[GH-ISSUE #4943] [Engine] Curious performance difference between iq3_s and unsloth_ud-q4_k_xl #2274

Open
opened 2026-11-04 01:58:05 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @galmok on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4943

I have been running iq3_s up until now and decided to try a bit larger model (103GB vs 77GB) to see if performance was acceptable on my system:

CPU: 9850X3D
GPU 0: AMD Radeon RX 9070 XT (gfx1201)
128GB RAM (MemAvailable 91.5 GiB)

With iq3_s I used to get around 1000 tps in prompt processing (earlier version of strata gave close to 1400 tps) and around 50 tps in generation speed.

However, with unsloth-ud-q4_k_xl I get about 140 tps in prompt processing and around 30 tps in generation speed. The token generation does read a tiny bit from disk like 1MB/s at most, but this could also have been other windows tasks. I did run calibrate.

I am wondering if 140 tps in prompt processing is normal or curiously low? I obviously think this is a bit low and would like to know the experience of other users with this model on Strata.

Related: During prompt processing, I do notice that one CPU core is loaded 100% and about 2 other cores loaded 30% and the rest not really being used. This is true for both models. Is this normal or should the load have been distributed better? During token generation, 8 cores are loaded 100%.

Originally created by @galmok on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4943 I have been running iq3_s up until now and decided to try a bit larger model (103GB vs 77GB) to see if performance was acceptable on my system: CPU: 9850X3D GPU 0: AMD Radeon RX 9070 XT (gfx1201) 128GB RAM (MemAvailable 91.5 GiB) With iq3_s I used to get around 1000 tps in prompt processing (earlier version of strata gave close to 1400 tps) and around 50 tps in generation speed. However, with unsloth-ud-q4_k_xl I get about 140 tps in prompt processing and around 30 tps in generation speed. The token generation does read a tiny bit from disk like 1MB/s at most, but this could also have been other windows tasks. I did run calibrate. I am wondering if 140 tps in prompt processing is normal or curiously low? I obviously think this is a bit low and would like to know the experience of other users with this model on Strata. Related: During prompt processing, I do notice that one CPU core is loaded 100% and about 2 other cores loaded 30% and the rest not really being used. This is true for both models. Is this normal or should the load have been distributed better? During token generation, 8 cores are loaded 100%.
Author
Owner

@bob-u commented on GitHub (Nov 2, 2026):

It's quite low. I have seen 670 to 930tok/s for pp and 42tok/s on Q4 while getting 1050tok/s pp on Q3_S. (0.1.50)

<!-- gh-comment-id:6567488538 --> @bob-u commented on GitHub (Nov 2, 2026): It's quite low. I have seen 670 to 930tok/s for pp and 42tok/s on Q4 while getting 1050tok/s pp on Q3_S. (0.1.50)
Author
Owner

@Adamyno commented on GitHub (Nov 2, 2026):

On sm_75 the ordering is the other way round: our UD-Q4_K_XL prefills ~1.9× faster than IQ3_S

A data point from a third architecture, because it speaks to whether your 140 tok/s is the pack or the box.

Hardware: 3× RTX 2080 Ti 22 GB (sm_75), i9-7980XE, 125 GiB DDR4-3600, Linux 7.0.0-38, CUDA 13.0, driver 580.178.04. Layer split across the three cards, --kv int8, --reasoning-format/MTP as below.

pack prefill decode config
GSQ-RCO IQ3_S (78 GB) ~920 tok/s 78.6 → 97.2 tok/s engine 0.1.54, --ctx 262144 --kv int8 --kv-resident 32768 --spec 3 --spec-min-p 0.54 --mtp mtp/rt --mtp-max-t 3, K=16,32
UD-Q4_K_XL 1758 tok/s 66.6 / 71.4 / 74.2 / 81.5 tok/s older engines (0.2.0 / 0.2.6), 262k, same shape

So on this box the larger K-quant is the faster one on the prompt path, by about 1.9×, and only slightly slower on decode. That matches the mechanism rather than the numbers: an i-quant expert is a lookup-table format (its dequant reads a table per block), while a K-quant dequant is arithmetic — so a 4.5 bpw K pack can beat a 3.5 bpw i-quant on prefill even though it moves more bytes. Your 1000 → 140 tok/s drop in the opposite direction (the small pack faster on prefill, 7×) is therefore the surprising half, and to me it points at the UD pack on that box rather than at "Q4 is slow".

What I would check first on your side, in this order:

  1. The pack's shard layout. On our side the UD-Q4_K_XL set is 4 shards for the 125B; if the pack for the 103 GB set puts the n-gram/PLE table in the first shard instead of a separate one, the prompt path pays a lookup per token. The strata generate startup line that prints the pack's tensor layout would show it.
  2. Whether the expert arena is actually resident. Your one-core-at-100% observation during prefill is the pattern we see when the CPU lane is doing per-token expert work; with IQ3_S the same core was not the bottleneck. --verbose prints the expert cache slots and the CPU-lane share per token, which separates "reading experts from RAM" from "reading them from disk" (you mention ~1 MB/s of disk reads, which is low enough to be unrelated, but the CPU-lane share is the number that matters).
  3. Prefill chunk size. --prefill auto versus a fixed --prefill-chunk: on our 3-card split the auto pick was 4,509 tokens, and going to 8,192 on a two-card box was worth 11-15% in the docs' own numbers. A much larger chunk on an AMD split can also thrash the expert cache, which would show up exactly as "prefill collapsed while decode only halved".

If it is useful I can run the same two packs back to back on this box at a fixed prompt set so you have a same-rig pair; but 1.9× in favour of the bigger pack on sm_75 is already the cleanest evidence I have that 140 tok/s is not what this pack should do.

Reproduction status: measured locally on the third box (sm_75, CUDA 13.0).

<!-- gh-comment-id:6586998959 --> @Adamyno commented on GitHub (Nov 2, 2026): ## On sm_75 the ordering is the other way round: our UD-Q4_K_XL prefills ~1.9× faster than IQ3_S A data point from a third architecture, because it speaks to whether your 140 tok/s is the pack or the box. **Hardware:** 3× RTX 2080 Ti 22 GB (sm_75), i9-7980XE, 125 GiB DDR4-3600, Linux 7.0.0-38, CUDA 13.0, driver 580.178.04. Layer split across the three cards, `--kv int8`, `--reasoning-format`/MTP as below. | pack | prefill | decode | config | |---|---:|---:|---| | **GSQ-RCO IQ3_S** (78 GB) | **~920 tok/s** | **78.6 → 97.2 tok/s** | engine 0.1.54, `--ctx 262144 --kv int8 --kv-resident 32768 --spec 3 --spec-min-p 0.54 --mtp mtp/rt --mtp-max-t 3`, K=16,32 | | **UD-Q4_K_XL** | **1758 tok/s** | 66.6 / 71.4 / 74.2 / 81.5 tok/s | older engines (0.2.0 / 0.2.6), 262k, same shape | So on this box the **larger K-quant is the *faster* one on the prompt path, by about 1.9×**, and only slightly slower on decode. That matches the mechanism rather than the numbers: an i-quant expert is a lookup-table format (its dequant reads a table per block), while a K-quant dequant is arithmetic — so a 4.5 bpw K pack can beat a 3.5 bpw i-quant on prefill even though it moves more bytes. Your 1000 → 140 tok/s drop in the *opposite* direction (the small pack faster on prefill, 7×) is therefore the surprising half, and to me it points at the UD pack on that box rather than at "Q4 is slow". **What I would check first on your side,** in this order: 1. **The pack's shard layout.** On our side the UD-Q4_K_XL set is 4 shards for the 125B; if the pack for the 103 GB set puts the n-gram/PLE table in the first shard instead of a separate one, the prompt path pays a lookup per token. The `strata generate` startup line that prints the pack's tensor layout would show it. 2. **Whether the expert arena is actually resident.** Your one-core-at-100% observation during prefill is the pattern we see when the CPU lane is doing per-token expert work; with IQ3_S the same core was not the bottleneck. `--verbose` prints the expert cache slots and the CPU-lane share per token, which separates "reading experts from RAM" from "reading them from disk" (you mention ~1 MB/s of disk reads, which is low enough to be unrelated, but the CPU-lane share is the number that matters). 3. **Prefill chunk size.** `--prefill auto` versus a fixed `--prefill-chunk`: on our 3-card split the auto pick was 4,509 tokens, and going to 8,192 on a two-card box was worth 11-15% in the docs' own numbers. A much larger chunk on an AMD split can also thrash the expert cache, which would show up exactly as "prefill collapsed while decode only halved". If it is useful I can run the same two packs back to back on this box at a fixed prompt set so you have a same-rig pair; but 1.9× in favour of the *bigger* pack on sm_75 is already the cleanest evidence I have that 140 tok/s is not what this pack should do. Reproduction status: measured locally on the third box (sm_75, CUDA 13.0).
Author
Owner

@galmok commented on GitHub (Nov 2, 2026):

I rebooted the computer and upgraded GPU drivers (probably wasn't required) and that resolved the issue. I don't know what was causing the issue, but it seems resolved now. I guess Windows (or rather the AMD GPU driver) can get stuff stuck in the GPU. I ran the benchmark:

iq3_s:

  chat decode tok/s                     72.90   (66.30 - 90.80, n=9)
  chat first token (s)                   0.45   (0.40 - 0.50, n=9)
  4K prompt tok/s                     1048.50   (1047.80 - 1053.30, n=3)
  4K first token (s)                     3.87   (3.85 - 3.87, n=3)
  16K prompt tok/s                    1229.10   (1220.50 - 1232.10, n=3)
  16K first token (s)                   13.11   (13.10 - 13.21, n=3)
  agent cache hit %                     69.46   (69.45 - 69.48, n=3)
  agent re-read tokens/session           3.00   (3.00 - 4.00, n=3)
  agent turn first token (s)             3.58   (3.47 - 3.92, n=15)
  agent decode tok/s                    75.00   (68.10 - 93.80, n=15)

unsloth-ud-q4_k_xl:

  chat decode tok/s                     56.60   (53.30 - 67.60, n=9)
  chat first token (s)                   0.61   (0.54 - 0.69, n=9)
  4K prompt tok/s                      750.10   (748.90 - 751.10, n=3)
  4K first token (s)                     5.41   (5.39 - 5.41, n=3)
  16K prompt tok/s                     900.60   (895.70 - 904.70, n=3)
  16K first token (s)                   17.87   (17.80 - 17.96, n=3)
  agent cache hit %                     69.40   (69.11 - 69.42, n=3)
  agent re-read tokens/session           4.00   (2.00 - 143.00, n=3)
  agent turn first token (s)             5.16   (4.82 - 5.44, n=15)
  agent decode tok/s                    58.00   (51.30 - 70.30, n=15)

So while the performance did lower, it is still decent. I checked the log files and compared a run yesterday with a run today and there were differences and I think I have extracted the most important ones (just a few from each):

Yesterday (poor performance; model on fast (10+ GBps) nvme):

strata generate: memory guard: limit 125.5 GiB (source: meminfo), current 34.0 GiB, reclaimable cache credited 0.0 GiB; available 91.5 GiB (MemAvailable 91.5 GiB), floor 2560 MiB
...
strata generate: expert arena read unbuffered (3 of 48 probe reads from the file cache; 14.3 GiB available, 103.7 GiB of files)
strata generate: expert arena: cudaHostRegister PORTABLE ok; large pages refused for 77022101504 B (GetLargePageMinimum=2097152, VirtualAlloc error 1450); using 4 KB pages
strata generate: loaded 71.73 GiB at 12.20 GiB/s
...
strata generate: only 0 MiB free once the slots are written (reserve 2560 MiB); shrinking the expert cache
strata generate: only 1901 MiB free once the slots are written (reserve 2560 MiB); shrinking the expert cache
strata generate: expert cache 821 slots, 2.39 GiB of VRAM; policy is
...
strata generate: pre-filled 821 of 821 slots from the profile in 0.4 s (6955 MB/s); slot 0 verified
...
strata generate: token graph hit path: 821 resident experts, decided on the device
strata serve: Windows commit: 80.3 GiB left of a 253.5 GiB limit (RAM + page file)
strata serve: prompt chunk auto: 3072 tokens, a 132-slot ring
strata serve: the prompt path borrows 686 CUDA0 cache slots (1.99 GiB)
...
strata serve: conversation cache sized from the free RAM: 3584 MiB for up to 4 parked conversations, so an agent's next turn reuses its prompt (--conversation-cache-mib N sets it, 0 turns it off)
...
strata serve: 5678 MiB of VRAM free with everything loaded

Today (decent performance; model on slower (<4GBps) nvme):

strata generate: memory guard: limit 125.5 GiB (source: meminfo), current 32.1 GiB, reclaimable cache credited 0.0 GiB; available 93.4 GiB (MemAvailable 93.4 GiB), floor 2560 MiB
...
strata generate: expert arena read unbuffered (1 of 48 probe reads from the file cache; 20.1 GiB available, 103.7 GiB of files)
strata generate: expert arena: cudaHostRegister PORTABLE ok; large pages (2097152 B)
strata generate: loaded 71.73 GiB at 6.60 GiB/s
...
strata generate: only 1184 MiB free once the slots are written (reserve 2560 MiB); shrinking the expert cache
strata generate: expert cache 1460 slots, 4.25 GiB of VRAM; policy is
...
strata generate: pre-filled 1460 of 1460 slots from the profile in 0.4 s (12256 MB/s); slot 0 verified
...
strata generate: token graph hit path: 1460 resident experts, decided on the device
strata serve: Windows commit: 124.4 GiB left of a 253.5 GiB limit (RAM + page file)
strata serve: prompt chunk auto: 6144 tokens, a 132-slot ring
strata serve: the prompt path borrows 1070 CUDA0 cache slots (3.11 GiB)
...
strata serve: conversation cache sized from the free RAM: 6400 MiB for up to 4 parked conversations, so an agent's next turn reuses its prompt (--conversation-cache-mib N sets it, 0 turns it off)
...
strata serve: 2111 MiB of VRAM free with everything loaded

So something did go wrong yesterday, but I am not sure why the 77GB load was refused when there was 91GB free, but I am not qualified to comment on the differences.

unsloth-ud-q4_k_xl good run.txt

<!-- gh-comment-id:6588469517 --> @galmok commented on GitHub (Nov 2, 2026): I rebooted the computer and upgraded GPU drivers (probably wasn't required) and that resolved the issue. I don't know what was causing the issue, but it seems resolved now. I guess Windows (or rather the AMD GPU driver) can get stuff stuck in the GPU. I ran the benchmark: iq3_s: ``` chat decode tok/s 72.90 (66.30 - 90.80, n=9) chat first token (s) 0.45 (0.40 - 0.50, n=9) 4K prompt tok/s 1048.50 (1047.80 - 1053.30, n=3) 4K first token (s) 3.87 (3.85 - 3.87, n=3) 16K prompt tok/s 1229.10 (1220.50 - 1232.10, n=3) 16K first token (s) 13.11 (13.10 - 13.21, n=3) agent cache hit % 69.46 (69.45 - 69.48, n=3) agent re-read tokens/session 3.00 (3.00 - 4.00, n=3) agent turn first token (s) 3.58 (3.47 - 3.92, n=15) agent decode tok/s 75.00 (68.10 - 93.80, n=15) ``` unsloth-ud-q4_k_xl: ``` chat decode tok/s 56.60 (53.30 - 67.60, n=9) chat first token (s) 0.61 (0.54 - 0.69, n=9) 4K prompt tok/s 750.10 (748.90 - 751.10, n=3) 4K first token (s) 5.41 (5.39 - 5.41, n=3) 16K prompt tok/s 900.60 (895.70 - 904.70, n=3) 16K first token (s) 17.87 (17.80 - 17.96, n=3) agent cache hit % 69.40 (69.11 - 69.42, n=3) agent re-read tokens/session 4.00 (2.00 - 143.00, n=3) agent turn first token (s) 5.16 (4.82 - 5.44, n=15) agent decode tok/s 58.00 (51.30 - 70.30, n=15) ``` So while the performance did lower, it is still decent. I checked the log files and compared a run yesterday with a run today and there were differences and I think I have extracted the most important ones (just a few from each): Yesterday (poor performance; model on fast (10+ GBps) nvme): ``` strata generate: memory guard: limit 125.5 GiB (source: meminfo), current 34.0 GiB, reclaimable cache credited 0.0 GiB; available 91.5 GiB (MemAvailable 91.5 GiB), floor 2560 MiB ... strata generate: expert arena read unbuffered (3 of 48 probe reads from the file cache; 14.3 GiB available, 103.7 GiB of files) strata generate: expert arena: cudaHostRegister PORTABLE ok; large pages refused for 77022101504 B (GetLargePageMinimum=2097152, VirtualAlloc error 1450); using 4 KB pages strata generate: loaded 71.73 GiB at 12.20 GiB/s ... strata generate: only 0 MiB free once the slots are written (reserve 2560 MiB); shrinking the expert cache strata generate: only 1901 MiB free once the slots are written (reserve 2560 MiB); shrinking the expert cache strata generate: expert cache 821 slots, 2.39 GiB of VRAM; policy is ... strata generate: pre-filled 821 of 821 slots from the profile in 0.4 s (6955 MB/s); slot 0 verified ... strata generate: token graph hit path: 821 resident experts, decided on the device strata serve: Windows commit: 80.3 GiB left of a 253.5 GiB limit (RAM + page file) strata serve: prompt chunk auto: 3072 tokens, a 132-slot ring strata serve: the prompt path borrows 686 CUDA0 cache slots (1.99 GiB) ... strata serve: conversation cache sized from the free RAM: 3584 MiB for up to 4 parked conversations, so an agent's next turn reuses its prompt (--conversation-cache-mib N sets it, 0 turns it off) ... strata serve: 5678 MiB of VRAM free with everything loaded ``` Today (decent performance; model on slower (<4GBps) nvme): ``` strata generate: memory guard: limit 125.5 GiB (source: meminfo), current 32.1 GiB, reclaimable cache credited 0.0 GiB; available 93.4 GiB (MemAvailable 93.4 GiB), floor 2560 MiB ... strata generate: expert arena read unbuffered (1 of 48 probe reads from the file cache; 20.1 GiB available, 103.7 GiB of files) strata generate: expert arena: cudaHostRegister PORTABLE ok; large pages (2097152 B) strata generate: loaded 71.73 GiB at 6.60 GiB/s ... strata generate: only 1184 MiB free once the slots are written (reserve 2560 MiB); shrinking the expert cache strata generate: expert cache 1460 slots, 4.25 GiB of VRAM; policy is ... strata generate: pre-filled 1460 of 1460 slots from the profile in 0.4 s (12256 MB/s); slot 0 verified ... strata generate: token graph hit path: 1460 resident experts, decided on the device strata serve: Windows commit: 124.4 GiB left of a 253.5 GiB limit (RAM + page file) strata serve: prompt chunk auto: 6144 tokens, a 132-slot ring strata serve: the prompt path borrows 1070 CUDA0 cache slots (3.11 GiB) ... strata serve: conversation cache sized from the free RAM: 6400 MiB for up to 4 parked conversations, so an agent's next turn reuses its prompt (--conversation-cache-mib N sets it, 0 turns it off) ... strata serve: 2111 MiB of VRAM free with everything loaded ``` So something did go wrong yesterday, but I am not sure why the 77GB load was refused when there was 91GB free, but I am not qualified to comment on the differences. [unsloth-ud-q4_k_xl good run.txt](https://github.com/user-attachments/files/34292140/unsloth-ud-q4_k_xl.good.run.txt)
Author
Owner

@galmok commented on GitHub (Nov 7, 2026):

With the later versions of Strata (I just updated), even when using iq3_s, running World of Warcraft at the same time really hits prompt processing hard, resulting in around 217 tps. I used to get 500-800 tps. Problem is, even when exiting WoW, prefill rate remains low (should be around 1000 (old Strata was close to 1400)). Seems I have to reboot every time and that wasn't necessary with the older Strata. Token generation speed is as expected, though.

<!-- gh-comment-id:6714720851 --> @galmok commented on GitHub (Nov 7, 2026): With the later versions of Strata (I just updated), even when using iq3_s, running World of Warcraft at the same time really hits prompt processing hard, resulting in around 217 tps. I used to get 500-800 tps. Problem is, even when exiting WoW, prefill rate remains low (should be around 1000 (old Strata was close to 1400)). Seems I have to reboot every time and that wasn't necessary with the older Strata. Token generation speed is as expected, though.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2274
No description provided.