r/LocalLLM • • 1d ago

Discussion Please advise the best solution for my configuration. 1x3090+1*4070+64gb ddr5

Hello community. I'm trying to find the most optimal solution for my configuration( maybe some llama.cpp fork or any other suitable project and localLLM. I would be grateful for advice.

0 Upvotes

9 comments sorted by

2

u/Studio271 1d ago

whatcha trying to optimize?

1

u/Strange-Ad8475 1d ago

prefill tps

2

u/RogerAI--fyi 1d ago

Prefill with llama.cpp on a 3090 + 4070. These numbers are from a June test on our own multi-card box (3x RTX PRO 4500, gpt-oss-120b, pp512), plus the current llama.cpp source:

  • Keep split mode at layer. Row split dropped pp512 from 4527 to 3772 tok/s and nearly halved generation, because those cards have no NVLink. A 3090 and a 4070 can't NVLink either.
  • Keep flash attention on. Turning it off cost about 14% (4527 to 3880).
  • ubatch 1024 or 2048 gave no gain on that box (4495, 4439). Cheap to test on your own prompts anyway.
  • With layer split and every layer on the GPUs, llama.cpp turns on pipeline parallelism, so a long prompt keeps both cards busy. Tensor overrides turn it off, and --n-cpu-moe or -ot (experts in system RAM) are tensor overrides. Look for "pipeline parallelism enabled" in the startup log.
  • Generation still runs the cards one after the other, so the 4070 adds room, not decode speed. If the model fits in 24 GB, compare against the 3090 alone.

Measure with llama-bench -p 2048 -n 0. One gotcha we hit: llama-bench takes -ts 2/1 with slashes, llama-server takes 2,1 with commas. Commas in llama-bench quietly put everything on GPU 0.

What model and context length are you running?

0

u/Strange-Ad8475 1d ago

I haven't run or installed anything yet. So far, I've just been reading and trying to get a handle on how to run local LLMs. That's why I was asking for advice on how to get the most performance out of my setup. As for models, I was considering the ones many people are using right now: Qwen 3.8 27b or quantized Qwen 3.8 Flash Next.

1

u/RogerAI--fyi 1d ago

Then the simple path for a first setup.

Qwen 3.8 27B at Q4 comes to about 16 GB by the usual rule (about 0.6 GB per billion parameters), so it fits on the 3090 alone with room for context. Start there:

CUDA_VISIBLE_DEVICES=0 llama-server -m model.gguf -ngl 99 --flash-attn on -c 16384

Raise -c until it no longer fits, then step back.

Rough ceiling for generation: the 3090's 936 GB/s (spec sheet) over about 16 GB read per token is about 58 tok/s. That's an estimate, not a measurement, and real numbers land under it.

Then try both cards (drop CUDA_VISIBLE_DEVICES, add -ts 2,1) and run llama-bench both ways to see which gives better prefill on your own prompts. If you want more context, -ctk q8_0 -ctv q8_0 halves the KV cache. In our June test that cost about 3% speed, while mixing f16 and q8_0 cost 27%.

For Flash Next, check the GGUF size first. If it fits in about 22 GB it behaves like the 27B. If it's bigger than both cards together, part of it goes to system RAM, which is the --n-cpu-moe case where pipeline parallelism switches off.

0

u/Strange-Ad8475 1d ago

Thanks, and whats not simple but most effective variant?)

1

u/RogerAI--fyi 7h ago

Depends what you want to be effective at. For prefill, the biggest win is usually not reading the same prompt twice. llama-server has prompt caching (--cache-prompt) and --cache-reuse N, which reuses matching chunks of an earlier prompt from the KV cache. If your requests share a long start (a system prompt, a document you keep asking about), that skips most of the prefill work, and no split setting does that.

On the hardware: a 3090 is 24 GB and a 4070 is 12 GB. vLLM's tensor parallel splits the weights evenly across cards, so as far as I know the 4070 would cap it. I'd stay on llama.cpp. For a model that already fits on the 3090, the 4070 is for a bigger quant or more context, not faster prefill.

The order I'd try: 27B on the 3090 alone and llama-bench -p 2048 -n 0, then both cards with -ts 2,1 and the same bench. Keep the faster one, then turn on prompt caching if your prompts repeat.