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-exact/qwen36-bench (the change before (08293922), QWEN36_METAL_EXACT=1, SNAP=<GGUF model>)
v1: launchers/gguf-exact/qwen36-bench (this change (627409db), QWEN36_METAL_EXACT=1, SNAP=<GGUF model>)
order: the binaries' order turns at every round (ABBA)

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

host after the runs: 2026-10-21 01:25:07 chrome=0 System-wide memory free percentage: 72% swap_used=534.88M swapouts=80676

## v1-run1
### before the run (date, thermal state, swap, wait)
2026-10-21 01:09:50
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,8.143,7.86,32,472.0,4.452,11391,8.30,dd7385ff77d52b86,f55beb9e5e71ac78,2.02724,0.531
512,512,54.563,9.38,32,423.8,4.301,13657,11.76,d10de97dd6fa777f,99b2135657766012,1.80726,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=float (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.20 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
       78.39 real         5.05 user        25.76 sys
          2787393536  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
              382167  page reclaims
                2121  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                   0  signals received
                 603  voluntary context switches
              711072  involuntary context switches
         58627337073  instructions retired
         61022187221  cycles elapsed
          1228012672  peak memory footprint

### after the run
2026-10-21 01:11:08
0
swap_used=534.88M swapouts=80676

## v1-run2
### before the run (date, thermal state, swap, wait)
2026-10-21 01:12:09
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,8.128,7.87,32,467.4,4.388,11391,8.34,dd7385ff77d52b86,f55beb9e5e71ac78,2.02724,0.531
512,512,54.472,9.40,32,435.2,4.356,13657,11.46,d10de97dd6fa777f,99b2135657766012,1.80726,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=float (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.17 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
       78.23 real         4.91 user        25.60 sys
          2644852736  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
              394583  page reclaims
                 394  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                   0  signals received
                 244  voluntary context switches
              710315  involuntary context switches
         57773221422  instructions retired
         60329414665  cycles elapsed
          1228061824  peak memory footprint

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

## v1-run3
### before the run (date, thermal state, swap, wait)
2026-10-21 01:19:09
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,8.188,7.82,32,471.3,4.379,11391,8.41,dd7385ff77d52b86,f55beb9e5e71ac78,2.02724,0.531
512,512,54.485,9.40,32,426.7,4.388,13657,11.32,d10de97dd6fa777f,99b2135657766012,1.80726,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=float (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 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.67 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
       78.35 real         5.01 user        25.45 sys
          2861907968  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
              384365  page reclaims
                2107  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                   0  signals received
                 588  voluntary context switches
              708993  involuntary context switches
         58366291922  instructions retired
         60206126210  cycles elapsed
          1228160128  peak memory footprint

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

## v1-run4
### before the run (date, thermal state, swap, wait)
2026-10-21 01:21: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,8.130,7.87,32,472.3,4.414,11391,8.17,dd7385ff77d52b86,f55beb9e5e71ac78,2.02724,0.531
512,512,54.326,9.42,32,431.9,4.376,13657,11.33,d10de97dd6fa777f,99b2135657766012,1.80726,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=float (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.17 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.58 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
       78.01 real         4.91 user        25.43 sys
          2771091456  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
              380663  page reclaims
                 390  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                   0  signals received
                 235  voluntary context switches
              704581  involuntary context switches
         57058735703  instructions retired
         59881744603  cycles elapsed
          1228143744  peak memory footprint

### after the run
2026-10-21 01:22:45
0
swap_used=534.88M swapouts=80676

