{ "question": "On a 64 GB M3 Max, how much memory and speed does mlx_lm's 8-bit and 4-bit KV-cache quantization (kv_bits) save at 8k, 16k and 32k tokens, and does it cost needle recall or change model outputs versus the default fp16 cache, on Qwen3.8-27B-4bit (dense) and Qwen3.6-35B-A3B-4bit (MoE)?", "environment": { "machine": { "hw.model": "unavailable: [Errno 2] No such file or directory: 'sysctl'", "cpu": "unavailable: [Errno 2] No such file or directory: 'sysctl'", "memsize_bytes": "unavailable: [Errno 2] No such file or directory: 'sysctl'", "mlx_device_info": { "device_name": "Apple M3 Max", "max_recommended_working_set_size": 55662788608, "memory_size": 68719476736, "architecture": "applegpu_g15s", "max_buffer_length": 41747087360, "resource_limit": 499000 } }, "os": { "sw_vers": "ProductName:\t\tmacOS\nProductVersion:\t\t27.0.1\nBuildVersion:\t\t26A434", "uname": { "system": "Darwin", "node": "", "release": "27.0.0", "version": "Darwin Kernel Version 27.0.0: Tue Aug 11 21:05:42 PDT 2026; root:xnu-13432.1.9~1/RELEASE_ARM64_T6031", "machine": "arm64", "processor": "arm" }, "power_settings": "System-wide power settings:\n SleepDisabled\t\t0\nCurrently in use:\n standby 1\n Sleep On Power Button 1\n hibernatefile /var/vm/sleepimage\n powernap 1\n networkoversleep 0\n disksleep 10\n sleep 1 (sleep prevented by powerd, caffeinate, caffeinate, caffeinate, caffeinate, caffeinate)\n hibernatemode 3\n ttyskeepawake 1\n displaysleep 10 (display sleep prevented by caffeinate)\n tcpkeepalive 1\n powermode 0\n womp 1", "battery": "Now drawing from 'AC Power'\n -InternalBattery-0 (id=37224547)\t85%; AC attached; not charging present: true" }, "software": { "python": "3.13.5 | packaged by Anaconda, Inc. | (main, Jun 12 2025, 11:23:37) [Clang 14.0.6 ]", "mlx": "0.31.2", "mlx_lm": "0.31.3", "numpy": "2.4.2", "transformers": "5.12.1" }, "models": { "moe": { "repo": "mlx-community/Qwen3.6-35B-A3B-4bit", "revision": "38740b847e4cb78f352aba30aa41c76e08e6eb46" }, "dense": { "repo": "mlx-community/Qwen3.8-27B-4bit", "revision": "10c35caafbb80f7dc6a7a432cdd11af10a6d4818" } }, "settings": { "kv_group_size": 64, "quantized_kv_start": 0, "max_tokens": 128, "drift_tokens": 64, "sampler": "greedy (argmax)", "prefill_step_size": 2048, "chat_template": "enable_thinking=False" } }, "runs": 3, "metrics": { "peak_gb__dense__8k__fp16": { "value": 19.202145, "unit": "GB", "samples": [ 19.218578, 19.202145, 19.18971 ], "min": 19.18971, "max": 19.218578, "note": "mx.get_peak_memory() over the whole run (weights + KV + activations + allocator cache); median of n=3 haystack variants, min-max 19.19-19.22" }, "peak_prefill_gb__dense__8k__fp16": { "value": 19.202145, "unit": "GB", "samples": [ 19.218578, 19.202145, 19.18971 ], "min": 19.18971, "max": 19.218578, "note": "peak memory from start until the first token; median of n=3 haystack variants, min-max 19.19-19.22" }, "peak_decode_gb__dense__8k__fp16": { "value": 16.136853, "unit": "GB", "samples": [ 16.088208, 16.136853, 16.139481 ], "min": 16.088208, "max": 16.139481, "note": "peak memory after the first token (peak reset at first token); median of n=3 haystack variants, min-max 16.09-16.14" }, "peak_minus_weights_gb__dense__8k__fp16": { "value": 1.003264, "unit": "GB", "samples": [ 0.95462, 1.003264, 1.005892 ], "min": 0.95462, "max": 1.005892, "note": "decode-phase peak minus active memory right after model load; median of n=3 haystack variants, min-max 0.9546-1.006" }, "kv_cache_gb__dense__8k__fp16": { "value": 0.553648, "unit": "GB", "samples": [ 0.553648, 0.553648, 0.553648 ], "min": 0.553648, "max": 0.553648, "note": "measured nbytes of the full-attention KV caches at end of run (incl. 256-token allocation padding); median of n=3 haystack variants, min-max 0.5536-0.5536" }, "linear_state_gb__dense__8k__fp16": { "value": 0.153944, "unit": "GB", "samples": [ 0.153944, 0.153944, 0.153944 ], "min": 0.153944, "max": 0.153944, "note": "measured nbytes of the linear-attention (Gated DeltaNet) state; constant in context length; median of n=3 haystack variants, min-max 0.1539-0.1539" }, "kv_theory_gb__dense__8k__fp16": { "value": 0.536281, "unit": "GB", "samples": [ 0.536871, 0.536281, 0.535822 ], "min": 0.535822, "max": 0.536871, "note": "full-attention layers x kv_heads x head_dim x prompt tokens x 2 x bytes/elem (quantized: bits/8 + 4/group_size); median of n=3 haystack variants, min-max 0.5358-0.5369" }, "prefill_tps__dense__8k__fp16": { "value": 152.486055, "unit": "tokens/s", "samples": [ 152.145467, 154.631724, 152.486055 ], "min": 152.145467, "max": 154.631724, "note": "prompt tokens / time to first token; median of n=3 haystack variants, min-max 152.1-154.6" }, "ttft_s__dense__8k__fp16": { "value": 53.618018, "unit": "s", "samples": [ 53.843208, 52.919283, 53.618018 ], "min": 52.919283, "max": 53.843208, "note": "time to first token (prefill of the full prompt + first sampled token); median of n=3 haystack variants, min-max 52.92-53.84" }, "decode_tps__dense__8k__fp16": { "value": 13.148967, "unit": "tokens/s", "samples": [ 13.148967, 14.961342, 12.746531 ], "min": 12.746531, "max": 14.961342, "note": "(generated tokens - 1) / time from first to last token; median of n=3 haystack variants, min-max 12.75-14.96" }, "n_gen_tokens__dense__8k__fp16": { "value": 66.0, "unit": "tokens", "samples": [ 66.0, 67.0, 66.0 ], "min": 66.0, "max": 67.0, "note": "generated tokens (greedy, max 128, stops at EOS); median of n=3 haystack variants, min-max 66-67" }, "recall__dense__8k__fp16": { "value": 5.0, "unit": "needles (of 5)", "samples": [ 5.0, 5.0, 5.0 ], "min": 5.0, "max": 5.0, "note": "exact-match needle values in the answer; median of n=3 haystack variants, min-max 5-5" }, "peak_gb__dense__8k__kv8": { "value": 18.954419, "unit": "GB", "samples": [ 18.970852, 18.954419, 18.941984 ], "min": 18.941984, "max": 18.970852, "note": "mx.get_peak_memory() over the whole run (weights + KV + activations + allocator cache); median of n=3 haystack variants, min-max 18.94-18.97" }, "peak_prefill_gb__dense__8k__kv8": { "value": 18.954419, "unit": "GB", "samples": [ 18.970852, 18.954419, 18.941984 ], "min": 18.941984, "max": 18.970852, "note": "peak memory from start until the first token; median of n=3 haystack variants, min-max 18.94-18.97" }, "peak_decode_gb__dense__8k__kv8": { "value": 15.828493, "unit": "GB", "samples": [ 15.804981, 15.828493, 15.83205 ], "min": 15.804981, "max": 15.83205, "note": "peak memory after the first token (peak reset at first token); median of n=3 haystack variants, min-max 15.8-15.83" }, "peak_minus_weights_gb__dense__8k__kv8": { "value": 0.694904, "unit": "GB", "samples": [ 0.671392, 0.694904, 0.698462 ], "min": 0.671392, "max": 0.698462, "note": "decode-phase peak minus active memory right after model load; median of n=3 haystack variants, min-max 0.6714-0.6985" }, "kv_cache_gb__dense__8k__kv8": { "value": 0.294126, "unit": "GB", "samples": [ 0.294126, 0.294126, 0.294126 ], "min": 0.294126, "max": 0.294126, "note": "measured nbytes of the full-attention KV caches at end of run (incl. 256-token allocation padding); median of n=3 haystack variants, min-max 0.2941-0.2941" }, "linear_state_gb__dense__8k__kv8": { "value": 0.153944, "unit": "GB", "samples": [ 0.153944, 0.153944, 0.153944 ], "min": 0.153944, "max": 0.153944, "note": "measured nbytes of the linear-attention (Gated DeltaNet) state; constant in context length; median of n=3 haystack variants, min-max 0.1539-0.1539" }, "kv_theory_gb__dense__8k__kv8": { "value": 0.284899, "unit": "GB", "samples": [ 0.285213, 0.284899, 0.284656 ], "min": 0.284656, "max": 0.285213, "note": "full-attention layers x kv_heads x head_dim x prompt tokens x 2 x bytes/elem (quantized: bits/8 + 4/group_size); median of n=3 haystack variants, min-max 0.2847-0.2852" }, "prefill_tps__dense__8k__kv8": { "value": 160.709795, "unit": "tokens/s", "samples": [ 164.202161, 160.709795, 152.410387 ], "min": 152.410387, "max": 164.202161, "note": "prompt tokens / time to first token; median of n=3 haystack variants, min-max 152.4-164.2" }, "ttft_s__dense__8k__kv8": { "value": 50.917867, "unit": "s", "samples": [ 49.889721, 50.917867, 53.644638 ], "min": 49.889721, "max": 53.644638, "note": "time to first token (prefill of the full prompt + first sampled token); median of n=3 haystack variants, min-max 49.89-53.64" }, "decode_tps__dense__8k__kv8": { "value": 14.265282, "unit": "tokens/s", "samples": [ 14.76245, 14.129884, 14.265282 ], "min": 14.129884, "max": 14.76245, "note": "(generated tokens - 1) / time from first to last token; median of n=3 haystack variants, min-max 14.13-14.76" }, "n_gen_tokens__dense__8k__kv8": { "value": 66.0, "unit": "tokens", "samples": [ 66.0, 67.0, 66.0 ], "min": 66.0, "max": 67.0, "note": "generated tokens (greedy, max 128, stops at EOS); median of n=3 haystack variants, min-max 66-67" }, "recall__dense__8k__kv8": { "value": 5.0, "unit": "needles (of 5)", "samples": [ 5.0, 5.0, 5.0 ], "min": 5.0, "max": 5.0, "note": "exact-match needle values in the answer; median of n=3 haystack variants, min-max 5-5" }, "peak_gb_change_pct__dense__8k__kv8": { "value": -1.290096, "unit": "%", "samples": [ -1.288993, -1.290096, -1.290932 ], "min": -1.290932, "max": -1.288993, "note": "peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -1.291--1.289" }, "peak_decode_gb_change_pct__dense__8k__kv8": { "value": -1.904836, "unit": "%", "samples": [ -1.760467, -1.910905, -1.904836 ], "min": -1.910905, "max": -1.760467, "note": "decode-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -1.911--1.76" }, "peak_prefill_gb_change_pct__dense__8k__kv8": { "value": -1.290096, "unit": "%", "samples": [ -1.288993, -1.290096, -1.290932 ], "min": -1.290932, "max": -1.288993, "note": "prefill-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -1.291--1.289" }, "prefill_tps_change_pct__dense__8k__kv8": { "value": 3.930675, "unit": "%", "samples": [ 7.924451, 3.930675, -0.049623 ], "min": -0.049623, "max": 7.924451, "note": "prefill throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -0.04962-7.924" }, "decode_tps_change_pct__dense__8k__kv8": { "value": 11.915015, "unit": "%", "samples": [ 12.270798, -5.557378, 11.915015 ], "min": -5.557378, "max": 12.270798, "note": "decode throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -5.557-12.27" }, "ttft_s_change_pct__dense__8k__kv8": { "value": -3.782016, "unit": "%", "samples": [ -7.342591, -3.782016, 0.049647 ], "min": -7.342591, "max": 0.049647, "note": "time to first token vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -7.343-0.04965" }, "peak_gb_change__dense__8k__kv8": { "value": -0.247726, "unit": "GB", "samples": [ -0.247726, -0.247726, -0.247726 ], "min": -0.247726, "max": -0.247726, "note": "peak memory minus fp16-cache peak on the same haystack variant; median of n=3 haystack variants, min-max -0.2477--0.2477" }, "peak_decode_gb_change__dense__8k__kv8": { "value": -0.307431, "unit": "GB", "samples": [ -0.283228, -0.30836, -0.307431 ], "min": -0.30836, "max": -0.283228, "note": "decode-phase peak minus fp16-cache decode-phase peak on the same haystack variant; median of n=3 haystack variants, min-max -0.3084--0.2832" }, "peak_gb__dense__8k__kv4": { "value": 18.822299, "unit": "GB", "samples": [ 18.838732, 18.822299, 18.809863 ], "min": 18.809863, "max": 18.838732, "note": "mx.get_peak_memory() over the whole run (weights + KV + activations + allocator cache); median of n=3 haystack variants, min-max 18.81-18.84" }, "peak_prefill_gb__dense__8k__kv4": { "value": 18.822299, "unit": "GB", "samples": [ 18.838732, 18.822299, 18.809863 ], "min": 18.809863, "max": 18.838732, "note": "peak memory from start until the first token; median of n=3 haystack variants, min-max 18.81-18.84" }, "peak_decode_gb__dense__8k__kv4": { "value": 15.666579, "unit": "GB", "samples": [ 15.666546, 15.666579, 15.66842 ], "min": 15.666546, "max": 15.66842, "note": "peak memory after the first token (peak reset at first token); median of n=3 haystack variants, min-max 15.67-15.67" }, "peak_minus_weights_gb__dense__8k__kv4": { "value": 0.53299, "unit": "GB", "samples": [ 0.532957, 0.53299, 0.534832 ], "min": 0.532957, "max": 0.534832, "note": "decode-phase peak minus active memory right after model load; median of n=3 haystack variants, min-max 0.533-0.5348" }, "kv_cache_gb__dense__8k__kv4": { "value": 0.155714, "unit": "GB", "samples": [ 0.155714, 0.155714, 0.155714 ], "min": 0.155714, "max": 0.155714, "note": "measured nbytes of the full-attention KV caches at end of run (incl. 256-token allocation padding); median of n=3 haystack variants, min-max 0.1557-0.1557" }, "linear_state_gb__dense__8k__kv4": { "value": 0.153944, "unit": "GB", "samples": [ 0.153944, 0.153944, 0.153944 ], "min": 0.153944, "max": 0.153944, "note": "measured nbytes of the linear-attention (Gated DeltaNet) state; constant in context length; median of n=3 haystack variants, min-max 0.1539-0.1539" }, "kv_theory_gb__dense__8k__kv4": { "value": 0.150829, "unit": "GB", "samples": [ 0.150995, 0.150829, 0.1507 ], "min": 0.1507, "max": 0.150995, "note": "full-attention layers x kv_heads x head_dim x prompt tokens x 2 x bytes/elem (quantized: bits/8 + 4/group_size); median of n=3 haystack variants, min-max 0.1507-0.151" }, "prefill_tps__dense__8k__kv4": { "value": 157.850334, "unit": "tokens/s", "samples": [ 158.995792, 153.501894, 157.850334 ], "min": 153.501894, "max": 158.995792, "note": "prompt tokens / time to first token; median of n=3 haystack variants, min-max 153.5-159" }, "ttft_s__dense__8k__kv4": { "value": 51.795899, "unit": "s", "samples": [ 51.523376, 53.308788, 51.795899 ], "min": 51.523376, "max": 53.308788, "note": "time to first token (prefill of the full prompt + first sampled token); median of n=3 haystack variants, min-max 51.52-53.31" }, "decode_tps__dense__8k__kv4": { "value": 13.630221, "unit": "tokens/s", "samples": [ 13.853433, 12.876398, 13.630221 ], "min": 12.876398, "max": 13.853433, "note": "(generated tokens - 1) / time from first to last token; median of n=3 haystack variants, min-max 12.88-13.85" }, "n_gen_tokens__dense__8k__kv4": { "value": 66.0, "unit": "tokens", "samples": [ 66.0, 67.0, 66.0 ], "min": 66.0, "max": 67.0, "note": "generated tokens (greedy, max 128, stops at EOS); median of n=3 haystack variants, min-max 66-67" }, "recall__dense__8k__kv4": { "value": 5.0, "unit": "needles (of 5)", "samples": [ 5.0, 5.0, 5.0 ], "min": 5.0, "max": 5.0, "note": "exact-match needle values in the answer; median of n=3 haystack variants, min-max 5-5" }, "peak_gb_change_pct__dense__8k__kv4": { "value": -1.978147, "unit": "%", "samples": [ -1.976455, -1.978147, -1.979429 ], "min": -1.979429, "max": -1.976455, "note": "peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -1.979--1.976" }, "peak_decode_gb_change_pct__dense__8k__kv4": { "value": -2.914286, "unit": "%", "samples": [ -2.620939, -2.914286, -2.918686 ], "min": -2.918686, "max": -2.620939, "note": "decode-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -2.919--2.621" }, "peak_prefill_gb_change_pct__dense__8k__kv4": { "value": -1.978147, "unit": "%", "samples": [ -1.976455, -1.978147, -1.979429 ], "min": -1.979429, "max": -1.976455, "note": "prefill-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -1.979--1.976" }, "prefill_tps_change_pct__dense__8k__kv4": { "value": 3.517882, "unit": "%", "samples": [ 4.502484, -0.730659, 3.517882 ], "min": -0.730659, "max": 4.502484, "note": "prefill throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -0.7307-4.502" }, "decode_tps_change_pct__dense__8k__kv4": { "value": 5.357575, "unit": "%", "samples": [ 5.357575, -13.935544, 6.932789 ], "min": -13.935544, "max": 6.932789, "note": "decode throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -13.94-6.933" }, "ttft_s_change_pct__dense__8k__kv4": { "value": -3.398332, "unit": "%", "samples": [ -4.308495, 0.736037, -3.398332 ], "min": -4.308495, "max": 0.736037, "note": "time to first token vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -4.308-0.736" }, "peak_gb_change__dense__8k__kv4": { "value": -0.379847, "unit": "GB", "samples": [ -0.379847, -0.379847, -0.379847 ], "min": -0.379847, "max": -0.379847, "note": "peak memory minus fp16-cache peak on the same haystack variant; median of n=3 haystack variants, min-max -0.3798--0.3798" }, "peak_decode_gb_change__dense__8k__kv4": { "value": -0.470274, "unit": "GB", "samples": [ -0.421662, -0.470274, -0.471061 ], "min": -0.471061, "max": -0.421662, "note": "decode-phase peak minus fp16-cache decode-phase peak on the same haystack variant; median of n=3 haystack variants, min-max -0.4711--0.4217" }, "peak_gb__dense__16k__fp16": { "value": 20.472708, "unit": "GB", "samples": [ 20.48226, 20.463156 ], "min": 20.463156, "max": 20.48226, "note": "mx.get_peak_memory() over the whole run (weights + KV + activations + allocator cache); median of n=2 haystack variants, min-max 20.46-20.48" }, "peak_prefill_gb__dense__16k__fp16": { "value": 20.472708, "unit": "GB", "samples": [ 20.48226, 20.463156 ], "min": 20.463156, "max": 20.48226, "note": "peak memory from start until the first token; median of n=2 haystack variants, min-max 20.46-20.48" }, "peak_decode_gb__dense__16k__fp16": { "value": 16.718717, "unit": "GB", "samples": [ 16.716431, 16.721002 ], "min": 16.716431, "max": 16.721002, "note": "peak memory after the first token (peak reset at first token); median of n=2 haystack variants, min-max 16.72-16.72" }, "peak_minus_weights_gb__dense__16k__fp16": { "value": 1.585128, "unit": "GB", "samples": [ 1.582843, 1.587414 ], "min": 1.582843, "max": 1.587414, "note": "decode-phase peak minus active memory right after model load; median of n=2 haystack variants, min-max 1.583-1.587" }, "kv_cache_gb__dense__16k__fp16": { "value": 1.090519, "unit": "GB", "samples": [ 1.090519, 1.090519 ], "min": 1.090519, "max": 1.090519, "note": "measured nbytes of the full-attention KV caches at end of run (incl. 256-token allocation padding); median of n=2 haystack variants, min-max 1.091-1.091" }, "linear_state_gb__dense__16k__fp16": { "value": 0.153944, "unit": "GB", "samples": [ 0.153944, 0.153944 ], "min": 0.153944, "max": 0.153944, "note": "measured nbytes of the linear-attention (Gated DeltaNet) state; constant in context length; median of n=2 haystack variants, min-max 0.1539-0.1539" }, "kv_theory_gb__dense__16k__fp16": { "value": 1.071088, "unit": "GB", "samples": [ 1.071383, 1.070793 ], "min": 1.070793, "max": 1.071383, "note": "full-attention layers x kv_heads x head_dim x prompt tokens x 2 x bytes/elem (quantized: bits/8 + 4/group_size); median of n=2 haystack variants, min-max 1.071-1.071" }, "prefill_tps__dense__16k__fp16": { "value": 137.837017, "unit": "tokens/s", "samples": [ 136.731552, 138.942482 ], "min": 136.731552, "max": 138.942482, "note": "prompt tokens / time to first token; median of n=2 haystack variants, min-max 136.7-138.9" }, "ttft_s__dense__16k__fp16": { "value": 118.579085, "unit": "s", "samples": [ 119.562747, 117.595423 ], "min": 117.595423, "max": 119.562747, "note": "time to first token (prefill of the full prompt + first sampled token); median of n=2 haystack variants, min-max 117.6-119.6" }, "decode_tps__dense__16k__fp16": { "value": 11.558238, "unit": "tokens/s", "samples": [ 11.436841, 11.679636 ], "min": 11.436841, "max": 11.679636, "note": "(generated tokens - 1) / time from first to last token; median of n=2 haystack variants, min-max 11.44-11.68" }, "n_gen_tokens__dense__16k__fp16": { "value": 68.0, "unit": "tokens", "samples": [ 68.0, 68.0 ], "min": 68.0, "max": 68.0, "note": "generated tokens (greedy, max 128, stops at EOS); median of n=2 haystack variants, min-max 68-68" }, "recall__dense__16k__fp16": { "value": 5.0, "unit": "needles (of 5)", "samples": [ 5.0, 5.0 ], "min": 5.0, "max": 5.0, "note": "exact-match needle values in the answer; median of n=2 haystack variants, min-max 5-5" }, "peak_gb__dense__16k__kv8": { "value": 19.973324, "unit": "GB", "samples": [ 19.982876, 19.963772 ], "min": 19.963772, "max": 19.982876, "note": "mx.get_peak_memory() over the whole run (weights + KV + activations + allocator cache); median of n=2 haystack variants, min-max 19.96-19.98" }, "peak_prefill_gb__dense__16k__kv8": { "value": 19.973324, "unit": "GB", "samples": [ 19.982876, 19.963772 ], "min": 19.963772, "max": 19.982876, "note": "peak memory from start until the first token; median of n=2 haystack variants, min-max 19.96-19.98" }, "peak_decode_gb__dense__16k__kv8": { "value": 16.182931, "unit": "GB", "samples": [ 16.180632, 16.18523 ], "min": 16.180632, "max": 16.18523, "note": "peak memory after the first token (peak reset at first token); median of n=2 haystack variants, min-max 16.18-16.19" }, "peak_minus_weights_gb__dense__16k__kv8": { "value": 1.049343, "unit": "GB", "samples": [ 1.047044, 1.051641 ], "min": 1.047044, "max": 1.051641, "note": "decode-phase peak minus active memory right after model load; median of n=2 haystack variants, min-max 1.047-1.052" }, "kv_cache_gb__dense__16k__kv8": { "value": 0.579338, "unit": "GB", "samples": [ 0.579338, 0.579338 ], "min": 0.579338, "max": 0.579338, "note": "measured nbytes of the full-attention KV caches at end of run (incl. 256-token allocation padding); median of n=2 haystack variants, min-max 0.5793-0.5793" }, "linear_state_gb__dense__16k__kv8": { "value": 0.153944, "unit": "GB", "samples": [ 0.153944, 0.153944 ], "min": 0.153944, "max": 0.153944, "note": "measured nbytes of the linear-attention (Gated DeltaNet) state; constant in context length; median of n=2 haystack variants, min-max 0.1539-0.1539" }, "kv_theory_gb__dense__16k__kv8": { "value": 0.569015, "unit": "GB", "samples": [ 0.569172, 0.568859 ], "min": 0.568859, "max": 0.569172, "note": "full-attention layers x kv_heads x head_dim x prompt tokens x 2 x bytes/elem (quantized: bits/8 + 4/group_size); median of n=2 haystack variants, min-max 0.5689-0.5692" }, "prefill_tps__dense__16k__kv8": { "value": 141.473476, "unit": "tokens/s", "samples": [ 141.549261, 141.39769 ], "min": 141.39769, "max": 141.549261, "note": "prompt tokens / time to first token; median of n=2 haystack variants, min-max 141.4-141.5" }, "ttft_s__dense__16k__kv8": { "value": 115.523438, "unit": "s", "samples": [ 115.493361, 115.553514 ], "min": 115.493361, "max": 115.553514, "note": "time to first token (prefill of the full prompt + first sampled token); median of n=2 haystack variants, min-max 115.5-115.6" }, "decode_tps__dense__16k__kv8": { "value": 11.273766, "unit": "tokens/s", "samples": [ 11.293338, 11.254194 ], "min": 11.254194, "max": 11.293338, "note": "(generated tokens - 1) / time from first to last token; median of n=2 haystack variants, min-max 11.25-11.29" }, "n_gen_tokens__dense__16k__kv8": { "value": 68.0, "unit": "tokens", "samples": [ 68.0, 68.0 ], "min": 68.0, "max": 68.0, "note": "generated tokens (greedy, max 128, stops at EOS); median of n=2 haystack variants, min-max 68-68" }, "recall__dense__16k__kv8": { "value": 5.0, "unit": "needles (of 5)", "samples": [ 5.0, 5.0 ], "min": 5.0, "max": 5.0, "note": "exact-match needle values in the answer; median of n=2 haystack variants, min-max 5-5" }, "peak_gb_change_pct__dense__16k__kv8": { "value": -2.439269, "unit": "%", "samples": [ -2.438131, -2.440407 ], "min": -2.440407, "max": -2.438131, "note": "peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=2 haystack variants, min-max -2.44--2.438" }, "peak_decode_gb_change_pct__dense__16k__kv8": { "value": -3.204706, "unit": "%", "samples": [ -3.205224, -3.204188 ], "min": -3.205224, "max": -3.204188, "note": "decode-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=2 haystack variants, min-max -3.205--3.204" }, "peak_prefill_gb_change_pct__dense__16k__kv8": { "value": -2.439269, "unit": "%", "samples": [ -2.438131, -2.440407 ], "min": -2.440407, "max": -2.438131, "note": "prefill-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=2 haystack variants, min-max -2.44--2.438" }, "prefill_tps_change_pct__dense__16k__kv8": { "value": 2.645274, "unit": "%", "samples": [ 3.52348, 1.767068 ], "min": 1.767068, "max": 3.52348, "note": "prefill throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=2 haystack variants, min-max 1.767-3.523" }, "decode_tps_change_pct__dense__16k__kv8": { "value": -2.448666, "unit": "%", "samples": [ -1.254739, -3.642593 ], "min": -3.642593, "max": -1.254739, "note": "decode throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=2 haystack variants, min-max -3.643--1.255" }, "ttft_s_change_pct__dense__16k__kv8": { "value": -2.569971, "unit": "%", "samples": [ -3.403557, -1.736385 ], "min": -3.403557, "max": -1.736385, "note": "time to first token vs fp16 cache on the same haystack variant (negative = lower); median of n=2 haystack variants, min-max -3.404--1.736" }, "peak_gb_change__dense__16k__kv8": { "value": -0.499384, "unit": "GB", "samples": [ -0.499384, -0.499384 ], "min": -0.499384, "max": -0.499384, "note": "peak memory minus fp16-cache peak on the same haystack variant; median of n=2 haystack variants, min-max -0.4994--0.4994" }, "peak_decode_gb_change__dense__16k__kv8": { "value": -0.535786, "unit": "GB", "samples": [ -0.535799, -0.535772 ], "min": -0.535799, "max": -0.535772, "note": "decode-phase peak minus fp16-cache decode-phase peak on the same haystack variant; median of n=2 haystack variants, min-max -0.5358--0.5358" }, "peak_gb__dense__16k__kv4": { "value": 19.706986, "unit": "GB", "samples": [ 19.716537, 19.697434 ], "min": 19.697434, "max": 19.716537, "note": "mx.get_peak_memory() over the whole run (weights + KV + activations + allocator cache); median of n=2 haystack variants, min-max 19.7-19.72" }, "peak_prefill_gb__dense__16k__kv4": { "value": 19.706986, "unit": "GB", "samples": [ 19.716537, 19.697434 ], "min": 19.697434, "max": 19.716537, "note": "peak memory from start until the first token; median of n=2 haystack variants, min-max 19.7-19.72" }, "peak_decode_gb__dense__16k__kv4": { "value": 15.860628, "unit": "GB", "samples": [ 15.858344, 15.862913 ], "min": 15.858344, "max": 15.862913, "note": "peak memory after the first token (peak reset at first token); median of n=2 haystack variants, min-max 15.86-15.86" }, "peak_minus_weights_gb__dense__16k__kv4": { "value": 0.72704, "unit": "GB", "samples": [ 0.724755, 0.729324 ], "min": 0.724755, "max": 0.729324, "note": "decode-phase peak minus active memory right after model load; median of n=2 haystack variants, min-max 0.7248-0.7293" }, "kv_cache_gb__dense__16k__kv4": { "value": 0.306708, "unit": "GB", "samples": [ 0.306708, 0.306708 ], "min": 0.306708, "max": 0.306708, "note": "measured nbytes of the full-attention KV caches at end of run (incl. 256-token allocation padding); median of n=2 haystack variants, min-max 0.3067-0.3067" }, "linear_state_gb__dense__16k__kv4": { "value": 0.153944, "unit": "GB", "samples": [ 0.153944, 0.153944 ], "min": 0.153944, "max": 0.153944, "note": "measured nbytes of the linear-attention (Gated DeltaNet) state; constant in context length; median of n=2 haystack variants, min-max 0.1539-0.1539" }, "kv_theory_gb__dense__16k__kv4": { "value": 0.301243, "unit": "GB", "samples": [ 0.301326, 0.30116 ], "min": 0.30116, "max": 0.301326, "note": "full-attention layers x kv_heads x head_dim x prompt tokens x 2 x bytes/elem (quantized: bits/8 + 4/group_size); median of n=2 haystack variants, min-max 0.3012-0.3013" }, "prefill_tps__dense__16k__kv4": { "value": 138.537637, "unit": "tokens/s", "samples": [ 139.318491, 137.756783 ], "min": 137.756783, "max": 139.318491, "note": "prompt tokens / time to first token; median of n=2 haystack variants, min-max 137.8-139.3" }, "ttft_s__dense__16k__kv4": { "value": 117.975117, "unit": "s", "samples": [ 117.342644, 118.60759 ], "min": 117.342644, "max": 118.60759, "note": "time to first token (prefill of the full prompt + first sampled token); median of n=2 haystack variants, min-max 117.3-118.6" }, "decode_tps__dense__16k__kv4": { "value": 11.291793, "unit": "tokens/s", "samples": [ 11.2663, 11.317285 ], "min": 11.2663, "max": 11.317285, "note": "(generated tokens - 1) / time from first to last token; median of n=2 haystack variants, min-max 11.27-11.32" }, "n_gen_tokens__dense__16k__kv4": { "value": 68.0, "unit": "tokens", "samples": [ 68.0, 68.0 ], "min": 68.0, "max": 68.0, "note": "generated tokens (greedy, max 128, stops at EOS); median of n=2 haystack variants, min-max 68-68" }, "recall__dense__16k__kv4": { "value": 5.0, "unit": "needles (of 5)", "samples": [ 5.0, 5.0 ], "min": 5.0, "max": 5.0, "note": "exact-match needle values in the answer; median of n=2 haystack variants, min-max 5-5" }, "peak_gb_change_pct__dense__16k__kv4": { "value": -3.740212, "unit": "%", "samples": [ -3.738467, -3.741958 ], "min": -3.741958, "max": -3.738467, "note": "peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=2 haystack variants, min-max -3.742--3.738" }, "peak_decode_gb_change_pct__dense__16k__kv4": { "value": -5.132503, "unit": "%", "samples": [ -5.133199, -5.131808 ], "min": -5.133199, "max": -5.131808, "note": "decode-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=2 haystack variants, min-max -5.133--5.132" }, "peak_prefill_gb_change_pct__dense__16k__kv4": { "value": -3.740212, "unit": "%", "samples": [ -3.738467, -3.741958 ], "min": -3.741958, "max": -3.738467, "note": "prefill-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=2 haystack variants, min-max -3.742--3.738" }, "prefill_tps_change_pct__dense__16k__kv4": { "value": 0.519305, "unit": "%", "samples": [ 1.891984, -0.853374 ], "min": -0.853374, "max": 1.891984, "note": "prefill throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=2 haystack variants, min-max -0.8534-1.892" }, "decode_tps_change_pct__dense__16k__kv4": { "value": -2.296784, "unit": "%", "samples": [ -1.491155, -3.102412 ], "min": -3.102412, "max": -1.491155, "note": "decode throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=2 haystack variants, min-max -3.102--1.491" }, "ttft_s_change_pct__dense__16k__kv4": { "value": -0.498067, "unit": "%", "samples": [ -1.856852, 0.860719 ], "min": -1.856852, "max": 0.860719, "note": "time to first token vs fp16 cache on the same haystack variant (negative = lower); median of n=2 haystack variants, min-max -1.857-0.8607" }, "peak_gb_change__dense__16k__kv4": { "value": -0.765723, "unit": "GB", "samples": [ -0.765723, -0.765723 ], "min": -0.765723, "max": -0.765723, "note": "peak memory minus fp16-cache peak on the same haystack variant; median of n=2 haystack variants, min-max -0.7657--0.7657" }, "peak_decode_gb_change__dense__16k__kv4": { "value": -0.858089, "unit": "GB", "samples": [ -0.858088, -0.85809 ], "min": -0.85809, "max": -0.858088, "note": "decode-phase peak minus fp16-cache decode-phase peak on the same haystack variant; median of n=2 haystack variants, min-max -0.8581--0.8581" }, "peak_gb__moe__8k__fp16": { "value": 21.880593, "unit": "GB", "samples": [ 21.890816, 21.880593, 21.872859 ], "min": 21.872859, "max": 21.890816, "note": "mx.get_peak_memory() over the whole run (weights + KV + activations + allocator cache); median of n=3 haystack variants, min-max 21.87-21.89" }, "peak_prefill_gb__moe__8k__fp16": { "value": 21.880593, "unit": "GB", "samples": [ 21.890816, 21.880593, 21.872859 ], "min": 21.872859, "max": 21.890816, "note": "peak memory from start until the first token; median of n=3 haystack variants, min-max 21.87-21.89" }, "peak_decode_gb__moe__8k__fp16": { "value": 19.864171, "unit": "GB", "samples": [ 19.86093, 19.864171, 19.868229 ], "min": 19.86093, "max": 19.868229, "note": "peak memory after the first token (peak reset at first token); median of n=3 haystack variants, min-max 19.86-19.87" }, "peak_minus_weights_gb__moe__8k__fp16": { "value": 0.355383, "unit": "GB", "samples": [ 0.352142, 0.355383, 0.359441 ], "min": 0.352142, "max": 0.359441, "note": "decode-phase peak minus active memory right after model load; median of n=3 haystack variants, min-max 0.3521-0.3594" }, "kv_cache_gb__moe__8k__fp16": { "value": 0.173015, "unit": "GB", "samples": [ 0.173015, 0.173015, 0.173015 ], "min": 0.173015, "max": 0.173015, "note": "measured nbytes of the full-attention KV caches at end of run (incl. 256-token allocation padding); median of n=3 haystack variants, min-max 0.173-0.173" }, "linear_state_gb__moe__8k__fp16": { "value": 0.064389, "unit": "GB", "samples": [ 0.064389, 0.064389, 0.064389 ], "min": 0.064389, "max": 0.064389, "note": "measured nbytes of the linear-attention (Gated DeltaNet) state; constant in context length; median of n=3 haystack variants, min-max 0.06439-0.06439" }, "kv_theory_gb__moe__8k__fp16": { "value": 0.167588, "unit": "GB", "samples": [ 0.167772, 0.167588, 0.167444 ], "min": 0.167444, "max": 0.167772, "note": "full-attention layers x kv_heads x head_dim x prompt tokens x 2 x bytes/elem (quantized: bits/8 + 4/group_size); median of n=3 haystack variants, min-max 0.1674-0.1678" }, "prefill_tps__moe__8k__fp16": { "value": 1357.981546, "unit": "tokens/s", "samples": [ 1471.053681, 1357.981546, 1044.648647 ], "min": 1044.648647, "max": 1471.053681, "note": "prompt tokens / time to first token; median of n=3 haystack variants, min-max 1045-1471" }, "ttft_s__moe__8k__fp16": { "value": 6.025855, "unit": "s", "samples": [ 5.568797, 6.025855, 7.826555 ], "min": 5.568797, "max": 7.826555, "note": "time to first token (prefill of the full prompt + first sampled token); median of n=3 haystack variants, min-max 5.569-7.827" }, "decode_tps__moe__8k__fp16": { "value": 90.692509, "unit": "tokens/s", "samples": [ 91.119201, 90.692509, 86.011052 ], "min": 86.011052, "max": 91.119201, "note": "(generated tokens - 1) / time from first to last token; median of n=3 haystack variants, min-max 86.01-91.12" }, "n_gen_tokens__moe__8k__fp16": { "value": 66.0, "unit": "tokens", "samples": [ 66.0, 67.0, 66.0 ], "min": 66.0, "max": 67.0, "note": "generated tokens (greedy, max 128, stops at EOS); median of n=3 haystack variants, min-max 66-67" }, "recall__moe__8k__fp16": { "value": 5.0, "unit": "needles (of 5)", "samples": [ 5.0, 5.0, 5.0 ], "min": 5.0, "max": 5.0, "note": "exact-match needle values in the answer; median of n=3 haystack variants, min-max 5-5" }, "peak_gb__moe__8k__kv8": { "value": 21.800393, "unit": "GB", "samples": [ 21.810731, 21.800393, 21.792578 ], "min": 21.792578, "max": 21.810731, "note": "mx.get_peak_memory() over the whole run (weights + KV + activations + allocator cache); median of n=3 haystack variants, min-max 21.79-21.81" }, "peak_prefill_gb__moe__8k__kv8": { "value": 21.800393, "unit": "GB", "samples": [ 21.810731, 21.800393, 21.792578 ], "min": 21.792578, "max": 21.810731, "note": "peak memory from start until the first token; median of n=3 haystack variants, min-max 21.79-21.81" }, "peak_decode_gb__moe__8k__kv8": { "value": 19.779403, "unit": "GB", "samples": [ 19.779403, 19.779403, 19.779419 ], "min": 19.779403, "max": 19.779419, "note": "peak memory after the first token (peak reset at first token); median of n=3 haystack variants, min-max 19.78-19.78" }, "peak_minus_weights_gb__moe__8k__kv8": { "value": 0.270615, "unit": "GB", "samples": [ 0.270615, 0.270615, 0.270632 ], "min": 0.270615, "max": 0.270632, "note": "decode-phase peak minus active memory right after model load; median of n=3 haystack variants, min-max 0.2706-0.2706" }, "kv_cache_gb__moe__8k__kv8": { "value": 0.091914, "unit": "GB", "samples": [ 0.091914, 0.091914, 0.091914 ], "min": 0.091914, "max": 0.091914, "note": "measured nbytes of the full-attention KV caches at end of run (incl. 256-token allocation padding); median of n=3 haystack variants, min-max 0.09191-0.09191" }, "linear_state_gb__moe__8k__kv8": { "value": 0.064389, "unit": "GB", "samples": [ 0.064389, 0.064389, 0.064389 ], "min": 0.064389, "max": 0.064389, "note": "measured nbytes of the linear-attention (Gated DeltaNet) state; constant in context length; median of n=3 haystack variants, min-max 0.06439-0.06439" }, "kv_theory_gb__moe__8k__kv8": { "value": 0.089031, "unit": "GB", "samples": [ 0.089129, 0.089031, 0.088955 ], "min": 0.088955, "max": 0.089129, "note": "full-attention layers x kv_heads x head_dim x prompt tokens x 2 x bytes/elem (quantized: bits/8 + 4/group_size); median of n=3 haystack variants, min-max 0.08895-0.08913" }, "prefill_tps__moe__8k__kv8": { "value": 1312.47851, "unit": "tokens/s", "samples": [ 1436.042374, 1312.47851, 1120.908537 ], "min": 1120.908537, "max": 1436.042374, "note": "prompt tokens / time to first token; median of n=3 haystack variants, min-max 1121-1436" }, "ttft_s__moe__8k__kv8": { "value": 6.234769, "unit": "s", "samples": [ 5.704567, 6.234769, 7.294083 ], "min": 5.704567, "max": 7.294083, "note": "time to first token (prefill of the full prompt + first sampled token); median of n=3 haystack variants, min-max 5.705-7.294" }, "decode_tps__moe__8k__kv8": { "value": 82.312845, "unit": "tokens/s", "samples": [ 83.301788, 82.312845, 77.325298 ], "min": 77.325298, "max": 83.301788, "note": "(generated tokens - 1) / time from first to last token; median of n=3 haystack variants, min-max 77.33-83.3" }, "n_gen_tokens__moe__8k__kv8": { "value": 66.0, "unit": "tokens", "samples": [ 66.0, 67.0, 66.0 ], "min": 66.0, "max": 67.0, "note": "generated tokens (greedy, max 128, stops at EOS); median of n=3 haystack variants, min-max 66-67" }, "recall__moe__8k__kv8": { "value": 5.0, "unit": "needles (of 5)", "samples": [ 5.0, 5.0, 5.0 ], "min": 5.0, "max": 5.0, "note": "exact-match needle values in the answer; median of n=3 haystack variants, min-max 5-5" }, "peak_gb_change_pct__moe__8k__kv8": { "value": -0.366533, "unit": "%", "samples": [ -0.365838, -0.366533, -0.367037 ], "min": -0.367037, "max": -0.365838, "note": "peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -0.367--0.3658" }, "peak_decode_gb_change_pct__moe__8k__kv8": { "value": -0.426739, "unit": "%", "samples": [ -0.41049, -0.426739, -0.446994 ], "min": -0.446994, "max": -0.41049, "note": "decode-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -0.447--0.4105" }, "peak_prefill_gb_change_pct__moe__8k__kv8": { "value": -0.366533, "unit": "%", "samples": [ -0.365838, -0.366533, -0.367037 ], "min": -0.367037, "max": -0.365838, "note": "prefill-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -0.367--0.3658" }, "prefill_tps_change_pct__moe__8k__kv8": { "value": -2.380016, "unit": "%", "samples": [ -2.380016, -3.350785, 7.300052 ], "min": -3.350785, "max": 7.300052, "note": "prefill throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -3.351-7.3" }, "decode_tps_change_pct__moe__8k__kv8": { "value": -9.239643, "unit": "%", "samples": [ -8.579326, -9.239643, -10.098416 ], "min": -10.098416, "max": -8.579326, "note": "decode throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -10.1--8.579" }, "ttft_s_change_pct__moe__8k__kv8": { "value": 2.438041, "unit": "%", "samples": [ 2.438041, 3.466955, -6.8034 ], "min": -6.8034, "max": 3.466955, "note": "time to first token vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -6.803-3.467" }, "peak_gb_change__moe__8k__kv8": { "value": -0.0802, "unit": "GB", "samples": [ -0.080085, -0.0802, -0.080282 ], "min": -0.080282, "max": -0.080085, "note": "peak memory minus fp16-cache peak on the same haystack variant; median of n=3 haystack variants, min-max -0.08028--0.08008" }, "peak_decode_gb_change__moe__8k__kv8": { "value": -0.084768, "unit": "GB", "samples": [ -0.081527, -0.084768, -0.08881 ], "min": -0.08881, "max": -0.081527, "note": "decode-phase peak minus fp16-cache decode-phase peak on the same haystack variant; median of n=3 haystack variants, min-max -0.08881--0.08153" }, "peak_gb__moe__8k__kv4": { "value": 21.754256, "unit": "GB", "samples": [ 21.764594, 21.754256, 21.746408 ], "min": 21.746408, "max": 21.764594, "note": "mx.get_peak_memory() over the whole run (weights + KV + activations + allocator cache); median of n=3 haystack variants, min-max 21.75-21.76" }, "peak_prefill_gb__moe__8k__kv4": { "value": 21.754256, "unit": "GB", "samples": [ 21.764594, 21.754256, 21.746408 ], "min": 21.746408, "max": 21.764594, "note": "peak memory from start until the first token; median of n=3 haystack variants, min-max 21.75-21.76" }, "peak_decode_gb__moe__8k__kv4": { "value": 19.736148, "unit": "GB", "samples": [ 19.736148, 19.736148, 19.736181 ], "min": 19.736148, "max": 19.736181, "note": "peak memory after the first token (peak reset at first token); median of n=3 haystack variants, min-max 19.74-19.74" }, "peak_minus_weights_gb__moe__8k__kv4": { "value": 0.22736, "unit": "GB", "samples": [ 0.22736, 0.22736, 0.227393 ], "min": 0.22736, "max": 0.227393, "note": "decode-phase peak minus active memory right after model load; median of n=3 haystack variants, min-max 0.2274-0.2274" }, "kv_cache_gb__moe__8k__kv4": { "value": 0.04866, "unit": "GB", "samples": [ 0.04866, 0.04866, 0.04866 ], "min": 0.04866, "max": 0.04866, "note": "measured nbytes of the full-attention KV caches at end of run (incl. 256-token allocation padding); median of n=3 haystack variants, min-max 0.04866-0.04866" }, "linear_state_gb__moe__8k__kv4": { "value": 0.064389, "unit": "GB", "samples": [ 0.064389, 0.064389, 0.064389 ], "min": 0.064389, "max": 0.064389, "note": "measured nbytes of the linear-attention (Gated DeltaNet) state; constant in context length; median of n=3 haystack variants, min-max 0.06439-0.06439" }, "kv_theory_gb__moe__8k__kv4": { "value": 0.047134, "unit": "GB", "samples": [ 0.047186, 0.047134, 0.047094 ], "min": 0.047094, "max": 0.047186, "note": "full-attention layers x kv_heads x head_dim x prompt tokens x 2 x bytes/elem (quantized: bits/8 + 4/group_size); median of n=3 haystack variants, min-max 0.04709-0.04719" }, "prefill_tps__moe__8k__kv4": { "value": 1271.027421, "unit": "tokens/s", "samples": [ 1424.25825, 1271.027421, 1097.922852 ], "min": 1097.922852, "max": 1424.25825, "note": "prompt tokens / time to first token; median of n=3 haystack variants, min-max 1098-1424" }, "ttft_s__moe__8k__kv4": { "value": 6.438099, "unit": "s", "samples": [ 5.751766, 6.438099, 7.446789 ], "min": 5.751766, "max": 7.446789, "note": "time to first token (prefill of the full prompt + first sampled token); median of n=3 haystack variants, min-max 5.752-7.447" }, "decode_tps__moe__8k__kv4": { "value": 84.581733, "unit": "tokens/s", "samples": [ 85.45545, 84.581733, 77.356218 ], "min": 77.356218, "max": 85.45545, "note": "(generated tokens - 1) / time from first to last token; median of n=3 haystack variants, min-max 77.36-85.46" }, "n_gen_tokens__moe__8k__kv4": { "value": 66.0, "unit": "tokens", "samples": [ 66.0, 67.0, 66.0 ], "min": 66.0, "max": 67.0, "note": "generated tokens (greedy, max 128, stops at EOS); median of n=3 haystack variants, min-max 66-67" }, "recall__moe__8k__kv4": { "value": 5.0, "unit": "needles (of 5)", "samples": [ 5.0, 5.0, 5.0 ], "min": 5.0, "max": 5.0, "note": "exact-match needle values in the answer; median of n=3 haystack variants, min-max 5-5" }, "peak_gb_change_pct__moe__8k__kv4": { "value": -0.577393, "unit": "%", "samples": [ -0.576599, -0.577393, -0.578121 ], "min": -0.578121, "max": -0.576599, "note": "peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -0.5781--0.5766" }, "peak_decode_gb_change_pct__moe__8k__kv4": { "value": -0.644492, "unit": "%", "samples": [ -0.628278, -0.644492, -0.66462 ], "min": -0.66462, "max": -0.628278, "note": "decode-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -0.6646--0.6283" }, "peak_prefill_gb_change_pct__moe__8k__kv4": { "value": -0.577393, "unit": "%", "samples": [ -0.576599, -0.577393, -0.578121 ], "min": -0.578121, "max": -0.576599, "note": "prefill-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -0.5781--0.5766" }, "prefill_tps_change_pct__moe__8k__kv4": { "value": -3.181082, "unit": "%", "samples": [ -3.181082, -6.403189, 5.099725 ], "min": -6.403189, "max": 5.099725, "note": "prefill throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -6.403-5.1" }, "decode_tps_change_pct__moe__8k__kv4": { "value": -6.737907, "unit": "%", "samples": [ -6.215761, -6.737907, -10.062467 ], "min": -10.062467, "max": -6.215761, "note": "decode throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -10.06--6.216" }, "ttft_s_change_pct__moe__8k__kv4": { "value": 3.2856, "unit": "%", "samples": [ 3.2856, 6.841247, -4.852272 ], "min": -4.852272, "max": 6.841247, "note": "time to first token vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -4.852-6.841" }, "peak_gb_change__moe__8k__kv4": { "value": -0.126337, "unit": "GB", "samples": [ -0.126222, -0.126337, -0.126452 ], "min": -0.126452, "max": -0.126222, "note": "peak memory minus fp16-cache peak on the same haystack variant; median of n=3 haystack variants, min-max -0.1265--0.1262" }, "peak_decode_gb_change__moe__8k__kv4": { "value": -0.128023, "unit": "GB", "samples": [ -0.124782, -0.128023, -0.132048 ], "min": -0.132048, "max": -0.124782, "note": "decode-phase peak minus fp16-cache decode-phase peak on the same haystack variant; median of n=3 haystack variants, min-max -0.132--0.1248" }, "peak_gb__moe__16k__fp16": { "value": 22.512916, "unit": "GB", "samples": [ 22.512916, 22.500907, 22.542736 ], "min": 22.500907, "max": 22.542736, "note": "mx.get_peak_memory() over the whole run (weights + KV + activations + allocator cache); median of n=3 haystack variants, min-max 22.5-22.54" }, "peak_prefill_gb__moe__16k__fp16": { "value": 22.512916, "unit": "GB", "samples": [ 22.512916, 22.500907, 22.542736 ], "min": 22.500907, "max": 22.542736, "note": "peak memory from start until the first token; median of n=3 haystack variants, min-max 22.5-22.54" }, "peak_decode_gb__moe__16k__fp16": { "value": 20.077451, "unit": "GB", "samples": [ 20.077451, 20.08233, 20.068166 ], "min": 20.068166, "max": 20.08233, "note": "peak memory after the first token (peak reset at first token); median of n=3 haystack variants, min-max 20.07-20.08" }, "peak_minus_weights_gb__moe__16k__fp16": { "value": 0.568663, "unit": "GB", "samples": [ 0.568663, 0.573542, 0.559378 ], "min": 0.559378, "max": 0.573542, "note": "decode-phase peak minus active memory right after model load; median of n=3 haystack variants, min-max 0.5594-0.5735" }, "kv_cache_gb__moe__16k__fp16": { "value": 0.340787, "unit": "GB", "samples": [ 0.340787, 0.340787, 0.340787 ], "min": 0.340787, "max": 0.340787, "note": "measured nbytes of the full-attention KV caches at end of run (incl. 256-token allocation padding); median of n=3 haystack variants, min-max 0.3408-0.3408" }, "linear_state_gb__moe__16k__fp16": { "value": 0.064389, "unit": "GB", "samples": [ 0.064389, 0.064389, 0.064389 ], "min": 0.064389, "max": 0.064389, "note": "measured nbytes of the linear-attention (Gated DeltaNet) state; constant in context length; median of n=3 haystack variants, min-max 0.06439-0.06439" }, "kv_theory_gb__moe__16k__fp16": { "value": 0.334807, "unit": "GB", "samples": [ 0.334807, 0.334623, 0.335258 ], "min": 0.334623, "max": 0.335258, "note": "full-attention layers x kv_heads x head_dim x prompt tokens x 2 x bytes/elem (quantized: bits/8 + 4/group_size); median of n=3 haystack variants, min-max 0.3346-0.3353" }, "prefill_tps__moe__16k__fp16": { "value": 1227.120762, "unit": "tokens/s", "samples": [ 1263.614454, 1227.120762, 1061.822134 ], "min": 1061.822134, "max": 1263.614454, "note": "prompt tokens / time to first token; median of n=3 haystack variants, min-max 1062-1264" }, "ttft_s__moe__16k__fp16": { "value": 13.314908, "unit": "s", "samples": [ 12.93749, 13.314908, 15.416895 ], "min": 12.93749, "max": 15.416895, "note": "time to first token (prefill of the full prompt + first sampled token); median of n=3 haystack variants, min-max 12.94-15.42" }, "decode_tps__moe__16k__fp16": { "value": 84.70795, "unit": "tokens/s", "samples": [ 85.213863, 84.70795, 79.653123 ], "min": 79.653123, "max": 85.213863, "note": "(generated tokens - 1) / time from first to last token; median of n=3 haystack variants, min-max 79.65-85.21" }, "n_gen_tokens__moe__16k__fp16": { "value": 68.0, "unit": "tokens", "samples": [ 68.0, 68.0, 67.0 ], "min": 67.0, "max": 68.0, "note": "generated tokens (greedy, max 128, stops at EOS); median of n=3 haystack variants, min-max 67-68" }, "recall__moe__16k__fp16": { "value": 5.0, "unit": "needles (of 5)", "samples": [ 5.0, 5.0, 5.0 ], "min": 5.0, "max": 5.0, "note": "exact-match needle values in the answer; median of n=3 haystack variants, min-max 5-5" }, "peak_gb__moe__16k__kv8": { "value": 22.412089, "unit": "GB", "samples": [ 22.412089, 22.399834, 22.442695 ], "min": 22.399834, "max": 22.442695, "note": "mx.get_peak_memory() over the whole run (weights + KV + activations + allocator cache); median of n=3 haystack variants, min-max 22.4-22.44" }, "peak_prefill_gb__moe__16k__kv8": { "value": 22.412089, "unit": "GB", "samples": [ 22.412089, 22.399834, 22.442695 ], "min": 22.399834, "max": 22.442695, "note": "peak memory from start until the first token; median of n=3 haystack variants, min-max 22.4-22.44" }, "peak_decode_gb__moe__16k__kv8": { "value": 19.885747, "unit": "GB", "samples": [ 19.885747, 19.889793, 19.87459 ], "min": 19.87459, "max": 19.889793, "note": "peak memory after the first token (peak reset at first token); median of n=3 haystack variants, min-max 19.87-19.89" }, "peak_minus_weights_gb__moe__16k__kv8": { "value": 0.37696, "unit": "GB", "samples": [ 0.37696, 0.381006, 0.365802 ], "min": 0.365802, "max": 0.381006, "note": "decode-phase peak minus active memory right after model load; median of n=3 haystack variants, min-max 0.3658-0.381" }, "kv_cache_gb__moe__16k__kv8": { "value": 0.181043, "unit": "GB", "samples": [ 0.181043, 0.181043, 0.181043 ], "min": 0.181043, "max": 0.181043, "note": "measured nbytes of the full-attention KV caches at end of run (incl. 256-token allocation padding); median of n=3 haystack variants, min-max 0.181-0.181" }, "linear_state_gb__moe__16k__kv8": { "value": 0.064389, "unit": "GB", "samples": [ 0.064389, 0.064389, 0.064389 ], "min": 0.064389, "max": 0.064389, "note": "measured nbytes of the linear-attention (Gated DeltaNet) state; constant in context length; median of n=3 haystack variants, min-max 0.06439-0.06439" }, "kv_theory_gb__moe__16k__kv8": { "value": 0.177866, "unit": "GB", "samples": [ 0.177866, 0.177768, 0.178106 ], "min": 0.177768, "max": 0.178106, "note": "full-attention layers x kv_heads x head_dim x prompt tokens x 2 x bytes/elem (quantized: bits/8 + 4/group_size); median of n=3 haystack variants, min-max 0.1778-0.1781" }, "prefill_tps__moe__16k__kv8": { "value": 1201.850676, "unit": "tokens/s", "samples": [ 1247.813999, 1201.850676, 1011.964541 ], "min": 1011.964541, "max": 1247.813999, "note": "prompt tokens / time to first token; median of n=3 haystack variants, min-max 1012-1248" }, "ttft_s__moe__16k__kv8": { "value": 13.594867, "unit": "s", "samples": [ 13.101312, 13.594867, 16.176456 ], "min": 13.101312, "max": 16.176456, "note": "time to first token (prefill of the full prompt + first sampled token); median of n=3 haystack variants, min-max 13.1-16.18" }, "decode_tps__moe__16k__kv8": { "value": 73.278933, "unit": "tokens/s", "samples": [ 73.278933, 73.512681, 66.713582 ], "min": 66.713582, "max": 73.512681, "note": "(generated tokens - 1) / time from first to last token; median of n=3 haystack variants, min-max 66.71-73.51" }, "n_gen_tokens__moe__16k__kv8": { "value": 68.0, "unit": "tokens", "samples": [ 68.0, 68.0, 67.0 ], "min": 67.0, "max": 68.0, "note": "generated tokens (greedy, max 128, stops at EOS); median of n=3 haystack variants, min-max 67-68" }, "recall__moe__16k__kv8": { "value": 5.0, "unit": "needles (of 5)", "samples": [ 5.0, 5.0, 5.0 ], "min": 5.0, "max": 5.0, "note": "exact-match needle values in the answer; median of n=3 haystack variants, min-max 5-5" }, "peak_gb_change_pct__moe__16k__kv8": { "value": -0.447863, "unit": "%", "samples": [ -0.447863, -0.449195, -0.443782 ], "min": -0.449195, "max": -0.443782, "note": "peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -0.4492--0.4438" }, "peak_decode_gb_change_pct__moe__16k__kv8": { "value": -0.958734, "unit": "%", "samples": [ -0.95482, -0.958734, -0.964591 ], "min": -0.964591, "max": -0.95482, "note": "decode-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -0.9646--0.9548" }, "peak_prefill_gb_change_pct__moe__16k__kv8": { "value": -0.447863, "unit": "%", "samples": [ -0.447863, -0.449195, -0.443782 ], "min": -0.449195, "max": -0.443782, "note": "prefill-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -0.4492--0.4438" }, "prefill_tps_change_pct__moe__16k__kv8": { "value": -2.059299, "unit": "%", "samples": [ -1.250417, -2.059299, -4.695475 ], "min": -4.695475, "max": -1.250417, "note": "prefill throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -4.695--1.25" }, "decode_tps_change_pct__moe__16k__kv8": { "value": -14.005855, "unit": "%", "samples": [ -14.005855, -13.216314, -16.244863 ], "min": -16.244863, "max": -13.216314, "note": "decode throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -16.24--13.22" }, "ttft_s_change_pct__moe__16k__kv8": { "value": 2.102598, "unit": "%", "samples": [ 1.266251, 2.102598, 4.926812 ], "min": 1.266251, "max": 4.926812, "note": "time to first token vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max 1.266-4.927" }, "peak_gb_change__moe__16k__kv8": { "value": -0.100827, "unit": "GB", "samples": [ -0.100827, -0.101073, -0.100041 ], "min": -0.101073, "max": -0.100041, "note": "peak memory minus fp16-cache peak on the same haystack variant; median of n=3 haystack variants, min-max -0.1011--0.1" }, "peak_decode_gb_change__moe__16k__kv8": { "value": -0.192536, "unit": "GB", "samples": [ -0.191703, -0.192536, -0.193576 ], "min": -0.193576, "max": -0.191703, "note": "decode-phase peak minus fp16-cache decode-phase peak on the same haystack variant; median of n=3 haystack variants, min-max -0.1936--0.1917" }, "peak_gb__moe__16k__kv4": { "value": 22.319847, "unit": "GB", "samples": [ 22.319847, 22.307543, 22.35042 ], "min": 22.307543, "max": 22.35042, "note": "mx.get_peak_memory() over the whole run (weights + KV + activations + allocator cache); median of n=3 haystack variants, min-max 22.31-22.35" }, "peak_prefill_gb__moe__16k__kv4": { "value": 22.319847, "unit": "GB", "samples": [ 22.319847, 22.307543, 22.35042 ], "min": 22.307543, "max": 22.35042, "note": "peak memory from start until the first token; median of n=3 haystack variants, min-max 22.31-22.35" }, "peak_decode_gb__moe__16k__kv4": { "value": 19.784006, "unit": "GB", "samples": [ 19.783989, 19.789841, 19.784006 ], "min": 19.783989, "max": 19.789841, "note": "peak memory after the first token (peak reset at first token); median of n=3 haystack variants, min-max 19.78-19.79" }, "peak_minus_weights_gb__moe__16k__kv4": { "value": 0.275218, "unit": "GB", "samples": [ 0.275202, 0.281053, 0.275218 ], "min": 0.275202, "max": 0.281053, "note": "decode-phase peak minus active memory right after model load; median of n=3 haystack variants, min-max 0.2752-0.2811" }, "kv_cache_gb__moe__16k__kv4": { "value": 0.095846, "unit": "GB", "samples": [ 0.095846, 0.095846, 0.095846 ], "min": 0.095846, "max": 0.095846, "note": "measured nbytes of the full-attention KV caches at end of run (incl. 256-token allocation padding); median of n=3 haystack variants, min-max 0.09585-0.09585" }, "linear_state_gb__moe__16k__kv4": { "value": 0.064389, "unit": "GB", "samples": [ 0.064389, 0.064389, 0.064389 ], "min": 0.064389, "max": 0.064389, "note": "measured nbytes of the linear-attention (Gated DeltaNet) state; constant in context length; median of n=3 haystack variants, min-max 0.06439-0.06439" }, "kv_theory_gb__moe__16k__kv4": { "value": 0.094164, "unit": "GB", "samples": [ 0.094164, 0.094113, 0.094291 ], "min": 0.094113, "max": 0.094291, "note": "full-attention layers x kv_heads x head_dim x prompt tokens x 2 x bytes/elem (quantized: bits/8 + 4/group_size); median of n=3 haystack variants, min-max 0.09411-0.09429" }, "prefill_tps__moe__16k__kv4": { "value": 1169.475166, "unit": "tokens/s", "samples": [ 1322.679775, 1169.475166, 1034.119345 ], "min": 1034.119345, "max": 1322.679775, "note": "prompt tokens / time to first token; median of n=3 haystack variants, min-max 1034-1323" }, "ttft_s__moe__16k__kv4": { "value": 13.971224, "unit": "s", "samples": [ 12.359757, 13.971224, 15.829894 ], "min": 12.359757, "max": 15.829894, "note": "time to first token (prefill of the full prompt + first sampled token); median of n=3 haystack variants, min-max 12.36-15.83" }, "decode_tps__moe__16k__kv4": { "value": 76.070904, "unit": "tokens/s", "samples": [ 76.273291, 76.070904, 69.233586 ], "min": 69.233586, "max": 76.273291, "note": "(generated tokens - 1) / time from first to last token; median of n=3 haystack variants, min-max 69.23-76.27" }, "n_gen_tokens__moe__16k__kv4": { "value": 68.0, "unit": "tokens", "samples": [ 68.0, 68.0, 67.0 ], "min": 67.0, "max": 68.0, "note": "generated tokens (greedy, max 128, stops at EOS); median of n=3 haystack variants, min-max 67-68" }, "recall__moe__16k__kv4": { "value": 5.0, "unit": "needles (of 5)", "samples": [ 5.0, 5.0, 5.0 ], "min": 5.0, "max": 5.0, "note": "exact-match needle values in the answer; median of n=3 haystack variants, min-max 5-5" }, "peak_gb_change_pct__moe__16k__kv4": { "value": -0.857592, "unit": "%", "samples": [ -0.857592, -0.859361, -0.853115 ], "min": -0.859361, "max": -0.853115, "note": "peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -0.8594--0.8531" }, "peak_decode_gb_change_pct__moe__16k__kv4": { "value": -1.45645, "unit": "%", "samples": [ -1.461647, -1.45645, -1.415974 ], "min": -1.461647, "max": -1.415974, "note": "decode-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -1.462--1.416" }, "peak_prefill_gb_change_pct__moe__16k__kv4": { "value": -0.857592, "unit": "%", "samples": [ -0.857592, -0.859361, -0.853115 ], "min": -0.859361, "max": -0.853115, "note": "prefill-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -0.8594--0.8531" }, "prefill_tps_change_pct__moe__16k__kv4": { "value": -2.608986, "unit": "%", "samples": [ 4.674315, -4.69763, -2.608986 ], "min": -4.69763, "max": 4.674315, "note": "prefill throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -4.698-4.674" }, "decode_tps_change_pct__moe__16k__kv4": { "value": -10.491922, "unit": "%", "samples": [ -10.491922, -10.196264, -13.08114 ], "min": -13.08114, "max": -10.196264, "note": "decode throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -13.08--10.2" }, "ttft_s_change_pct__moe__16k__kv4": { "value": 2.678877, "unit": "%", "samples": [ -4.46558, 4.929185, 2.678877 ], "min": -4.46558, "max": 4.929185, "note": "time to first token vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -4.466-4.929" }, "peak_gb_change__moe__16k__kv4": { "value": -0.193069, "unit": "GB", "samples": [ -0.193069, -0.193364, -0.192315 ], "min": -0.193364, "max": -0.192315, "note": "peak memory minus fp16-cache peak on the same haystack variant; median of n=3 haystack variants, min-max -0.1934--0.1923" }, "peak_decode_gb_change__moe__16k__kv4": { "value": -0.292489, "unit": "GB", "samples": [ -0.293461, -0.292489, -0.28416 ], "min": -0.293461, "max": -0.28416, "note": "decode-phase peak minus fp16-cache decode-phase peak on the same haystack variant; median of n=3 haystack variants, min-max -0.2935--0.2842" }, "peak_gb__moe__32k__fp16": { "value": 23.964425, "unit": "GB", "samples": [ 23.918844, 23.964425, 23.966341 ], "min": 23.918844, "max": 23.966341, "note": "mx.get_peak_memory() over the whole run (weights + KV + activations + allocator cache); median of n=3 haystack variants, min-max 23.92-23.97" }, "peak_prefill_gb__moe__32k__fp16": { "value": 23.964425, "unit": "GB", "samples": [ 23.918844, 23.964425, 23.966341 ], "min": 23.918844, "max": 23.966341, "note": "peak memory from start until the first token; median of n=3 haystack variants, min-max 23.92-23.97" }, "peak_decode_gb__moe__32k__fp16": { "value": 20.436344, "unit": "GB", "samples": [ 20.480779, 20.436344, 20.435836 ], "min": 20.435836, "max": 20.480779, "note": "peak memory after the first token (peak reset at first token); median of n=3 haystack variants, min-max 20.44-20.48" }, "peak_minus_weights_gb__moe__32k__fp16": { "value": 0.927557, "unit": "GB", "samples": [ 0.971991, 0.927557, 0.927049 ], "min": 0.927049, "max": 0.971991, "note": "decode-phase peak minus active memory right after model load; median of n=3 haystack variants, min-max 0.927-0.972" }, "kv_cache_gb__moe__32k__fp16": { "value": 0.676332, "unit": "GB", "samples": [ 0.676332, 0.676332, 0.676332 ], "min": 0.676332, "max": 0.676332, "note": "measured nbytes of the full-attention KV caches at end of run (incl. 256-token allocation padding); median of n=3 haystack variants, min-max 0.6763-0.6763" }, "linear_state_gb__moe__32k__fp16": { "value": 0.064389, "unit": "GB", "samples": [ 0.064389, 0.064389, 0.064389 ], "min": 0.064389, "max": 0.064389, "note": "measured nbytes of the linear-attention (Gated DeltaNet) state; constant in context length; median of n=3 haystack variants, min-max 0.06439-0.06439" }, "kv_theory_gb__moe__32k__fp16": { "value": 0.67074, "unit": "GB", "samples": [ 0.670249, 0.67074, 0.670761 ], "min": 0.670249, "max": 0.670761, "note": "full-attention layers x kv_heads x head_dim x prompt tokens x 2 x bytes/elem (quantized: bits/8 + 4/group_size); median of n=3 haystack variants, min-max 0.6702-0.6708" }, "prefill_tps__moe__32k__fp16": { "value": 854.908159, "unit": "tokens/s", "samples": [ 1123.67616, 854.908159, 851.27229 ], "min": 851.27229, "max": 1123.67616, "note": "prompt tokens / time to first token; median of n=3 haystack variants, min-max 851.3-1124" }, "ttft_s__moe__32k__fp16": { "value": 38.309378, "unit": "s", "samples": [ 29.124939, 38.309378, 38.474176 ], "min": 29.124939, "max": 38.474176, "note": "time to first token (prefill of the full prompt + first sampled token); median of n=3 haystack variants, min-max 29.12-38.47" }, "decode_tps__moe__32k__fp16": { "value": 61.997867, "unit": "tokens/s", "samples": [ 75.05899, 61.067619, 61.997867 ], "min": 61.067619, "max": 75.05899, "note": "(generated tokens - 1) / time from first to last token; median of n=3 haystack variants, min-max 61.07-75.06" }, "n_gen_tokens__moe__32k__fp16": { "value": 66.0, "unit": "tokens", "samples": [ 68.0, 66.0, 66.0 ], "min": 66.0, "max": 68.0, "note": "generated tokens (greedy, max 128, stops at EOS); median of n=3 haystack variants, min-max 66-68" }, "recall__moe__32k__fp16": { "value": 5.0, "unit": "needles (of 5)", "samples": [ 5.0, 5.0, 5.0 ], "min": 5.0, "max": 5.0, "note": "exact-match needle values in the answer; median of n=3 haystack variants, min-max 5-5" }, "peak_gb__moe__32k__kv8": { "value": 23.66558, "unit": "GB", "samples": [ 23.620295, 23.66558, 23.667464 ], "min": 23.620295, "max": 23.667464, "note": "mx.get_peak_memory() over the whole run (weights + KV + activations + allocator cache); median of n=3 haystack variants, min-max 23.62-23.67" }, "peak_prefill_gb__moe__32k__kv8": { "value": 23.66558, "unit": "GB", "samples": [ 23.620295, 23.66558, 23.667464 ], "min": 23.620295, "max": 23.667464, "note": "peak memory from start until the first token; median of n=3 haystack variants, min-max 23.62-23.67" }, "peak_decode_gb__moe__32k__kv8": { "value": 20.089841, "unit": "GB", "samples": [ 20.100074, 20.089841, 20.089006 ], "min": 20.089006, "max": 20.100074, "note": "peak memory after the first token (peak reset at first token); median of n=3 haystack variants, min-max 20.09-20.1" }, "peak_minus_weights_gb__moe__32k__kv8": { "value": 0.581054, "unit": "GB", "samples": [ 0.591287, 0.581054, 0.580218 ], "min": 0.580218, "max": 0.591287, "note": "decode-phase peak minus active memory right after model load; median of n=3 haystack variants, min-max 0.5802-0.5913" }, "kv_cache_gb__moe__32k__kv8": { "value": 0.359301, "unit": "GB", "samples": [ 0.359301, 0.359301, 0.359301 ], "min": 0.359301, "max": 0.359301, "note": "measured nbytes of the full-attention KV caches at end of run (incl. 256-token allocation padding); median of n=3 haystack variants, min-max 0.3593-0.3593" }, "linear_state_gb__moe__32k__kv8": { "value": 0.064389, "unit": "GB", "samples": [ 0.064389, 0.064389, 0.064389 ], "min": 0.064389, "max": 0.064389, "note": "measured nbytes of the linear-attention (Gated DeltaNet) state; constant in context length; median of n=3 haystack variants, min-max 0.06439-0.06439" }, "kv_theory_gb__moe__32k__kv8": { "value": 0.356331, "unit": "GB", "samples": [ 0.35607, 0.356331, 0.356342 ], "min": 0.35607, "max": 0.356342, "note": "full-attention layers x kv_heads x head_dim x prompt tokens x 2 x bytes/elem (quantized: bits/8 + 4/group_size); median of n=3 haystack variants, min-max 0.3561-0.3563" }, "prefill_tps__moe__32k__kv8": { "value": 947.602837, "unit": "tokens/s", "samples": [ 1069.692228, 947.602837, 832.951246 ], "min": 832.951246, "max": 1069.692228, "note": "prompt tokens / time to first token; median of n=3 haystack variants, min-max 833-1070" }, "ttft_s__moe__32k__kv8": { "value": 34.561948, "unit": "s", "samples": [ 30.594781, 34.561948, 39.320429 ], "min": 30.594781, "max": 39.320429, "note": "time to first token (prefill of the full prompt + first sampled token); median of n=3 haystack variants, min-max 30.59-39.32" }, "decode_tps__moe__32k__kv8": { "value": 52.676663, "unit": "tokens/s", "samples": [ 61.319687, 52.676663, 48.605682 ], "min": 48.605682, "max": 61.319687, "note": "(generated tokens - 1) / time from first to last token; median of n=3 haystack variants, min-max 48.61-61.32" }, "n_gen_tokens__moe__32k__kv8": { "value": 66.0, "unit": "tokens", "samples": [ 68.0, 66.0, 66.0 ], "min": 66.0, "max": 68.0, "note": "generated tokens (greedy, max 128, stops at EOS); median of n=3 haystack variants, min-max 66-68" }, "recall__moe__32k__kv8": { "value": 5.0, "unit": "needles (of 5)", "samples": [ 5.0, 5.0, 5.0 ], "min": 5.0, "max": 5.0, "note": "exact-match needle values in the answer; median of n=3 haystack variants, min-max 5-5" }, "peak_gb_change_pct__moe__32k__kv8": { "value": -1.24707, "unit": "%", "samples": [ -1.248177, -1.247033, -1.24707 ], "min": -1.248177, "max": -1.247033, "note": "peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -1.248--1.247" }, "peak_decode_gb_change_pct__moe__32k__kv8": { "value": -1.69717, "unit": "%", "samples": [ -1.858839, -1.695524, -1.69717 ], "min": -1.858839, "max": -1.695524, "note": "decode-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -1.859--1.696" }, "peak_prefill_gb_change_pct__moe__32k__kv8": { "value": -1.24707, "unit": "%", "samples": [ -1.248177, -1.247033, -1.24707 ], "min": -1.248177, "max": -1.247033, "note": "prefill-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -1.248--1.247" }, "prefill_tps_change_pct__moe__32k__kv8": { "value": -2.152196, "unit": "%", "samples": [ -4.804225, 10.842647, -2.152196 ], "min": -4.804225, "max": 10.842647, "note": "prefill throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -4.804-10.84" }, "decode_tps_change_pct__moe__32k__kv8": { "value": -18.304674, "unit": "%", "samples": [ -18.304674, -13.740434, -21.601041 ], "min": -21.601041, "max": -13.740434, "note": "decode throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -21.6--13.74" }, "ttft_s_change_pct__moe__32k__kv8": { "value": 2.199534, "unit": "%", "samples": [ 5.046679, -9.782018, 2.199534 ], "min": -9.782018, "max": 5.046679, "note": "time to first token vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -9.782-5.047" }, "peak_gb_change__moe__32k__kv8": { "value": -0.298844, "unit": "GB", "samples": [ -0.29855, -0.298844, -0.298877 ], "min": -0.298877, "max": -0.29855, "note": "peak memory minus fp16-cache peak on the same haystack variant; median of n=3 haystack variants, min-max -0.2989--0.2985" }, "peak_decode_gb_change__moe__32k__kv8": { "value": -0.346831, "unit": "GB", "samples": [ -0.380705, -0.346503, -0.346831 ], "min": -0.380705, "max": -0.346503, "note": "decode-phase peak minus fp16-cache decode-phase peak on the same haystack variant; median of n=3 haystack variants, min-max -0.3807--0.3465" }, "peak_gb__moe__32k__kv4": { "value": 23.485061, "unit": "GB", "samples": [ 23.439514, 23.485061, 23.486978 ], "min": 23.439514, "max": 23.486978, "note": "mx.get_peak_memory() over the whole run (weights + KV + activations + allocator cache); median of n=3 haystack variants, min-max 23.44-23.49" }, "peak_prefill_gb__moe__32k__kv4": { "value": 23.485061, "unit": "GB", "samples": [ 23.439514, 23.485061, 23.486978 ], "min": 23.439514, "max": 23.486978, "note": "peak memory from start until the first token; median of n=3 haystack variants, min-max 23.44-23.49" }, "peak_decode_gb__moe__32k__kv4": { "value": 19.888482, "unit": "GB", "samples": [ 19.900672, 19.888482, 19.887991 ], "min": 19.887991, "max": 19.900672, "note": "peak memory after the first token (peak reset at first token); median of n=3 haystack variants, min-max 19.89-19.9" }, "peak_minus_weights_gb__moe__32k__kv4": { "value": 0.379695, "unit": "GB", "samples": [ 0.391885, 0.379695, 0.379203 ], "min": 0.379203, "max": 0.391885, "note": "decode-phase peak minus active memory right after model load; median of n=3 haystack variants, min-max 0.3792-0.3919" }, "kv_cache_gb__moe__32k__kv4": { "value": 0.190218, "unit": "GB", "samples": [ 0.190218, 0.190218, 0.190218 ], "min": 0.190218, "max": 0.190218, "note": "measured nbytes of the full-attention KV caches at end of run (incl. 256-token allocation padding); median of n=3 haystack variants, min-max 0.1902-0.1902" }, "linear_state_gb__moe__32k__kv4": { "value": 0.064389, "unit": "GB", "samples": [ 0.064389, 0.064389, 0.064389 ], "min": 0.064389, "max": 0.064389, "note": "measured nbytes of the linear-attention (Gated DeltaNet) state; constant in context length; median of n=3 haystack variants, min-max 0.06439-0.06439" }, "kv_theory_gb__moe__32k__kv4": { "value": 0.188646, "unit": "GB", "samples": [ 0.188508, 0.188646, 0.188652 ], "min": 0.188508, "max": 0.188652, "note": "full-attention layers x kv_heads x head_dim x prompt tokens x 2 x bytes/elem (quantized: bits/8 + 4/group_size); median of n=3 haystack variants, min-max 0.1885-0.1887" }, "prefill_tps__moe__32k__kv4": { "value": 879.800422, "unit": "tokens/s", "samples": [ 1075.224757, 879.800422, 861.632933 ], "min": 861.632933, "max": 1075.224757, "note": "prompt tokens / time to first token; median of n=3 haystack variants, min-max 861.6-1075" }, "ttft_s__moe__32k__kv4": { "value": 37.225488, "unit": "s", "samples": [ 30.437357, 37.225488, 38.011546 ], "min": 30.437357, "max": 38.011546, "note": "time to first token (prefill of the full prompt + first sampled token); median of n=3 haystack variants, min-max 30.44-38.01" }, "decode_tps__moe__32k__kv4": { "value": 55.867154, "unit": "tokens/s", "samples": [ 63.991941, 55.04067, 55.867154 ], "min": 55.04067, "max": 63.991941, "note": "(generated tokens - 1) / time from first to last token; median of n=3 haystack variants, min-max 55.04-63.99" }, "n_gen_tokens__moe__32k__kv4": { "value": 66.0, "unit": "tokens", "samples": [ 68.0, 66.0, 66.0 ], "min": 66.0, "max": 68.0, "note": "generated tokens (greedy, max 128, stops at EOS); median of n=3 haystack variants, min-max 66-68" }, "recall__moe__32k__kv4": { "value": 5.0, "unit": "needles (of 5)", "samples": [ 5.0, 5.0, 5.0 ], "min": 5.0, "max": 5.0, "note": "exact-match needle values in the answer; median of n=3 haystack variants, min-max 5-5" }, "peak_gb_change_pct__moe__32k__kv4": { "value": -2.000311, "unit": "%", "samples": [ -2.003986, -2.000311, -2.000151 ], "min": -2.003986, "max": -2.000151, "note": "peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -2.004--2" }, "peak_decode_gb_change_pct__moe__32k__kv4": { "value": -2.680822, "unit": "%", "samples": [ -2.832445, -2.680822, -2.680808 ], "min": -2.832445, "max": -2.680808, "note": "decode-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -2.832--2.681" }, "peak_prefill_gb_change_pct__moe__32k__kv4": { "value": -2.000311, "unit": "%", "samples": [ -2.003986, -2.000311, -2.000151 ], "min": -2.003986, "max": -2.000151, "note": "prefill-phase peak memory vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -2.004--2" }, "prefill_tps_change_pct__moe__32k__kv4": { "value": 1.217077, "unit": "%", "samples": [ -4.311865, 2.911688, 1.217077 ], "min": -4.311865, "max": 2.911688, "note": "prefill throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -4.312-2.912" }, "decode_tps_change_pct__moe__32k__kv4": { "value": -9.888587, "unit": "%", "samples": [ -14.744468, -9.869304, -9.888587 ], "min": -14.744468, "max": -9.869304, "note": "decode throughput vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -14.74--9.869" }, "ttft_s_change_pct__moe__32k__kv4": { "value": -1.202443, "unit": "%", "samples": [ 4.506165, -2.829308, -1.202443 ], "min": -2.829308, "max": 4.506165, "note": "time to first token vs fp16 cache on the same haystack variant (negative = lower); median of n=3 haystack variants, min-max -2.829-4.506" }, "peak_gb_change__moe__32k__kv4": { "value": -0.479363, "unit": "GB", "samples": [ -0.47933, -0.479363, -0.479363 ], "min": -0.479363, "max": -0.47933, "note": "peak memory minus fp16-cache peak on the same haystack variant; median of n=3 haystack variants, min-max -0.4794--0.4793" }, "peak_decode_gb_change__moe__32k__kv4": { "value": -0.547862, "unit": "GB", "samples": [ -0.580107, -0.547862, -0.547846 ], "min": -0.580107, "max": -0.547846, "note": "decode-phase peak minus fp16-cache decode-phase peak on the same haystack variant; median of n=3 haystack variants, min-max -0.5801--0.5478" }, "kl_mean__dense__8k__fp16": { "value": 0.0, "unit": "nats", "samples": [ 0.0, 0.0, 0.0 ], "min": 0.0, "max": 0.0, "note": "mean per-token KL(fp16 || this cache) over teacher-forced fp16 greedy tokens (self-check: fp16 cache re-forced on its own tokens, expected ~0); median of n=3 haystack variants, min-max 0-0" }, "kl_max__dense__8k__fp16": { "value": 0.0, "unit": "nats", "samples": [ 0.0, 0.0, 0.0 ], "min": 0.0, "max": 0.0, "note": "max per-token KL(fp16 || this cache) (self-check: fp16 cache re-forced on its own tokens, expected ~0); median of n=3 haystack variants, min-max 0-0" }, "top1_agreement__dense__8k__fp16": { "value": 100.0, "unit": "%", "samples": [ 100.0, 100.0, 100.0 ], "min": 100.0, "max": 100.0, "note": "share of teacher-forced positions where argmax matches the fp16 cache (self-check: fp16 cache re-forced on its own tokens, expected ~0); median of n=3 haystack variants, min-max 100-100" }, "forced_tokens__dense__8k__fp16": { "value": 64, "unit": "tokens", "samples": [ 64, 64, 64 ], "min": 64, "max": 64, "note": "teacher-forced tokens per prompt (fp16 greedy continuation, <= 64; shorter if EOS came first); median of n=3 haystack variants, min-max 64-64" }, "kl_mean__dense__8k__kv4": { "value": 0.000133, "unit": "nats", "samples": [ 0.00013, 0.000333, 0.000133 ], "min": 0.00013, "max": 0.000333, "note": "mean per-token KL(fp16 || this cache) over teacher-forced fp16 greedy tokens; median of n=3 haystack variants, min-max 0.0001298-0.0003334" }, "kl_max__dense__8k__kv4": { "value": 0.006212, "unit": "nats", "samples": [ 0.006212, 0.01968, 0.005389 ], "min": 0.005389, "max": 0.01968, "note": "max per-token KL(fp16 || this cache); median of n=3 haystack variants, min-max 0.005389-0.01968" }, "top1_agreement__dense__8k__kv4": { "value": 100.0, "unit": "%", "samples": [ 100.0, 100.0, 100.0 ], "min": 100.0, "max": 100.0, "note": "share of teacher-forced positions where argmax matches the fp16 cache; median of n=3 haystack variants, min-max 100-100" }, "forced_tokens__dense__8k__kv4": { "value": 64, "unit": "tokens", "samples": [ 64, 64, 64 ], "min": 64, "max": 64, "note": "teacher-forced tokens per prompt (fp16 greedy continuation, <= 64; shorter if EOS came first); median of n=3 haystack variants, min-max 64-64" }, "kl_mean__dense__8k__kv8": { "value": 4e-05, "unit": "nats", "samples": [ 2.1e-05, 5.1e-05, 4e-05 ], "min": 2.1e-05, "max": 5.1e-05, "note": "mean per-token KL(fp16 || this cache) over teacher-forced fp16 greedy tokens; median of n=3 haystack variants, min-max 2.073e-05-5.068e-05" }, "kl_max__dense__8k__kv8": { "value": 0.002301, "unit": "nats", "samples": [ 0.00122, 0.003004, 0.002301 ], "min": 0.00122, "max": 0.003004, "note": "max per-token KL(fp16 || this cache); median of n=3 haystack variants, min-max 0.00122-0.003004" }, "top1_agreement__dense__8k__kv8": { "value": 100.0, "unit": "%", "samples": [ 100.0, 100.0, 100.0 ], "min": 100.0, "max": 100.0, "note": "share of teacher-forced positions where argmax matches the fp16 cache; median of n=3 haystack variants, min-max 100-100" }, "forced_tokens__dense__8k__kv8": { "value": 64, "unit": "tokens", "samples": [ 64, 64, 64 ], "min": 64, "max": 64, "note": "teacher-forced tokens per prompt (fp16 greedy continuation, <= 64; shorter if EOS came first); median of n=3 haystack variants, min-max 64-64" }, "kl_mean__dense__16k__fp16": { "value": 0.0, "unit": "nats", "samples": [ 0.0, 0.0 ], "min": 0.0, "max": 0.0, "note": "mean per-token KL(fp16 || this cache) over teacher-forced fp16 greedy tokens (self-check: fp16 cache re-forced on its own tokens, expected ~0); median of n=2 haystack variants, min-max 0-0" }, "kl_max__dense__16k__fp16": { "value": 0.0, "unit": "nats", "samples": [ 0.0, 0.0 ], "min": 0.0, "max": 0.0, "note": "max per-token KL(fp16 || this cache) (self-check: fp16 cache re-forced on its own tokens, expected ~0); median of n=2 haystack variants, min-max 0-0" }, "top1_agreement__dense__16k__fp16": { "value": 100.0, "unit": "%", "samples": [ 100.0, 100.0 ], "min": 100.0, "max": 100.0, "note": "share of teacher-forced positions where argmax matches the fp16 cache (self-check: fp16 cache re-forced on its own tokens, expected ~0); median of n=2 haystack variants, min-max 100-100" }, "forced_tokens__dense__16k__fp16": { "value": 64.0, "unit": "tokens", "samples": [ 64, 64 ], "min": 64, "max": 64, "note": "teacher-forced tokens per prompt (fp16 greedy continuation, <= 64; shorter if EOS came first); median of n=2 haystack variants, min-max 64-64" }, "kl_mean__dense__16k__kv4": { "value": 0.000222, "unit": "nats", "samples": [ 6e-05, 0.000385 ], "min": 6e-05, "max": 0.000385, "note": "mean per-token KL(fp16 || this cache) over teacher-forced fp16 greedy tokens; median of n=2 haystack variants, min-max 5.951e-05-0.0003849" }, "kl_max__dense__16k__kv4": { "value": 0.012213, "unit": "nats", "samples": [ 0.002464, 0.021963 ], "min": 0.002464, "max": 0.021963, "note": "max per-token KL(fp16 || this cache); median of n=2 haystack variants, min-max 0.002464-0.02196" }, "top1_agreement__dense__16k__kv4": { "value": 100.0, "unit": "%", "samples": [ 100.0, 100.0 ], "min": 100.0, "max": 100.0, "note": "share of teacher-forced positions where argmax matches the fp16 cache; median of n=2 haystack variants, min-max 100-100" }, "forced_tokens__dense__16k__kv4": { "value": 64.0, "unit": "tokens", "samples": [ 64, 64 ], "min": 64, "max": 64, "note": "teacher-forced tokens per prompt (fp16 greedy continuation, <= 64; shorter if EOS came first); median of n=2 haystack variants, min-max 64-64" }, "kl_mean__dense__16k__kv8": { "value": 1.9e-05, "unit": "nats", "samples": [ 2.9e-05, 9e-06 ], "min": 9e-06, "max": 2.9e-05, "note": "mean per-token KL(fp16 || this cache) over teacher-forced fp16 greedy tokens; median of n=2 haystack variants, min-max 9.053e-06-2.932e-05" }, "kl_max__dense__16k__kv8": { "value": 0.001062, "unit": "nats", "samples": [ 0.001681, 0.000442 ], "min": 0.000442, "max": 0.001681, "note": "max per-token KL(fp16 || this cache); median of n=2 haystack variants, min-max 0.0004425-0.001681" }, "top1_agreement__dense__16k__kv8": { "value": 100.0, "unit": "%", "samples": [ 100.0, 100.0 ], "min": 100.0, "max": 100.0, "note": "share of teacher-forced positions where argmax matches the fp16 cache; median of n=2 haystack variants, min-max 100-100" }, "forced_tokens__dense__16k__kv8": { "value": 64.0, "unit": "tokens", "samples": [ 64, 64 ], "min": 64, "max": 64, "note": "teacher-forced tokens per prompt (fp16 greedy continuation, <= 64; shorter if EOS came first); median of n=2 haystack variants, min-max 64-64" }, "kl_mean__moe__8k__fp16": { "value": 0.0, "unit": "nats", "samples": [ 0.0, 0.0, 0.0 ], "min": 0.0, "max": 0.0, "note": "mean per-token KL(fp16 || this cache) over teacher-forced fp16 greedy tokens (self-check: fp16 cache re-forced on its own tokens, expected ~0); median of n=3 haystack variants, min-max 0-0" }, "kl_max__moe__8k__fp16": { "value": 0.0, "unit": "nats", "samples": [ 0.0, 0.0, 0.0 ], "min": 0.0, "max": 0.0, "note": "max per-token KL(fp16 || this cache) (self-check: fp16 cache re-forced on its own tokens, expected ~0); median of n=3 haystack variants, min-max 0-0" }, "top1_agreement__moe__8k__fp16": { "value": 100.0, "unit": "%", "samples": [ 100.0, 100.0, 100.0 ], "min": 100.0, "max": 100.0, "note": "share of teacher-forced positions where argmax matches the fp16 cache (self-check: fp16 cache re-forced on its own tokens, expected ~0); median of n=3 haystack variants, min-max 100-100" }, "forced_tokens__moe__8k__fp16": { "value": 64, "unit": "tokens", "samples": [ 64, 64, 64 ], "min": 64, "max": 64, "note": "teacher-forced tokens per prompt (fp16 greedy continuation, <= 64; shorter if EOS came first); median of n=3 haystack variants, min-max 64-64" }, "kl_mean__moe__8k__kv4": { "value": 0.002421, "unit": "nats", "samples": [ 0.000165, 0.004005, 0.002421 ], "min": 0.000165, "max": 0.004005, "note": "mean per-token KL(fp16 || this cache) over teacher-forced fp16 greedy tokens; median of n=3 haystack variants, min-max 0.0001647-0.004005" }, "kl_max__moe__8k__kv4": { "value": 0.153832, "unit": "nats", "samples": [ 0.009225, 0.255492, 0.153832 ], "min": 0.009225, "max": 0.255492, "note": "max per-token KL(fp16 || this cache); median of n=3 haystack variants, min-max 0.009225-0.2555" }, "top1_agreement__moe__8k__kv4": { "value": 100.0, "unit": "%", "samples": [ 100.0, 100.0, 100.0 ], "min": 100.0, "max": 100.0, "note": "share of teacher-forced positions where argmax matches the fp16 cache; median of n=3 haystack variants, min-max 100-100" }, "forced_tokens__moe__8k__kv4": { "value": 64, "unit": "tokens", "samples": [ 64, 64, 64 ], "min": 64, "max": 64, "note": "teacher-forced tokens per prompt (fp16 greedy continuation, <= 64; shorter if EOS came first); median of n=3 haystack variants, min-max 64-64" }, "kl_mean__moe__8k__kv8": { "value": 1.1e-05, "unit": "nats", "samples": [ 2.5e-05, 1.1e-05, 5e-06 ], "min": 5e-06, "max": 2.5e-05, "note": "mean per-token KL(fp16 || this cache) over teacher-forced fp16 greedy tokens; median of n=3 haystack variants, min-max 4.812e-06-2.532e-05" }, "kl_max__moe__8k__kv8": { "value": 0.000606, "unit": "nats", "samples": [ 0.001066, 0.000606, 0.000124 ], "min": 0.000124, "max": 0.001066, "note": "max per-token KL(fp16 || this cache); median of n=3 haystack variants, min-max 0.0001244-0.001066" }, "top1_agreement__moe__8k__kv8": { "value": 100.0, "unit": "%", "samples": [ 100.0, 100.0, 100.0 ], "min": 100.0, "max": 100.0, "note": "share of teacher-forced positions where argmax matches the fp16 cache; median of n=3 haystack variants, min-max 100-100" }, "forced_tokens__moe__8k__kv8": { "value": 64, "unit": "tokens", "samples": [ 64, 64, 64 ], "min": 64, "max": 64, "note": "teacher-forced tokens per prompt (fp16 greedy continuation, <= 64; shorter if EOS came first); median of n=3 haystack variants, min-max 64-64" }, "kl_mean__moe__16k__fp16": { "value": 0.0, "unit": "nats", "samples": [ 0.0, 0.0, 0.0 ], "min": 0.0, "max": 0.0, "note": "mean per-token KL(fp16 || this cache) over teacher-forced fp16 greedy tokens (self-check: fp16 cache re-forced on its own tokens, expected ~0); median of n=3 haystack variants, min-max 0-0" }, "kl_max__moe__16k__fp16": { "value": 0.0, "unit": "nats", "samples": [ 0.0, 0.0, 0.0 ], "min": 0.0, "max": 0.0, "note": "max per-token KL(fp16 || this cache) (self-check: fp16 cache re-forced on its own tokens, expected ~0); median of n=3 haystack variants, min-max 0-0" }, "top1_agreement__moe__16k__fp16": { "value": 100.0, "unit": "%", "samples": [ 100.0, 100.0, 100.0 ], "min": 100.0, "max": 100.0, "note": "share of teacher-forced positions where argmax matches the fp16 cache (self-check: fp16 cache re-forced on its own tokens, expected ~0); median of n=3 haystack variants, min-max 100-100" }, "forced_tokens__moe__16k__fp16": { "value": 64, "unit": "tokens", "samples": [ 64, 64, 64 ], "min": 64, "max": 64, "note": "teacher-forced tokens per prompt (fp16 greedy continuation, <= 64; shorter if EOS came first); median of n=3 haystack variants, min-max 64-64" }, "kl_mean__moe__16k__kv4": { "value": 0.002107, "unit": "nats", "samples": [ 0.002107, 0.000219, 0.002429 ], "min": 0.000219, "max": 0.002429, "note": "mean per-token KL(fp16 || this cache) over teacher-forced fp16 greedy tokens; median of n=3 haystack variants, min-max 0.0002191-0.002429" }, "kl_max__moe__16k__kv4": { "value": 0.134521, "unit": "nats", "samples": [ 0.134521, 0.013562, 0.152958 ], "min": 0.013562, "max": 0.152958, "note": "max per-token KL(fp16 || this cache); median of n=3 haystack variants, min-max 0.01356-0.153" }, "top1_agreement__moe__16k__kv4": { "value": 100.0, "unit": "%", "samples": [ 100.0, 100.0, 98.4375 ], "min": 98.4375, "max": 100.0, "note": "share of teacher-forced positions where argmax matches the fp16 cache; median of n=3 haystack variants, min-max 98.44-100" }, "forced_tokens__moe__16k__kv4": { "value": 64, "unit": "tokens", "samples": [ 64, 64, 64 ], "min": 64, "max": 64, "note": "teacher-forced tokens per prompt (fp16 greedy continuation, <= 64; shorter if EOS came first); median of n=3 haystack variants, min-max 64-64" }, "kl_mean__moe__16k__kv8": { "value": 0.000102, "unit": "nats", "samples": [ 0.000491, 0.000102, 3.7e-05 ], "min": 3.7e-05, "max": 0.000491, "note": "mean per-token KL(fp16 || this cache) over teacher-forced fp16 greedy tokens; median of n=3 haystack variants, min-max 3.732e-05-0.000491" }, "kl_max__moe__16k__kv8": { "value": 0.006382, "unit": "nats", "samples": [ 0.031368, 0.006382, 0.002252 ], "min": 0.002252, "max": 0.031368, "note": "max per-token KL(fp16 || this cache); median of n=3 haystack variants, min-max 0.002252-0.03137" }, "top1_agreement__moe__16k__kv8": { "value": 100.0, "unit": "%", "samples": [ 100.0, 100.0, 100.0 ], "min": 100.0, "max": 100.0, "note": "share of teacher-forced positions where argmax matches the fp16 cache; median of n=3 haystack variants, min-max 100-100" }, "forced_tokens__moe__16k__kv8": { "value": 64, "unit": "tokens", "samples": [ 64, 64, 64 ], "min": 64, "max": 64, "note": "teacher-forced tokens per prompt (fp16 greedy continuation, <= 64; shorter if EOS came first); median of n=3 haystack variants, min-max 64-64" }, "kl_mean__moe__32k__fp16": { "value": 0.0, "unit": "nats", "samples": [ 0.0, 0.0, 0.0 ], "min": 0.0, "max": 0.0, "note": "mean per-token KL(fp16 || this cache) over teacher-forced fp16 greedy tokens (self-check: fp16 cache re-forced on its own tokens, expected ~0); median of n=3 haystack variants, min-max 0-0" }, "kl_max__moe__32k__fp16": { "value": 0.0, "unit": "nats", "samples": [ 0.0, 0.0, 0.0 ], "min": 0.0, "max": 0.0, "note": "max per-token KL(fp16 || this cache) (self-check: fp16 cache re-forced on its own tokens, expected ~0); median of n=3 haystack variants, min-max 0-0" }, "top1_agreement__moe__32k__fp16": { "value": 100.0, "unit": "%", "samples": [ 100.0, 100.0, 100.0 ], "min": 100.0, "max": 100.0, "note": "share of teacher-forced positions where argmax matches the fp16 cache (self-check: fp16 cache re-forced on its own tokens, expected ~0); median of n=3 haystack variants, min-max 100-100" }, "forced_tokens__moe__32k__fp16": { "value": 64, "unit": "tokens", "samples": [ 64, 64, 64 ], "min": 64, "max": 64, "note": "teacher-forced tokens per prompt (fp16 greedy continuation, <= 64; shorter if EOS came first); median of n=3 haystack variants, min-max 64-64" }, "kl_mean__moe__32k__kv4": { "value": 0.000163, "unit": "nats", "samples": [ 0.000119, 0.000165, 0.000163 ], "min": 0.000119, "max": 0.000165, "note": "mean per-token KL(fp16 || this cache) over teacher-forced fp16 greedy tokens; median of n=3 haystack variants, min-max 0.0001194-0.0001654" }, "kl_max__moe__32k__kv4": { "value": 0.00717, "unit": "nats", "samples": [ 0.00717, 0.00794, 0.004905 ], "min": 0.004905, "max": 0.00794, "note": "max per-token KL(fp16 || this cache); median of n=3 haystack variants, min-max 0.004905-0.00794" }, "top1_agreement__moe__32k__kv4": { "value": 100.0, "unit": "%", "samples": [ 100.0, 100.0, 100.0 ], "min": 100.0, "max": 100.0, "note": "share of teacher-forced positions where argmax matches the fp16 cache; median of n=3 haystack variants, min-max 100-100" }, "forced_tokens__moe__32k__kv4": { "value": 64, "unit": "tokens", "samples": [ 64, 64, 64 ], "min": 64, "max": 64, "note": "teacher-forced tokens per prompt (fp16 greedy continuation, <= 64; shorter if EOS came first); median of n=3 haystack variants, min-max 64-64" }, "kl_mean__moe__32k__kv8": { "value": 0.000125, "unit": "nats", "samples": [ 0.000117, 0.000125, 0.000152 ], "min": 0.000117, "max": 0.000152, "note": "mean per-token KL(fp16 || this cache) over teacher-forced fp16 greedy tokens; median of n=3 haystack variants, min-max 0.0001167-0.0001519" }, "kl_max__moe__32k__kv8": { "value": 0.007692, "unit": "nats", "samples": [ 0.007352, 0.007692, 0.007699 ], "min": 0.007352, "max": 0.007699, "note": "max per-token KL(fp16 || this cache); median of n=3 haystack variants, min-max 0.007352-0.007699" }, "top1_agreement__moe__32k__kv8": { "value": 100.0, "unit": "%", "samples": [ 100.0, 100.0, 100.0 ], "min": 100.0, "max": 100.0, "note": "share of teacher-forced positions where argmax matches the fp16 cache; median of n=3 haystack variants, min-max 100-100" }, "forced_tokens__moe__32k__kv8": { "value": 64, "unit": "tokens", "samples": [ 64, 64, 64 ], "min": 64, "max": 64, "note": "teacher-forced tokens per prompt (fp16 greedy continuation, <= 64; shorter if EOS came first); median of n=3 haystack variants, min-max 64-64" }, "weights_active_gb__moe": { "value": 19.5088, "unit": "GB", "samples": [ 19.508787464 ], "note": "mx.get_active_memory() right after load (weights-only baseline)" }, "load_s__moe": { "value": 5.27, "unit": "s", "samples": [ 5.2697641249978915 ], "note": "model load time (from local HF cache)" }, "weights_active_gb__dense": { "value": 15.1336, "unit": "GB", "samples": [ 15.13358849 ], "note": "mx.get_active_memory() right after load (weights-only baseline)" }, "load_s__dense": { "value": 3.95, "unit": "s", "samples": [ 3.952617833012482 ], "note": "model load time (from local HF cache)" }, "full_attention_layers__moe": { "value": 10, "unit": "layers", "samples": [ 10 ], "note": "of 40 layers; the rest are linear-attention layers with a fixed-size state (from config.json)" }, "kv_theory_if_all_layers_full_attention_gb__moe__8k__fp16": { "value": 0.6711, "unit": "GB", "samples": [ 0.67108864 ], "note": "what a naive layers x kv_heads x head_dim x tokens estimate gives if every layer had a KV cache (not true for these hybrid models)" }, "kv_theory_if_all_layers_full_attention_gb__moe__16k__fp16": { "value": 1.3422, "unit": "GB", "samples": [ 1.34217728 ], "note": "what a naive layers x kv_heads x head_dim x tokens estimate gives if every layer had a KV cache (not true for these hybrid models)" }, "kv_theory_if_all_layers_full_attention_gb__moe__32k__fp16": { "value": 2.6844, "unit": "GB", "samples": [ 2.68435456 ], "note": "what a naive layers x kv_heads x head_dim x tokens estimate gives if every layer had a KV cache (not true for these hybrid models)" }, "full_attention_layers__dense": { "value": 16, "unit": "layers", "samples": [ 16 ], "note": "of 64 layers; the rest are linear-attention layers with a fixed-size state (from config.json)" }, "kv_theory_if_all_layers_full_attention_gb__dense__8k__fp16": { "value": 2.1475, "unit": "GB", "samples": [ 2.147483648 ], "note": "what a naive layers x kv_heads x head_dim x tokens estimate gives if every layer had a KV cache (not true for these hybrid models)" }, "kv_theory_if_all_layers_full_attention_gb__dense__16k__fp16": { "value": 4.295, "unit": "GB", "samples": [ 4.294967296 ], "note": "what a naive layers x kv_heads x head_dim x tokens estimate gives if every layer had a KV cache (not true for these hybrid models)" } }, "observations": [ "Qwen3.6-35B-A3B-4bit (MoE): 10 of 40 layers are full attention with 2 KV heads x head_dim 256; only these layers have a KV cache that kv_bits can quantize.", "Qwen3.6-35B-A3B-4bit (MoE) 8k: median peak memory fp16 21.88 GB, kv8 21.80 GB, kv4 21.75 GB (decode-phase peak 19.86 / 19.78 / 19.74 GB); measured KV cache 0.173 / 0.092 / 0.049 GB.", "Qwen3.6-35B-A3B-4bit (MoE) 8k: median prefill fp16 1358.0 tok/s; kv8 1312.5 (-2.4% paired, ranges overlap with fp16); kv4 1271.0 (-3.2% paired, ranges overlap with fp16).", "Qwen3.6-35B-A3B-4bit (MoE) 8k: median decode fp16 90.7 tok/s; kv8 82.3 (-9.2% paired, ranges do not overlap); kv4 84.6 (-6.7% paired, ranges do not overlap).", "Qwen3.6-35B-A3B-4bit (MoE) 8k: needle recall (sum over variants, of 5 each) fp16 15/15, kv8 15/15, kv4 15/15.", "Qwen3.6-35B-A3B-4bit (MoE) 8k kv8: median mean KL 1.1e-05 nats, median max KL 0.000606 nats, top-1 agreement 100.0% vs fp16 cache.", "Qwen3.6-35B-A3B-4bit (MoE) 8k kv4: median mean KL 0.002421 nats, median max KL 0.1538 nats, top-1 agreement 100.0% vs fp16 cache.", "Qwen3.6-35B-A3B-4bit (MoE) 8k: drift self-check (fp16 vs fp16 re-forced) max KL 0 nats.", "Qwen3.6-35B-A3B-4bit (MoE) 16k: median peak memory fp16 22.51 GB, kv8 22.41 GB, kv4 22.32 GB (decode-phase peak 20.08 / 19.89 / 19.78 GB); measured KV cache 0.341 / 0.181 / 0.096 GB.", "Qwen3.6-35B-A3B-4bit (MoE) 16k: median prefill fp16 1227.1 tok/s; kv8 1201.9 (-2.1% paired, ranges overlap with fp16); kv4 1169.5 (-2.6% paired, ranges overlap with fp16).", "Qwen3.6-35B-A3B-4bit (MoE) 16k: median decode fp16 84.7 tok/s; kv8 73.3 (-14.0% paired, ranges do not overlap); kv4 76.1 (-10.5% paired, ranges do not overlap).", "Qwen3.6-35B-A3B-4bit (MoE) 16k: needle recall (sum over variants, of 5 each) fp16 15/15, kv8 15/15, kv4 15/15.", "Qwen3.6-35B-A3B-4bit (MoE) 16k kv8: median mean KL 0.000102 nats, median max KL 0.006382 nats, top-1 agreement 100.0% vs fp16 cache.", "Qwen3.6-35B-A3B-4bit (MoE) 16k kv4: median mean KL 0.002107 nats, median max KL 0.1345 nats, top-1 agreement 100.0% vs fp16 cache.", "Qwen3.6-35B-A3B-4bit (MoE) 16k: drift self-check (fp16 vs fp16 re-forced) max KL 0 nats.", "Qwen3.6-35B-A3B-4bit (MoE) 32k: median peak memory fp16 23.96 GB, kv8 23.67 GB, kv4 23.49 GB (decode-phase peak 20.44 / 20.09 / 19.89 GB); measured KV cache 0.676 / 0.359 / 0.190 GB.", "Qwen3.6-35B-A3B-4bit (MoE) 32k: median prefill fp16 854.9 tok/s; kv8 947.6 (-2.2% paired, ranges overlap with fp16); kv4 879.8 (+1.2% paired, ranges overlap with fp16).", "Qwen3.6-35B-A3B-4bit (MoE) 32k: median decode fp16 62.0 tok/s; kv8 52.7 (-18.3% paired, ranges overlap with fp16); kv4 55.9 (-9.9% paired, ranges overlap with fp16).", "Qwen3.6-35B-A3B-4bit (MoE) 32k: needle recall (sum over variants, of 5 each) fp16 15/15, kv8 15/15, kv4 15/15.", "Qwen3.6-35B-A3B-4bit (MoE) 32k kv8: median mean KL 0.000125 nats, median max KL 0.007692 nats, top-1 agreement 100.0% vs fp16 cache.", "Qwen3.6-35B-A3B-4bit (MoE) 32k kv4: median mean KL 0.000163 nats, median max KL 0.00717 nats, top-1 agreement 100.0% vs fp16 cache.", "Qwen3.6-35B-A3B-4bit (MoE) 32k: drift self-check (fp16 vs fp16 re-forced) max KL 0 nats.", "Qwen3.8-27B-4bit (dense): 16 of 64 layers are full attention with 4 KV heads x head_dim 256; only these layers have a KV cache that kv_bits can quantize.", "Qwen3.8-27B-4bit (dense) 8k: median peak memory fp16 19.20 GB, kv8 18.95 GB, kv4 18.82 GB (decode-phase peak 16.14 / 15.83 / 15.67 GB); measured KV cache 0.554 / 0.294 / 0.156 GB.", "Qwen3.8-27B-4bit (dense) 8k: median prefill fp16 152.5 tok/s; kv8 160.7 (+3.9% paired, ranges overlap with fp16); kv4 157.9 (+3.5% paired, ranges overlap with fp16).", "Qwen3.8-27B-4bit (dense) 8k: median decode fp16 13.1 tok/s; kv8 14.3 (+11.9% paired, ranges overlap with fp16); kv4 13.6 (+5.4% paired, ranges overlap with fp16).", "Qwen3.8-27B-4bit (dense) 8k: needle recall (sum over variants, of 5 each) fp16 15/15, kv8 15/15, kv4 15/15.", "Qwen3.8-27B-4bit (dense) 8k kv8: median mean KL 4e-05 nats, median max KL 0.002301 nats, top-1 agreement 100.0% vs fp16 cache.", "Qwen3.8-27B-4bit (dense) 8k kv4: median mean KL 0.000133 nats, median max KL 0.006212 nats, top-1 agreement 100.0% vs fp16 cache.", "Qwen3.8-27B-4bit (dense) 8k: drift self-check (fp16 vs fp16 re-forced) max KL 0 nats.", "Qwen3.8-27B-4bit (dense) 16k: median peak memory fp16 20.47 GB, kv8 19.97 GB, kv4 19.71 GB (decode-phase peak 16.72 / 16.18 / 15.86 GB); measured KV cache 1.091 / 0.579 / 0.307 GB.", "Qwen3.8-27B-4bit (dense) 16k: median prefill fp16 137.8 tok/s; kv8 141.5 (+2.6% paired, ranges do not overlap); kv4 138.5 (+0.5% paired, ranges overlap with fp16).", "Qwen3.8-27B-4bit (dense) 16k: median decode fp16 11.6 tok/s; kv8 11.3 (-2.4% paired, ranges do not overlap); kv4 11.3 (-2.3% paired, ranges do not overlap).", "Qwen3.8-27B-4bit (dense) 16k: needle recall (sum over variants, of 5 each) fp16 10/10, kv8 10/10, kv4 10/10.", "Qwen3.8-27B-4bit (dense) 16k kv8: median mean KL 1.9e-05 nats, median max KL 0.001062 nats, top-1 agreement 100.0% vs fp16 cache.", "Qwen3.8-27B-4bit (dense) 16k kv4: median mean KL 0.000222 nats, median max KL 0.01221 nats, top-1 agreement 100.0% vs fp16 cache.", "Qwen3.8-27B-4bit (dense) 16k: drift self-check (fp16 vs fp16 re-forced) max KL 0 nats.", "3 planned runs did not complete: skipped: time budget" ], "caveats": [ "Both models are hybrid (Gated DeltaNet linear attention in 3 of every 4 layers); kv_bits only affects the full-attention layers, so savings are much smaller than for a model where every layer has a KV cache. 'Dense' refers to the MLP (no experts), not to the attention layout.", "Peak memory (mx.get_peak_memory) includes weights, activations and transient buffers, not just the KV cache; the KV cache is also reported separately (measured nbytes and theoretical size).", "mlx_lm quantized attention is implemented as quantized_matmul + softmax + quantized_matmul (scores are materialized), while the fp16 path uses fused mx.fast.scaled_dot_product_attention; prefill-phase memory and speed reflect that implementation in this mlx_lm version.", "kv_group_size=64, quantized_kv_start=0, prefill_step_size=2048: with quantized_kv_start=0 the cache is converted after the first 2048-token prefill chunk, and all later chunks attend to quantized K/V.", "Synthetic needle retrieval in fake logs is a recall stress test, not a quality benchmark; exact-match scoring on 5 needles per prompt.", "n=3 haystack variants per cell; differences smaller than the min-max spread should not be read as real.", "Decode throughput is measured over the model's actual answer (stops at EOS, typically well under 128 tokens), so it reflects short generations right after a long prefill.", "KL is computed from the model's bf16 logits renormalised in float64; the fp16 self-check row shows the noise floor of the measurement path.", "The linear-attention state snapshot (tens to ~150 MB) is held during decode in every run (all KV settings equally), so decode-phase peaks include it.", "Thinking disabled via the chat template (enable_thinking=False) for all runs.", "powermetrics thermal sampling was not available (needs root); thermal state was logged with `pmset -g therm` only (see results/thermal.jsonl).", "3 of 45 planned runs did not complete (time budget or error); see results/runs.csv 'error' column." ], "drift_selftest_1k_prompt": { "moe": { "fp16_self_max_kl": 0.0, "kv4_mean_kl": 0.0003068498302406213, "kv4_top1": 1.0, "tokens": 16 }, "dense": { "fp16_self_max_kl": 0.0, "kv4_mean_kl": 0.0008521803414896238, "kv4_top1": 1.0, "tokens": 16 } }, "raw_files": [ "results/runs.csv", "results/drift.csv", "results/outputs.jsonl", "results/thermal.jsonl", "results/env.json", "results/models.json", "data/prompts_moe.json", "data/prompts_dense.json" ] }