# multi-activation kernels for the CPU small-batch pass (speculative verification): paired measurements
model: gpt-oss-20b-MXFP4.gguf (12109565632 bytes, sha256 65D06D31A3977D553CB3AF137B5C26B5F1E9297A6AAA29AE7CAA98788CDE53AB)
cpu: Core Ultra 7 265U, 14 threads, kernels avx-vnni, single-channel DDR5-5600; base commit c581730 plus this change
date: 2026-10-16; machine state not controlled (another session ran teacher-forced probes on the same model in between;
runs below were started only after no other model process had run for 60 s)

## profile before the change (batch_cost, position 900, 5 rounds, quiet morning run, single step 89 ms)
n	median ms	ms per token	cost vs n single steps
1	89	89	1.00	(runs [86.0, 88.0, 89.0, 90.0, 92.0])
2	131	65	0.74	(runs [131.0, 131.0, 131.0, 132.0, 134.0])
3	170	57	0.64	(runs [166.0, 168.0, 170.0, 175.0, 175.0])
4	220	55	0.62	(runs [210.0, 217.0, 220.0, 221.0, 224.0])
5	261	52	0.59	(runs [254.0, 254.0, 261.0, 266.0, 269.0])
6	304	51	0.57	(runs [301.0, 304.0, 304.0, 321.0, 323.0])
7	360	51	0.58	(runs [348.0, 358.0, 360.0, 370.0, 372.0])
8	418	52	0.59	(runs [393.0, 401.0, 418.0, 420.0, 425.0])
9	458	51	0.57	(runs [451.0, 457.0, 458.0, 466.0, 472.0])
phase breakdown, per token, summed over the measured rounds:
1	per token ms: qkv 12.5 | attention 5.1 | o-proj 10.1 | router 1.2 | gate+up 26.9 | activation 1.0 | down 15.0 | lm-head 17.1 | total 88.8 | distinct experts per layer 4.0
2	per token ms: qkv 7.3 | attention 3.9 | o-proj 5.9 | router 0.9 | gate+up 23.7 | activation 1.4 | down 12.6 | lm-head 10.1 | total 65.8 | distinct experts per layer 5.6
3	per token ms: qkv 5.9 | attention 2.9 | o-proj 4.7 | router 0.7 | gate+up 21.2 | activation 1.4 | down 11.4 | lm-head 8.5 | total 56.8 | distinct experts per layer 6.5
4	per token ms: qkv 5.5 | attention 2.8 | o-proj 4.5 | router 0.6 | gate+up 20.4 | activation 1.4 | down 11.1 | lm-head 8.1 | total 54.5 | distinct experts per layer 7.4
5	per token ms: qkv 5.2 | attention 2.5 | o-proj 4.2 | router 0.6 | gate+up 19.8 | activation 1.5 | down 10.6 | lm-head 7.8 | total 52.1 | distinct experts per layer 8.2
6	per token ms: qkv 5.1 | attention 2.4 | o-proj 4.1 | router 0.6 | gate+up 19.8 | activation 1.4 | down 10.6 | lm-head 7.6 | total 51.6 | distinct experts per layer 8.9
7	per token ms: qkv 5.1 | attention 2.3 | o-proj 4.1 | router 0.6 | gate+up 19.9 | activation 1.5 | down 10.5 | lm-head 7.5 | total 51.5 | distinct experts per layer 9.7
8	per token ms: qkv 5.1 | attention 2.4 | o-proj 4.0 | router 0.6 | gate+up 19.5 | activation 1.6 | down 10.4 | lm-head 7.8 | total 51.3 | distinct experts per layer 8.7
9	per token ms: qkv 5.0 | attention 2.3 | o-proj 3.9 | router 0.5 | gate+up 19.6 | activation 1.5 | down 10.4 | lm-head 7.7 | total 51.1 | distinct experts per layer 9.5

## paired, in one process (batch_cost <model> 900 9 9 14 ab): every pass run without and with the multi-activation
## kernels back to back, alternating which goes first; started 2026-10-16 12:40 local after 60 s with no other model process
prefill of 900 tokens: 42.9 s; 14 threads
one-token kernel per token:
n	median ms	ms per token	cost vs n single steps
1	108	108	1.00	(runs [108.0, 107.0, 118.0, 105.0, 131.0, 106.0, 111.0, 101.0, 114.0])
2	185	93	0.86	(runs [179.0, 179.0, 194.0, 185.0, 222.0, 183.0, 197.0, 174.0, 201.0])
3	259	86	0.80	(runs [252.0, 253.0, 272.0, 262.0, 261.0, 265.0, 251.0, 244.0, 259.0])
4	338	84	0.78	(runs [317.0, 323.0, 350.0, 339.0, 338.0, 343.0, 334.0, 324.0, 356.0])
5	401	80	0.74	(runs [393.0, 398.0, 361.0, 406.0, 427.0, 449.0, 401.0, 399.0, 402.0])
6	487	81	0.75	(runs [504.0, 463.0, 447.0, 476.0, 527.0, 489.0, 487.0, 461.0, 488.0])
7	559	80	0.74	(runs [559.0, 549.0, 528.0, 543.0, 609.0, 595.0, 584.0, 557.0, 604.0])
8	657	82	0.76	(runs [657.0, 590.0, 662.0, 609.0, 705.0, 670.0, 612.0, 647.0, 830.0])
9	742	82	0.76	(runs [761.0, 765.0, 742.0, 721.0, 833.0, 739.0, 714.0, 669.0, 834.0])
phase breakdown, per token, summed over the measured rounds:
1	per token ms: qkv 14.4 | attention 8.3 | o-proj 11.7 | router 1.7 | gate+up 35.3 | activation 1.8 | down 20.5 | lm-head 17.5 | total 111.1 | distinct experts per layer 4.0
2	per token ms: qkv 10.3 | attention 6.4 | o-proj 8.4 | router 1.3 | gate+up 33.4 | activation 2.3 | down 18.7 | lm-head 14.3 | total 95.1 | distinct experts per layer 5.5
3	per token ms: qkv 9.2 | attention 4.8 | o-proj 7.2 | router 1.0 | gate+up 31.0 | activation 2.3 | down 16.9 | lm-head 13.4 | total 85.7 | distinct experts per layer 6.4
4	per token ms: qkv 8.6 | attention 4.6 | o-proj 6.9 | router 1.0 | gate+up 31.2 | activation 2.4 | down 16.7 | lm-head 12.4 | total 83.8 | distinct experts per layer 7.8
5	per token ms: qkv 8.2 | attention 4.0 | o-proj 6.6 | router 0.9 | gate+up 30.1 | activation 2.4 | down 16.1 | lm-head 12.2 | total 80.7 | distinct experts per layer 8.0
6	per token ms: qkv 8.0 | attention 4.0 | o-proj 6.5 | router 0.9 | gate+up 30.3 | activation 2.4 | down 16.0 | lm-head 12.1 | total 80.3 | distinct experts per layer 8.7
7	per token ms: qkv 8.1 | attention 3.8 | o-proj 6.5 | router 0.9 | gate+up 30.5 | activation 2.5 | down 16.3 | lm-head 12.7 | total 81.2 | distinct experts per layer 9.2
8	per token ms: qkv 8.1 | attention 3.7 | o-proj 6.5 | router 0.8 | gate+up 32.1 | activation 2.5 | down 16.7 | lm-head 12.4 | total 82.9 | distinct experts per layer 9.1
9	per token ms: qkv 8.3 | attention 3.7 | o-proj 6.5 | router 0.8 | gate+up 32.0 | activation 2.5 | down 16.9 | lm-head 12.8 | total 83.5 | distinct experts per layer 9.6
multi-activation kernels:
n	median ms	ms per token	cost vs n single steps
1	108	108	1.00	(runs [114.0, 106.0, 122.0, 106.0, 127.0, 108.0, 108.0, 102.0, 111.0])
2	186	93	0.86	(runs [175.0, 190.0, 186.0, 186.0, 202.0, 186.0, 187.0, 171.0, 190.0])
3	239	80	0.74	(runs [226.0, 228.0, 241.0, 241.0, 251.0, 248.0, 233.0, 232.0, 239.0])
4	306	76	0.71	(runs [284.0, 281.0, 338.0, 306.0, 299.0, 316.0, 306.0, 289.0, 373.0])
5	338	68	0.63	(runs [328.0, 340.0, 304.0, 332.0, 347.0, 357.0, 353.0, 338.0, 334.0])
6	393	66	0.61	(runs [424.0, 376.0, 357.0, 370.0, 425.0, 393.0, 409.0, 369.0, 397.0])
7	439	63	0.58	(runs [431.0, 444.0, 397.0, 419.0, 472.0, 462.0, 439.0, 410.0, 454.0])
8	496	62	0.57	(runs [496.0, 463.0, 454.0, 493.0, 569.0, 524.0, 491.0, 500.0, 816.0])
9	547	61	0.56	(runs [535.0, 532.0, 547.0, 560.0, 629.0, 617.0, 541.0, 513.0, 716.0])
phase breakdown, per token, summed over the measured rounds:
1	per token ms: qkv 14.3 | attention 8.3 | o-proj 11.7 | router 1.7 | gate+up 35.5 | activation 1.7 | down 20.5 | lm-head 17.4 | total 111.2 | distinct experts per layer 4.0
2	per token ms: qkv 9.9 | attention 6.1 | o-proj 7.8 | router 1.2 | gate+up 33.1 | activation 2.5 | down 18.2 | lm-head 13.8 | total 92.7 | distinct experts per layer 5.5
3	per token ms: qkv 8.0 | attention 4.9 | o-proj 6.2 | router 1.1 | gate+up 29.2 | activation 2.4 | down 16.1 | lm-head 11.2 | total 79.0 | distinct experts per layer 6.4
4	per token ms: qkv 7.4 | attention 4.9 | o-proj 5.7 | router 1.0 | gate+up 29.5 | activation 2.5 | down 16.1 | lm-head 10.2 | total 77.4 | distinct experts per layer 7.8
5	per token ms: qkv 6.2 | attention 4.0 | o-proj 4.9 | router 0.9 | gate+up 25.5 | activation 2.4 | down 13.8 | lm-head 9.5 | total 67.2 | distinct experts per layer 8.0
6	per token ms: qkv 6.0 | attention 4.1 | o-proj 4.6 | router 0.9 | gate+up 24.7 | activation 2.5 | down 13.1 | lm-head 9.1 | total 65.0 | distinct experts per layer 8.7
7	per token ms: qkv 5.6 | attention 3.7 | o-proj 4.4 | router 0.9 | gate+up 23.7 | activation 2.4 | down 12.8 | lm-head 8.7 | total 62.2 | distinct experts per layer 9.2
8	per token ms: qkv 5.9 | attention 4.0 | o-proj 4.6 | router 0.9 | gate+up 25.0 | activation 2.7 | down 14.1 | lm-head 9.6 | total 66.6 | distinct experts per layer 9.1
9	per token ms: qkv 5.7 | attention 3.9 | o-proj 4.4 | router 0.9 | gate+up 24.2 | activation 2.6 | down 13.2 | lm-head 9.1 | total 63.9 | distinct experts per layer 9.6
logits of the two arms identical bit for bit in all 90 paired passes
paired: time with multi-activation kernels / time without, per round
n	median ratio	(ratios)
1	1.006	[1.053, 0.989, 1.027, 1.011, 0.969, 1.015, 0.976, 1.006, 0.966]
2	0.976	[0.976, 1.059, 0.963, 1.005, 0.911, 1.012, 0.949, 0.981, 0.946]
3	0.924	[0.899, 0.902, 0.886, 0.92, 0.961, 0.934, 0.925, 0.951, 0.924]
4	0.903	[0.893, 0.869, 0.966, 0.903, 0.884, 0.922, 0.918, 0.893, 1.048]
5	0.833	[0.833, 0.853, 0.843, 0.818, 0.811, 0.795, 0.88, 0.847, 0.831]
6	0.805	[0.842, 0.812, 0.798, 0.778, 0.805, 0.804, 0.839, 0.8, 0.815]
7	0.771	[0.771, 0.809, 0.752, 0.773, 0.774, 0.778, 0.751, 0.735, 0.751]
8	0.785	[0.755, 0.785, 0.685, 0.81, 0.806, 0.782, 0.802, 0.773, 0.984]
9	0.759	[0.703, 0.696, 0.737, 0.776, 0.755, 0.834, 0.759, 0.767, 0.859]

## earlier attempts, kept for the record (too noisy to use)
- separate binaries before/after/before/after, 5 rounds each, while another session compiled and ran probes: n=9 medians
  951 / 416 / 611 / 491 ms, n=4 425 / 214 / 273 / 283 ms; single steps 145 / 100 / 100 / 102 ms.
- in-process paired run with a probe running on ~7.5 cores (7 rounds): median ratios n=2..9 1.037, 0.916, 0.921, 0.866,
  0.797, 0.834, 0.757, 0.734 (n=1 1.017), consistent with the quieter paired run above.

## DISTURBED, not used: speculation A/B after the change (ab_speculation <model> crates/gptoss/src/sampling.rs 3 320 14)
## started 12:52 local after 60 s with no other model process, but another session's GPU prefill probe (gpu_prefill.exe,
## not in the busy check) ran for about 2.5 minutes inside this window and took memory bandwidth and power; superseded by
## the clean rerun at the end of this file
## (output text and id lines omitted; LELEKA_SPECULATION_LOG was not set, so acceptance counts were not captured)
leleka-cpu-worker: read 12109565632 bytes of the model in 10.1 s (checksum 345869555)
leleka-cpu-worker: gpt-oss loaded; kernels avx-vnni, 14 threads, context 1262, stop tokens [200002, 200012, 199999]
ab_speculation: 4 prompts of [878, 874, 868, 856] tokens, 3 pairs, max_new 320, 14 threads
rewrite pair 0 speculate=false: 320 tokens, prompt 472 ms, decode 39262 ms (8.15 tok/s), identical=true
rewrite pair 0 speculate=true: 320 tokens, prompt 98 ms, decode 27761 ms (11.53 tok/s), identical=true
rewrite pair 1 speculate=true: 320 tokens, prompt 111 ms, decode 25672 ms (12.47 tok/s), identical=true
rewrite pair 1 speculate=false: 320 tokens, prompt 95 ms, decode 31010 ms (10.32 tok/s), identical=true
rewrite pair 2 speculate=false: 320 tokens, prompt 102 ms, decode 30917 ms (10.35 tok/s), identical=true
rewrite pair 2 speculate=true: 320 tokens, prompt 96 ms, decode 22319 ms (14.34 tok/s), identical=true
diff pair 0 speculate=true: 303 tokens, prompt 1406 ms, decode 28226 ms (10.73 tok/s), identical=true
diff pair 0 speculate=false: 303 tokens, prompt 98 ms, decode 30460 ms (9.95 tok/s), identical=true
diff pair 1 speculate=false: 303 tokens, prompt 101 ms, decode 32609 ms (9.29 tok/s), identical=true
diff pair 1 speculate=true: 303 tokens, prompt 113 ms, decode 30563 ms (9.91 tok/s), identical=true
diff pair 2 speculate=true: 303 tokens, prompt 102 ms, decode 31781 ms (9.53 tok/s), identical=true
diff pair 2 speculate=false: 303 tokens, prompt 106 ms, decode 31289 ms (9.68 tok/s), identical=true
json pair 0 speculate=false: 195 tokens, prompt 1185 ms, decode 20548 ms (9.49 tok/s), identical=true
json pair 0 speculate=true: 195 tokens, prompt 101 ms, decode 20176 ms (9.66 tok/s), identical=true
json pair 1 speculate=true: 195 tokens, prompt 100 ms, decode 20217 ms (9.65 tok/s), identical=true
json pair 1 speculate=false: 195 tokens, prompt 100 ms, decode 20202 ms (9.65 tok/s), identical=true
json pair 2 speculate=false: 195 tokens, prompt 103 ms, decode 20186 ms (9.66 tok/s), identical=true
json pair 2 speculate=true: 195 tokens, prompt 100 ms, decode 22955 ms (8.49 tok/s), identical=true
explain pair 0 speculate=true: 162 tokens, prompt 875 ms, decode 18533 ms (8.74 tok/s), identical=true
explain pair 0 speculate=false: 162 tokens, prompt 105 ms, decode 16852 ms (9.61 tok/s), identical=true
explain pair 1 speculate=false: 162 tokens, prompt 102 ms, decode 16798 ms (9.64 tok/s), identical=true
explain pair 1 speculate=true: 162 tokens, prompt 101 ms, decode 18042 ms (8.98 tok/s), identical=true
explain pair 2 speculate=true: 162 tokens, prompt 108 ms, decode 17434 ms (9.29 tok/s), identical=true
explain pair 2 speculate=false: 162 tokens, prompt 112 ms, decode 17281 ms (9.37 tok/s), identical=true
rewrite: plain median 10.32 tok/s, speculate median 12.47 tok/s, paired ratio mean 1.34 (runs [1.41, 1.21, 1.39]), outputs identical: true
diff: plain median 9.68 tok/s, speculate median 9.91 tok/s, paired ratio mean 1.04 (runs [1.08, 1.07, 0.98]), outputs identical: true
json: plain median 9.65 tok/s, speculate median 9.65 tok/s, paired ratio mean 0.97 (runs [1.02, 1.0, 0.88]), outputs identical: true
explain: plain median 9.61 tok/s, speculate median 8.98 tok/s, paired ratio mean 0.94 (runs [0.91, 0.93, 0.99]), outputs identical: true

## replay of these outputs through the drafter with the new MEASURED_COST (LELEKA_AB_REPLAY, no model run)
default policy: geomean 1.160 min 0.991 [1.592, 1.151, 0.999, 0.991] (rewrite, diff, json, explain)

## machine state after the speculation A/B (Capture-MachineState.ps1; the scripted capture before it failed on a path form)
{"captured_utc":"2026-10-16T11:04:05Z","os_build":"26100","os_ubr":9711,"npu_driver_version":"32.0.100.4778","npu_status":"OK","igpu_driver_version":"32.0.101.8860","bios_version":"1.17.0","power_plan_guid":"381b4222-f694-41f0-9685-ff5bb260df2e","ac_online":true,"discharging":false,"available_mbytes":14535,"committed_bytes":22191890432,"commit_limit_bytes":43978014720,"cpu_samples":[{"utc":"2026-10-16T11:04:16Z","perf":91,"pct_max_freq":77,"mhz":1517,"utility":3},{"utc":"2026-10-16T11:04:18Z","perf":82,"pct_max_freq":72,"mhz":1503,"utility":1},{"utc":"2026-10-16T11:04:19Z","perf":72,"pct_max_freq":74,"mhz":1592,"utility":1}],"processes":328,"vmmemwsl_working_set_bytes":0,"docker_desktop_processes":0,"browser_processes":45,"browser_working_set_bytes":8140898304,"security_agent_running":true,"top_cpu_processes":[{"name":"claude","cpu_seconds":531},{"name":"claude","cpu_seconds":512},{"name":"claude","cpu_seconds":270},{"name":"Taskmgr","cpu_seconds":216},{"name":"chrome","cpu_seconds":208}],"reference_record":{"record_id":"RHW-WIN-265U-NPU","revision":1},"drift_result":{"os_build":"match","os_ubr":"mismatch","npu_driver_version":"match","igpu_driver_version":"match","bios_version":"match","power_plan_guid":"match","power_mode":"not-comparable","overall":"stale"}}

## clean rerun, 2026-10-16 13:08-13:20 local, with the other session holding all heavy work
## other model\/compiler processes checked before, between and after (cargo\/rustc were still finishing at the start of
## batch_cost, so its first rounds ran slower; nothing else ran after 13:10)
== start Fri Oct 16 13:08:53     2026
OTHER_PROCESSES_BEFORE: [cargo.exe 3592; cargo.exe 11096; rustc.exe 13328]
prefill of 900 tokens: 31.0 s; 14 threads
one-token kernel per token:
n	median ms	ms per token	cost vs n single steps
1	87	87	1.00	(runs [96.0, 105.0, 97.0, 87.0, 84.0, 86.0, 94.0, 85.0, 86.0])
2	132	66	0.76	(runs [149.0, 162.0, 187.0, 132.0, 128.0, 132.0, 124.0, 125.0, 126.0])
3	187	62	0.72	(runs [206.0, 193.0, 328.0, 187.0, 190.0, 180.0, 168.0, 172.0, 176.0])
4	240	60	0.69	(runs [256.0, 241.0, 245.0, 240.0, 237.0, 223.0, 220.0, 241.0, 240.0])
5	278	56	0.64	(runs [309.0, 320.0, 299.0, 278.0, 265.0, 266.0, 274.0, 294.0, 266.0])
6	345	58	0.66	(runs [380.0, 351.0, 345.0, 349.0, 313.0, 343.0, 321.0, 355.0, 317.0])
7	392	56	0.64	(runs [392.0, 419.0, 416.0, 443.0, 369.0, 419.0, 368.0, 369.0, 364.0])
8	464	58	0.67	(runs [622.0, 460.0, 471.0, 464.0, 411.0, 507.0, 481.0, 414.0, 413.0])
9	487	54	0.62	(runs [510.0, 526.0, 576.0, 487.0, 464.0, 482.0, 494.0, 480.0, 471.0])
phase breakdown, per token, summed over the measured rounds:
1	per token ms: qkv 12.7 | attention 5.5 | o-proj 10.2 | router 1.1 | gate+up 27.5 | activation 0.8 | down 15.7 | lm-head 17.4 | total 90.9 | distinct experts per layer 4.0
2	per token ms: qkv 7.8 | attention 4.0 | o-proj 7.3 | router 0.8 | gate+up 24.8 | activation 1.2 | down 13.6 | lm-head 10.7 | total 70.3 | distinct experts per layer 5.5
3	per token ms: qkv 6.9 | attention 3.4 | o-proj 5.4 | router 0.7 | gate+up 25.1 | activation 1.2 | down 14.3 | lm-head 9.5 | total 66.5 | distinct experts per layer 6.4
4	per token ms: qkv 6.2 | attention 3.1 | o-proj 5.0 | router 0.6 | gate+up 22.5 | activation 1.2 | down 12.1 | lm-head 8.7 | total 59.4 | distinct experts per layer 7.8
5	per token ms: qkv 5.8 | attention 2.8 | o-proj 4.7 | router 0.6 | gate+up 21.5 | activation 1.2 | down 11.6 | lm-head 8.9 | total 57.0 | distinct experts per layer 8.0
6	per token ms: qkv 5.7 | attention 2.7 | o-proj 4.6 | router 0.5 | gate+up 21.7 | activation 1.2 | down 11.5 | lm-head 8.9 | total 56.8 | distinct experts per layer 8.7
7	per token ms: qkv 5.6 | attention 2.6 | o-proj 4.5 | router 0.5 | gate+up 21.8 | activation 1.3 | down 11.5 | lm-head 8.6 | total 56.4 | distinct experts per layer 9.2
8	per token ms: qkv 5.7 | attention 2.7 | o-proj 4.6 | router 0.5 | gate+up 22.5 | activation 1.4 | down 11.7 | lm-head 9.7 | total 58.9 | distinct experts per layer 9.1
9	per token ms: qkv 5.5 | attention 2.5 | o-proj 4.4 | router 0.5 | gate+up 21.3 | activation 1.3 | down 11.2 | lm-head 8.7 | total 55.4 | distinct experts per layer 9.6
multi-activation kernels:
n	median ms	ms per token	cost vs n single steps
1	92	92	1.00	(runs [92.0, 102.0, 105.0, 93.0, 86.0, 85.0, 96.0, 92.0, 85.0])
2	135	68	0.73	(runs [150.0, 169.0, 253.0, 132.0, 135.0, 134.0, 131.0, 126.0, 135.0])
3	177	59	0.64	(runs [191.0, 180.0, 226.0, 177.0, 188.0, 161.0, 169.0, 164.0, 162.0])
4	206	52	0.56	(runs [221.0, 208.0, 215.0, 206.0, 192.0, 195.0, 197.0, 213.0, 197.0])
5	236	47	0.51	(runs [257.0, 264.0, 236.0, 240.0, 230.0, 227.0, 217.0, 239.0, 222.0])
6	268	45	0.49	(runs [332.0, 278.0, 284.0, 280.0, 263.0, 268.0, 262.0, 262.0, 257.0])
7	309	44	0.48	(runs [383.0, 336.0, 332.0, 309.0, 309.0, 323.0, 297.0, 305.0, 284.0])
8	349	44	0.47	(runs [365.0, 349.0, 388.0, 351.0, 338.0, 347.0, 358.0, 323.0, 330.0])
9	385	43	0.46	(runs [383.0, 385.0, 435.0, 391.0, 358.0, 416.0, 369.0, 402.0, 350.0])
phase breakdown, per token, summed over the measured rounds:
1	per token ms: qkv 12.7 | attention 6.1 | o-proj 10.4 | router 1.2 | gate+up 28.5 | activation 0.9 | down 15.8 | lm-head 17.4 | total 92.9 | distinct experts per layer 4.0
2	per token ms: qkv 8.5 | attention 4.7 | o-proj 7.4 | router 0.9 | gate+up 26.9 | activation 1.2 | down 14.8 | lm-head 11.5 | total 75.7 | distinct experts per layer 5.5
3	per token ms: qkv 6.1 | attention 3.4 | o-proj 4.9 | router 0.7 | gate+up 22.7 | activation 1.2 | down 12.2 | lm-head 8.5 | total 59.8 | distinct experts per layer 6.4
4	per token ms: qkv 4.9 | attention 3.0 | o-proj 3.9 | router 0.6 | gate+up 19.8 | activation 1.1 | down 10.7 | lm-head 7.2 | total 51.1 | distinct experts per layer 7.8
5	per token ms: qkv 4.4 | attention 2.7 | o-proj 3.5 | router 0.5 | gate+up 18.4 | activation 1.2 | down 9.9 | lm-head 6.7 | total 47.3 | distinct experts per layer 8.0
6	per token ms: qkv 4.3 | attention 2.8 | o-proj 3.3 | router 0.5 | gate+up 17.6 | activation 1.3 | down 9.5 | lm-head 6.6 | total 45.9 | distinct experts per layer 8.7
7	per token ms: qkv 4.3 | attention 2.7 | o-proj 3.2 | router 0.5 | gate+up 17.9 | activation 1.3 | down 9.4 | lm-head 6.2 | total 45.6 | distinct experts per layer 9.2
8	per token ms: qkv 3.9 | attention 2.6 | o-proj 3.1 | router 0.5 | gate+up 17.0 | activation 1.3 | down 9.0 | lm-head 6.1 | total 43.6 | distinct experts per layer 9.1
9	per token ms: qkv 3.8 | attention 2.6 | o-proj 3.0 | router 0.5 | gate+up 16.6 | activation 1.4 | down 8.9 | lm-head 6.1 | total 43.0 | distinct experts per layer 9.6
logits of the two arms identical bit for bit in all 90 paired passes
paired: time with multi-activation kernels / time without, per round
n	median ratio	(ratios)
1	1.020	[0.957, 0.975, 1.083, 1.076, 1.02, 0.99, 1.027, 1.086, 0.989]
2	1.047	[1.002, 1.047, 1.347, 1.001, 1.053, 1.013, 1.062, 1.003, 1.075]
3	0.935	[0.929, 0.935, 0.688, 0.951, 0.993, 0.899, 1.009, 0.949, 0.92]
4	0.865	[0.862, 0.865, 0.877, 0.857, 0.81, 0.876, 0.895, 0.885, 0.823]
5	0.832	[0.832, 0.823, 0.79, 0.862, 0.868, 0.853, 0.791, 0.812, 0.836]
6	0.809	[0.873, 0.793, 0.824, 0.802, 0.839, 0.782, 0.815, 0.738, 0.809]
7	0.802	[0.978, 0.802, 0.796, 0.699, 0.836, 0.771, 0.808, 0.825, 0.782]
8	0.758	[0.587, 0.758, 0.822, 0.756, 0.822, 0.684, 0.744, 0.781, 0.798]
9	0.756	[0.751, 0.731, 0.756, 0.804, 0.772, 0.862, 0.745, 0.837, 0.744]
OTHER_PROCESSES_BETWEEN: [] at Fri Oct 16 13:10:41     2026
leleka-cpu-worker: read 12109565632 bytes of the model in 4.5 s (checksum 345869555)
leleka-cpu-worker: gpt-oss loaded; kernels avx-vnni, 14 threads, context 1262, stop tokens [200002, 200012, 199999]
ab_speculation: 4 prompts of [878, 874, 868, 856] tokens, 3 pairs, max_new 320, 14 threads
rewrite pair 0 speculate=false: 320 tokens, prompt 331 ms, decode 27684 ms (11.56 tok/s), identical=true
leleka-cpu-worker: speculation: 320 tokens, 41 verified batches, 222 of 230 drafted tokens accepted
rewrite pair 0 speculate=true: 320 tokens, prompt 84 ms, decode 18572 ms (17.23 tok/s), identical=true
leleka-cpu-worker: speculation: 320 tokens, 39 verified batches, 223 of 228 drafted tokens accepted
rewrite pair 1 speculate=true: 320 tokens, prompt 94 ms, decode 18862 ms (16.96 tok/s), identical=true
rewrite pair 1 speculate=false: 320 tokens, prompt 104 ms, decode 30350 ms (10.54 tok/s), identical=true
rewrite pair 2 speculate=false: 320 tokens, prompt 98 ms, decode 30216 ms (10.59 tok/s), identical=true
leleka-cpu-worker: speculation: 320 tokens, 39 verified batches, 224 of 227 drafted tokens accepted
rewrite pair 2 speculate=true: 320 tokens, prompt 89 ms, decode 19831 ms (16.14 tok/s), identical=true
leleka-cpu-worker: speculation: 303 tokens, 50 verified batches, 119 of 160 drafted tokens accepted
diff pair 0 speculate=true: 303 tokens, prompt 1212 ms, decode 25440 ms (11.91 tok/s), identical=true
diff pair 0 speculate=false: 303 tokens, prompt 94 ms, decode 28227 ms (10.73 tok/s), identical=true
diff pair 1 speculate=false: 303 tokens, prompt 92 ms, decode 29193 ms (10.38 tok/s), identical=true
leleka-cpu-worker: speculation: 303 tokens, 49 verified batches, 107 of 154 drafted tokens accepted
diff pair 1 speculate=true: 303 tokens, prompt 95 ms, decode 27434 ms (11.04 tok/s), identical=true
leleka-cpu-worker: speculation: 303 tokens, 31 verified batches, 61 of 96 drafted tokens accepted
diff pair 2 speculate=true: 303 tokens, prompt 98 ms, decode 30681 ms (9.88 tok/s), identical=true
diff pair 2 speculate=false: 303 tokens, prompt 102 ms, decode 30794 ms (9.84 tok/s), identical=true
json pair 0 speculate=false: 195 tokens, prompt 1133 ms, decode 20499 ms (9.51 tok/s), identical=true
leleka-cpu-worker: speculation: 195 tokens, 19 verified batches, 21 of 42 drafted tokens accepted
json pair 0 speculate=true: 195 tokens, prompt 104 ms, decode 21135 ms (9.23 tok/s), identical=true
leleka-cpu-worker: speculation: 195 tokens, 18 verified batches, 21 of 41 drafted tokens accepted
json pair 1 speculate=true: 195 tokens, prompt 103 ms, decode 21893 ms (8.91 tok/s), identical=true
json pair 1 speculate=false: 195 tokens, prompt 123 ms, decode 22325 ms (8.73 tok/s), identical=true
json pair 2 speculate=false: 195 tokens, prompt 119 ms, decode 21907 ms (8.90 tok/s), identical=true
leleka-cpu-worker: speculation: 195 tokens, 25 verified batches, 30 of 61 drafted tokens accepted
json pair 2 speculate=true: 195 tokens, prompt 105 ms, decode 23778 ms (8.20 tok/s), identical=true
leleka-cpu-worker: speculation: 162 tokens, 4 verified batches, 3 of 9 drafted tokens accepted
explain pair 0 speculate=true: 162 tokens, prompt 688 ms, decode 16908 ms (9.58 tok/s), identical=true
explain pair 0 speculate=false: 162 tokens, prompt 103 ms, decode 16678 ms (9.71 tok/s), identical=true
explain pair 1 speculate=false: 162 tokens, prompt 102 ms, decode 16520 ms (9.81 tok/s), identical=true
leleka-cpu-worker: speculation: 162 tokens, 4 verified batches, 3 of 9 drafted tokens accepted
explain pair 1 speculate=true: 162 tokens, prompt 105 ms, decode 17096 ms (9.48 tok/s), identical=true
leleka-cpu-worker: speculation: 162 tokens, 4 verified batches, 3 of 9 drafted tokens accepted
explain pair 2 speculate=true: 162 tokens, prompt 101 ms, decode 17053 ms (9.50 tok/s), identical=true
explain pair 2 speculate=false: 162 tokens, prompt 103 ms, decode 16557 ms (9.78 tok/s), identical=true
rewrite: plain median 10.59 tok/s, speculate median 16.96 tok/s, paired ratio mean 1.54 (runs [1.49, 1.61, 1.52]), outputs identical: true
diff: plain median 10.38 tok/s, speculate median 11.04 tok/s, paired ratio mean 1.06 (runs [1.11, 1.06, 1.0]), outputs identical: true
json: plain median 8.90 tok/s, speculate median 8.91 tok/s, paired ratio mean 0.97 (runs [0.97, 1.02, 0.92]), outputs identical: true
explain: plain median 9.78 tok/s, speculate median 9.50 tok/s, paired ratio mean 0.97 (runs [0.99, 0.97, 0.97]), outputs identical: true
OTHER_PROCESSES_AFTER: []
== finished Fri Oct 16 13:20:48     2026
STATE_BEFORE {"captured_utc":"2026-10-16T11:08:55Z","os_build":"26100","os_ubr":9711,"npu_driver_version":"32.0.100.4778","npu_status":"OK","igpu_driver_version":"32.0.101.8860","bios_version":"1.17.0","power_plan_guid":"381b4222-f694-41f0-9685-ff5bb260df2e","ac_online":true,"discharging":false,"available_mbytes":13949,"committed_bytes":22529998848,"commit_limit_bytes":43978014720,"cpu_samples":[{"utc":"2026-10-16T11:09:02Z","perf":165,"pct_max_freq":100,"mhz":1548,"utility":42},{"utc":"2026-10-16T11:09:03Z","perf":175,"pct_max_freq":83,"mhz":1639,"utility":31},{"utc":"2026-10-16T11:09:05Z","perf":187,"pct_max_freq":100,"mhz":1639,"utility":17}],"processes":343,"vmmemwsl_working_set_bytes":0,"docker_desktop_processes":0,"browser_processes":45,"browser_working_set_bytes":8089944064,"security_agent_running":true,"top_cpu_processes":[{"name":"claude","cpu_seconds":549},{"name":"claude","cpu_seconds":541},{"name":"claude","cpu_seconds":277},{"name":"Taskmgr","cpu_seconds":231},{"name":"chrome","cpu_seconds":211}],"reference_record":{"record_id":"RHW-WIN-265U-NPU","revision":1},"drift_result":{"os_build":"match","os_ubr":"mismatch","npu_driver_version":"match","igpu_driver_version":"match","bios_version":"match","power_plan_guid":"match","power_mode":"not-comparable","overall":"stale"}}
STATE_AFTER {"captured_utc":"2026-10-16T11:20:33Z","os_build":"26100","os_ubr":9711,"npu_driver_version":"32.0.100.4778","npu_status":"OK","igpu_driver_version":"32.0.101.8860","bios_version":"1.17.0","power_plan_guid":"381b4222-f694-41f0-9685-ff5bb260df2e","ac_online":true,"discharging":false,"available_mbytes":14599,"committed_bytes":22255783936,"commit_limit_bytes":43978014720,"cpu_samples":[{"utc":"2026-10-16T11:20:44Z","perf":81,"pct_max_freq":74,"mhz":1471,"utility":1},{"utc":"2026-10-16T11:20:45Z","perf":85,"pct_max_freq":71,"mhz":1562,"utility":2},{"utc":"2026-10-16T11:20:46Z","perf":84,"pct_max_freq":76,"mhz":1503,"utility":2}],"processes":337,"vmmemwsl_working_set_bytes":0,"docker_desktop_processes":0,"browser_processes":44,"browser_working_set_bytes":8007385088,"security_agent_running":true,"top_cpu_processes":[{"name":"claude","cpu_seconds":642},{"name":"claude","cpu_seconds":596},{"name":"Taskmgr","cpu_seconds":321},{"name":"claude","cpu_seconds":287},{"name":"chrome","cpu_seconds":219}],"reference_record":{"record_id":"RHW-WIN-265U-NPU","revision":1},"drift_result":{"os_build":"match","os_ubr":"mismatch","npu_driver_version":"match","igpu_driver_version":"match","bios_version":"match","power_plan_guid":"match","power_mode":"not-comparable","overall":"stale"}}

## serve-loop time breakdown (LELEKA_SPECULATION_LOG=1, ab_speculation <model> crates/gptoss/src/sampling.rs 2 320 14)
## 2026-10-16 13:33-13:39 local, no other model or compiler process before or after (other session holding)
## each log line belongs to the run line after it; output text and id lines omitted; the first 'plain decode 0 ms' line is the warm-up
OTHER_BEFORE: [] Fri Oct 16 13:33:45     2026
leleka-cpu-worker: read 12109565632 bytes of the model in 5.4 s (checksum 345869555)
leleka-cpu-worker: gpt-oss loaded; kernels avx-vnni, 14 threads, context 1262, stop tokens [200002, 200012, 199999]
ab_speculation: 4 prompts of [878, 874, 868, 856] tokens, 2 pairs, max_new 320, 14 threads
leleka-cpu-worker: plain decode 0 ms = passes (tokens:count x mean ms) | sample 0 | write 0 | draft 0 | truncate 0 | other 0
leleka-cpu-worker: plain decode 25858 ms = passes 1:319x80.9 (tokens:count x mean ms) | sample 56 | write 1 | draft 0 | truncate 0 | other 0
rewrite pair 0 speculate=false: 320 tokens, prompt 281 ms, decode 25859 ms (12.37 tok/s), identical=true
leleka-cpu-worker: speculation: 320 tokens, 39 verified batches, 224 of 225 drafted tokens accepted
leleka-cpu-worker: speculating decode 16485 ms = passes 1:56x81.0 3:8x164.1 4:2x206.2 5:4x238.5 6:2x288.6 7:2x322.8 8:3x358.6 9:18x383.4 (tokens:count x mean ms) | sample 58 | write 1 | draft 0 | truncate 0 | other 7
rewrite pair 0 speculate=true: 320 tokens, prompt 81 ms, decode 16485 ms (19.41 tok/s), identical=true
leleka-cpu-worker: speculation: 320 tokens, 41 verified batches, 222 of 228 drafted tokens accepted
leleka-cpu-worker: speculating decode 17661 ms = passes 1:56x83.0 3:6x179.5 4:3x223.6 5:3x263.7 6:4x313.4 7:3x358.2 8:19x356.9 9:3x431.5 (tokens:count x mean ms) | sample 64 | write 1 | draft 1 | truncate 0 | other 6
rewrite pair 1 speculate=true: 320 tokens, prompt 86 ms, decode 17661 ms (18.12 tok/s), identical=true
leleka-cpu-worker: plain decode 26985 ms = passes 1:319x84.4 (tokens:count x mean ms) | sample 59 | write 1 | draft 0 | truncate 0 | other 0
rewrite pair 1 speculate=false: 320 tokens, prompt 84 ms, decode 26985 ms (11.86 tok/s), identical=true
leleka-cpu-worker: speculation: 303 tokens, 59 verified batches, 109 of 155 drafted tokens accepted
leleka-cpu-worker: speculating decode 22539 ms = passes 1:134x83.4 2:1x121.5 3:33x165.0 4:18x206.7 5:3x249.3 6:2x301.3 7:2x331.4 (tokens:count x mean ms) | sample 54 | write 1 | draft 1 | truncate 0 | other 1
diff pair 0 speculate=true: 303 tokens, prompt 1018 ms, decode 22539 ms (13.44 tok/s), identical=true
leleka-cpu-worker: plain decode 25357 ms = passes 1:302x83.8 (tokens:count x mean ms) | sample 57 | write 1 | draft 0 | truncate 0 | other 0
diff pair 0 speculate=false: 303 tokens, prompt 91 ms, decode 25358 ms (11.95 tok/s), identical=true
leleka-cpu-worker: plain decode 25435 ms = passes 1:302x84.0 (tokens:count x mean ms) | sample 59 | write 1 | draft 0 | truncate 0 | other 0
diff pair 1 speculate=false: 303 tokens, prompt 84 ms, decode 25435 ms (11.91 tok/s), identical=true
leleka-cpu-worker: speculation: 303 tokens, 51 verified batches, 121 of 162 drafted tokens accepted
leleka-cpu-worker: speculating decode 22758 ms = passes 1:130x86.5 2:1x137.0 3:16x179.7 4:16x214.7 5:12x255.1 6:3x312.6 7:3x333.9 (tokens:count x mean ms) | sample 60 | write 1 | draft 1 | truncate 0 | other 1
diff pair 1 speculate=true: 303 tokens, prompt 84 ms, decode 22758 ms (13.31 tok/s), identical=true
leleka-cpu-worker: plain decode 16777 ms = passes 1:194x86.3 (tokens:count x mean ms) | sample 41 | write 1 | draft 0 | truncate 0 | other 0
json pair 0 speculate=false: 195 tokens, prompt 894 ms, decode 16777 ms (11.62 tok/s), identical=true
leleka-cpu-worker: speculation: 195 tokens, 18 verified batches, 22 of 39 drafted tokens accepted
leleka-cpu-worker: speculating decode 16925 ms = passes 1:154x88.0 2:7x136.2 3:3x184.9 4:6x217.1 5:2x258.8 (tokens:count x mean ms) | sample 42 | write 1 | draft 1 | truncate 0 | other 0
json pair 0 speculate=true: 195 tokens, prompt 90 ms, decode 16925 ms (11.52 tok/s), identical=true
leleka-cpu-worker: speculation: 195 tokens, 21 verified batches, 24 of 41 drafted tokens accepted
leleka-cpu-worker: speculating decode 16960 ms = passes 1:149x88.1 2:10x140.0 3:5x179.5 4:3x229.1 5:3x267.7 (tokens:count x mean ms) | sample 43 | write 1 | draft 1 | truncate 0 | other 1
json pair 1 speculate=true: 195 tokens, prompt 84 ms, decode 16960 ms (11.50 tok/s), identical=true
leleka-cpu-worker: plain decode 17294 ms = passes 1:194x88.9 (tokens:count x mean ms) | sample 45 | write 1 | draft 0 | truncate 0 | other 0
json pair 1 speculate=false: 195 tokens, prompt 87 ms, decode 17294 ms (11.28 tok/s), identical=true
leleka-cpu-worker: speculation: 162 tokens, 4 verified batches, 3 of 9 drafted tokens accepted
leleka-cpu-worker: speculating decode 15262 ms = passes 1:154x93.3 3:3x201.1 4:1x241.4 (tokens:count x mean ms) | sample 40 | write 1 | draft 1 | truncate 0 | other 0
explain pair 0 speculate=true: 162 tokens, prompt 571 ms, decode 15262 ms (10.61 tok/s), identical=true
leleka-cpu-worker: plain decode 14454 ms = passes 1:161x89.5 (tokens:count x mean ms) | sample 38 | write 1 | draft 0 | truncate 0 | other 0
explain pair 0 speculate=false: 162 tokens, prompt 86 ms, decode 14454 ms (11.21 tok/s), identical=true
leleka-cpu-worker: plain decode 14620 ms = passes 1:161x90.6 (tokens:count x mean ms) | sample 39 | write 1 | draft 0 | truncate 0 | other 0
explain pair 1 speculate=false: 162 tokens, prompt 87 ms, decode 14620 ms (11.08 tok/s), identical=true
leleka-cpu-worker: speculation: 162 tokens, 4 verified batches, 3 of 9 drafted tokens accepted
leleka-cpu-worker: speculating decode 14652 ms = passes 1:154x89.7 3:3x189.7 4:1x229.2 (tokens:count x mean ms) | sample 38 | write 1 | draft 1 | truncate 0 | other 0
explain pair 1 speculate=true: 162 tokens, prompt 88 ms, decode 14652 ms (11.06 tok/s), identical=true
rewrite: plain median 12.37 tok/s, speculate median 19.41 tok/s, paired ratio mean 1.55 (runs [1.57, 1.53]), outputs identical: true
diff: plain median 11.95 tok/s, speculate median 13.44 tok/s, paired ratio mean 1.12 (runs [1.13, 1.12]), outputs identical: true
json: plain median 11.62 tok/s, speculate median 11.52 tok/s, paired ratio mean 1.01 (runs [0.99, 1.02]), outputs identical: true
explain: plain median 11.21 tok/s, speculate median 11.06 tok/s, paired ratio mean 0.97 (runs [0.95, 1.0]), outputs identical: true
OTHER_AFTER: [] Fri Oct 16 13:39:30     2026
pass cost in the worker, relative to the same run's single step, all speculating runs pooled (passes):
2 tokens 1.57 (19) | 3 2.04 (77) | 4 2.50 (50) | 5 2.99 (27) | 6 3.66 (11) | 7 4.04 (10) | 8 4.32 (22) | 9 4.80 (21)
batch_cost quiet rerun (random ids, position 900):  1.52 | 1.99 | 2.31 | 2.65 | 3.01 | 3.47 | 3.92 | 4.33
MEASURED_COST (drafter prior):                      1.58 | 2.00 | 2.42 | 2.84 | 3.27 | 3.69 | 4.11 | 4.53
