Repository navigation
cuda w4a8: smaller tiles of the int8 prompt GEMM where the 128x128 grid leaves SMs idle (TF_QWEN_INT8_TILES, default off) - #6098
Conversation
|
The hash run named in the description:
perf-receipt.json (receipt_sha256 69914d1085c6b05f...){
"schema": 1,
"pack_id": "tf-receipt-v1",
"pack_sha256": "ab2a5d0ff262007e3ef4714fa46e62b2b2454b3f97b652ca18da49e4e0583c42",
"generated_at_utc": "2026-12-03T00:50:48Z",
"claim": "With --prompt-precision int8 and TF_QWEN_INT8_TILES=1 the head serves the same tokens as main; the change is in the prompt pass, so decode tok/s is level.",
"git": {
"base_sha": "0ba35fe6de5b290d660196add7ccc2be17998987",
"head_sha": "d123ff74da1d682f6b2a6bd082abd60b37e959b5"
},
"environment": {
"chip": "rtx-5090",
"os": "linux",
"arch": "x86_64",
"checkpoint_id": "TensorFold/Qwen3.8-27B-MLX-4bit@22d8d538",
"draft": true,
"base_binary_sha256": "acb2594cb6cd59ec266e4c9085bdeb80b84fff01a23f7a1dc506b06b74cbebb9",
"head_binary_sha256": "09e3aea6491aab2e59466892862a22ff1baedfc95efb29fedc06b975f45a35d5"
},
"control": {
"prompt_id": "prose_seeded",
"seed_a": 424242,
"seed_b": 989898,
"base_token_sha256": "3fba05a0ae462fc6e4ba0023037275856ae0c71e2e61ac42c764e43ccaf9541f",
"alt_token_sha256": "a6c9d7d6e740c26e5aacf7eeae76c7ce1faa1927e2296b2782c199c9259ba49e",
"diverged": true
},
"draft_check": {
"prompt_id": "prose_greedy",
"plain_token_sha256": "bae66e46655d5d9c423b8f9408ca82783bfc15d2117a9d5ea4aa7448846d28bb",
"draft_token_sha256": "bae66e46655d5d9c423b8f9408ca82783bfc15d2117a9d5ea4aa7448846d28bb",
"equal": true
},
"order": [
"base",
"head",
"head",
"base",
"base",
"head",
"head",
"base"
],
"rounds": [
{
"index": 0,
"arm": "base",
"agg_tok_s": 328.783
},
{
"index": 1,
"arm": "head",
"agg_tok_s": 328.205
},
{
"index": 2,
"arm": "head",
"agg_tok_s": 328.398
},
{
"index": 3,
"arm": "base",
"agg_tok_s": 328.735
},
{
"index": 4,
"arm": "base",
"agg_tok_s": 329.121
},
{
"index": 5,
"arm": "head",
"agg_tok_s": 328.976
},
{
"index": 6,
"arm": "head",
"agg_tok_s": 329.025
},
{
"index": 7,
"arm": "base",
"agg_tok_s": 329.073
}
],
"summary": {
"mean_base_tok_s": 328.928,
"mean_head_tok_s": 328.651,
"gain_pct": -0.084,
"base_noise_pct": 0.117
},
"prompts": {
"prose_greedy": {
"base": {
"tokens": 128,
"prompt_tokens": 71,
"cached_tokens": 0,
"complete": true,
"token_sha256": "bae66e46655d5d9c423b8f9408ca82783bfc15d2117a9d5ea4aa7448846d28bb",
"output_sha256": "193650b0e6bfdd761c9cc7caf3154ec4d7fcd78072d3b3bb6ba094b516ab5384",
"tok_s": 245.838,
"ttft_s": 0.0569
},
"head": {
"tokens": 128,
"prompt_tokens": 71,
"cached_tokens": 0,
"complete": true,
"token_sha256": "bae66e46655d5d9c423b8f9408ca82783bfc15d2117a9d5ea4aa7448846d28bb",
"output_sha256": "193650b0e6bfdd761c9cc7caf3154ec4d7fcd78072d3b3bb6ba094b516ab5384",
"tok_s": 245.778,
"ttft_s": 0.0322
},
"token_equal": true
},
"code_greedy": {
"base": {
"tokens": 128,
"prompt_tokens": 78,
"cached_tokens": 0,
"complete": true,
"token_sha256": "0b47594d2975969cb4c72df23c9df9cfbe1ce63c166348a5843bf9e076f311c5",
"output_sha256": "f419036bdae542ded35e3c7f39fcbf066d2dc41dbe918014a03aaac7e699fff7",
"tok_s": 312.335,
"ttft_s": 0.0572
},
"head": {
"tokens": 128,
"prompt_tokens": 78,
"cached_tokens": 0,
"complete": true,
"token_sha256": "0b47594d2975969cb4c72df23c9df9cfbe1ce63c166348a5843bf9e076f311c5",
"output_sha256": "f419036bdae542ded35e3c7f39fcbf066d2dc41dbe918014a03aaac7e699fff7",
"tok_s": 312.228,
"ttft_s": 0.0327
},
"token_equal": true
},
"reasoning_greedy": {
"base": {
"tokens": 128,
"prompt_tokens": 89,
"cached_tokens": 0,
"complete": true,
"token_sha256": "7da5c3a040233b558d6258914310660966d99ff3fc5a1f06c520a0344399cee2",
"output_sha256": "8912fceb7f3c2c57054d8cb31f1626badb73c31745656efe32f517c9b600428a",
"tok_s": 508.993,
"ttft_s": 0.0577
},
"head": {
"tokens": 128,
"prompt_tokens": 89,
"cached_tokens": 0,
"complete": true,
"token_sha256": "7da5c3a040233b558d6258914310660966d99ff3fc5a1f06c520a0344399cee2",
"output_sha256": "8912fceb7f3c2c57054d8cb31f1626badb73c31745656efe32f517c9b600428a",
"tok_s": 509.036,
"ttft_s": 0.0327
},
"token_equal": true
},
"prose_seeded": {
"base": {
"tokens": 64,
"prompt_tokens": 65,
"cached_tokens": 0,
"complete": true,
"token_sha256": "3fba05a0ae462fc6e4ba0023037275856ae0c71e2e61ac42c764e43ccaf9541f",
"output_sha256": "6666d17da18529064fb76b843e6eb12b6d2b8bbf1fbb7829a5547a8f3b9f99d0",
"tok_s": 356.823,
"ttft_s": 0.0567
},
"head": {
"tokens": 64,
"prompt_tokens": 65,
"cached_tokens": 0,
"complete": true,
"token_sha256": "3fba05a0ae462fc6e4ba0023037275856ae0c71e2e61ac42c764e43ccaf9541f",
"output_sha256": "6666d17da18529064fb76b843e6eb12b6d2b8bbf1fbb7829a5547a8f3b9f99d0",
"tok_s": 356.916,
"ttft_s": 0.0319
},
"token_equal": true
}
},
"exactness_sha256": "4714c808a025601edea9ef6b194c3ea2bf00c376ca2fe2d596af709b53eaca54",
"receipt_sha256": "69914d1085c6b05f1de54320b5d5b21e32d8bb216d3077c3d62243b21ac8cd32"
} |
Synthena Initial Review — Performance receipt required (
|
|
On the review at The chooser's constants (the blocker). Taken the second way you suggest:
The stride rule in the exception case. It is now an exhaustive Checks on The hash run on this head, same pack and settings as the one above: tokens equal on all four prompts, the planted control diverged, drafted equals perf-receipt.json, switch set (receipt_sha256 48a8f543d1dce63a...){
"schema": 1,
"pack_id": "tf-receipt-v1",
"pack_sha256": "ab2a5d0ff262007e3ef4714fa46e62b2b2454b3f97b652ca18da49e4e0583c42",
"generated_at_utc": "2026-12-03T01:12:36Z",
"claim": "With --prompt-precision int8 and TF_QWEN_INT8_TILES=1 the head serves the same tokens as main; the change is in the prompt pass, so decode tok/s is level.",
"git": {
"base_sha": "0ba35fe6de5b290d660196add7ccc2be17998987",
"head_sha": "773ef46434351913ea07c92592f0081a436f5f3d"
},
"environment": {
"chip": "rtx-5090",
"os": "linux",
"arch": "x86_64",
"checkpoint_id": "TensorFold/Qwen3.8-27B-MLX-4bit@22d8d538",
"draft": true,
"base_binary_sha256": "acb2594cb6cd59ec266e4c9085bdeb80b84fff01a23f7a1dc506b06b74cbebb9",
"head_binary_sha256": "f44ac8c66e97156479f395c5ab86b27b53846d1736689001bca4d9a45187b395"
},
"control": {
"prompt_id": "prose_seeded",
"seed_a": 424242,
"seed_b": 989898,
"base_token_sha256": "3fba05a0ae462fc6e4ba0023037275856ae0c71e2e61ac42c764e43ccaf9541f",
"alt_token_sha256": "a6c9d7d6e740c26e5aacf7eeae76c7ce1faa1927e2296b2782c199c9259ba49e",
"diverged": true
},
"draft_check": {
"prompt_id": "prose_greedy",
"plain_token_sha256": "bae66e46655d5d9c423b8f9408ca82783bfc15d2117a9d5ea4aa7448846d28bb",
"draft_token_sha256": "bae66e46655d5d9c423b8f9408ca82783bfc15d2117a9d5ea4aa7448846d28bb",
"equal": true
},
"order": [
"base",
"head",
"head",
"base",
"base",
"head",
"head",
"base"
],
"rounds": [
{
"index": 0,
"arm": "base",
"agg_tok_s": 329.921
},
{
"index": 1,
"arm": "head",
"agg_tok_s": 336.109
},
{
"index": 2,
"arm": "head",
"agg_tok_s": 336.134
},
{
"index": 3,
"arm": "base",
"agg_tok_s": 329.412
},
{
"index": 4,
"arm": "base",
"agg_tok_s": 329.775
},
{
"index": 5,
"arm": "head",
"agg_tok_s": 336.513
},
{
"index": 6,
"arm": "head",
"agg_tok_s": 336.488
},
{
"index": 7,
"arm": "base",
"agg_tok_s": 329.824
}
],
"summary": {
"mean_base_tok_s": 329.733,
"mean_head_tok_s": 336.311,
"gain_pct": 1.995,
"base_noise_pct": 0.155
},
"prompts": {
"prose_greedy": {
"base": {
"tokens": 128,
"prompt_tokens": 71,
"cached_tokens": 0,
"complete": true,
"token_sha256": "bae66e46655d5d9c423b8f9408ca82783bfc15d2117a9d5ea4aa7448846d28bb",
"output_sha256": "193650b0e6bfdd761c9cc7caf3154ec4d7fcd78072d3b3bb6ba094b516ab5384",
"tok_s": 246.188,
"ttft_s": 0.0568
},
"head": {
"tokens": 128,
"prompt_tokens": 71,
"cached_tokens": 0,
"complete": true,
"token_sha256": "bae66e46655d5d9c423b8f9408ca82783bfc15d2117a9d5ea4aa7448846d28bb",
"output_sha256": "193650b0e6bfdd761c9cc7caf3154ec4d7fcd78072d3b3bb6ba094b516ab5384",
"tok_s": 252.797,
"ttft_s": 0.0323
},
"token_equal": true
},
"code_greedy": {
"base": {
"tokens": 128,
"prompt_tokens": 78,
"cached_tokens": 0,
"complete": true,
"token_sha256": "0b47594d2975969cb4c72df23c9df9cfbe1ce63c166348a5843bf9e076f311c5",
"output_sha256": "f419036bdae542ded35e3c7f39fcbf066d2dc41dbe918014a03aaac7e699fff7",
"tok_s": 313.229,
"ttft_s": 0.0572
},
"head": {
"tokens": 128,
"prompt_tokens": 78,
"cached_tokens": 0,
"complete": true,
"token_sha256": "0b47594d2975969cb4c72df23c9df9cfbe1ce63c166348a5843bf9e076f311c5",
"output_sha256": "f419036bdae542ded35e3c7f39fcbf066d2dc41dbe918014a03aaac7e699fff7",
"tok_s": 314.005,
"ttft_s": 0.0327
},
"token_equal": true
},
"reasoning_greedy": {
"base": {
"tokens": 128,
"prompt_tokens": 89,
"cached_tokens": 0,
"complete": true,
"token_sha256": "7da5c3a040233b558d6258914310660966d99ff3fc5a1f06c520a0344399cee2",
"output_sha256": "8912fceb7f3c2c57054d8cb31f1626badb73c31745656efe32f517c9b600428a",
"tok_s": 510.218,
"ttft_s": 0.0577
},
"head": {
"tokens": 128,
"prompt_tokens": 89,
"cached_tokens": 0,
"complete": true,
"token_sha256": "7da5c3a040233b558d6258914310660966d99ff3fc5a1f06c520a0344399cee2",
"output_sha256": "8912fceb7f3c2c57054d8cb31f1626badb73c31745656efe32f517c9b600428a",
"tok_s": 536.745,
"ttft_s": 0.0331
},
"token_equal": true
},
"prose_seeded": {
"base": {
"tokens": 64,
"prompt_tokens": 65,
"cached_tokens": 0,
"complete": true,
"token_sha256": "3fba05a0ae462fc6e4ba0023037275856ae0c71e2e61ac42c764e43ccaf9541f",
"output_sha256": "6666d17da18529064fb76b843e6eb12b6d2b8bbf1fbb7829a5547a8f3b9f99d0",
"tok_s": 357.724,
"ttft_s": 0.0567
},
"head": {
"tokens": 64,
"prompt_tokens": 65,
"cached_tokens": 0,
"complete": true,
"token_sha256": "3fba05a0ae462fc6e4ba0023037275856ae0c71e2e61ac42c764e43ccaf9541f",
"output_sha256": "6666d17da18529064fb76b843e6eb12b6d2b8bbf1fbb7829a5547a8f3b9f99d0",
"tok_s": 357.768,
"ttft_s": 0.0318
},
"token_equal": true
}
},
"exactness_sha256": "4714c808a025601edea9ef6b194c3ea2bf00c376ca2fe2d596af709b53eaca54",
"receipt_sha256": "48a8f543d1dce63aa2ab411f56c4d9a548f79599794465a30f23b68fc13abd47"
} |
Synthena Initial Review — Performance receipt required (
|
|
On the red
Tell me which way you want it and I will commit the receipts as |
|
On the review at
The 170-SM scope. The description's first paragraph, its "Boxes it reaches" line and the switch's row in The 3 % margin and the order of the tiles. The three smaller tiles all carry the same factor, so comparing them with each other is a comparison of their raw predictions, and the factor only counts against the 128 x 128 tile, which is the form you describe. A scratch test confirms the pick equals "the best smaller tile by raw prediction, taken only if it beats the 128 x 128 prediction by 3 %" for every row count from 1 to 4,096, seven widths, two depths and 48, 84, 128, 170 and 188 SMs. The usage records. They are checked against compiled kernels by the project's own tool: |
|
READY to land on this head. Opt-in (TF_QWEN_INT8_TILES, off by default). Device A/B on an RTX 5090: tokens equal in every cell and speed unchanged (within 0.6%, repetitions overlapping), so the default path is unaffected; the short-turn gain rests on the author's exact-token receipts for the switch.
|
773ef46 to
f810945
Compare
|
READY to land on this head. Opt-in (TF_QWEN_INT8_TILES, off by default). Device A/B on an RTX 5090: tokens equal in every cell and speed unchanged (within 0.6%, repetitions overlapping), so the default path is unaffected; the short-turn gain rests on the author's exact-token receipts for the switch. This head is rebased onto current main and re-pins its serving sources for the new switch; the serving-pin tests pass.
|
Synthena Initial Review — Needs maintainer review (
|
|
On the review at Timing for the smaller tiles. The source carries none by the repository's rule. The numbers are in #6059 and in this description: one launch of each tile against 128 x 128 on the 27B's projections (7 to 32 rows 70-72 us -> 15.6-23 us, 110 rows 89 / 245 -> 36 / 95 us, 410 rows 223 / 298 -> 150 / 215 us), the served table of first-token times at 33k and 140k, and the hash run in the comment above. Other SM counts I cannot fit: I have one card, which is why The cost model at one wave. The prediction is the larger of the block floor and the grid term, and the two meet near a full machine: 170 blocks of 128 x 128 at K = 5,120 give a grid term of 78.4 us against the 70.5 us floor. So a 128 x 128 grid that fills the card is priced by its grid term, not by the floor. I have not fitted a stepped |
f810945 to
61b52d8
Compare
Synthena Initial Review — Needs maintainer review (
|
|
READY to land on this head. Opt-in (TF_QWEN_INT8_TILES, off by default). Device A/B on an RTX 5090: tokens equal in every cell and speed unchanged (within 0.6%, repetitions overlapping), so the default path is unaffected; the short-turn gain rests on the author's exact-token receipts for the switch. This head is rebased onto current main and re-pins its serving sources for the new switch; the serving-pin tests pass. Rebased onto main after #6095: both opt-in switches sit side by side, each off by default and independent, with the serving pins refreshed.
|
|
On the review at
|
61b52d8 to
889b74b
Compare
|
READY to land on this head. Opt-in (TF_QWEN_INT8_TILES, off by default). Device A/B on an RTX 5090: tokens equal in every cell and speed unchanged (within 0.6%, repetitions overlapping), so the default path is unaffected; the short-turn gain rests on the author's exact-token receipts for the switch. This head is rebased onto current main and re-pins its serving sources for the new switch; the serving-pin tests pass. Rebased onto main after #6095: both opt-in switches sit side by side, each off by default and independent, with the serving pins refreshed.
|
…id leaves SMs idle (TF_QWEN_INT8_TILES, default off) tf_w4a8_prefill runs 128 x 128 tiles, so a projection whose grid is at most one wave of blocks pays one block's whole K loop whatever its size. Three more instantiations of the same body (64x128, 32x128, 16x64) and a chooser take the tile with the least predicted time from the shape and the card's SM count. A tile only changes which outputs a block holds: each output's integer group dots and its ascending fma chain over the groups are the same, so the bytes are the same. The switch is read through the environment registry in the Qwen family and handed to the kernels as fields; unset, every projection takes tf_w4a8_prefill. The three kernels are registered with the kernel contract: each is compared byte for byte with tf_w4a8_prefill on the 27B's int8 projections, row counts from 1 to 4,096 and the chooser's boundaries, with a planted control that runs the tile one input group short. Refs ashhart#6059
…tted on; other cards keep 128x128 Refs ashhart#6059
889b74b to
a861433
Compare
|
READY to land on this head. The prior RTX 5090 A/B matched every token cell with default-path speed within 0.6%. This rebase preserves all 16 non-pin PR changes and refreshes the serving pins on current main. TF_QWEN_INT8_TILES stays off by default. The author supplied the opt-in short-prompt exactness and timing evidence. The normal train will check the resulting tip.
|
|
Thank you @jojomondag. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
What this changes
The int8 prompt GEMM (
--prompt-precision int8,tf_w4a8_prefill) runs 128 x 128 tiles, one block an SM. A projection whose grid is at most one wave of blocks pays one block's whole K loop whatever its size, which is every turn that adds a short message or tool result to a kept conversation. WithTF_QWEN_INT8_TILES=1(default off)w4a8_prefill.cualso instantiatesprefill8_bodyat 64x128, 32x128 and 16x64, andchooseTile(rows, n, k, sms)takes the tile with the least predicted time, on a card of 170 SMs (tuned_sms, the count its constants were measured on); a card of another SM count keeps the 128 x 128 tile. A tile only changes which outputs a block holds: each output's integer group dots and its ascending fma chain over the groups are the same, so the bytes are the same. Unset, every projection takestf_w4a8_prefillas today.0ba35fe6d, two commits:d123ff74d(16 files, +225 -23: 13 lines inzig/kernels/cuda/w4a8_prefill.cu, the chooser inzig/src/cuda/w4a8.zig, the Qwen hook incuda_prompt_int8.zig, contract records and cells, the switch's registration) and773ef4643(the chooser only on the measured SM count, after the first review). The branch merges into current mainac6fd5664without a conflict.atc overlap --json: run at 2026-12-03 00:44 UTC with ATC 0.9.6 ond123ff74d(the later commit touches four of the same files and no new one). 65 open pull requests share files with this one. The 9 that could be test-merged are clean; 56 could not be test-merged within ATC's limits (complete: false:timeLimit,pullRequestsLimit,otherPullRequestsLimit,pullFilesUnavailable). Nothing is claimed or started.Checks on this head
773ef4643on main0ba35fe6d.python3 tools/zig/lean_check.py, on the base and on this head: 88 and 88, 0 new.zig build -Dfixed-cpu test-host: exit 0, no failed step.zig build test-w4a8-contract-host(reached bytest-host): the chooser's picks at 170 SMs, that the switch off and cards of 0, 48, 84, 128 and 188 SMs keep the 128 x 128 tile, that the chooser's row boundaries are served contract shapes, and the tiles' shared memory. A wrong expectation planted in it fails the step (expected 1, found 0, exit 1).zig fmt --check build.zig zigandgit diff --check: clean.zig build nativeandzig build compile-cuda-testswith-Dsm=120compile.tf-cuda-test kernel-contract w4a8on one RTX 5090, on this head: each of the three tiles passes gates 1 to 4, andshapesreports272 shapes bit-equal to the kernel it replacesfor each; the planted control (a tile run one input group short) differs from byte 0.The run exits 1 on the 5 limit problems, which are the usage audit under my device compiler, nvcc 13.4, where this image has no record set: all five launches print
recorded 0, 0, and main0ba35fe6dbuilt the same way prints the same for its two.tf-cuda-test w4a8exits 0.kernel-contract-limitson fatbins built by nvcc 13.0.88 for sm_80/86/89/120/121:record currentfor the three new launches on all five (147/147/147/125/125, 118/118/118/76/76 and 96/96/96/72/72 registers). The records are markedlater_pending, since I have no 13.2 or 13.3 compiler for the sets between.shapesgate compares the tiles on the device); Metal, HIP, XPU (CUDA-only change).Receipt
Main against branch: cells and numbers, or why they can't be run: the switch unset against set on this head (unset is main's path: every projection takes
tf_w4a8_prefill). One RTX 5090, one server an arm, order unset, set, set, unset in one run;--drafter --kv-cache fp8 --prompt-precision int8 --context 262144 --parallel 1 --prompt-cache-gib 24,TF_QWEN_REQUEST_STARTS=1 TF_QWEN_PROMPT_SPLITK=1in every arm,tools/bench_tail_turns.py --user-words 400 --turns 4 --seed 1234. Median first token of the turns that each add one message (ms), the two servers of an arm:Cold reads (cut at message starts, unmerged): 11.72 / 11.73 -> 10.03 / 10.05 s at 33k, and 85.7 to 86.3 -> 78.7 to 79.2 s at 140k (four reads a server). Every reply's token and output hash equals the first server's, in all four servers of both runs. No
panicline in the eight server logs.The tree that ran these differs from
d123ff74din one string, the issue number in the profile row.773ef4643changes no kernel and, on this 170-SM card, no pick.One launch, today's tile against the chosen one (the issue's table, a v1.3.5-based build with the same kernel body): 7 to 32 rows 70-72 us -> 15.6-23 us (16x64); 110 rows 89 / 245 us -> 36 / 95 us (32x128); 410 rows 223 / 298 -> 150 / 215 us (64x128). Over the duel's 77 cells the chooser lands within 1.3 % of the best of the four tiles.
Hash run (
tools/perf_receipt.pyof ci: add tamper-evident performance receipt hash run and GitHub verifier #6078 at51424e47). Base0ba35fe6dagainst head773ef4643, both arms served with--prompt-precision int8andTF_QWEN_INT8_TILES=1in the environment (the base build does not know the switch), two mirrored blocks, drafted: tokens equal on all four prompts, the planted control diverged, drafted equals"draft": false; first token (the receipt'sttft_s) 0.057 -> 0.032 s on each of the four prompts. Decode reads 329.73 -> 336.31 tok/s (+2.0 %, base against base 0.15 % apart), and I do not claim that for the change: the same two binaries with the switch unset read 328.59 -> 335.20 tok/s (+2.0 %, first token 0.057 -> 0.057 s), so the decode difference belongs to this build of the head and not to the switch, and the previous head's build read level (328.93 -> 328.65 tok/s) with the same first-token gain. The pack scores decode tok/s on four prompts of 65 to 89 tokens with the prompt cache off; this change acts in the prompt pass. The receipt is attached in a comment, not committed: a receipt committed on the branch cannot name the commit that holds it, so--expect-headwould call it stale.Boxes it reaches: the int8 prompt GEMM (
--prompt-precision int8), whose callers on main are Qwen 3.5/3.8 on CUDA, only with the switch set and on a 170-SM card. bf16 prompts and decode keep their kernels. Large passes see the chooser too: at 3,945 to 8,192 rows it takes 64x128 for N of 1,024 and up and 16x64 for the 48-wide projections (the issue's numbers: worst cell in the duel 2.4 % slower, a merged 140k read 1.1 s sooner).New switch? Default, accepted values, profile row:
TF_QWEN_INT8_TILES,0or1, unset0, profile classidentical, indocs/environment.md,docs/environment-names.md,platform/environment.zig,environment_valid_cases.zig,core/profile.zigand the CLI's environment list. No stored-data change; at most about 36 KB of shared memory a block (less than today's 55 KB).Environment, with the TensorFold commit, Zig and backend toolchain, machine and GPU, checkpoint and revision: head
773ef4643on main0ba35fe6d,zig build native -Dsm=120, Zig 0.17.0, nvcc 13.4 (usage records from nvcc 13.0.88); one RTX 5090 32 GB (170 SMs), driver 615.78.08, Ryzen 7 9800X3D, Linux, nothing else on the GPU during a timed run;TensorFold/Qwen3.8-27B-MLX-4bit@22d8d538, drafterz-lab/Qwen3.8-27B-DFlash2@50307d4c.Paths and platforms the change reaches, which I ran and which I could not: ran on sm_120: int8 prompts over whole fp8 caches, short turns and cold reads, with request starts and the split passes beside it. Could not run: sm_121 and other SM classes, several streams.
Exactness, from
tools/bench_concurrent.py --alone --serialortoken_shaagainst"draft": false: the fixture's token and output hashes in every server, the contract's byte comparison of each tile withtf_w4a8_prefill(272 shapes a tile, a planted control), and the hash run's four prompts (base and head token-equal, drafted equal to"draft": false).Main against this branch, same machine and checkpoint, posted before asking for a run on our machines (or why you can't): the table above (unset is main's path) and the hash run (main's binary against the head's).
Decode speed before and after, from
tools/bench_openai.py: the switch is read only by the int8 prompt GEMM; the hash run's decode tok/s is the same with the switch unset and set (335.20 and 336.31 tok/s on this head's build; 328.6 to 329.7 on main's).Prompt speed before and after: the tables above.
Licence of any new weights or drafter, or "n/a": n/a
Checklist
The title and description match the head commit, including the receipt and the stack.
New tests fail before the change, pass after it, and skip cleanly without their dependency.
Comments and docstrings are one line. No measurements or history in the source.
No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.
Every token still goes through the lane rounds. No serial path, and nothing that needs drafts off.
Drafted output equals
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. Drafted against"draft": falseis shown by the hash run on one prompt, and the issue's two disk stores resume each other (12 of 12 replies, the v1.3.5-based build). Concurrent against solo was not run on this change.No precision traded for speed. If the bits change, the description says which sums change and why.
Decode and prompt processing are no slower than main at one stream and the widest admitted; with
--drafter, no slower than without it, greedy and sampled. Measured: one stream with--drafter. Several streams and the drafter off were not measured.