I'm planning on building a PC with 64GB VRAM (two RTX 5090s) and 512 DDR4 RAM with…
- User
I'm planning on building a PC with 64GB VRAM (two RTX 5090s) and 512 DDR4 RAM with 8x64GB sticks and a threadripper 3975wx. What llms can I run inference on and what performance should I expect ? Will the 64GB VRAM help with performance if the model is split between VRAM and RAM?
Assistant
Okay, let's break down this powerful (and hypothetical, regarding the RTX 5090) build for LLM inference.
Hardware Analysis:
- CPU (Threadripper 3975WX): 32 cores / 64 threads. This is a beast for multi-threaded tasks. While inference is primarily GPU-bound, the CPU plays a role in data loading, pre/post-processing, and potentially handling parts of the model if offloading occurs. A strong CPU like this is excellent for managing the overall process and handling CPU-based inference if needed, though it won't match GPU speeds.
- RAM (512GB DDR4): This is a massive amount of system RAM. It's far more than typically needed just for the OS and common applications. Its primary benefit for LLMs will be:
- Loading extremely large models entirely into system RAM if they don't fit in VRAM (though this will be slow).
- Holding intermediate data, datasets, or running multiple processes.
- Crucially, acting as a buffer/offload target when VRAM is insufficient (more on this later).
- DDR4 speed is slower than DDR5, but the sheer capacity is the key advantage here.
- VRAM (64GB Total): This is the most critical component for LLM inference speed. You mention "two RTX 5090s". As of now, the RTX 5090 doesn't exist. The current top-end consumer card is the RTX 4090 with 24GB VRAM. Professional cards like the Nvidia RTX 6000 Ada have 48GB.
- Assumption: Let's assume you mean you have two high-end cards that provide 64GB of VRAM in total. This could be two hypothetical future cards (each 32GB), or perhaps you're combining a 48GB card (like A6000 Ada) with another or misstated the total. Regardless, 64GB total VRAM is a significant amount for consumer/prosumer setups.
- Implication: This much VRAM allows you to load larger models entirely into GPU memory, which is essential for achieving high inference speeds.
What LLMs Can You Run?
With 64GB of total VRAM, you're in a great position for running large, powerful models, especially when using quantization techniques:
-
Quantized Large Models (Highly Recommended):
- ~70 Billion Parameters: Models like Llama 2 (70B), Llama 3 (70B), CodeLlama (70B), Mixtral 8x7B (MoE, effectively uses ~47B parameters per token forward pass) become very manageable.
- Quantization: Using 4-bit quantization (like GPTQ, AWQ, or GGUF q4/q5 formats) drastically reduces the VRAM footprint. A 70B parameter model typically requires around 140GB in full FP16 precision, but quantized to 4-bit, it might only need ~35-45GB.
- Performance: Fitting these quantized models entirely within your 64GB VRAM should yield very good performance. The dual GPU setup means the model might be split across the cards depending on the software, requiring effective inter-GPU communication.
-
Medium Models (Unquantized or Lightly Quantized):
- Models in the 13B to 40B parameter range (e.g., Llama 3 8B/70B, Mistral 7B, Mixtral 8x7B) can likely be run in FP16 (16-bit) or BF16 precision, possibly even fitting larger ones with specific optimizations or slightly lower quantization.
-
Very Large Models (Potential Offloading):
- Models exceeding 64GB even when quantized (e.g., some experimental 100B+ models) could potentially be run by utilizing your massive system RAM. However, this relies heavily on software support for splitting layers between VRAM and system RAM (CPU offloading).
Expected Performance:
- VRAM Only (Ideal Scenario): If a quantized 70B model fits entirely within your 64GB VRAM (e.g., ~40GB usage), you should expect good to excellent inference speeds. This typically translates to generating text in the range of 15-50+ tokens per second, depending heavily on:
- The specific model architecture.
- The quantization method (GPTQ, AWQ, GGUF variants).
- The inference software used (e.g., vLLM, TGI, ExLlamaV2, Oobabooga's text-generation-webui, LM Studio). These tools have different levels of optimization.
- Context length and batch size.
- Interconnect speed between your two GPUs (PCIe lanes, NVLink if supported and utilized).
- VRAM + RAM Offloading (Compromise Scenario): If you run a model that requires more than 64GB VRAM, the system might offload some layers/tensors to your 512GB system RAM.
- Performance Impact: This will result in a significant performance degradation. Accessing system RAM is orders of magnitude slower than accessing VRAM. Instead of 15-50+ t/s, you might see speeds drop drastically, potentially to 1-10 t/s or even lower, depending on how much is offloaded and how efficiently the software manages the data transfer. The Threadripper CPU will help process the layers run on the CPU, but the memory bandwidth bottleneck between RAM and VRAM (or just within RAM for CPU processing) is the main limiting factor.
Will Splitting Between VRAM and RAM Help Performance?
Let's clarify the scenarios:
- Splitting between GPU 1 VRAM and GPU 2 VRAM: If a model is slightly too large for one of your hypothetical 32GB cards but fits within the combined 64GB across both cards, splitting the model (model parallelism) across the two GPUs is necessary. This will work, and performance will be good, assuming efficient communication between the cards. This is different from using system RAM.
- Splitting between VRAM and System RAM (Offloading): Yes, this absolutely helps in the sense that it enables you to run models that would otherwise be impossible due to VRAM limitations. Your 512GB of RAM is fantastic for this, as it provides a large pool to offload to. However, it does NOT help performance compared to running entirely in VRAM; rather, it dramatically reduces performance due to the speed difference between VRAM and RAM.
In summary:
- Your build is very capable, especially with the large VRAM and massive system RAM.
- You can run powerful quantized models up to ~70B parameters very effectively, likely achieving good token generation speeds (tens of tokens/sec).
- You can attempt to run even larger models by offloading layers to system RAM, enabled by your huge 512GB pool. This makes larger models possible but comes at a severe speed cost (single-digit tokens/sec).
- Ensure your chosen inference software supports multi-GPU configurations (like TGI, vLLM, ExLlamaV2) and potentially CPU offloading (like llama.cpp's GGUF format with
--n-gpu-layersor LM Studio's offload settings).
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.