Paths shortened: <GGUF model> is the directory coli import --mode link made for the GGUF (<GGUF dir>/ holds the file), <model> is the model's own directory (canonical.qc and experts.qc beside it); bin-<commit>/ holds the harness built from that commit; each launchers/<name>/qwen36-bench is a script that sets SNAP and the variables in brackets and runs a harness. Units: /usr/bin/time -l gives bytes; the engine's '[bench] peak RSS' is in GiB; the summary's 'peak memory ... MB' is in MiB, and so is the engine's '1.95 MB per expert at most' (2,039,808 bytes, 2.04 MB).

# 538509312: 264 slots, 256 retained, so a prompt runs layer by layer (qwen36_prefill_stream.h): one slot (2.04 MB) more

model set by each launcher; text code.txt; lengths 64,512; gen 32; runs 4; extra env: TEACHER=1
cooldown before every run: 60 seconds, after waiting for thermal state 0: yes, at most 900s; thermal states: 0 nominal, 1 fair, 2 serious, 3 critical
v0: launchers/gguf/qwen36-bench (this change (08293922), the defaults, SNAP=<GGUF model>)
v1: launchers/gguf-264-slots/qwen36-bench (this change (08293922), QWEN_EXPERT_CACHE_BYTES=538509312, SNAP=<GGUF model>)
order: the binaries' order turns at every round (ABBA)

host before the runs: 2026-10-19 13:31:21 chrome=0 System-wide memory free percentage: 76% swap_used=693.62M swapouts=75988

host after the runs: 2026-10-19 13:44:11 chrome=0 System-wide memory free percentage: 76% swap_used=661.62M swapouts=75988

## v1-run1
### before the run (date, thermal state, swap, wait)
2026-10-19 13:35:14
0
swap_used=693.62M swapouts=75988
waited for state 0: 0s

### harness output
ctx_tokens,prefill_tokens,prefill_s,prefill_tps,gen_tokens,gen_first_ms,gen_steady_tps,expert_miss,disk_s,fingerprint,tokens,nll,top1
64,64,4.538,14.10,32,710.9,6.150,10573,15.87,993fc7a94a1c6db6,24b5cd77c9db23fb,2.88531,0.406
512,512,7.088,72.24,32,1072.0,5.964,13697,24.53,34a820a03a3e3055,561100505ac9d4ca,2.59825,0.562

### engine log and /usr/bin/time -l
[bench] GGUF <GGUF dir>/Qwen3.6-35B-A3B-UD-Q4_K_M.gguf: 1 file(s), 733 tensors
[tok] loaded 248320 pieces (max id 248319) from <GGUF model>/tokenizer.json
[gguf] qwen35moe: 40 layers (10 attention), hidden 2048, 256 experts top-8, inter 512, vocab 248320, DeltaNet v/k heads 32/16
[gguf] experts: layer 0 gate Q4_K up Q4_K down Q5_K, 1.95 MB per expert at most
[qwen-cache] global_bytes=538509312 slots=264 slot_bytes=2039808 decode_policy=expected-reuse
[qwen36-metal] graph ready on Apple M1: rows<=2048 dense=mapped kv=half (1910087680 bytes mapped); the experts in the global cache, not in the per-layer one
[qwen36-metal] GGUF: the dense matrices read in place as the file's ggml blocks, and the routed experts as its blocks too (layer 0: gate Q4_K, up Q4_K, down Q5_K), with no second quantization
[bench] Metal graph ready in 0.16 s; text 7275 tokens; lengths 64,512; gen 32; each length from an empty state
[bench] peak RSS 0.85 GB
[qwen36-metal] GGUF: 22861 products with the file's dense matrices and 12254 with its routed experts ran on the GPU
       24.17 real         1.77 user        13.00 sys
           915963904  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
              102706  page reclaims
               23119  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                   0  signals received
                 701  voluntary context switches
              475952  involuntary context switches
         45215960403  instructions retired
         44124941866  cycles elapsed
          1150095232  peak memory footprint

### after the run
2026-10-19 13:35:38
0
swap_used=693.62M swapouts=75988

## v1-run2
### before the run (date, thermal state, swap, wait)
2026-10-19 13:36:39
0
swap_used=669.62M swapouts=75988
waited for state 0: 0s

### harness output
ctx_tokens,prefill_tokens,prefill_s,prefill_tps,gen_tokens,gen_first_ms,gen_steady_tps,expert_miss,disk_s,fingerprint,tokens,nll,top1
64,64,4.493,14.24,32,1284.7,5.874,10573,16.35,993fc7a94a1c6db6,24b5cd77c9db23fb,2.88531,0.406
512,512,7.208,71.03,32,956.5,5.893,13697,24.41,34a820a03a3e3055,561100505ac9d4ca,2.59825,0.562

### engine log and /usr/bin/time -l
[bench] GGUF <GGUF dir>/Qwen3.6-35B-A3B-UD-Q4_K_M.gguf: 1 file(s), 733 tensors
[tok] loaded 248320 pieces (max id 248319) from <GGUF model>/tokenizer.json
[gguf] qwen35moe: 40 layers (10 attention), hidden 2048, 256 experts top-8, inter 512, vocab 248320, DeltaNet v/k heads 32/16
[gguf] experts: layer 0 gate Q4_K up Q4_K down Q5_K, 1.95 MB per expert at most
[qwen-cache] global_bytes=538509312 slots=264 slot_bytes=2039808 decode_policy=expected-reuse
[qwen36-metal] graph ready on Apple M1: rows<=2048 dense=mapped kv=half (1910087680 bytes mapped); the experts in the global cache, not in the per-layer one
[qwen36-metal] GGUF: the dense matrices read in place as the file's ggml blocks, and the routed experts as its blocks too (layer 0: gate Q4_K, up Q4_K, down Q5_K), with no second quantization
[bench] Metal graph ready in 0.24 s; text 7275 tokens; lengths 64,512; gen 32; each length from an empty state
[bench] peak RSS 0.82 GB
[qwen36-metal] GGUF: 22861 products with the file's dense matrices and 12254 with its routed experts ran on the GPU
       25.09 real         1.78 user        12.96 sys
           883589120  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
              128605  page reclaims
               22616  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                   0  signals received
                 789  voluntary context switches
              484307  involuntary context switches
         45989063936  instructions retired
         43988767685  cycles elapsed
          1149931328  peak memory footprint

### after the run
2026-10-19 13:37:04
0
swap_used=669.62M swapouts=75988

## v1-run3
### before the run (date, thermal state, swap, wait)
2026-10-19 13:40:56
0
swap_used=669.62M swapouts=75988
waited for state 0: 0s

### harness output
ctx_tokens,prefill_tokens,prefill_s,prefill_tps,gen_tokens,gen_first_ms,gen_steady_tps,expert_miss,disk_s,fingerprint,tokens,nll,top1
64,64,4.397,14.56,32,1024.4,6.174,10573,15.95,993fc7a94a1c6db6,24b5cd77c9db23fb,2.88531,0.406
512,512,6.252,81.90,32,1307.8,6.007,13697,23.18,34a820a03a3e3055,561100505ac9d4ca,2.59825,0.562

### engine log and /usr/bin/time -l
[bench] GGUF <GGUF dir>/Qwen3.6-35B-A3B-UD-Q4_K_M.gguf: 1 file(s), 733 tensors
[tok] loaded 248320 pieces (max id 248319) from <GGUF model>/tokenizer.json
[gguf] qwen35moe: 40 layers (10 attention), hidden 2048, 256 experts top-8, inter 512, vocab 248320, DeltaNet v/k heads 32/16
[gguf] experts: layer 0 gate Q4_K up Q4_K down Q5_K, 1.95 MB per expert at most
[qwen-cache] global_bytes=538509312 slots=264 slot_bytes=2039808 decode_policy=expected-reuse
[qwen36-metal] graph ready on Apple M1: rows<=2048 dense=mapped kv=half (1910087680 bytes mapped); the experts in the global cache, not in the per-layer one
[qwen36-metal] GGUF: the dense matrices read in place as the file's ggml blocks, and the routed experts as its blocks too (layer 0: gate Q4_K, up Q4_K, down Q5_K), with no second quantization
[bench] Metal graph ready in 0.22 s; text 7275 tokens; lengths 64,512; gen 32; each length from an empty state
[bench] peak RSS 0.93 GB
[qwen36-metal] GGUF: 22861 products with the file's dense matrices and 12254 with its routed experts ran on the GPU
       23.77 real         1.74 user        13.02 sys
          1001996288  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
              117758  page reclaims
               18676  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                   0  signals received
                 998  voluntary context switches
              464629  involuntary context switches
         45093735407  instructions retired
         44157969240  cycles elapsed
          1150078848  peak memory footprint

### after the run
2026-10-19 13:41:20
0
swap_used=661.62M swapouts=75988

## v1-run4
### before the run (date, thermal state, swap, wait)
2026-10-19 13:42:20
0
swap_used=661.62M swapouts=75988
waited for state 0: 0s

### harness output
ctx_tokens,prefill_tokens,prefill_s,prefill_tps,gen_tokens,gen_first_ms,gen_steady_tps,expert_miss,disk_s,fingerprint,tokens,nll,top1
64,64,3.903,16.40,32,1367.2,5.943,10573,15.66,993fc7a94a1c6db6,24b5cd77c9db23fb,2.88531,0.406
512,512,7.191,71.20,32,655.8,6.049,13697,24.12,34a820a03a3e3055,561100505ac9d4ca,2.59825,0.562

### engine log and /usr/bin/time -l
[bench] GGUF <GGUF dir>/Qwen3.6-35B-A3B-UD-Q4_K_M.gguf: 1 file(s), 733 tensors
[tok] loaded 248320 pieces (max id 248319) from <GGUF model>/tokenizer.json
[gguf] qwen35moe: 40 layers (10 attention), hidden 2048, 256 experts top-8, inter 512, vocab 248320, DeltaNet v/k heads 32/16
[gguf] experts: layer 0 gate Q4_K up Q4_K down Q5_K, 1.95 MB per expert at most
[qwen-cache] global_bytes=538509312 slots=264 slot_bytes=2039808 decode_policy=expected-reuse
[qwen36-metal] graph ready on Apple M1: rows<=2048 dense=mapped kv=half (1910087680 bytes mapped); the experts in the global cache, not in the per-layer one
[qwen36-metal] GGUF: the dense matrices read in place as the file's ggml blocks, and the routed experts as its blocks too (layer 0: gate Q4_K, up Q4_K, down Q5_K), with no second quantization
[bench] Metal graph ready in 0.18 s; text 7275 tokens; lengths 64,512; gen 32; each length from an empty state
[bench] peak RSS 0.82 GB
[qwen36-metal] GGUF: 22861 products with the file's dense matrices and 12254 with its routed experts ran on the GPU
       24.01 real         1.56 user        13.06 sys
           885260288  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
              122781  page reclaims
               21413  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                   0  signals received
                 307  voluntary context switches
              470893  involuntary context switches
         43053666094  instructions retired
         43614500234  cycles elapsed
          1149947776  peak memory footprint

### after the run
2026-10-19 13:42:44
0
swap_used=661.62M swapouts=75988

