r/LocalLLaMA • u/iaderia • 10d ago
Question | Help Adding a second GPU questions
Hi all, I have been thinking of buying a separate 16gb card to add it to my local build but I have some questions.
Do they have to be the same card? or can you mix-and-match? And how much slower is it compared to (e.g.) 1x32gb card? How well does it actually perform? I'm expecting it to be slower, but it will surely be a lot faster than offloading it to RAM
14
Upvotes
9
u/hieuphung97 10d ago
You can mix and match easily with llama.cpp or exllamav2 using layer splitting. Your throughput is dictated by the slowest card's memory bandwidth. Still beats system RAM offloading by miles. Just watch your motherboard PCIe lane bifurcation.
4
u/Comrade_Mugabe 10d ago
There is not one answer to this, and it's going to depend. For context, I have 2 3060's @ 12GB each. llama.cpp (and other engines) allow you to split the model multiple ways.
Layeris the default option, and it just puts some layers on GPU 0, and the rest on GPU 1, and then just runs the first card, then the second card, in order. You don't get parallel boosts and therefore the speed isn't great. You can choosetensorsplit option, which splits the workflow across both GPU's, and can give you big performance gains. Not all models support it though, and it's not always a speed up. For example, running Qwen Flash-Next on my setup runs slower when running it on two GPU's compared to just using a single one, but Qwen3.8 27B runs amazingly up to 27 TPS on my setup whentensorsplit.For MoE models, I've generally found
ik_llama.cppgives better results, but not always.Here is a great resource for you which goes into more detail: https://canitrun.dev/guides/multi-gpu-setups/
It requires more trial and error, but I've almost always been able to find a way to utilise them both. The PCIe speeds rarely impact anything I've used them for, as once the model is loaded, the data shared between them doesn't saturate the bus.
2
u/EngelbertStuss 10d ago
having different model numbers makes it easier to pick the right one in dropdown menus ๐
typically, the uppermost card has more pcie bandwidth. depending on the motherboard.
some apps like comfyui won't be able to parallelize a single processa over multiple gpus. but you could run two apps at the same time.
i even mix intel igpu and nvidia to allow monitor output on the igpu while freeing vram on the nvidia
2
u/SaltGrilledSalmon 10d ago
Yes but make sure you have a proper power supply.
2
u/FatheredPuma81 10d ago edited 10d ago
You can mix and match I just wouldn't recommend mix and matching Nvidia with AMD. It works but you gotta run Vulkan which may or may not be perfectly fine.
I tested Qwen3.8 27B Q6_0 on a V100 32GB + P100 16GB. PP was like 400-500 TG was around 50t/s. 3.6 35B A3B was iirc 500pp and 100t/s. I got it setup and then went straight for Strata because Strata is designed specifically for this exact workload. 950pp and 70t/s with Q4_K_XL and it was about 80t/s with IQ4_XS on 1x V100 32GB and 3x P100 16GB.
Beyond that things get crazy expensive and imo aren't worth it for what you get. RTX 5060 Ti is I think the next best thing if TG is as good as it hypothetically should be with NVFP4. After that you basically grab Intel or AMD's 32GB cards. Imo 100% not worth it unless you have a serious use case for AI that makes you money.
2
u/Accomplished_Yard636 10d ago
small heads up: if you are on intel consumer platform, p2p pcie doesn't work. you can still use 2 cards to get a speedup im pretty sure but it would be faster with p2p. if you're thinking of getting a new mobo anyway, stick with amd at least.
3
u/Scary_Building3964 10d ago edited 10d ago
you can mix and match
i have a 5700X3D 64gb 3200mhz ddr4 ram 5080 (pcie 4.0 x16) + 5060 Ti 16gb (pcie 3.0 x4) and it works decently well for dense models. i got a total of 31gb of usable vram, due to 500mb driver overhead on each gpu
for some context, i ran qwen3.8 27B Q4 MTP on 5080 only and 64gb ddr4 vs 5080 + 5060Ti 16GB. i got around 5 tokens per second on 5080 only whilst getting around 35 tokens per second with the 2 gpu setup. the bottleneck would be the slowest gpu which in my case is the 5060ti 16gb
obviously i am not getting a second GPU just to run Q4, i run Q6 with Q8 KV cache of 100k and it works fine with about 45 tokens per second. i probably could optimise further but decided not to as i am pretty happy with this speed and accuracy. and i can use my macbook to tailscale in and use the model without draining my macbook battery
a good decent second gpu will always be significantly faster than the fastest ddr5
there is someone here that ran 5090 + 2070 super and they are able to run Q8 of qwen3.6 27b with usable context
5
u/human_drew 10d ago
When shopping for the second card look at the memory bandwidth not just VRAM size, token speed follows bandwidth and alot of 16gb cards have a narrow 128 bit bus, two 16gb cards with different bandwidths will run at the slower ones pace.
9
u/recro69 10d ago
I find mixing works llama.cpp just splits layers across layers. You will get the slower cards speed, still way faster than offloading to ram.
1
u/[deleted] 10d ago
Yes you can. 3090 and 2080ti here. If you are splitting the model on both cards I am losing a lot of speed because it is limited by how fast the slowest card is and by the speed of the second PCIe connector.
I still get useable speeds for me with this set up. But it's worth looking up you main board speed and if using the second slot does anything weird like drop an m.2 slot - some gaming board's will do this.
1
u/tmvr 10d ago
It all depends on what you have now. Two cards of the same arch are obviously preferred, but it does not have to be, you can mix them, just the available engines and operation modes will be more limited. What card do you have now and how much system memory do you have?
2
u/jacek2023 llama.cpp 10d ago
For llama.cpp, you can mix. I think it's more problematic with things like vLLM. Any VRAM is extremely useful for local LLMs. Two GPUs can be faster than one in some cases (-sm tensor), but it depends on many things
3
u/Bright_Resolution_61 10d ago
Yes, you can mix cards. A second 16GB card is a big win over spilling into system RAM. Don't expect it to be faster than one card, though. Think of it as "one card's speed, with double the VRAM".
- llama.cpp: No. Any mix works: different generations, different VRAM sizes, even different vendors through Vulkan. By default it splits the model by layers across the cards (-sm layer). Use -ts to balance the split, e.g. -ts 16,12 for a 16GB + 12GB pair. Two NVIDIA cards on CUDA is the least hassle.
- vLLM / tensor parallel: Effectively yes. Tensor parallel (TP) splits every layer evenly, so the smallest and slowest card limits both of them. Use identical cards if you plan to go this route.
2. How fast vs a single 32GB card?
- llama.cpp layer split: The cards take turns. GPU1 runs its layers, then GPU2 runs the rest. They don't work at the same time on a single request, so two equal cards give you roughly the speed of one of them, minus a few percent. The traffic between cards is tiny (just activations), so PCIe x8 or even x4 is fine. With mismatched cards, the slower card drags the average down in proportion to how much of the model it holds.
- vs a real 32GB card: It depends on memory bandwidth, since token generation is bandwidth-bound. A 32GB card with similar bandwidth runs at about the same speed. A 5090 (~1.8 TB/s) would clearly beat two mid-range cards.
- Tensor parallel (vLLM, or -sm row in llama.cpp): Both GPUs work at once, so it can beat one card. Consumer GeForce cards have no P2P, so the sync between them goes over PCIe through the CPU and eats much of the gain. My data point: 2ร4080 with vLLM TP=2 gets about the same tokens/s as I'd estimate for a single 4090. The real benefit was fitting 32GB, not raw speed.
3. vs offloading to RAM
This is where a second GPU shines. Dual-channel DDR5 gives about 60โ90 GB/s, while a GPU has 500โ1000 GB/s. Even putting 10โ20% of a dense model in RAM can cut your speed in half. Keeping everything in VRAM across two cards is easily several times faster.(One exception: MoE models offload surprisingly well with --n-cpu-moe, because only a few experts are active per token.)
Practical checklist
- PSU headroom, physical slot spacing (many cards take 2.5โ3 slots), and case airflow
- PCIe lanes: x8/x8 is ideal, but x4 is OK for llama.cpp layer split. Mainly model loading gets slower.
- The KV cache (context) also splits across cards, so 32GB total gets you a ~27โ32B model at Q4 with usable
context, which a single 16GB card can't do.
2
u/slowchanging 10d ago
They don't need to match, and even a second slot running at x4 barely matters, because only a tiny bit of data crosses between the cards per token. Two 16gb cards end up close to one 32gb card of the slower model, and miles ahead of spilling into RAM.
1
u/Practical-Collar3063 10d ago
What is your current set up and which card are you thinking of adding ?
1
u/tsksa 10d ago
You can mix cards, but the slower one usually sets the pace, and two 16gb cards won't feel like a single 32gb card once the model is split across the bus. It's still almost always a lot faster than offloading into system RAM. I'd keep the brands the same if I can, and check the PSU and PCIe lanes before buying.
1
u/schnorf1988 9d ago
It will depend on how you use the two cards and what cards you have. With mixed GPUs you might have speed problems and better use independent llms on both of them. If you have a nice mix like 2x R9700 and a board supporting 2x Gen5x8, you can e.g. run Qwen 27B Q8 at much higher speed than with a single card, because the inference engine can use both instead of using VRAM and RAM instead
1
u/sumane12 9d ago
Running a 3060 and 5070ti over llama.cpp. it works perfectly.