Paths shortened: <GGUF model> is the directory coli import --mode link made for the GGUF (<GGUF dir>/ holds the file); 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).

# this change's (627409db): the dense matrices' pages locked in memory (mlock) from the start of each prompt to the end of the decode step after it

model set by each launcher; text chat.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-08293922/qwen36-bench (the change before (08293922), the defaults, SNAP=<GGUF model>)
v1: launchers/gguf/qwen36-bench (this change (627409db), the defaults, SNAP=<GGUF model>)
order: the binaries' order turns at every round (ABBA)

host before the runs: 2026-10-21 00:09:34 chrome=0 System-wide memory free percentage: 72% swap_used=534.88M swapouts=80676

host after the runs: 2026-10-21 00:22:23 chrome=0 System-wide memory free percentage: 71% swap_used=534.88M swapouts=80676

## v1-run1
### before the run (date, thermal state, swap, wait)
2026-10-21 00:13:27
0
swap_used=534.88M swapouts=80676
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.121,15.53,32,374.7,5.860,11392,11.86,88ce147048ad7765,f55beb9e5e71ac78,2.02861,0.531
512,512,7.760,65.98,32,307.3,5.819,13659,13.47,33d594906f36b78b,99b2135657766012,1.81011,0.469

### 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=536469504 slots=263 slot_bytes=2039808 decode_policy=expected-reuse
[qwen36-metal] expert cache below 256 retained slots: prompt experts load eight at a time
[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.25 s; text 1590 tokens; lengths 64,512; gen 32; each length from an empty state
[qwen36-metal] GGUF: the dense matrices locked in memory (1914208256 bytes) from each prompt to the decode step after it
[bench] peak RSS 2.64 GB
[qwen36-metal] GGUF: 21706 products with the file's dense matrices and 12180 with its routed experts ran on the GPU
[qwen36-metal] GGUF: the dense matrices locked for 2 prompts, unlocked after 2 first decode steps and at the end of 0 requests; 0 still locked at exit
       23.80 real         1.68 user        15.52 sys
          2836660224  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
              360158  page reclaims
                2075  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                   0  signals received
                 411  voluntary context switches
              404017  involuntary context switches
         43878769136  instructions retired
         50316179917  cycles elapsed
          1150368704  peak memory footprint

### after the run
2026-10-21 00:13:51
0
swap_used=534.88M swapouts=80676

## v1-run2
### before the run (date, thermal state, swap, wait)
2026-10-21 00:14:51
0
swap_used=534.88M swapouts=80676
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.154,15.41,32,377.2,5.741,11392,11.92,88ce147048ad7765,f55beb9e5e71ac78,2.02861,0.531
512,512,7.741,66.14,32,320.6,5.803,13659,13.44,33d594906f36b78b,99b2135657766012,1.81011,0.469

### 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=536469504 slots=263 slot_bytes=2039808 decode_policy=expected-reuse
[qwen36-metal] expert cache below 256 retained slots: prompt experts load eight at a time
[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.21 s; text 1590 tokens; lengths 64,512; gen 32; each length from an empty state
[qwen36-metal] GGUF: the dense matrices locked in memory (1914208256 bytes) from each prompt to the decode step after it
[bench] peak RSS 2.46 GB
[qwen36-metal] GGUF: 21706 products with the file's dense matrices and 12180 with its routed experts ran on the GPU
[qwen36-metal] GGUF: the dense matrices locked for 2 prompts, unlocked after 2 first decode steps and at the end of 0 requests; 0 still locked at exit
       23.88 real         1.63 user        15.66 sys
          2637545472  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
              366571  page reclaims
                 393  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                   0  signals received
                 196  voluntary context switches
              406177  involuntary context switches
         43494710818  instructions retired
         50565579653  cycles elapsed
          1150368704  peak memory footprint

### after the run
2026-10-21 00:15:15
0
swap_used=534.88M swapouts=80676

## v1-run3
### before the run (date, thermal state, swap, wait)
2026-10-21 00:19:07
0
swap_used=534.88M swapouts=80676
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.076,15.70,32,383.1,5.707,11392,12.07,88ce147048ad7765,f55beb9e5e71ac78,2.02861,0.531
512,512,7.974,64.21,32,316.6,5.679,13659,14.27,33d594906f36b78b,99b2135657766012,1.81011,0.469

### 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=536469504 slots=263 slot_bytes=2039808 decode_policy=expected-reuse
[qwen36-metal] expert cache below 256 retained slots: prompt experts load eight at a time
[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.19 s; text 1590 tokens; lengths 64,512; gen 32; each length from an empty state
[qwen36-metal] GGUF: the dense matrices locked in memory (1914208256 bytes) from each prompt to the decode step after it
[bench] peak RSS 2.68 GB
[qwen36-metal] GGUF: 21706 products with the file's dense matrices and 12180 with its routed experts ran on the GPU
[qwen36-metal] GGUF: the dense matrices locked for 2 prompts, unlocked after 2 first decode steps and at the end of 0 requests; 0 still locked at exit
       24.17 real         1.63 user        15.44 sys
          2880831488  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
              360280  page reclaims
                 497  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                   0  signals received
                 213  voluntary context switches
              410334  involuntary context switches
         43319998591  instructions retired
         50003872670  cycles elapsed
          1150352384  peak memory footprint

### after the run
2026-10-21 00:19:32
0
swap_used=534.88M swapouts=80676

## v1-run4
### before the run (date, thermal state, swap, wait)
2026-10-21 00:20:32
0
swap_used=534.88M swapouts=80676
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.100,15.61,32,376.2,5.660,11392,12.05,88ce147048ad7765,f55beb9e5e71ac78,2.02861,0.531
512,512,7.987,64.10,32,309.7,5.674,13659,14.39,33d594906f36b78b,99b2135657766012,1.81011,0.469

### 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=536469504 slots=263 slot_bytes=2039808 decode_policy=expected-reuse
[qwen36-metal] expert cache below 256 retained slots: prompt experts load eight at a time
[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.21 s; text 1590 tokens; lengths 64,512; gen 32; each length from an empty state
[qwen36-metal] GGUF: the dense matrices locked in memory (1914208256 bytes) from each prompt to the decode step after it
[bench] peak RSS 2.60 GB
[qwen36-metal] GGUF: 21706 products with the file's dense matrices and 12180 with its routed experts ran on the GPU
[qwen36-metal] GGUF: the dense matrices locked for 2 prompts, unlocked after 2 first decode steps and at the end of 0 requests; 0 still locked at exit
       24.26 real         1.64 user        15.39 sys
          2788999168  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
              361994  page reclaims
                 394  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                   0  signals received
                 185  voluntary context switches
              412820  involuntary context switches
         43501669761  instructions retired
         49902648905  cycles elapsed
          1150434240  peak memory footprint

### after the run
2026-10-21 00:20:56
0
swap_used=534.88M swapouts=80676

