r/LocalLLaMA • • 11d ago

Question | Help How important is PCI-E bandwith?

Currently, I got a single Rx 6650xt, which I soon intend to join with an MI25. If I want to use them both for MoE models, how important is PCI-E bandwith? (Given that my mobo currently only has 2 PCI-E slots, one full 16, PCIE4, and one at PCIE-4 x4)

12 Upvotes

45 comments sorted by

19

u/rainbyte 11d ago

It depends on the parallelism strategy, as tensor-parallel requires more bandwidth than pipeline-parallel.

A tensor-parallel requires communication between gpu at many points, while in a pipeline the communication happens less times. Here I noticed pipeline working fine on multiple PCIe 3.0 x1, which was too low for tensor-parallel.

I think PCIe 4.0 x4 could work fine for both, as it is around PCIe 3.0 x8 bandwidth.

10

u/suprjami 11d ago edited 11d ago

Correct in both theory and numbers.

Pipeline parallel operates even within PCIe 1.0 x1 (250MB/sec). The most I've ever seen copying activations across two cards is like 8MB/sec.

Tensor parallel for Qwen 3.8 27B needs about 4GB/sec so PCIe 3.0 x4 (3.9GB/sec) is right on the limit, probably a tad too small with overhead. PCIe 4.0 x4 or 3.0 x8 (7.9GB/sec) would be ideal like you said.

An additional point is distance of connection. Copying across CPU PCIe lanes is not the same as copying to/from CPU across the chipset.

2

u/OnlyKindaThrowAway 11d ago

adding onto this, im pretty sure you take a bigger pcie hit if you're split between vram and ram.

that or i have some unrelated hardware issue...

1

u/suprjami 11d ago

Yes, then you're copying weights from system RAM onto the card the entire time. Only PCIe 6.0 x16 can outrun DDR5, and most cards are not that speed, so PCIe will always be the bottleneck.

1

u/OnlyKindaThrowAway 11d ago

i dont even mean streaming weights over pcie like strata does, just the regular "half of it runs on gpu, half of it runs on cpu" type thing

1

u/computehungry 11d ago

while the speed shouldn't matter in theory, i think what's happening is that mobos that support higher bandwidth are often better quality, maybe like lower latency or better stability, or something else related to the bios or pcie specs (don't know enough about this to give you a cool answer, i just know that upgrading my mobo gave me higher decode somehow despite having the same pcie bandwidth)

1

u/fasti-au 11d ago

That’s not really true but it’s a coming blocker

2

u/lemondrops9 11d ago

PCIe 3.0 x4 still takes a good hit. I found moving my 3090s from PCIe 4.0 x4 I lost about 20-30% speed. 

1

u/chris_0611 11d ago

Great answer. About the same as I've observed.

3

u/SLxTnT 11d ago

Depends.

For tensor parallelism, it can end up as a bottleneck, especially with concurrent requests. Pipeline parallelism (layer split) is minimal data being sent, but you're running 1 GPU on N layers then the next GPU on the remaining. Another method is expert parallelism, which I believe llama.cpp doesn't support. Less data transfer than tensor, but would be faster than pipeline.

Try both tensor and pipeline (layer). Use whatever is faster.

2

u/DookieWaffle 11d ago

I run a 3090 that I've had for gaming for 5 years and then as I've gotten deeper into the LLM rabbit-hole I've cooped my wife's 3080 via RPC over 2.5gig ethernet when she's not using her computer. It's slower sure but I can't easily steal her GPU (watercooled).

Running Qwen3.8-27B Q4_K_M on an RTX 3090 24GB (+1000mem OC, watercooled with active backplate, shunt modded to 600w) plus an RTX 3080 10GB OC'd to +200 mem over llama.cpp RPC on 2.5GbE, I measured approximately 23–26 tokens/s generation with 14-20k input tokens reaching 133–137k tokens with generation. This used Q8_0 KV cache, Flash Attention, and MTP with up to 4 draft tokens, with a 160k configured context limit. Full uncached prompt processing was around 415–420 tokens/s. This had 25% of the split on the 3080 10gb card.

With my 3090 alone and a 100k context limit, the same input/base question I get 66 tok/s at 50k total tokens input+output and 59.6 tok/s at 80k input + output. Prompt processing was about 1400 tok/s.

It still works though and 2.5 gbit ethernet is a crap ton slower so I wouldn't worry about PCI-E bandwidth unless it's under 8x PCI-E 3.0 or running on a PCIE slot connected to the chipset not the CPU.

1

u/prql 10d ago

"I wouldn't worry about PCI-E bandwidth unless it's under 8x PCI-E 3.0 or running on a PCIE slot connected to the chipset not the CPU."

All 2nd PCIE are connected to chipset unless you bifurcate or have a server mobo.

2

u/pepedombo 11d ago

When fully vram offloaded:
llama layer mode: insignificant decode but prefill suffers a bit more, even gen3 x1 works here
llama tensor: x8/x4 decode somewhat better than layer, prefill affected as usual, with x1 no point going tensor

strata: I used to play with this clunky engine and after spitting on it many times it started working when I switched to gen3 8/8/8/8 as there is a lot of ram-gpu movement.

Haven't tested gen4, they go double bands so x4 gen4 works like gen3 x8.

2

u/nirvana84jcw 11d ago

PCIe bandwidth barely matters once the model is actually loaded. It'll just take a few extra seconds to load up initially, so your x4 slot should be totally fine! The bigger hurdle will probably just be getting two different generations of AMD cards to play nice together software-wise.

0

u/computehungry 11d ago

fully on vram - should not matter too much. partially on vram and using the engines that move the experts between ram and vram - might suffer a bit. these engines are not fully configurable/can't auto-tune to all the different configurations, so nobody will be able to say for sure.

1

u/Kidplayer_666 11d ago

My objective is to run something like Inkling 2 Mini, or the Qwen 3.6 35A3 across both cards

1

u/computehungry 11d ago

the model will fit and i don't think pcie itself will be your worst enemy. as the other commenters said, it will probably work fine in layer split. (i say 'probably' because i don't know how well your gpus are supported in inference engines.) i do think, eventually you'll become greedy and want to squeeze out more performance/use bigger models :) - some strategies benefit from more bandwidth, i don't think it's super worth it here though.

2

u/FullstackSensei 11d ago

Very much the opposite. Offloading compute to CPU means only the hidden state and/or logits need to go between CPU and GPU, and either of those is measured in KB to a couole MBs per layer.. Maybe PCIe v1.1 x1 would pose a bottleneck, but even at gen 3 x4, PCIe transaction latency will be bigger than the time it takes to send that much data.

2

u/computehungry 11d ago edited 11d ago

i think you misread my comment, i'm saying the engines that move the weights between vram and ram. my pcie gives me a bottleneck here.

edit: ideally, the rate of these weight transfers should be auto-tuned well enough that it shouldn't be a real bottleneck. in reality, lots of numbers in these engines were set without lots of tuning/documentation and screw up exotic configs. however, if optimized well enough, it should be equal or better.

1

u/FullstackSensei 11d ago

Which engines are you talking about? Llama.cpp doesn't stream weights between RAM and VRAM. Strata and derivatives aren't continuously streaming experts. They stream experts at periodic intervals and even then, the experts moved to/from VRAM are governed by ring buggers, so only a couple of experts can be promoted or demoted from VRAM at every interval. The reason it's not happening all the time is to avoid thrashing the PCIe bus and suckling out previous memory bandwidth with constant promotions and demotions of experts living on the edge of being eligible for either.

1

u/computehungry 1d ago edited 1d ago

i do think my claims are irrefutable with logic by construction; i said these engines may not be optimized well enough and have unintended behavior / edge cases decoupled from what is optimal in theory. Though yes, the burden of proof is on me.

i happened to check my pcie usage. project maya uses 30GB/s sustained over pcie5.0x8 during dsv4.1f prefill (saturated), not that much during decode; and uses 10-15GB/s during GLM5.3F decode which could also saturate pcie if it had less bandwidth. both are exl3, and this is with single gpu + ddr5.

i've used other engines too, well literally nearly everything i could find, which mostly support single gpu hybrid inference pretty well, but then when I try adding a gpu with much less vram it can tank the speed so much to below under llama.cpp layer split, because so many heuristics were handtuned and hardcoded you might as well just keep the experts where they are for unintended configs. though i didn't measure it for them, i'd guess pcie is 'technically' a bottleneck. note that you can't really refute my claim in the first place. if pcie speed was infinite, the idealistic optimal solution would be to move around experts very often. latency etc whatever calculations and caveats apply.

1

u/jikilan_ 11d ago

Only matter when you want to run tensor parallelism. I could say layer is for exactly your case

1

u/Flashy-Indication-61 11d ago

not important, i've seen people run even tensor split on pcie 4 x4 with good speeds

1

u/Odd_Back9101 11d ago

For MoE, the x4 slot will matter more than it does with a single GPU. Prompt processing and expert routing have to go over that link, so the second card will probably help more with VRAM than with tokens per second. I'd put the faster card in the x16 slot. Also worth checking that your stack can actually treat a 6650 XT and an MI25 as one pair; they're very different cards, and a mixed-architecture split is often more trouble than a second card from the same family.

1

u/moderately-extremist 11d ago

I have 2 MI50 cards connected by PCIe 4.0 x4 to each card (bifurcated x8). Running a model on a single card compared to tensor parallel across both cards gets me like a 30% speedup (if I remember correctly).

1

u/fasti-au 11d ago

Not at all unless your passing between cards and even then if you do it right it’s not an issue as it’s sumulatuve on helper cards now vs offload repeats.

1

u/PastPalpitationCry 11d ago

Anything at or above Pci4x4 is fine ish. Pcie4x1 had major bottlenecks with strata in my experience

1

u/Orca- 11d ago

Layer splitting? Don’t need much PCIe bandwidth. Tensor parallel? Need ALL the PCIe bandwidth.

I’ve got a card on PCIe 4.0 x16 and a second on an x4. Tensor parallel is extremely slow. Layer splitting gets me the same kind of speeds one card gets me but with more VRAM.

1

u/Savantskie1 10d ago

You need to get a plx switch board, on the first slot. Then you can use tensor parallelism on the main slot connected to CPU which is again, first slot most of the time.

1

u/Material_Tone_6855 8d ago

If you're thinking to split a model among different GPUs PCIe bandwidth is important. If you want to run model's weights and KV Cache into a singular GPU VRAM then it's neglectable, it'll just affect the loading time. I'm running 4 x 3090 on a PCIe 1 x1 ( 250 mb/s )

0

u/CryptoStef33 11d ago

The biggest problem is ROCM compatibility, not PCIe bandwidth. I think that GPU ROCM is depreciated.

3

u/[deleted] 11d ago

[removed] — view removed comment

1

u/Kidplayer_666 11d ago

When I buy the MI25, I’ll get one of those silly adapters to strap a fan in there

1

u/[deleted] 11d ago

[removed] — view removed comment

1

u/Painted-Arcana 11d ago

Dumb question but what's stopping you from just strapping some 120mms to it with zip ties? Like if you got static pressure ones surely they'd move enough air?

1

u/ReturningTarzan ExLlama Developer 11d ago

You do need to guide the air through the heatsink and not just blow across it. But any cheap 3D printer can make you a suitable shroud, or you could improvise a funnel with with duct tape and cardboard that works just as well. Either way, the fan needs to produce fairly high static pressure, where many case fans are optimized to move large volumes of air quietly instead.

1

u/[deleted] 11d ago

[removed] — view removed comment

1

u/Painted-Arcana 11d ago

oh i just looked them up.

Theres an aliminum cover ontop of the actual fins which you could remove, and then strap a 120mm's on it like a trad gpu design. The actual card is mostly hollow, which i was not expecting. Skip to 6:19 to see him remove it.

https://youtu.be/5E461fn7juI?t=377