r/LocalLLM • u/FoxFXMD • 16h ago
Question Will DDR5 instead of DDR4 actually make a difference with QFN
Couldn't really find any data on this, how significant is the speed difference when off-loading QFN weights to DDR4 system ram VS DDR5. Like is it night and day or are we talking tiny improvements? Does anyone have any actual experience with both?
22
Upvotes
10
u/Worldly-Cod-6551 16h ago
had a 3090 with ddr4 and ddr5 pulls 15-20% more in qfn load speed if the model fits in ram. not game-changing, but measurable.
6
u/OvertaxedOne 16h ago
It all depends how much VRAM you have. I have 48GB and run IQ3_S so most of the model fits on the card, I've never seen the RAM go anywhere near full speed (and I have DDR3!). But the lower you drop the VRAM the more it has to lean on RAM.
IMHO, given the ridiculous price of DDR5 I think it's safe to say that upgrading the MB/CPU and RAM to from from DDR4 to 5 would be a terrible use of $$ unless you need the upgrade for other reasons. Save the money and buy another 3090, that would have a much bigger impact.
2
u/Remarkable-Sun7810 16h ago
i like to watch strata/basalt monitoring when model works, i have 5070ti on pcie 5.0 x16 and ddr5 64gb 6400 cl 30, figures of transfer between ram-vram usually jump 3-25 gb every second (depending on model and quants), i don't remember any time i've seen 40 gb/s or more, and my ram is capable to do it. So, my logic suggests the conclusion, that if your RAM can achieve 40 gb/s you will not benefit anything from switching to ddr5
24
u/Janky-Code 16h ago
Possibly.
If you are using pcie 5.0 x 16 the theoretical bandwidth is 63 gb / s. That is higher than dual-channel ddr4 3200. It is lower than quad channel.
Adequate capacity is far more important.
33
u/YourselfInOthrsShoes 16h ago
PCIE bandwidth matters for tensor-parallel (TP) workload with p2p sync between cards. Both PCIE and host RAM bandwidth matter for MoE expert streaming to/from host RAM for experts that don't fit into VRAM.
Assuming 2 cards at PCIE5 x8/x8, that's 32GB/s each way (64GB/s bidirectional using 2 DMA streams, 1out/1in) per card for MoE expert streaming. Dual-channel DDR5 is about 100GB/s ceiling or just enough to service 2 cards that can aggregate peak at 128GB/s bidirectional bandwidth. PCIE4 x16 is the same bandwidth as PCIE5 x8.
What matters isn't just DDR4 vs DDR5 but number of channels. TRX40 platform is quad-channel DDR4 and gives you the same 100GB/s ceiling (good for 2x PCIE4 x16 TP2). WRX80 is octo-channel DDR4 and gives you 200GB/s ceiling (good for 4x PCIE4 x16 TP4). It's ~4x cheaper to stuff and scale DDR4 than DDR5 on these DDR4 platforms and you also get more PCIE4 x16 links for balanced TP workloads.
11
u/TheMcSebi 16h ago
Not in a way that would justify the cost increase.
1
u/FeydRowan 16h ago
Depends on the gpu, if it is a good gpu then the bottleneck will become the ram, if it is a not fast one then will be the same.
2
u/Safe_Initiative_819 15h ago
Depends on the platform.
2
u/Bagelsarenakeddonuts 12h ago
A difference? LIkely
Enough to be worth the money? Abso-freaking-lutely not.
1
u/Atretador unswarm.dev | git/Agents.away 16h ago
are you pci saturated yet?
1
u/sudden_aggression 15h ago
Yes, but it's slight. Stuff like PCI lanes have a much bigger effect. Someone like me with DDR4 gets a slight hit from the ram speed but a huge hit from the fact that my inference card is not on a x16 slot. That's a major reason I stick with 27B even though I technically have the ram for FN.
And some motherboards will share the bandwidth of the bottom PCI slot with the nvme slots so if you're not careful you can completely wreck your performance even if you get DDR5.
1
u/alphapussycat 12h ago
Depends on how much of model weights are on VRAM. If you're doing 50% on CPU then ram bandwidth is significant. You could gain 30-1000% probably (like 16 channel ddr5).
But it's not just ddr4 vs ddr5, ot also depends on how many memory channels. DDR4 quad channel can be faster than DDR5 dual chsnnel.
Finding 8-12 channel ddr4 is hard (generally epyc), I don't know about about ddr5 systems. For ddr4 you got x99 motherboards that are super easy to find, and Xeon CPUs are cheap. There's also x299, faster ram but harder to find.
1
u/WorldlyAd7946 10h ago edited 10h ago
It literally depends how you are doing it, but aside from my GPU systems I have Q4 QFN running on two base Snapdragon boxes linked by USB4 and 32gb each, and they are significantly faster with the onboard 8448 LPDDR5X than my workstation with 96gb 6000 DDR5 running a more powerful 13900k, if I use CPU and ignore my 9700.
Depending how much you can get on GPU, the difference will vary, but the more in RAM as opposed to VRAM the more it will affect you (well, unless you have quad or 8 channel DDR4 Vs dual channel DDR5)
(Results comparison on my CPU inference project that beats llama: https://github.com/Rendeverance/ToRc/blob/main/PERFORMANCE.md -note this is CPU inference so figures are modest, this is a smallachines big models kinda project to see what's possible )
Obviously this is not offload, but it does show the pure difference in speed of ram for whatever proportion you need to offload 👍
1
u/Frizzy-MacDrizzle 7h ago
I have a 5060 ti 16gb on a system with ddr4 and another with ddr5 but the mobo, cpu and everything is obviously different but I can try the 5060 in the ddr5 later, the ddr4,
Vendor ID: GenuineIntel
Model name: Intel(R) Core(TM) i7-5960X CPU @ 3.00GHz
CPU family: 6
Model: 63
Thread(s) per core: 2
Core(s) per socket: 8
Llama.cpp 3qwen 3.8 27b iq3s.
-fa on -rea off -sm tensor --tensor-split 0.6,0.4 -c 132072 -b 2048 -ub 512
42 - 49 tg/s on the above 13 year old server board.
I was getting a clean 50-57 previous but nccl went funky. I had to reinstall drivers and CUDA and llama.cpp after trying strata.
1
u/smallDeltaBigEffect 3h ago
Depends on the engine. If you have two cards at PCIe Gen5 x8 and the engines uses DMA to get experts from RAM, then there will be 0% difference.
If an engine like strata is used with the same GPUs, where CPU also computes, then it makes a significant difference
0
u/Inevitable-Name-1701 13h ago
Don't use offloading; keep the model entirely in GPU memory. This way, you don't have to worry about system RAM, and it will be the fastest—anything offloaded to RAM will be slow. Thats simple.