Kyojin: open-source engine that runs 100 GB-class open models (GLM-5.3, Qwen3.8, DeepSeek V4.1) on one desktop machine. AMD Strix Halo, NVIDIA RTX and Apple Mac. OpenAI API, built on ExLlamaV3.
Python amdapple-siliconcudadeepseekexl3exllamav3glminferencellmllm-inferencelocal-llmnvidiaopenai-apiquantizationqwenrocmstrix-halo
Restyle benchmark charts to the house style (white background, steel blue accent, greys)
YanissAmze1a7ef33600b
diff --git a/doc/img/decode_context.svg b/doc/img/decode_context.svgindex 43e17ff..a767781 100644--- a/doc/img/decode_context.svg+++ b/doc/img/decode_context.svg@@ -1 +1 @@-<svg xmlns="http://www.w3.org/2000/svg" width="560" height="380" viewBox="0 0 560 380" font-family="'Ubuntu Sans','DejaVu Sans',Helvetica,Arial,sans-serif"><rect width="560" height="380" rx="16" fill="#18181F" stroke="#2E2E38"/><text x="26" y="44" fill="#F4F2EC" font-size="25" text-anchor="start" font-weight="700">Qwen decode: 44.3 tok/s at 256K</text><text x="26" y="70" fill="#9A98A3" font-size="16" text-anchor="start" font-weight="400">Higher is better.</text><line x1="64" x2="532" y1="316.0" y2="316.0" stroke="#2E2E38"/><text x="54" y="321.0" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">0</text><line x1="64" x2="532" y1="269.3333333333333" y2="269.3333333333333" stroke="#2E2E38"/><text x="54" y="274.3333333333333" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">20</text><line x1="64" x2="532" y1="222.66666666666669" y2="222.66666666666669" stroke="#2E2E38"/><text x="54" y="227.66666666666669" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">40</text><line x1="64" x2="532" y1="176.0" y2="176.0" stroke="#2E2E38"/><text x="54" y="181.0" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">60</text><text x="92.0" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">8K</text><text x="174.4" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">16K</text><text x="256.8" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">32K</text><text x="339.2" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">64K</text><text x="421.6" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">128K</text><text x="504.0" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">256K</text><rect x="26" y="86" width="14" height="14" rx="3" fill="#9C8CFF"/><text x="48" y="98" fill="#F4F2EC" font-size="16" text-anchor="start" font-weight="400">Kyojin</text><polyline fill="none" stroke="#9C8CFF" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" points="92.0,207.5 256.8,207.7 339.2,207.7 421.6,210.8 504.0,212.6"/><circle cx="92.0" cy="207.5" r="5.5" fill="#9C8CFF"/><circle cx="256.8" cy="207.7" r="5.5" fill="#9C8CFF"/><circle cx="339.2" cy="207.7" r="5.5" fill="#9C8CFF"/><circle cx="421.6" cy="210.8" r="5.5" fill="#9C8CFF"/><circle cx="504.0" cy="212.6" r="5.5" fill="#9C8CFF"/><text x="504.0" y="200.63333333333333" fill="#9C8CFF" font-size="16" text-anchor="middle" font-weight="700">44.3</text><rect x="26" y="108" width="14" height="14" rx="3" fill="#E8745C"/><text x="48" y="120" fill="#F4F2EC" font-size="16" text-anchor="start" font-weight="400">Strata (measured by us)</text><polyline fill="none" stroke="#E8745C" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" points="92.0,225.0 256.8,225.7 339.2,231.1 421.6,234.3 504.0,228.5"/><circle cx="92.0" cy="225.0" r="5.5" fill="#E8745C"/><circle cx="256.8" cy="225.7" r="5.5" fill="#E8745C"/><circle cx="339.2" cy="231.1" r="5.5" fill="#E8745C"/><circle cx="421.6" cy="234.3" r="5.5" fill="#E8745C"/><circle cx="504.0" cy="228.5" r="5.5" fill="#E8745C"/><rect x="26" y="130" width="14" height="14" rx="3" fill="#8FA3C4"/><text x="48" y="142" fill="#F4F2EC" font-size="16" text-anchor="start" font-weight="400">Gufo (measured by us)</text><polyline fill="none" stroke="#8FA3C4" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" points="92.0,233.6 256.8,241.6 339.2,232.5 421.6,242.7"/><circle cx="92.0" cy="233.6" r="5.5" fill="#8FA3C4"/><circle cx="256.8" cy="241.6" r="5.5" fill="#8FA3C4"/><circle cx="339.2" cy="232.5" r="5.5" fill="#8FA3C4"/><circle cx="421.6" cy="242.7" r="5.5" fill="#8FA3C4"/><text x="26" y="362" fill="#9A98A3" font-size="14" text-anchor="start" font-weight="400">Speculative decode against context; same machine, 128 GB.</text></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="560" height="380" viewBox="0 0 560 380" font-family="'Ubuntu Sans','DejaVu Sans',Helvetica,Arial,sans-serif"><rect width="560" height="380" rx="6" fill="#FFFFFF" stroke="#DDDDDD"/><text x="26" y="44" fill="#111111" font-size="25" text-anchor="start" font-weight="700">Qwen decode: 44.3 tok/s at 256K</text><text x="26" y="70" fill="#555555" font-size="16" text-anchor="start" font-weight="400">Higher is better.</text><line x1="64" x2="532" y1="316.0" y2="316.0" stroke="#DDDDDD"/><text x="54" y="321.0" fill="#555555" font-size="15" text-anchor="end" font-weight="400">0</text><line x1="64" x2="532" y1="269.3333333333333" y2="269.3333333333333" stroke="#DDDDDD"/><text x="54" y="274.3333333333333" fill="#555555" font-size="15" text-anchor="end" font-weight="400">20</text><line x1="64" x2="532" y1="222.66666666666669" y2="222.66666666666669" stroke="#DDDDDD"/><text x="54" y="227.66666666666669" fill="#555555" font-size="15" text-anchor="end" font-weight="400">40</text><line x1="64" x2="532" y1="176.0" y2="176.0" stroke="#DDDDDD"/><text x="54" y="181.0" fill="#555555" font-size="15" text-anchor="end" font-weight="400">60</text><text x="92.0" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">8K</text><text x="174.4" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">16K</text><text x="256.8" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">32K</text><text x="339.2" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">64K</text><text x="421.6" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">128K</text><text x="504.0" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">256K</text><line x1="24" x2="44" y1="93" y2="93" stroke="#1F5FA8" stroke-width="3"/><circle cx="34" cy="93" r="4.5" fill="#1F5FA8"/><text x="54" y="98" fill="#111111" font-size="16" text-anchor="start" font-weight="400">Kyojin</text><polyline fill="none" stroke="#1F5FA8" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" points="92.0,207.5 256.8,207.7 339.2,207.7 421.6,210.8 504.0,212.6"/><circle cx="92.0" cy="207.5" r="5.5" fill="#1F5FA8"/><circle cx="256.8" cy="207.7" r="5.5" fill="#1F5FA8"/><circle cx="339.2" cy="207.7" r="5.5" fill="#1F5FA8"/><circle cx="421.6" cy="210.8" r="5.5" fill="#1F5FA8"/><circle cx="504.0" cy="212.6" r="5.5" fill="#1F5FA8"/><text x="504.0" y="200.63333333333333" fill="#1F5FA8" font-size="16" text-anchor="middle" font-weight="700">44.3</text><line x1="24" x2="44" y1="115" y2="115" stroke="#555555" stroke-width="3" stroke-dasharray="8 5"/><circle cx="34" cy="115" r="4.5" fill="#555555"/><text x="54" y="120" fill="#111111" font-size="16" text-anchor="start" font-weight="400">Strata (measured by us)</text><polyline fill="none" stroke="#555555" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" stroke-dasharray="8 5" points="92.0,225.0 256.8,225.7 339.2,231.1 421.6,234.3 504.0,228.5"/><circle cx="92.0" cy="225.0" r="5.5" fill="#555555"/><circle cx="256.8" cy="225.7" r="5.5" fill="#555555"/><circle cx="339.2" cy="231.1" r="5.5" fill="#555555"/><circle cx="421.6" cy="234.3" r="5.5" fill="#555555"/><circle cx="504.0" cy="228.5" r="5.5" fill="#555555"/><line x1="24" x2="44" y1="137" y2="137" stroke="#999999" stroke-width="3" stroke-dasharray="2 5"/><circle cx="34" cy="137" r="4.5" fill="#999999"/><text x="54" y="142" fill="#111111" font-size="16" text-anchor="start" font-weight="400">Gufo (measured by us)</text><polyline fill="none" stroke="#999999" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" stroke-dasharray="2 5" points="92.0,233.6 256.8,241.6 339.2,232.5 421.6,242.7"/><circle cx="92.0" cy="233.6" r="5.5" fill="#999999"/><circle cx="256.8" cy="241.6" r="5.5" fill="#999999"/><circle cx="339.2" cy="232.5" r="5.5" fill="#999999"/><circle cx="421.6" cy="242.7" r="5.5" fill="#999999"/><text x="26" y="362" fill="#555555" font-size="14" text-anchor="start" font-weight="400">Speculative decode against context; same machine, 128 GB.</text></svg>\ No newline at end of filediff --git a/doc/img/decode_models.svg b/doc/img/decode_models.svgindex 433ddc7..eee6e54 100644--- a/doc/img/decode_models.svg+++ b/doc/img/decode_models.svg@@ -1 +1 @@-<svg xmlns="http://www.w3.org/2000/svg" width="560" height="380" viewBox="0 0 560 380" font-family="'Ubuntu Sans','DejaVu Sans',Helvetica,Arial,sans-serif"><rect width="560" height="380" rx="16" fill="#18181F" stroke="#2E2E38"/><text x="26" y="44" fill="#F4F2EC" font-size="25" text-anchor="start" font-weight="700">Qwen decode: 44.3 tok/s at 256K</text><text x="26" y="70" fill="#9A98A3" font-size="16" text-anchor="start" font-weight="400">Higher is better.</text><line x1="64" x2="532" y1="316.0" y2="316.0" stroke="#2E2E38"/><text x="54" y="321.0" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">0</text><line x1="64" x2="532" y1="269.3333333333333" y2="269.3333333333333" stroke="#2E2E38"/><text x="54" y="274.3333333333333" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">20</text><line x1="64" x2="532" y1="222.66666666666669" y2="222.66666666666669" stroke="#2E2E38"/><text x="54" y="227.66666666666669" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">40</text><line x1="64" x2="532" y1="176.0" y2="176.0" stroke="#2E2E38"/><text x="54" y="181.0" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">60</text><text x="92.0" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">8K</text><text x="174.4" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">16K</text><text x="256.8" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">32K</text><text x="339.2" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">64K</text><text x="421.6" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">128K</text><text x="504.0" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">256K</text><rect x="26" y="86" width="14" height="14" rx="3" fill="#9C8CFF"/><text x="48" y="98" fill="#F4F2EC" font-size="16" text-anchor="start" font-weight="400">Qwen3.8-Flash-Next</text><polyline fill="none" stroke="#9C8CFF" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" points="92.0,207.5 256.8,207.7 339.2,207.7 421.6,210.8 504.0,212.6"/><circle cx="92.0" cy="207.5" r="5.5" fill="#9C8CFF"/><text x="92.0" y="195.5" fill="#9C8CFF" font-size="16" text-anchor="middle" font-weight="700">46.5</text><circle cx="256.8" cy="207.7" r="5.5" fill="#9C8CFF"/><circle cx="339.2" cy="207.7" r="5.5" fill="#9C8CFF"/><circle cx="421.6" cy="210.8" r="5.5" fill="#9C8CFF"/><circle cx="504.0" cy="212.6" r="5.5" fill="#9C8CFF"/><text x="504.0" y="200.63333333333333" fill="#9C8CFF" font-size="16" text-anchor="middle" font-weight="700">44.3</text><rect x="26" y="108" width="14" height="14" rx="3" fill="#F0B04A"/><text x="48" y="120" fill="#F4F2EC" font-size="16" text-anchor="start" font-weight="400">GLM-5.3-Flash</text><polyline fill="none" stroke="#F0B04A" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" points="92.0,243.4 256.8,244.4 339.2,246.0 421.6,241.1 504.0,240.6"/><circle cx="92.0" cy="243.4" r="5.5" fill="#F0B04A"/><text x="92.0" y="231.43333333333334" fill="#F0B04A" font-size="16" text-anchor="middle" font-weight="700">31.1</text><circle cx="256.8" cy="244.4" r="5.5" fill="#F0B04A"/><circle cx="339.2" cy="246.0" r="5.5" fill="#F0B04A"/><circle cx="421.6" cy="241.1" r="5.5" fill="#F0B04A"/><circle cx="504.0" cy="240.6" r="5.5" fill="#F0B04A"/><text x="504.0" y="228.63333333333333" fill="#F0B04A" font-size="16" text-anchor="middle" font-weight="700">32.3</text><rect x="26" y="130" width="14" height="14" rx="3" fill="#3FD0B0"/><text x="48" y="142" fill="#F4F2EC" font-size="16" text-anchor="start" font-weight="400">MiMo-V2.6-Flash</text><polyline fill="none" stroke="#3FD0B0" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" points="92.0,246.5 256.8,261.4 339.2,275.4 421.6,285.9"/><circle cx="92.0" cy="246.5" r="5.5" fill="#3FD0B0"/><text x="92.0" y="272.4666666666667" fill="#3FD0B0" font-size="16" text-anchor="middle" font-weight="700">29.8</text><circle cx="256.8" cy="261.4" r="5.5" fill="#3FD0B0"/><circle cx="339.2" cy="275.4" r="5.5" fill="#3FD0B0"/><circle cx="421.6" cy="285.9" r="5.5" fill="#3FD0B0"/><text x="421.6" y="311.9" fill="#3FD0B0" font-size="16" text-anchor="middle" font-weight="700">12.9</text><text x="26" y="362" fill="#9A98A3" font-size="14" text-anchor="start" font-weight="400">Speculative decode against context; same machine, 128 GB.</text></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="560" height="380" viewBox="0 0 560 380" font-family="'Ubuntu Sans','DejaVu Sans',Helvetica,Arial,sans-serif"><rect width="560" height="380" rx="6" fill="#FFFFFF" stroke="#DDDDDD"/><text x="26" y="44" fill="#111111" font-size="25" text-anchor="start" font-weight="700">Qwen decode: 44.3 tok/s at 256K</text><text x="26" y="70" fill="#555555" font-size="16" text-anchor="start" font-weight="400">Higher is better.</text><line x1="64" x2="532" y1="316.0" y2="316.0" stroke="#DDDDDD"/><text x="54" y="321.0" fill="#555555" font-size="15" text-anchor="end" font-weight="400">0</text><line x1="64" x2="532" y1="269.3333333333333" y2="269.3333333333333" stroke="#DDDDDD"/><text x="54" y="274.3333333333333" fill="#555555" font-size="15" text-anchor="end" font-weight="400">20</text><line x1="64" x2="532" y1="222.66666666666669" y2="222.66666666666669" stroke="#DDDDDD"/><text x="54" y="227.66666666666669" fill="#555555" font-size="15" text-anchor="end" font-weight="400">40</text><line x1="64" x2="532" y1="176.0" y2="176.0" stroke="#DDDDDD"/><text x="54" y="181.0" fill="#555555" font-size="15" text-anchor="end" font-weight="400">60</text><text x="92.0" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">8K</text><text x="174.4" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">16K</text><text x="256.8" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">32K</text><text x="339.2" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">64K</text><text x="421.6" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">128K</text><text x="504.0" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">256K</text><line x1="24" x2="44" y1="93" y2="93" stroke="#1F5FA8" stroke-width="3"/><circle cx="34" cy="93" r="4.5" fill="#1F5FA8"/><text x="54" y="98" fill="#111111" font-size="16" text-anchor="start" font-weight="400">Qwen3.8-Flash-Next</text><polyline fill="none" stroke="#1F5FA8" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" points="92.0,207.5 256.8,207.7 339.2,207.7 421.6,210.8 504.0,212.6"/><circle cx="92.0" cy="207.5" r="5.5" fill="#1F5FA8"/><text x="92.0" y="195.5" fill="#1F5FA8" font-size="16" text-anchor="middle" font-weight="700">46.5</text><circle cx="256.8" cy="207.7" r="5.5" fill="#1F5FA8"/><circle cx="339.2" cy="207.7" r="5.5" fill="#1F5FA8"/><circle cx="421.6" cy="210.8" r="5.5" fill="#1F5FA8"/><circle cx="504.0" cy="212.6" r="5.5" fill="#1F5FA8"/><text x="504.0" y="200.63333333333333" fill="#1F5FA8" font-size="16" text-anchor="middle" font-weight="700">44.3</text><line x1="24" x2="44" y1="115" y2="115" stroke="#111111" stroke-width="3"/><circle cx="34" cy="115" r="4.5" fill="#111111"/><text x="54" y="120" fill="#111111" font-size="16" text-anchor="start" font-weight="400">GLM-5.3-Flash</text><polyline fill="none" stroke="#111111" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" points="92.0,243.4 256.8,244.4 339.2,246.0 421.6,241.1 504.0,240.6"/><circle cx="92.0" cy="243.4" r="5.5" fill="#111111"/><text x="92.0" y="231.43333333333334" fill="#111111" font-size="16" text-anchor="middle" font-weight="700">31.1</text><circle cx="256.8" cy="244.4" r="5.5" fill="#111111"/><circle cx="339.2" cy="246.0" r="5.5" fill="#111111"/><circle cx="421.6" cy="241.1" r="5.5" fill="#111111"/><circle cx="504.0" cy="240.6" r="5.5" fill="#111111"/><text x="504.0" y="228.63333333333333" fill="#111111" font-size="16" text-anchor="middle" font-weight="700">32.3</text><line x1="24" x2="44" y1="137" y2="137" stroke="#999999" stroke-width="3" stroke-dasharray="9 6"/><circle cx="34" cy="137" r="4.5" fill="#999999"/><text x="54" y="142" fill="#111111" font-size="16" text-anchor="start" font-weight="400">MiMo-V2.6-Flash</text><polyline fill="none" stroke="#999999" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" stroke-dasharray="9 6" points="92.0,246.5 256.8,261.4 339.2,275.4 421.6,285.9"/><circle cx="92.0" cy="246.5" r="5.5" fill="#999999"/><text x="92.0" y="272.4666666666667" fill="#555555" font-size="16" text-anchor="middle" font-weight="700">29.8</text><circle cx="256.8" cy="261.4" r="5.5" fill="#999999"/><circle cx="339.2" cy="275.4" r="5.5" fill="#999999"/><circle cx="421.6" cy="285.9" r="5.5" fill="#999999"/><text x="421.6" y="311.9" fill="#555555" font-size="16" text-anchor="middle" font-weight="700">12.9</text><text x="26" y="362" fill="#555555" font-size="14" text-anchor="start" font-weight="400">Speculative decode against context; same machine, 128 GB.</text></svg>\ No newline at end of filediff --git a/doc/img/prefill.svg b/doc/img/prefill.svgindex e40639a..491a87b 100644--- a/doc/img/prefill.svg+++ b/doc/img/prefill.svg@@ -1 +1 @@-<svg xmlns="http://www.w3.org/2000/svg" width="560" height="380" viewBox="0 0 560 380" font-family="'Ubuntu Sans','DejaVu Sans',Helvetica,Arial,sans-serif"><rect width="560" height="380" rx="16" fill="#18181F" stroke="#2E2E38"/><text x="26" y="44" fill="#F4F2EC" font-size="25" text-anchor="start" font-weight="700">Qwen prefill: 1,347+ tok/s to 256K</text><text x="26" y="70" fill="#9A98A3" font-size="16" text-anchor="start" font-weight="400">Higher is better.</text><line x1="64" x2="532" y1="316.0" y2="316.0" stroke="#2E2E38"/><text x="54" y="321.0" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">0</text><line x1="64" x2="532" y1="281.0" y2="281.0" stroke="#2E2E38"/><text x="54" y="286.0" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">500</text><line x1="64" x2="532" y1="246.0" y2="246.0" stroke="#2E2E38"/><text x="54" y="251.0" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">1,000</text><line x1="64" x2="532" y1="211.0" y2="211.0" stroke="#2E2E38"/><text x="54" y="216.0" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">1,500</text><line x1="64" x2="532" y1="176.0" y2="176.0" stroke="#2E2E38"/><text x="54" y="181.0" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">2,000</text><text x="92.0" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">4K</text><text x="160.66666666666669" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">8K</text><text x="229.33333333333334" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">16K</text><text x="298.0" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">32K</text><text x="366.6666666666667" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">64K</text><text x="435.3333333333333" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">128K</text><text x="504.0" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">256K</text><rect x="26" y="86" width="14" height="14" rx="3" fill="#9C8CFF"/><text x="48" y="98" fill="#F4F2EC" font-size="16" text-anchor="start" font-weight="400">Qwen3.8-Flash-Next</text><polyline fill="none" stroke="#9C8CFF" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" points="160.7,212.3 298.0,212.6 366.7,215.5 435.3,218.3 504.0,221.7"/><circle cx="160.7" cy="212.3" r="5.5" fill="#9C8CFF"/><text x="160.66666666666669" y="200.32999999999998" fill="#9C8CFF" font-size="16" text-anchor="middle" font-weight="700">1,481</text><circle cx="298.0" cy="212.6" r="5.5" fill="#9C8CFF"/><circle cx="366.7" cy="215.5" r="5.5" fill="#9C8CFF"/><circle cx="435.3" cy="218.3" r="5.5" fill="#9C8CFF"/><circle cx="504.0" cy="221.7" r="5.5" fill="#9C8CFF"/><text x="504.0" y="209.70999999999998" fill="#9C8CFF" font-size="16" text-anchor="middle" font-weight="700">1,347</text><rect x="26" y="108" width="14" height="14" rx="3" fill="#F0B04A"/><text x="48" y="120" fill="#F4F2EC" font-size="16" text-anchor="start" font-weight="400">GLM-5.3-Flash</text><polyline fill="none" stroke="#F0B04A" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" points="160.7,271.6 298.0,271.4 366.7,273.1 435.3,274.8 504.0,276.3"/><circle cx="160.7" cy="271.6" r="5.5" fill="#F0B04A"/><text x="160.66666666666669" y="297.62" fill="#F0B04A" font-size="16" text-anchor="middle" font-weight="700">634</text><circle cx="298.0" cy="271.4" r="5.5" fill="#F0B04A"/><circle cx="366.7" cy="273.1" r="5.5" fill="#F0B04A"/><circle cx="435.3" cy="274.8" r="5.5" fill="#F0B04A"/><circle cx="504.0" cy="276.3" r="5.5" fill="#F0B04A"/><text x="504.0" y="302.31" fill="#F0B04A" font-size="16" text-anchor="middle" font-weight="700">567</text><rect x="26" y="130" width="14" height="14" rx="3" fill="#3FD0B0"/><text x="48" y="142" fill="#F4F2EC" font-size="16" text-anchor="start" font-weight="400">MiMo-V2.6-Flash</text><polyline fill="none" stroke="#3FD0B0" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" points="160.7,262.8 298.0,266.9 366.7,274.1 435.3,283.9"/><circle cx="160.7" cy="262.8" r="5.5" fill="#3FD0B0"/><text x="160.66666666666669" y="250.8" fill="#3FD0B0" font-size="16" text-anchor="middle" font-weight="700">760</text><circle cx="298.0" cy="266.9" r="5.5" fill="#3FD0B0"/><circle cx="366.7" cy="274.1" r="5.5" fill="#3FD0B0"/><circle cx="435.3" cy="283.9" r="5.5" fill="#3FD0B0"/><text x="435.3333333333333" y="271.94" fill="#3FD0B0" font-size="16" text-anchor="middle" font-weight="700">458</text><text x="26" y="362" fill="#9A98A3" font-size="14" text-anchor="start" font-weight="400">Prompt tokens per second against context; one Ryzen AI Max+ 395, 128 GB.</text></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="560" height="380" viewBox="0 0 560 380" font-family="'Ubuntu Sans','DejaVu Sans',Helvetica,Arial,sans-serif"><rect width="560" height="380" rx="6" fill="#FFFFFF" stroke="#DDDDDD"/><text x="26" y="44" fill="#111111" font-size="25" text-anchor="start" font-weight="700">Qwen prefill: 1,347+ tok/s to 256K</text><text x="26" y="70" fill="#555555" font-size="16" text-anchor="start" font-weight="400">Higher is better.</text><line x1="64" x2="532" y1="316.0" y2="316.0" stroke="#DDDDDD"/><text x="54" y="321.0" fill="#555555" font-size="15" text-anchor="end" font-weight="400">0</text><line x1="64" x2="532" y1="281.0" y2="281.0" stroke="#DDDDDD"/><text x="54" y="286.0" fill="#555555" font-size="15" text-anchor="end" font-weight="400">500</text><line x1="64" x2="532" y1="246.0" y2="246.0" stroke="#DDDDDD"/><text x="54" y="251.0" fill="#555555" font-size="15" text-anchor="end" font-weight="400">1,000</text><line x1="64" x2="532" y1="211.0" y2="211.0" stroke="#DDDDDD"/><text x="54" y="216.0" fill="#555555" font-size="15" text-anchor="end" font-weight="400">1,500</text><line x1="64" x2="532" y1="176.0" y2="176.0" stroke="#DDDDDD"/><text x="54" y="181.0" fill="#555555" font-size="15" text-anchor="end" font-weight="400">2,000</text><text x="92.0" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">4K</text><text x="160.66666666666669" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">8K</text><text x="229.33333333333334" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">16K</text><text x="298.0" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">32K</text><text x="366.6666666666667" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">64K</text><text x="435.3333333333333" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">128K</text><text x="504.0" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">256K</text><line x1="24" x2="44" y1="93" y2="93" stroke="#1F5FA8" stroke-width="3"/><circle cx="34" cy="93" r="4.5" fill="#1F5FA8"/><text x="54" y="98" fill="#111111" font-size="16" text-anchor="start" font-weight="400">Qwen3.8-Flash-Next</text><polyline fill="none" stroke="#1F5FA8" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" points="160.7,212.3 298.0,212.6 366.7,215.5 435.3,218.3 504.0,221.7"/><circle cx="160.7" cy="212.3" r="5.5" fill="#1F5FA8"/><text x="160.66666666666669" y="200.32999999999998" fill="#1F5FA8" font-size="16" text-anchor="middle" font-weight="700">1,481</text><circle cx="298.0" cy="212.6" r="5.5" fill="#1F5FA8"/><circle cx="366.7" cy="215.5" r="5.5" fill="#1F5FA8"/><circle cx="435.3" cy="218.3" r="5.5" fill="#1F5FA8"/><circle cx="504.0" cy="221.7" r="5.5" fill="#1F5FA8"/><text x="504.0" y="209.70999999999998" fill="#1F5FA8" font-size="16" text-anchor="middle" font-weight="700">1,347</text><line x1="24" x2="44" y1="115" y2="115" stroke="#111111" stroke-width="3"/><circle cx="34" cy="115" r="4.5" fill="#111111"/><text x="54" y="120" fill="#111111" font-size="16" text-anchor="start" font-weight="400">GLM-5.3-Flash</text><polyline fill="none" stroke="#111111" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" points="160.7,271.6 298.0,271.4 366.7,273.1 435.3,274.8 504.0,276.3"/><circle cx="160.7" cy="271.6" r="5.5" fill="#111111"/><text x="160.66666666666669" y="297.62" fill="#111111" font-size="16" text-anchor="middle" font-weight="700">634</text><circle cx="298.0" cy="271.4" r="5.5" fill="#111111"/><circle cx="366.7" cy="273.1" r="5.5" fill="#111111"/><circle cx="435.3" cy="274.8" r="5.5" fill="#111111"/><circle cx="504.0" cy="276.3" r="5.5" fill="#111111"/><text x="504.0" y="302.31" fill="#111111" font-size="16" text-anchor="middle" font-weight="700">567</text><line x1="24" x2="44" y1="137" y2="137" stroke="#999999" stroke-width="3" stroke-dasharray="9 6"/><circle cx="34" cy="137" r="4.5" fill="#999999"/><text x="54" y="142" fill="#111111" font-size="16" text-anchor="start" font-weight="400">MiMo-V2.6-Flash</text><polyline fill="none" stroke="#999999" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" stroke-dasharray="9 6" points="160.7,262.8 298.0,266.9 366.7,274.1 435.3,283.9"/><circle cx="160.7" cy="262.8" r="5.5" fill="#999999"/><text x="160.66666666666669" y="250.8" fill="#555555" font-size="16" text-anchor="middle" font-weight="700">760</text><circle cx="298.0" cy="266.9" r="5.5" fill="#999999"/><circle cx="366.7" cy="274.1" r="5.5" fill="#999999"/><circle cx="435.3" cy="283.9" r="5.5" fill="#999999"/><text x="435.3333333333333" y="271.94" fill="#555555" font-size="16" text-anchor="middle" font-weight="700">458</text><text x="26" y="362" fill="#555555" font-size="14" text-anchor="start" font-weight="400">Prompt tokens per second against context; one Ryzen AI Max+ 395, 128 GB.</text></svg>\ No newline at end of filediff --git a/doc/img/prefill_context.svg b/doc/img/prefill_context.svgindex 904145b..4af2f32 100644--- a/doc/img/prefill_context.svg+++ b/doc/img/prefill_context.svg@@ -1 +1 @@-<svg xmlns="http://www.w3.org/2000/svg" width="560" height="380" viewBox="0 0 560 380" font-family="'Ubuntu Sans','DejaVu Sans',Helvetica,Arial,sans-serif"><rect width="560" height="380" rx="16" fill="#18181F" stroke="#2E2E38"/><text x="26" y="44" fill="#F4F2EC" font-size="25" text-anchor="start" font-weight="700">Qwen prefill: 1,347 tok/s at 256K</text><text x="26" y="70" fill="#9A98A3" font-size="16" text-anchor="start" font-weight="400">Higher is better.</text><line x1="64" x2="532" y1="316.0" y2="316.0" stroke="#2E2E38"/><text x="54" y="321.0" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">0</text><line x1="64" x2="532" y1="281.0" y2="281.0" stroke="#2E2E38"/><text x="54" y="286.0" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">500</text><line x1="64" x2="532" y1="246.0" y2="246.0" stroke="#2E2E38"/><text x="54" y="251.0" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">1,000</text><line x1="64" x2="532" y1="211.0" y2="211.0" stroke="#2E2E38"/><text x="54" y="216.0" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">1,500</text><line x1="64" x2="532" y1="176.0" y2="176.0" stroke="#2E2E38"/><text x="54" y="181.0" fill="#9A98A3" font-size="15" text-anchor="end" font-weight="400">2,000</text><text x="92.0" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">8K</text><text x="174.4" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">16K</text><text x="256.8" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">32K</text><text x="339.2" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">64K</text><text x="411.10841013429786" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400"></text><text x="421.6" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">128K</text><text x="504.0" y="344" fill="#9A98A3" font-size="16" text-anchor="middle" font-weight="400">256K</text><rect x="26" y="86" width="14" height="14" rx="3" fill="#9C8CFF"/><text x="48" y="98" fill="#F4F2EC" font-size="16" text-anchor="start" font-weight="400">Kyojin</text><polyline fill="none" stroke="#9C8CFF" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" points="92.0,212.3 256.8,212.6 339.2,215.5 421.6,218.3 504.0,221.7"/><circle cx="92.0" cy="212.3" r="5.5" fill="#9C8CFF"/><circle cx="256.8" cy="212.6" r="5.5" fill="#9C8CFF"/><circle cx="339.2" cy="215.5" r="5.5" fill="#9C8CFF"/><circle cx="421.6" cy="218.3" r="5.5" fill="#9C8CFF"/><circle cx="504.0" cy="221.7" r="5.5" fill="#9C8CFF"/><text x="504.0" y="247.70999999999998" fill="#9C8CFF" font-size="16" text-anchor="middle" font-weight="700">1,347</text><rect x="27" y="109" width="12" height="12" rx="6" fill="#18181F" stroke="#E8745C" stroke-width="3"/><text x="48" y="120" fill="#F4F2EC" font-size="16" text-anchor="start" font-weight="400">Strata (Ciru Inference Lab)</text><polyline fill="none" stroke="#E8745C" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" stroke-dasharray="8 7" points="256.8,260.3 339.2,262.6 411.1,266.4"/><circle cx="256.8" cy="260.3" r="5" fill="#18181F" stroke="#E8745C" stroke-width="3"/><circle cx="339.2" cy="262.6" r="5" fill="#18181F" stroke="#E8745C" stroke-width="3"/><circle cx="411.1" cy="266.4" r="5" fill="#18181F" stroke="#E8745C" stroke-width="3"/><rect x="26" y="130" width="14" height="14" rx="3" fill="#8FA3C4"/><text x="48" y="142" fill="#F4F2EC" font-size="16" text-anchor="start" font-weight="400">Gufo (measured by us)</text><polyline fill="none" stroke="#8FA3C4" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" points="92.0,228.5 256.8,224.4 339.2,225.8 421.6,229.9"/><circle cx="92.0" cy="228.5" r="5.5" fill="#8FA3C4"/><circle cx="256.8" cy="224.4" r="5.5" fill="#8FA3C4"/><circle cx="339.2" cy="225.8" r="5.5" fill="#8FA3C4"/><circle cx="421.6" cy="229.9" r="5.5" fill="#8FA3C4"/><text x="26" y="362" fill="#9A98A3" font-size="14" text-anchor="start" font-weight="400">Prompt tokens per second against context; same machine, 128 GB.</text></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="560" height="380" viewBox="0 0 560 380" font-family="'Ubuntu Sans','DejaVu Sans',Helvetica,Arial,sans-serif"><rect width="560" height="380" rx="6" fill="#FFFFFF" stroke="#DDDDDD"/><text x="26" y="44" fill="#111111" font-size="25" text-anchor="start" font-weight="700">Qwen prefill: 1,347 tok/s at 256K</text><text x="26" y="70" fill="#555555" font-size="16" text-anchor="start" font-weight="400">Higher is better.</text><line x1="64" x2="532" y1="316.0" y2="316.0" stroke="#DDDDDD"/><text x="54" y="321.0" fill="#555555" font-size="15" text-anchor="end" font-weight="400">0</text><line x1="64" x2="532" y1="281.0" y2="281.0" stroke="#DDDDDD"/><text x="54" y="286.0" fill="#555555" font-size="15" text-anchor="end" font-weight="400">500</text><line x1="64" x2="532" y1="246.0" y2="246.0" stroke="#DDDDDD"/><text x="54" y="251.0" fill="#555555" font-size="15" text-anchor="end" font-weight="400">1,000</text><line x1="64" x2="532" y1="211.0" y2="211.0" stroke="#DDDDDD"/><text x="54" y="216.0" fill="#555555" font-size="15" text-anchor="end" font-weight="400">1,500</text><line x1="64" x2="532" y1="176.0" y2="176.0" stroke="#DDDDDD"/><text x="54" y="181.0" fill="#555555" font-size="15" text-anchor="end" font-weight="400">2,000</text><text x="92.0" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">8K</text><text x="174.4" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">16K</text><text x="256.8" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">32K</text><text x="339.2" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">64K</text><text x="411.10841013429786" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400"></text><text x="421.6" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">128K</text><text x="504.0" y="344" fill="#555555" font-size="16" text-anchor="middle" font-weight="400">256K</text><line x1="24" x2="44" y1="93" y2="93" stroke="#1F5FA8" stroke-width="3"/><circle cx="34" cy="93" r="4.5" fill="#1F5FA8"/><text x="54" y="98" fill="#111111" font-size="16" text-anchor="start" font-weight="400">Kyojin</text><polyline fill="none" stroke="#1F5FA8" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" points="92.0,212.3 256.8,212.6 339.2,215.5 421.6,218.3 504.0,221.7"/><circle cx="92.0" cy="212.3" r="5.5" fill="#1F5FA8"/><circle cx="256.8" cy="212.6" r="5.5" fill="#1F5FA8"/><circle cx="339.2" cy="215.5" r="5.5" fill="#1F5FA8"/><circle cx="421.6" cy="218.3" r="5.5" fill="#1F5FA8"/><circle cx="504.0" cy="221.7" r="5.5" fill="#1F5FA8"/><text x="504.0" y="247.70999999999998" fill="#1F5FA8" font-size="16" text-anchor="middle" font-weight="700">1,347</text><line x1="24" x2="44" y1="115" y2="115" stroke="#555555" stroke-width="3" stroke-dasharray="8 5"/><circle cx="34" cy="115" r="4.5" fill="#FFFFFF" stroke="#555555" stroke-width="2.5"/><text x="54" y="120" fill="#111111" font-size="16" text-anchor="start" font-weight="400">Strata (Ciru Inference Lab)</text><polyline fill="none" stroke="#555555" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" stroke-dasharray="8 5" points="256.8,260.3 339.2,262.6 411.1,266.4"/><circle cx="256.8" cy="260.3" r="5" fill="#FFFFFF" stroke="#555555" stroke-width="3"/><circle cx="339.2" cy="262.6" r="5" fill="#FFFFFF" stroke="#555555" stroke-width="3"/><circle cx="411.1" cy="266.4" r="5" fill="#FFFFFF" stroke="#555555" stroke-width="3"/><line x1="24" x2="44" y1="137" y2="137" stroke="#999999" stroke-width="3" stroke-dasharray="2 5"/><circle cx="34" cy="137" r="4.5" fill="#999999"/><text x="54" y="142" fill="#111111" font-size="16" text-anchor="start" font-weight="400">Gufo (measured by us)</text><polyline fill="none" stroke="#999999" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" stroke-dasharray="2 5" points="92.0,228.5 256.8,224.4 339.2,225.8 421.6,229.9"/><circle cx="92.0" cy="228.5" r="5.5" fill="#999999"/><circle cx="256.8" cy="224.4" r="5.5" fill="#999999"/><circle cx="339.2" cy="225.8" r="5.5" fill="#999999"/><circle cx="421.6" cy="229.9" r="5.5" fill="#999999"/><text x="26" y="362" fill="#555555" font-size="14" text-anchor="start" font-weight="400">Prompt tokens per second against context; same machine, 128 GB.</text></svg>\ No newline at end of filediff --git a/tools/make_charts.py b/tools/make_charts.pyindex 197b5ca..6c13471 100644--- a/tools/make_charts.py+++ b/tools/make_charts.py@@ -2,15 +2,17 @@"""Build the README charts (SVG, standard library only) from doc/figures.json.usage: python3 tools/make_charts.py [figures.json] [out_dir]Four line charts, one idea each: prefill against context length (log scale), speculative decode by kind of text, and speculative decode against context length (Kyojin now and before, rivals where they publish a figure at that context), and prefill against context with the rivals. Higher is better.-Dark card background, so they read the same on GitHub light and dark themes.+House style: white background, black text, steel blue accent, greys for the rest.A model without published values is listed in the legend and not drawn."""import json, sys, osroot = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))src = sys.argv[1] if len(sys.argv) > 1 else os.path.join(root, "doc", "figures.json")out = sys.argv[2] if len(sys.argv) > 2 else os.path.join(root, "doc", "img")F = json.load(open(src)); M = F["models"]-CARD, GRID, TXT, SUB = "#18181F", "#2E2E38", "#F4F2EC", "#9A98A3"-COL = {"qwen": "#9C8CFF", "glm": "#F0B04A", "mimo": "#3FD0B0"}+CARD, GRID, TXT, SUB = "#FFFFFF", "#DDDDDD", "#111111", "#555555"+BLUE, GREY = "#1F5FA8", "#999999"+COL = {"qwen": BLUE, "glm": "#111111", "mimo": GREY}+DASH = {"mimo": "9 6"}SHORT = {"qwen": "Qwen3.8-Flash-Next", "glm": "GLM-5.3-Flash", "mimo": "MiMo-V2.6-Flash"}FONT = "font-family=\"'Ubuntu Sans','DejaVu Sans',Helvetica,Arial,sans-serif\""def fmt(v): return f"{v:,.0f}" if v >= 100 else f"{v:.1f}"@@ -22,7 +24,7 @@ import mathdef frame(headline, sub):W, H = 560, 380return (f'<svg xmlns="http://www.w3.org/2000/svg" width="{W}" height="{H}" viewBox="0 0 {W} {H}" {FONT}>'- f'<rect width="{W}" height="{H}" rx="16" fill="{CARD}" stroke="{GRID}"/>'+ f'<rect width="{W}" height="{H}" rx="6" fill="{CARD}" stroke="{GRID}"/>'+ t(26, 44, headline, 25, TXT, "start", "700") + t(26, 70, sub, 16, SUB)), W, Hdef draw_lines(headline, footer, xs, label, pos, series, note=None):"""xs: sorted x keys; pos: x key -> pixel; series: [{name, color, pts {x: value}, dash, hollow}].@@ -43,22 +45,24 @@ def draw_lines(headline, footer, xs, label, pos, series, note=None):pts = [(px[c], y1 - (y1 - y0) * g[c] / top, g[c]) for c in xs if g.get(c)]ly = 98 + 22 * itxt = se["name"] + ("" if pts else " (" + (note or "see table") + ")")- dash = ' stroke-dasharray="8 7"' if se.get("dash") else ""- sw = f'<rect x="26" y="{ly-12}" width="14" height="14" rx="3" fill="{col if pts else GRID}"/>'- if se.get("dash") and pts: sw = f'<rect x="27" y="{ly-11}" width="12" height="12" rx="3" fill="none" stroke="{col}" stroke-width="2.5" stroke-dasharray="4 3"/>'- if se.get("hollow") and pts: sw = f'<rect x="27" y="{ly-11}" width="12" height="12" rx="6" fill="{CARD}" stroke="{col}" stroke-width="3"/>'- s += sw + t(48, ly, txt, 16, TXT if pts else SUB)+ dp = se.get("dash")+ dash = f' stroke-dasharray="{dp}"' if dp else ""+ sd = f' stroke-dasharray="{dp}"' if dp else ""+ sw = f'<line x1="24" x2="44" y1="{ly-5}" y2="{ly-5}" stroke="{col if pts else GRID}" stroke-width="3"{sd}/>'+ if se.get("hollow") and pts: sw += f'<circle cx="34" cy="{ly-5}" r="4.5" fill="{CARD}" stroke="{col}" stroke-width="2.5"/>'+ elif pts: sw += f'<circle cx="34" cy="{ly-5}" r="4.5" fill="{col}"/>'+ s += sw + t(54, ly, txt, 16, TXT if pts else SUB)if len(pts) > 1: s += f'<polyline fill="none" stroke="{col}" stroke-width="4" stroke-linejoin="round" stroke-linecap="round"{dash} points="{" ".join(f"{a:.1f},{b:.1f}" for a, b, _ in pts)}"/>'for k, (a, b, v) in enumerate(pts):s += (f'<circle cx="{a:.1f}" cy="{b:.1f}" r="5" fill="{CARD}" stroke="{col}" stroke-width="3"/>' if se.get("hollow")else f'<circle cx="{a:.1f}" cy="{b:.1f}" r="5.5" fill="{col}"/>')lab = (k == len(pts) - 1 and se.get("last_label", True)) or (k == 0 and se.get("first_label", True))- if lab and not se.get("dash"): s += t(a, b + (26 if se.get("below") else -12), fmt(v), 16, col, "middle", "700")+ if lab and not se.get("nolabel"): s += t(a, b + (26 if se.get("below") else -12), fmt(v), 16, SUB if col == GREY else col, "middle", "700")return s + t(26, H - 18, footer, 14, SUB) + "</svg>"def draw(key, headline, footer, xs, label, pos, getter, note=None):"""One series per model; getter(model) -> {x key: value}."""- series = [{"name": SHORT[m["id"]], "color": COL[m["id"]], "pts": getter(m)} for m in M]+ series = [{"name": SHORT[m["id"]], "color": COL[m["id"]], "pts": getter(m), "dash": DASH.get(m["id"])} for m in M]first = lambda se: se["pts"][min(se["pts"], key=xs.index)] if se["pts"] else 0low = min(series, key=first) # the lowest line carries its labels under the points, so close lines do not overlapif len(series) > 1: low["below"] = True@@ -87,10 +91,10 @@ def prefill_context_chart():q = M[0]; R = F.get("rivals", {})ticks = [8192, 16384, 32768, 65536, 131072, 262144]ints = lambda d: {int(c): v for c, v in d.items() if v}- series = [{"name": "Kyojin", "color": COL["qwen"], "pts": ints(q["prefill"]), "below": True, "first_label": False}]+ series = [{"name": "Kyojin", "color": BLUE, "pts": ints(q["prefill"]), "below": True, "first_label": False}]if R.get("strata"):- series.append({"name": "Strata (" + R["strata"]["independent"]["lab"] + ")", "color": "#E8745C", "pts": ints(R["strata"]["prefill_independent"]), "hollow": True, "dash": True, "last_label": False})- if R.get("gufo"): series.append({"name": "Gufo (measured by us)", "color": "#8FA3C4", "pts": ints(R["gufo"]["prefill_measured"]), "first_label": False, "last_label": False})+ series.append({"name": "Strata (" + R["strata"]["independent"]["lab"] + ")", "color": "#555555", "pts": ints(R["strata"]["prefill_independent"]), "hollow": True, "dash": "8 5", "nolabel": True, "last_label": False})+ if R.get("gufo"): series.append({"name": "Gufo (measured by us)", "color": GREY, "pts": ints(R["gufo"]["prefill_measured"]), "dash": "2 5", "first_label": False, "last_label": False})xs = sorted(set(ticks) | {c for se in series for c in se["pts"]}); lo, hi = math.log2(ticks[0]), math.log2(ticks[-1])pos = lambda a, b: {c: a + (b - a) * (math.log2(c) - lo) / (hi - lo) for c in xs}pts = ints(q["prefill"]); cmax = max(pts) if pts else 0@@ -105,9 +109,9 @@ def decode_context_chart():lo, hi = math.log2(ticks[0]), math.log2(ticks[-1])pos = lambda a, b: {c: a + (b - a) * (math.log2(c) - lo) / (hi - lo) for c in ticks}ints = lambda d: {int(c): v for c, v in d.items() if v}- series = [{"name": "Kyojin", "color": COL["qwen"], "pts": ints(q["decode"]), "first_label": False}]- if R.get("strata"): series.append({"name": "Strata (measured by us)", "color": "#E8745C", "pts": ints(R["strata"]["decode_measured"]), "first_label": False, "last_label": False})- if R.get("gufo"): series.append({"name": "Gufo (measured by us)", "color": "#8FA3C4", "pts": ints(R["gufo"]["decode_measured"]), "first_label": False, "last_label": False})+ series = [{"name": "Kyojin", "color": BLUE, "pts": ints(q["decode"]), "first_label": False}]+ if R.get("strata"): series.append({"name": "Strata (measured by us)", "color": "#555555", "pts": ints(R["strata"]["decode_measured"]), "dash": "8 5", "first_label": False, "last_label": False})+ if R.get("gufo"): series.append({"name": "Gufo (measured by us)", "color": GREY, "pts": ints(R["gufo"]["decode_measured"]), "dash": "2 5", "first_label": False, "last_label": False})pts = ints(q["decode"]); cmax = max(pts) if pts else 0head = f"Qwen decode: {fmt(pts[cmax])} tok/s at {ck(cmax)}" if pts else "Qwen decode by context"foot = "Speculative decode against context; same machine, 128 GB."