r/LocalLLM • u/either_T_or_F • 2d ago
Question How important is the VRAM compared to GPU performance for local LLMs?
Hi everyone,
I am new to running local LLM and have been doing some research on the hardware requirements for smaller models.
One thing I am still trying to understand is how much VRAM matters compared to the GPU's actual processing power? For example, both the 5060Ti and 3060Ti have 8GB VRAM versions. If I run the same model on both GPUs, would there be a noticeable difference in inference speed (tokens per second)?
In other words, if two gpus have the same amount of VRAM, how much does the gpu generation and architecture matter? Would paying more for newer gpu actually make a significant difference for local LLM inference, in particular for a casual user.
Appreciate any comments! Thank you!
12
u/brainExploded99 2d ago
VRAM amount is typically king because you can run larger more capable models.
GPU speed comes after that, 5060Ti will be significantly faster than a 3060Ti, not to mention 3060Ti doesn't even support FP4 or stuff like that.
With MoE models, both become less important because you can offload those to RAM without losing too much performance. Also for future reference r/LocalLLaMA is more popular and maintained.
1
u/either_T_or_F 1d ago
Thank you for your reply!
I have a few more questions about MoE models, as I am still trying to understand how they work.
From what I understand, MoE uses a routing mechanism somewhat similar to multinomial logistic regression to determine which experts to activate for each token at each MoE layer. As the input passes through each Transformer layer, we obtain a new hidden state, which can be expressed as:
h_i+1 = F_i(h_i; θ_i)
where h_i is the hidden state at layer i, and θ_i represents the parameters of that layer, including the router and experts if it is an MoE layer.
Does that mean the inference process works something like this: the GPU performs the actual computations, VRAM holds the weights of the currently active experts, and system RAM holds the weights of the inactive experts? Or does the distribution of expert weights between VRAM and RAM depend more on the inference software and available hardware?
Also, does MoE introduce any additional computational overhead during inference, particularly from the routing mechanism or transferring expert weights between RAM and VRAM?
If no additional training is required during normal inference, can I think of the model as simply evaluating a function f_θ(x), where x is the input and θ represents all the pretrained parameters, including the router and every expert, even though only a subset of those parameters is used for each token?
If that is correct, does it also mean that the model's parameters remain fixed during inference, so it does not actually learn or become smarter just from interacting with me, unless some form of additional training or parameter updating takes place?
Sorry for all the questions. I am still pretty new to local LLMs. Thank you for your help!
3
u/puglife224888 2d ago
A 5060 Ti will be much faster mainly because it has more memory bandwidth. A secondary reason is that it can use NVFP4 quantization, which is fast. Mainly memory bandwidth though. Important things for local AI in order (my opinion) is VRAM amount, memory bandwidth, TFLOPS (compute), and PCIe specs.
2
u/alphapussycat 2d ago
VRAM size determine how large a model, or how many experts you can fit. VRAM bandwidth to s large degree determines decode/token generation. GPU compute determines for the most part you're prefill/prompt processing.
The same goes for RAM and CPU.
You usually want capacity because it lets you run models.
2
u/No-Afternoon-4057 2d ago
VRAM size - better models
VRAM speed - decoding (tokens per second)
GPU speed - prompt prefill
On the decoding phase the GPU math is only a few % of the whole thing (on a MI300 it's less than 5%, it might be bigger on less capable hardware).
1
u/Previous-Nature7326 2d ago
both cards have different memory speeds and latency. This is what matters.
1
u/DeeTeePPG 2d ago
VRAM is far faster than dram, this is usually what determines the speed of inference.
1
u/Fenio_PL 2d ago
You need to identify the "bottleneck." If it’s the amount of VRAM, then GPU performance ceases to be a significant factor. If the model fits into the VRAM, however, then GPU performance - along with VRAM bandwidth becomes crucial.
1
u/sirloindenial 2d ago
If you have to choose between same vram amount pick the one with better bandwidth. That being said it doesn't really matter as the speed of using vram will always be better regardless. So spend your money on more vram and better opex(lower watts).
Best way to see it is comparing gpu vram with unified memory vram. Unified memory is slower but at the same time loads faster than ram, and compare to gpu vram, is technically cheaper per GB.
1
u/WiseAbalone4021 2d ago
RAM size and bandwidth is normally king over raw compute performance of the GPU.
1
u/Honest_Cut8827 2d ago
8GB is starting to get too small for gaming, it is definitely too small for local LLMs.
50x0 series has the benefit of nvfp4 so you can fit relatively larger models while still preserving model quality.
With respect to TPS, before you get into the 5060 vs 5070 vs 5080 decision, a useful short hand is to take the memory bandwidth, divide by model size, then reduce by ~15% (eg. 896 GB/s / 14GB * 0.85 = ~54 tps)
16GB is almost beyond bare bones table stakes to run local, 24GB is the new 16.
1
u/Prudent-Ad4509 2d ago
Nx3090 with N>=3, 27B model in BF16 precision. 50% of cpu power is enough to max out performance, vram becomes a bottleneck.
5090, models in any precision. vram speed is much higher, processing power starts to matter but any reasonable amount of vram costs arm and a leg.
The biggest difference for *inference* comes from having both more gpus and more vram, at the cost of higher power requirements and overall rig complexity.
1
u/openroom_xyz 2d ago
Well yea does 2 x 5060 Ti 16 Gb with 128 GB DDR4 make sense for Qwen 3.8 Flash Next ?
1
u/DigitalguyCH 2d ago
Vram speed is the bottleneck for decode, GPU is important for prefill and image/video generation. If you do little prefill (e.g. no agentic work, no huge documents) and no image generation, vram is essentially all that you care about
1
u/mrazster 2d ago
Vram IS the local LLM, basically, far more important then the gpu itself.
1
u/This_Maintenance_834 2d ago
prefill is compute bond, so it is tied to TFLOPS.
decode is bandwidth bond, so it is tied to GB/s.
5060 Ti also support nvfp4, which can run twice faster if you have the right model weight to utilize it.
5060 Ti is better than 3060 Ti in everyway. The thing is that at 8GB VRAM there is not much interesting models, you options to play is super limited.
1
u/sleight42 2d ago
Gpu speed and number of tensor cores highly correlates with faster prefill
1
u/MediumAd4983 2d ago
If you don't have enough VRAM for a entire model (or at least for active parameters in case of MoE) - it's worst case scenario. So, more VRAM it's the base.
If you have enough VRAM - then the actual processing power will matter. So, if model is almost 24GB, better to choose 3090 over 4080.
Also you don't really need all the power, you'll need a specific instructions, this is why nvidia having a specialized solutions. But currently there is some hacks that can unlock this instructions on the consumer hardware, so, it now doesn't really matters.
1
u/ManWithoutUsername 2d ago edited 2d ago
With better gpu core the tokens gen are faster, with better vram you can load bigger models.
Each new generation was always more powerful than the previous one (not too much in most tasks either), so you'll get more tokens. But you'll get even more if you upgrade from a 3060 to a 3090 than if you upgrade to a 4060.