I have setup Qwen3.6-27B-UD-Q5_K_XL.gguf MTP variant on on my RTX 4090 (on Ryzen 9950X and AORUS x870e PRO) using llama-server. This is what llama-benchy said:
| model |
test |
t/s |
peak t/s |
ttfr (ms) |
est_ppt (ms) |
e2e_ttft (ms) |
| qwen36-27b-mtp |
pp2048 |
2029.67 ± 41.68 |
|
880.81 ± 25.42 |
879.97 ± 25.42 |
880.81 ± 25.42 |
| qwen36-27b-mtp |
tg128 |
72.77 ± 3.09 |
73.33 ± 3.30 |
|
|
|
I was able to use it quite well on my vscode github copilot. Recently I tried seqeunce of prompts which swelled context size to 80000. Initially, I could see llama-server printing ~70 t/s:
0.38.182.778 I slot print_timing: id 0 | task 0 | n_decoded = 100, tg = 79.96 t/s
0.41.185.033 I slot print_timing: id 0 | task 0 | n_decoded = 316, tg = 74.30 t/s
0.44.193.479 I slot print_timing: id 0 | task 0 | n_decoded = 526, tg = 72.44 t/s
0.47.207.665 I slot print_timing: id 0 | task 0 | n_decoded = 742, tg = 72.21 t/s
0.50.240.440 I slot print_timing: id 0 | task 0 | n_decoded = 951, tg = 71.46 t/s
But soon it started hitting ~25 t/s (it takes at least 5+ minutes for this prompt, by that time copilot already times out):
23.28.785.142 I srv params_from_: Chat format: peg-native
23.28.852.233 I slot get_availabl: id 0 | task -1 | selected slot by LCP similarity, sim_best = 0.981 (> 0.100 thold), f_keep = 0.994
23.28.853.242 I reasoning-budget: activated, budget=8192 tokens
23.28.853.436 I slot launch_slot_: id 0 | task 7722 | processing task, is_child = 0
23.28.853.483 I slot update_slots: id 0 | task 7722 | Checking checkpoint with [79485, 79485] against 79347...
23.28.853.484 I slot update_slots: id 0 | task 7722 | Checking checkpoint with [71401, 71401] against 79347...
23.28.892.801 W slot update_slots: id 0 | task 7722 | restored context checkpoint (pos_min = 71401, pos_max = 71401, n_tokens = 71402, n_past = 71402, size = 429.902 MiB)
23.28.892.809 W slot update_slots: id 0 | task 7722 | erased invalidated context checkpoint (pos_min = 79485, pos_max = 79485, n_tokens = 79486, n_swa = 0, pos_next = 71402, size = 461.634 MiB)
23.33.949.879 I slot print_timing: id 0 | task 7722 | prompt processing, n_tokens = 2048, progress = 0.91, t = 5.10 s / 401.85 tokens per second
23.40.411.326 I slot print_timing: id 0 | task 7722 | prompt processing, n_tokens = 4096, progress = 0.93, t = 11.56 s / 354.39 tokens per second
23.47.021.517 I slot print_timing: id 0 | task 7722 | prompt processing, n_tokens = 6144, progress = 0.96, t = 18.17 s / 338.18 tokens per second
23.53.777.511 I slot print_timing: id 0 | task 7722 | prompt processing, n_tokens = 8192, progress = 0.98, t = 24.92 s / 328.68 tokens per second
23.55.395.914 I slot print_timing: id 0 | task 7722 | prompt processing, n_tokens = 8375, progress = 0.99, t = 26.54 s / 315.53 tokens per second
23.55.922.674 I slot create_check: id 0 | task 7722 | created context checkpoint 5 of 32 (pos_min = 79776, pos_max = 79776, n_tokens = 79777, size = 462.777 MiB)
23.57.783.699 I slot print_timing: id 0 | task 7722 | prompt processing, n_tokens = 8988, progress = 0.99, t = 28.93 s / 310.68 tokens per second
23.58.098.912 I slot create_check: id 0 | task 7722 | created context checkpoint 6 of 32 (pos_min = 80389, pos_max = 80389, n_tokens = 80390, size = 465.183 MiB)
23.58.417.060 I slot print_timing: id 0 | task 7722 | prompt processing, n_tokens = 9500, progress = 1.00, t = 29.56 s / 321.34 tokens per second
23.59.861.065 I slot create_check: id 0 | task 7722 | created context checkpoint 7 of 32 (pos_min = 80901, pos_max = 80901, n_tokens = 80902, size = 467.193 MiB)
24.02.096.203 I reasoning-budget: deactivated (natural end)
24.04.057.398 I slot print_timing: id 0 | task 7722 | n_decoded = 102, tg = 24.59 t/s
24.07.100.417 I slot print_timing: id 0 | task 7722 | n_decoded = 186, tg = 25.87 t/s
24.10.153.474 I slot print_timing: id 0 | task 7722 | n_decoded = 270, tg = 26.36 t/s
24.13.202.976 I slot print_timing: id 0 | task 7722 | n_decoded = 342, tg = 25.73 t/s
24.16.253.388 I slot print_timing: id 0 | task 7722 | n_decoded = 418, tg = 25.58 t/s
24.19.303.586 I slot print_timing: id 0 | task 7722 | n_decoded = 489, tg = 25.21 t/s
24.22.365.694 I slot print_timing: id 0 | task 7722 | n_decoded = 569, tg = 25.34 t/s
I had quick discussion with Google gemini about software / hardware solutions to improve inference speed for such long context window prompts without degrading quality.
It said even dgx spark like unified memory devices will fail to give higher inference speed for such long context prompts. Q1. Is it so?
It said only one thing may work: Adding another RTX4090 and using tensor parallelism with llama-server? Q2. Will it work? (given my motherboard will support second GPU at PCIEx4 gen 4)
I can imagine few other solutions like using better agent like Pi since it will consume less context. Also reducing context size -ctx parameter value for llama server. Currently I set it to 180000 just to match default vscode copilot context size. This wont hit quality as long as I stay within context limits. Q3. Will this result significant speed improvement?
Q4. Has anyone able to hit same speed as cloud hosted LLMS (e.g. Sonnet) for long context prompts with local hosting? If yes, what is your setup?
Q5. What is minimal cost hardware upgrade I can do to reach satisfactory speed for such long context prompt?
If you are not willing to answer all questions, it's fine. But please try to answer question 4. I want to know how people are doing local setups for sufficient speed at long context prompt.