okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge branch 'f-1402-w' into f-140253623e56f

main
4.1 KiB82 linesraw

Q8 prefill: 6.7x faster with 8,192-token chunks

Unmodified Strata v0.1.40, Unsloth Qwen3.8-Flash-Next Q8_0, RTX PRO 6000 Blackwell Workstation Edition 96 GB, Ryzen 9 7950X, 128 GB RAM. GPU power limit: 400 W. Measured 2026-10-06.

Q8 prefill and total request time with 1024 versus 8192 token chunks

The measured change is --prefill 1024 to --prefill 8192. Both configurations keep FP16 KV, MTP T4, ngram off, the same weights and pack, 15,472 GPU expert slots (75.25 GiB), a 56 GiB resident expert budget, --no-prefill-borrow, and the same adaptation settings. No engine code was changed or optimization history imported into this branch.

Actual inputStarting prefill8192 prefillPrefill speedupTotal request, starting -> 8192
32,768 tokens52.87 s7.90 s6.70x59.71 -> 14.85 s
131,072 tokens213.18 s31.98 s6.67x220.25 -> 39.13 s
Actual inputStarting input tok/s8192 input tok/sStarting output tok/s8192 output tok/sEffective output tok/s, starting -> 8192
32,768619.84149.8149.8147.317.15 -> 68.98
131,072614.94098.9145.1143.54.65 -> 26.18

Every request generated 1,024 tokens. Total request time includes prefill and excludes loading. Effective throughput is output count divided by engine prefill plus decode time. Each timed request freshly read its whole prompt, with zero prompt reuse. Allocated context was 40,960 for the 32K request and 139,264 for the 128K request.

Why larger chunks helped

The initial 32K native Nsight trace recorded about 1.50 TB of host-to-device copies during prefill, at 28.55 GB/s. A startup PCIe probe measured about 28.9 GB/s. Those bytes alone imply a 51.86-second transfer floor, close to the 53.06-second prefill marker in that trace. Expert weights outside the GPU cache were repeatedly streamed across 1,024-token chunks.

Larger chunks let more input tokens use each upload. The faster configuration's hardware profile is still being collected; its new transfer volume and ceiling are not claimed here. This result compares two explicit configurations, not the default auto preset against a new engine implementation.

Frozen configuration

config.example.json contains the runtime arguments. Edit its asset paths for your machine. Its default allocated context is 139,264, covering the tested 128K input plus output. launch.py accepts --engine and --context overrides and passes additional arguments to the native engine:

python configs/rtxpro-q8-prefill8192/launch.py --dry-run
# For the native stdin/stdout protocol, not an HTTP listener:
sudo prlimit --pid $$ --memlock=unlimited:unlimited
python configs/rtxpro-q8-prefill8192/launch.py --serve

The launcher clears inherited Strata experiment variables and sets the recorded environment. The benchmark overrides EOS to force 1,024 outputs; the runtime example keeps normal stopping.

The exact engine tag is v0.1.40 at 1cbcacbcae2953f3be9edc46369f0c875bc6ab8b. The native model is the six-shard Unsloth Q8_0 GGUF set. The existing compatibility pack includes BF16 conversions for small projections. Both arms used the same pack, profile, draft runtime and frozen request client. The coding task requested a priority queue module and tests, padded with ordinary maintenance notes to the recorded input count. Thinking was off and temperature was zero.

Recorded checks

Both configurations completed at both input lengths and passed the small triangular(n) generated-function check. Output streams first differed at token 17 for 32K and token 85 for 128K. The long generated module was not executed. These are single observations with a fixed output cap.

results.csv holds chart data; measurements.json holds the four timing records, binary hashes, launch arguments and committed token IDs. Run python plot.py with matplotlib to regenerate the PNG/SVG. This configuration experiment remains under investigation.

1# Q8 prefill: 6.7x faster with 8,192-token chunks
2
3**Unmodified Strata v0.1.40, Unsloth Qwen3.8-Flash-Next Q8_0, RTX PRO 6000
4Blackwell Workstation Edition 96 GB, Ryzen 9 7950X, 128 GB RAM.** GPU power
5limit: 400 W. Measured 2026-10-06.
6
7![Q8 prefill and total request time with 1024 versus 8192 token chunks](overview.png)
8
9The measured change is `--prefill 1024` to **`--prefill 8192`**. Both
10configurations keep FP16 KV, MTP T4, ngram off, the same weights and pack,
1115,472 GPU expert slots (75.25 GiB), a 56 GiB resident expert budget,
12`--no-prefill-borrow`, and the same adaptation settings. No engine code was
13changed or optimization history imported into this branch.
14
15| Actual input | Starting prefill | 8192 prefill | Prefill speedup | Total request, starting -> 8192 |
16|---|---:|---:|---:|---:|
17| 32,768 tokens | 52.87 s | **7.90 s** | **6.70x** | 59.71 -> **14.85 s** |
18| 131,072 tokens | 213.18 s | **31.98 s** | **6.67x** | 220.25 -> **39.13 s** |
19
20| Actual input | Starting input tok/s | 8192 input tok/s | Starting output tok/s | 8192 output tok/s | Effective output tok/s, starting -> 8192 |
21|---|---:|---:|---:|---:|---:|
22| 32,768 | 619.8 | **4149.8** | 149.8 | 147.3 | 17.15 -> **68.98** |
23| 131,072 | 614.9 | **4098.9** | 145.1 | 143.5 | 4.65 -> **26.18** |
24
25Every request generated **1,024 tokens**. Total request time includes prefill
26and excludes loading. Effective throughput is output count divided by engine
27prefill plus decode time. Each timed request freshly read its whole prompt,
28with zero prompt reuse. Allocated context was 40,960 for the 32K request and
29139,264 for the 128K request.
30
31## Why larger chunks helped
32
33The initial 32K native Nsight trace recorded about **1.50 TB of host-to-device
34copies during prefill**, at **28.55 GB/s**. A startup PCIe probe measured about
3528.9 GB/s. Those bytes alone imply a 51.86-second transfer floor, close to
36the 53.06-second prefill marker in that trace. Expert weights outside the
37GPU cache were repeatedly streamed across 1,024-token chunks.
38
39Larger chunks let more input tokens use each upload. The faster configuration's
40hardware profile is still being collected; its new transfer volume and ceiling
41are not claimed here. This result compares two explicit configurations, not
42the default auto preset against a new engine implementation.
43
44## Frozen configuration
45
46[config.example.json](../../../configs/rtxpro-q8-prefill8192/config.example.json)
47contains the runtime arguments. Edit its asset paths for your machine. Its
48default allocated context is 139,264, covering the tested 128K input plus output.
49[launch.py](../../../configs/rtxpro-q8-prefill8192/launch.py) accepts `--engine`
50and `--context` overrides and passes additional arguments to the native engine:
51
52```sh
53python configs/rtxpro-q8-prefill8192/launch.py --dry-run
54# For the native stdin/stdout protocol, not an HTTP listener:
55sudo prlimit --pid $$ --memlock=unlimited:unlimited
56python configs/rtxpro-q8-prefill8192/launch.py --serve
57```
58
59The launcher clears inherited Strata experiment variables and sets the recorded
60environment. The benchmark overrides EOS to force 1,024 outputs; the runtime
61example keeps normal stopping.
62
63The exact engine tag is v0.1.40 at
64`1cbcacbcae2953f3be9edc46369f0c875bc6ab8b`.
65The native model is the six-shard Unsloth Q8_0 GGUF set. The existing compatibility
66pack includes BF16 conversions for small projections. Both arms used the same
67pack, profile, draft runtime and frozen request client. The coding task requested
68a priority queue module and tests, padded with ordinary maintenance notes to
69the recorded input count. Thinking was off and temperature was zero.
70
71## Recorded checks
72
73Both configurations completed at both input lengths and passed the small
74`triangular(n)` generated-function check. Output streams first differed at
75**token 17 for 32K** and **token 85 for 128K**. The long generated module was not
76executed. These are single observations with a fixed output cap.
77
78[results.csv](results.csv) holds chart data;
79[measurements.json](measurements.json) holds the four timing records, binary
80hashes, launch arguments and committed token IDs. Run `python plot.py` with
81matplotlib to regenerate the PNG/SVG. This configuration experiment remains
82under investigation.