Skip to content

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.

Docs: decode-by-context line chart, Strata and Gufo comparison tables, quality table, figures file carries previous release and rivals

Yanisscac3e8a2b8ca
diff --git a/doc/benchmarks.md b/doc/benchmarks.md
index 4523f96..336cbd1 100644
--- a/doc/benchmarks.md
+++ b/doc/benchmarks.md
@@ -9,7 +9,7 @@ The Qwen and MiMo figures on the front page come from a run set up like yours (G
- the public code at the commit named in `doc/figures.json`, built from the README install;
- an empty home directory, the published packs downloaded from the hub, the default environment (no private flags);
- greedy decoding, thinking off, the four card prompts for each of chat, prose and code, 256 tokens, median of 3 repetitions (`tools/bench.sh` runs the same prompts);
-- prefill and decode by context: cold prompts of 8K and 32K tokens (Qwen also 64K, 128K, 256K), a long essay request; prefill is the engine-reported prompt speed, decode the speculative decode speed over the reply. GLM and MiMo: median of 3 requests after a warm-up request, speed from the server timing; Qwen: one request per depth, essay of 256 tokens, as `ladder.py --chat`;
+- prefill and decode by context: cold prompts of 8K and 32K tokens (Qwen also 64K, 128K, 256K), a long essay request; prefill is the engine-reported prompt speed, decode the speculative decode speed over the reply. GLM and MiMo: median of 3 requests after a warm-up request, speed from the server timing; Qwen: one request per depth, essay of 256 tokens;
- speculative decode is the default server mode and returns the same tokens as plain decode.
- the server log of each run has no `fallback`, `disabled`, `unavailable`, `not tuned` or `No module` line.
@@ -33,13 +33,14 @@ The GLM figures were published before this page and are quoted as published (99.
| 14K | 584 | 30.3 |
| 64K | 546 | 27.6 |
-At temperature 1.0 and top-p 0.95 decode is 26.0 / 28.5 / 26.4 tok/s. The GLM figures were not re-run with the new-user recipe above, so they are left out of the by-text-kind decode chart (the chart needs chat, prose and code figures for the same pack).
+At temperature 1.0 and top-p 0.95 decode is 26.0 / 28.5 / 26.4 tok/s. These GLM figures were not re-run with the new-user recipe above, so they are left out of the by-text-kind decode chart.
## Where each figure comes from
-- Qwen3.8-Flash-Next (V1.2) prefill (1494 / 1478 / 1457 / 1395 / 1277 tok/s at 8K / 32K / 64K / 128K / 256K) and speculative decode on the card prompts (49.8 chat, 44.5 prose, 59.1 code): runs with the recipe above, at the commit named in `doc/figures.json`. The model card on the hub still carries the earlier V1.1 figures.
+- Qwen3.8-Flash-Next prefill and speculative decode (by context and on the card prompts): runs with the recipe above, at the commit named in `doc/figures.json`.
- MiMo-V2.6-Flash: the same recipe and commit.
-- GLM-5.3-Flash: the "Measured numbers" table of the previous README (kept below) and the Speed section of the hub card, `yamz-labs/GLM-5.3-Flash-EXL3-Yamz`.
+- GLM-5.3-Flash: the recipe above where a value is in the main table; otherwise the "Measured numbers" table of the previous README (kept below) and the Speed section of the hub card, `yamz-labs/GLM-5.3-Flash-EXL3-Yamz`.
+- Strata and Gufo: the section "Strata and Gufo" below names the source of each figure.
- Charts and the front-page table are built from `doc/figures.json` with `tools/make_charts.py` and `tools/make_readme_table.py`.
Caveats, once: one machine, one OS image; prefill is the engine-reported prompt speed; contexts differ between models because each figure keeps the context at which it was published or measured. These are first versions and improvements are coming.
@@ -58,15 +59,51 @@ One machine: Ryzen AI Max+ 395, Radeon 8060S (gfx1151), 128 GB LPDDR5X, ROCm. Ot
| GLM-5.3-Flash, 99 GB pack, MTP 2, `-c 131072` | 24K | 609.0 | 28.1 (28.12, 28.09) | run, same harness as the next row |
| GLM-5.3-Flash, 82 GB pack, hook off, today's engine, `-c 131072`, client temperature 0, mean of 3 | 3.5K / 14K | 661 / 645 | 32.0 prose, 33.6 chat, 35.7 code | run, second machine (same CPU) |
| GLM-5.3-Flash (99.7 GB), hook on + agent-lane flags, `-c 98304`, prefill mean of 3, decode mean of 6 | 3.5K / 14K / 64K | 580 / 584 / 546 | 29.0 / 30.3 / 27.6 at temperature 0; 26.0 / 28.5 / 26.4 at temperature 1.0, top-p 0.95 | run |
-| MiMo-V2.6-Flash-MOPD, 105 GB pack, speculative decoding on (default), 4 bpw drafter (702 MB), `-c 32768`, client temperature 0, decode medians of 6 runs over two loads, 128 tokens | - | 32.1 prose, 34.8 chat, 44.3 code (plain: 28.9 on all three, 1.11x / 1.21x / 1.53x) | run, public tree |
-| MiMo-V2.6-Flash-MOPD, 105 GB pack, plain decode (no draft), 32K window, client temperature 0 | 4.1K / 23.7K | 594 / 613 | 25.2 to 27.8 | run, single runs |
+| MiMo-V2.6-Flash-MOPD, 105 GB pack, speculative decoding on (default), 4 bpw drafter (702 MB), `-c 32768`, client temperature 0, decode medians of 6 runs over two loads, 128 tokens | - | 32.1 prose, 34.8 chat, 44.3 code | run, public tree |
+
+## Strata and Gufo
+
+Same machine, one method for every engine we ran: non-thinking chat, an essay request on cold prompts of 8K to 256K tokens, 256 greedy tokens, speculation on, engine-reported prefill. Rival figures are the ones we measured on our machine, with Strata v0.1.40 (UD-IQ4_XS pack) and Gufo v0.8.0 (UD-Q4_K_XL pack), plus the independent test cited below. Each project also publishes its own figures, on its own machine and with its own method: [Strata](https://github.com/Niko1221/Strata/releases/tag/v0.1.40), [Gufo](https://github.com/gufo-org/gufo/blob/main/docs/models/qwen3.8-flash-next/BENCHMARKS.md).
+
+### Prefill
+
+![Prefill against context](img/prefill_context.svg)
+
+| tok/s | 8K | 32K | 64K | 128K | 256K |
+|---|---|---|---|---|---|
+| Kyojin | 1494 | 1478 | 1457 | 1395 | 1277 |
+| Gufo v0.8.0, measured by us | 1250 | 1308 | 1289 | 1230 | - |
+
+Strata prefill, independent measurement by Ciru Inference Lab ([report](https://llm.ciru.ai/strataflash/), 6 October 2026; cold prompts of 32K, 64K and 120K tokens; a different machine and different prompts; the lab states that it did not reproduce the publisher's exact workload and that the cause of the gap is not established): 795 / 762 / 709 tok/s at 32K / 64K / 120K.
+
+### Speculative decode
+
+![Speculative decode against context](img/decode_context.svg)
+
+| tok/s | 8K | 32K | 64K | 128K | 256K |
+|---|---|---|---|---|---|
+| Kyojin | 43.4 | 40.2 | 36.7 | 31.9 | 20.4 |
+| Gufo, measured by us | 35.3 | 31.9 | 35.8 | 31.4 | - |
+| Strata, measured by us | 39.0 | 38.7 | 36.4 | 35.0 | 37.5 |
+
+Card prompts (chat / prose / code): Kyojin 49.8 / 44.5 / 59.1; Gufo 37.3 / 32.5 / 52.3; Strata 46.7 / 41.5 / 61.6 (measured by us, client-timed). Gufo could not take the 256K prompt: the 256K prompt (about 264K tokens by Gufo's count) exceeds its 262144-token window.
+
+### Fidelity to the original model
+
+Top-1 agreement and KL divergence against the official FP8 release: 200 public neutral texts, 3084 scored positions, fixed-seed points, one scorer for all three engines, row-cluster bootstrap. The rival engines were patched only to write out their top-20 log-probabilities; their GGUF packs come from the BF16 weights. Run-to-run variation is the KL between two runs of the same engine on the same points.
+
+| Engine | Pack | Top-1 | KL | KL run-to-run |
+|---|---|---|---|---|
+| Kyojin | 95 GB | 93.81 % | 0.0216 | 0.0008 |
+| Strata | 93.7 GB | 93.64 % | 0.0316 | 0.0074 |
+| Gufo | 111.3 GB | 95.36 % | 0.0156 | 0.0000 |
+
+Sources: [Strata](https://github.com/Niko1221/Strata/releases/tag/v0.1.40) (v0.1.40, seen 2026-10-06), [Gufo](https://github.com/gufo-org/gufo/blob/main/docs/models/qwen3.8-flash-next/BENCHMARKS.md) (v0.8.0, seen 2026-10-06). Scripts, prompts and raw outputs are in the repository.
## Other engines
llama.cpp (ROCm, UD-IQ1_S 1.56 bpw, `-fa 1 -ub 2048`, no MTP), same machine: pp4096 197.9, pp16384 158.3, tg128 16.74, tg at 64K 7.19 tok/s. Coarser quant: engine and format are compared together.
-Quality against the official FP8 weights (129 held-out rows): see the model cards.
-
## Share your numbers
Start a server from the quickstart, then run `tools/bench.sh` (standard library only, `--base` and `--model` select the server). It measures prefill on a prompt of about 3.5K tokens and decode on prose, chat and code with the prompts behind the table above, and prints one Markdown block with your hardware and versions (`--json` adds the same numbers, with every run, as a JSON block).
diff --git a/doc/benchmarks.tmpl.md b/doc/benchmarks.tmpl.md
index e749088..13921b8 100644
--- a/doc/benchmarks.tmpl.md
+++ b/doc/benchmarks.tmpl.md
@@ -9,7 +9,7 @@ The Qwen and MiMo figures on the front page come from a run set up like yours (G
- the public code at the commit named in `doc/figures.json`, built from the README install;
- an empty home directory, the published packs downloaded from the hub, the default environment (no private flags);
- greedy decoding, thinking off, the four card prompts for each of chat, prose and code, 256 tokens, median of 3 repetitions (`tools/bench.sh` runs the same prompts);
-- prefill and decode by context: cold prompts of 8K and 32K tokens (Qwen also 64K, 128K, 256K), a long essay request; prefill is the engine-reported prompt speed, decode the speculative decode speed over the reply. GLM and MiMo: median of 3 requests after a warm-up request, speed from the server timing; Qwen: one request per depth, essay of 256 tokens, as `ladder.py --chat`;
+- prefill and decode by context: cold prompts of 8K and 32K tokens (Qwen also 64K, 128K, 256K), a long essay request; prefill is the engine-reported prompt speed, decode the speculative decode speed over the reply. GLM and MiMo: median of 3 requests after a warm-up request, speed from the server timing; Qwen: {{LADDER}}, essay of 256 tokens;
- speculative decode is the default server mode and returns the same tokens as plain decode.
- the server log of each run has no `fallback`, `disabled`, `unavailable`, `not tuned` or `No module` line.
@@ -19,23 +19,13 @@ Tokens per second; prefill by context, speculative decode by kind of text.
{{TABLE}}
-## GLM-5.3-Flash
-
-The GLM figures were published before this page and are quoted as published (99.7 GB pack, MTP with 2 drafts, `-c 98304`, hook on with the agent-lane server flags, prefill mean of 3, decode mean of 6, temperature 0):
-
-| Context | Prefill tok/s | Decode tok/s |
-|---|---|---|
-| 3.5K | 580 | 29.0 |
-| 14K | 584 | 30.3 |
-| 64K | 546 | 27.6 |
-
-At temperature 1.0 and top-p 0.95 decode is 26.0 / 28.5 / 26.4 tok/s. The GLM figures were not re-run with the new-user recipe above, so they are left out of the by-text-kind decode chart (the chart needs chat, prose and code figures for the same pack).
-
+{{GLM}}
## Where each figure comes from
-- Qwen3.8-Flash-Next (V1.2) prefill (1494 / 1478 / 1457 / 1395 / 1277 tok/s at 8K / 32K / 64K / 128K / 256K) and speculative decode on the card prompts (49.8 chat, 44.5 prose, 59.1 code): runs with the recipe above, at the commit named in `doc/figures.json`. The model card on the hub still carries the earlier V1.1 figures.
+- Qwen3.8-Flash-Next prefill and speculative decode (by context and on the card prompts): runs with the recipe above, at the commit named in `doc/figures.json`.
- MiMo-V2.6-Flash: the same recipe and commit.
-- GLM-5.3-Flash: the "Measured numbers" table of the previous README (kept below) and the Speed section of the hub card, `yamz-labs/GLM-5.3-Flash-EXL3-Yamz`.
+- GLM-5.3-Flash: the recipe above where a value is in the main table; otherwise the "Measured numbers" table of the previous README (kept below) and the Speed section of the hub card, `yamz-labs/GLM-5.3-Flash-EXL3-Yamz`.
+- Strata and Gufo: the section "Strata and Gufo" below names the source of each figure.
- Charts and the front-page table are built from `doc/figures.json` with `tools/make_charts.py` and `tools/make_readme_table.py`.
Caveats, once: one machine, one OS image; prefill is the engine-reported prompt speed; contexts differ between models because each figure keeps the context at which it was published or measured. These are first versions and improvements are coming.
@@ -54,15 +44,15 @@ One machine: Ryzen AI Max+ 395, Radeon 8060S (gfx1151), 128 GB LPDDR5X, ROCm. Ot
| GLM-5.3-Flash, 99 GB pack, MTP 2, `-c 131072` | 24K | 609.0 | 28.1 (28.12, 28.09) | run, same harness as the next row |
| GLM-5.3-Flash, 82 GB pack, hook off, today's engine, `-c 131072`, client temperature 0, mean of 3 | 3.5K / 14K | 661 / 645 | 32.0 prose, 33.6 chat, 35.7 code | run, second machine (same CPU) |
| GLM-5.3-Flash (99.7 GB), hook on + agent-lane flags, `-c 98304`, prefill mean of 3, decode mean of 6 | 3.5K / 14K / 64K | 580 / 584 / 546 | 29.0 / 30.3 / 27.6 at temperature 0; 26.0 / 28.5 / 26.4 at temperature 1.0, top-p 0.95 | run |
-| MiMo-V2.6-Flash-MOPD, 105 GB pack, speculative decoding on (default), 4 bpw drafter (702 MB), `-c 32768`, client temperature 0, decode medians of 6 runs over two loads, 128 tokens | - | 32.1 prose, 34.8 chat, 44.3 code (plain: 28.9 on all three, 1.11x / 1.21x / 1.53x) | run, public tree |
-| MiMo-V2.6-Flash-MOPD, 105 GB pack, plain decode (no draft), 32K window, client temperature 0 | 4.1K / 23.7K | 594 / 613 | 25.2 to 27.8 | run, single runs |
+| MiMo-V2.6-Flash-MOPD, 105 GB pack, speculative decoding on (default), 4 bpw drafter (702 MB), `-c 32768`, client temperature 0, decode medians of 6 runs over two loads, 128 tokens | - | 32.1 prose, 34.8 chat, 44.3 code | run, public tree |
+
+## Strata and Gufo
+{{RIVALS}}
## Other engines
llama.cpp (ROCm, UD-IQ1_S 1.56 bpw, `-fa 1 -ub 2048`, no MTP), same machine: pp4096 197.9, pp16384 158.3, tg128 16.74, tg at 64K 7.19 tok/s. Coarser quant: engine and format are compared together.
-Quality against the official FP8 weights (129 held-out rows): see the model cards.
-
## Share your numbers
Start a server from the quickstart, then run `tools/bench.sh` (standard library only, `--base` and `--model` select the server). It measures prefill on a prompt of about 3.5K tokens and decode on prose, chat and code with the prompts behind the table above, and prints one Markdown block with your hardware and versions (`--json` adds the same numbers, with every run, as a JSON block).
diff --git a/doc/figures.json b/doc/figures.json
index c331338..e310f99 100644
--- a/doc/figures.json
+++ b/doc/figures.json
@@ -1,5 +1,5 @@
{
- "_comment": "Single source for the README table and the charts. null = not published/measured (left out of the chart). Qwen and MiMo: new-user recipe at commit a3ac00d. GLM: figures already published (see source). Rebuild: python3 tools/make_charts.py && python3 tools/make_readme_table.py",
+ "_comment": "Single source for the README table and the charts. null = not published/measured (left out of the chart). Qwen and MiMo: new-user recipe at commit a3ac00d. GLM: figures already published (see source). Rebuild: python3 tools/make_charts.py && python3 tools/make_readme_table.py before = previous release (same method). rivals: readme = figures published by the rival, measured = ours with the same ladder, independent = third party. quality: top-1 / KL against the FP8 original.",
"machine": "Ryzen AI Max+ 395, Radeon 8060S (gfx1151), 128 GB",
"method": "new-user install, published packs, default environment, card prompts, greedy, engine-reported prefill",
"date": "2026-10-06",
@@ -31,6 +31,22 @@
"table": {
"prefill": "1494 at 8K",
"decode": "44.5 to 59.1"
+ },
+ "before": {
+ "prefill": {
+ "8192": 1494,
+ "32768": 1478,
+ "65536": 1457,
+ "131072": 1395,
+ "262144": 1277
+ },
+ "decode": {
+ "8192": 43.4,
+ "32768": 40.2,
+ "65536": 36.7,
+ "131072": 31.9,
+ "262144": 20.4
+ }
}
},
{
@@ -56,7 +72,19 @@
"prefill": "584 at 14K",
"decode": "27.6 to 30.3"
},
- "source": "public README (Measured numbers, 99.7 GB row) and hub card yamz-labs/GLM-5.3-Flash-EXL3-Yamz, Speed section: -c 98304, hook on, agent-lane flags, MTP 2, prefill mean of 3, decode mean of 6 at temperature 0"
+ "source": "public README (Measured numbers, 99.7 GB row) and hub card yamz-labs/GLM-5.3-Flash-EXL3-Yamz, Speed section: -c 98304, hook on, agent-lane flags, MTP 2, prefill mean of 3, decode mean of 6 at temperature 0",
+ "before": {
+ "prefill": {
+ "3500": 580,
+ "14000": 584,
+ "65536": 546
+ },
+ "decode": {
+ "3500": 29.0,
+ "14000": 30.3,
+ "65536": 27.6
+ }
+ }
},
{
"id": "mimo",
@@ -78,9 +106,106 @@
"table": {
"prefill": "812 at 8K",
"decode": "29.1 to 38.9"
+ },
+ "before": {
+ "prefill": {
+ "8192": 812,
+ "32768": 698
+ },
+ "decode": {
+ "8192": 35.1,
+ "32768": 27.2
+ }
}
}
],
"headline_prompt": "chat",
- "headline_prefill_ctx": "8192"
+ "headline_prefill_ctx": "8192",
+ "rivals": {
+ "strata": {
+ "name": "Strata",
+ "version": "v0.1.40",
+ "pack": "UD-IQ4_XS",
+ "pack_gb": 93.7,
+ "repo": "https://github.com/Niko1221/Strata",
+ "source_url": "https://github.com/Niko1221/Strata/releases/tag/v0.1.40",
+ "seen": "2026-10-06",
+ "prefill_independent": {
+ "32768": 795.1,
+ "65536": 762.5,
+ "120000": 709.1
+ },
+ "independent": {
+ "lab": "Ciru Inference Lab",
+ "date": "6 October 2026",
+ "url": "https://llm.ciru.ai/strataflash/",
+ "audit_url": "https://github.com/ciru-ai/strataflash/blob/main/benchmark/advertised-prefill-audit.json",
+ "sizes": "32K, 64K and 120K tokens"
+ },
+ "decode_measured": {
+ "8192": 39.0,
+ "32768": 38.7,
+ "65536": 36.4,
+ "131072": 35.0,
+ "262144": 37.5
+ },
+ "card_measured": {
+ "chat": 46.7,
+ "prose": 41.5,
+ "code": 61.6
+ }
+ },
+ "gufo": {
+ "name": "Gufo",
+ "version": "v0.8.0",
+ "pack": "UD-Q4_K_XL",
+ "pack_gb": 111.3,
+ "repo": "https://github.com/gufo-org/gufo",
+ "source_url": "https://github.com/gufo-org/gufo/blob/main/docs/models/qwen3.8-flash-next/BENCHMARKS.md",
+ "seen": "2026-10-06",
+ "prefill_measured": {
+ "8192": 1250.5,
+ "32768": 1308.1,
+ "65536": 1289.0,
+ "131072": 1230.2
+ },
+ "decode_measured": {
+ "8192": 35.3,
+ "32768": 31.9,
+ "65536": 35.8,
+ "131072": 31.4
+ },
+ "card_measured": {
+ "chat": 37.3,
+ "prose": 32.5,
+ "code": 52.3
+ },
+ "note_256K": "the 256K prompt (about 264K tokens by Gufo's count) exceeds its 262144-token window"
+ }
+ },
+ "quality": {
+ "reference": "official FP8 release of the model",
+ "set": "200 public neutral texts, 3,084 scored positions, one scorer for all three engines, row-cluster bootstrap",
+ "positions": 3084,
+ "texts": 200,
+ "kyojin": {
+ "top1": 93.81,
+ "kl": 0.0216,
+ "kl_variation": 0.0008,
+ "pack_gb": 95.0
+ },
+ "strata": {
+ "top1": 93.64,
+ "kl": 0.0316,
+ "kl_variation": 0.0074,
+ "pack_gb": 93.7
+ },
+ "gufo": {
+ "top1": 95.36,
+ "kl": 0.0156,
+ "kl_variation": 0.0,
+ "pack_gb": 111.3
+ }
+ },
+ "method_ladder_reps": 1
}
\ No newline at end of file
diff --git a/doc/img/decode_context.svg b/doc/img/decode_context.svg
new file mode 100644
index 0000000..37aee03
--- /dev/null
+++ b/doc/img/decode_context.svg
@@ -0,0 +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: 20.4 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,214.7 256.8,222.2 339.2,230.4 421.6,241.6 504.0,268.4"/><circle cx="92.0" cy="214.7" r="5.5" fill="#9C8CFF"/><circle cx="256.8" cy="222.2" r="5.5" fill="#9C8CFF"/><circle cx="339.2" cy="230.4" r="5.5" fill="#9C8CFF"/><circle cx="421.6" cy="241.6" r="5.5" fill="#9C8CFF"/><circle cx="504.0" cy="268.4" r="5.5" fill="#9C8CFF"/><text x="504.0" y="294.4" fill="#9C8CFF" font-size="16" text-anchor="middle" font-weight="700">20.4</text><rect x="27" y="109" width="12" height="12" rx="3" fill="none" stroke="#9C8CFF" stroke-width="2.5" stroke-dasharray="4 3"/><text x="48" y="120" fill="#F4F2EC" font-size="16" text-anchor="start" font-weight="400">Kyojin, previous release</text><polyline fill="none" stroke="#9C8CFF" stroke-width="4" stroke-linejoin="round" stroke-linecap="round" stroke-dasharray="8 7" points="92.0,214.7 256.8,222.2 339.2,230.4 421.6,241.6 504.0,268.4"/><circle cx="92.0" cy="214.7" r="5.5" fill="#9C8CFF"/><circle cx="256.8" cy="222.2" r="5.5" fill="#9C8CFF"/><circle cx="339.2" cy="230.4" r="5.5" fill="#9C8CFF"/><circle cx="421.6" cy="241.6" r="5.5" fill="#9C8CFF"/><circle cx="504.0" cy="268.4" r="5.5" fill="#9C8CFF"/><rect x="26" y="130" width="14" height="14" rx="3" fill="#E8745C"/><text x="48" y="142" 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="152" width="14" height="14" rx="3" fill="#8FA3C4"/><text x="48" y="164" 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
diff --git a/doc/img/prefill_context.svg b/doc/img/prefill_context.svg
new file mode 100644
index 0000000..ca3cd91
--- /dev/null
+++ b/doc/img/prefill_context.svg
@@ -0,0 +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,277 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,211.4 256.8,212.5 339.2,214.0 421.6,218.3 504.0,226.6"/><circle cx="92.0" cy="211.4" r="5.5" fill="#9C8CFF"/><circle cx="256.8" cy="212.5" r="5.5" fill="#9C8CFF"/><circle cx="339.2" cy="214.0" r="5.5" fill="#9C8CFF"/><circle cx="421.6" cy="218.3" r="5.5" fill="#9C8CFF"/><circle cx="504.0" cy="226.6" r="5.5" fill="#9C8CFF"/><text x="504.0" y="252.61" fill="#9C8CFF" font-size="16" text-anchor="middle" font-weight="700">1,277</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
diff --git a/tools/make_charts.py b/tools/make_charts.py
index 6d8115d..74370c0 100644
--- a/tools/make_charts.py
+++ b/tools/make_charts.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
"""Build the README charts (SVG, standard library only) from doc/figures.json.
usage: python3 tools/make_charts.py [figures.json] [out_dir]
-Two line charts, one idea each: prefill against context length (log scale), and speculative decode by kind of text (higher is better).
+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.
A model without published values is listed in the legend and not drawn."""
import json, sys, os
@@ -24,11 +24,12 @@ def frame(headline, sub):
return (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}"/>'
+ t(26, 44, headline, 25, TXT, "start", "700") + t(26, 70, sub, 16, SUB)), W, H
-def draw(key, headline, footer, xs, label, pos, getter, note=None):
- """xs: sorted x keys; pos: x key -> pixel; getter(model) -> {x key: value}. Models without points get a muted legend line."""
+def 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}].
+ A series without points gets a muted legend line and is not drawn."""
s, W, H = frame(headline, "Higher is better.")
x0, x1, y0, y1 = 64, W - 28, 176, 316
- vals = [v for m in M for v in getter(m).values() if v]
+ vals = [v for se in series for v in se["pts"].values() if v]
top = max(vals) * 1.15 if vals else 100
step = next(st for st in (5, 10, 20, 50, 100, 200, 250, 500) if top / st <= 4)
top = step * -(-top // step)
@@ -37,18 +38,29 @@ def draw(key, headline, footer, xs, label, pos, getter, note=None):
s += f'<line x1="{x0}" x2="{x1}" y1="{y}" y2="{y}" stroke="{GRID}"/>' + t(x0 - 10, y + 5, f"{v:,.0f}", 15, SUB, "end")
px = pos(x0 + 28, x1 - 28)
for c in xs: s += t(px[c], y1 + 28, label(c), 16, SUB, "middle")
- for i, m in enumerate(M):
- col = COL[m["id"]]; g = getter(m)
+ for i, se in enumerate(series):
+ col = se["color"]; g = se["pts"]
pts = [(px[c], y1 - (y1 - y0) * g[c] / top, g[c]) for c in xs if g.get(c)]
ly = 98 + 22 * i
- txt = SHORT[m["id"]] + ("" if pts else " (" + (note or "see table") + ")")
- s += f'<rect x="26" y="{ly-12}" width="14" height="14" rx="3" fill="{col if pts else GRID}"/>' + t(48, 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" points="{" ".join(f"{a:.1f},{b:.1f}" for a, b, _ in pts)}"/>'
+ txt = 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)
+ 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.5" fill="{col}"/>'
- if k in (0, len(pts) - 1): s += t(a, b - 12, fmt(v), 16, col, "middle", "700")
+ 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")
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}."""
+ return draw_lines(headline, footer, xs, label, pos,
+ [{"name": SHORT[m["id"]], "color": COL[m["id"]], "pts": getter(m)} for m in M], note)
+
def prefill_chart():
ticks = [4096, 8192, 16384, 32768, 65536, 131072, 262144]
allx = sorted({int(c) for m in M for c, v in m["prefill"].items() if v})
@@ -67,6 +79,38 @@ def decode_chart():
foot = "Speculative decode by kind of text; same machine, 128 GB."
return draw("decode", head, foot, kinds, str.capitalize, pos, lambda m: {k: v for k, v in m["spec"].items() if v}, "per context in the table")
+def prefill_context_chart():
+ """Prefill against context length: Kyojin and the rivals where a figure exists (Strata by the independent lab, Gufo measured by us)."""
+ 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}]
+ 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})
+ 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
+ head = f"Qwen prefill: {fmt(pts[cmax])} tok/s at {ck(cmax)}" if pts else "Qwen prefill by context"
+ foot = "Prompt tokens per second against context; same machine, 128 GB."
+ return draw_lines(head, foot, xs, lambda c: ck(c) if c in ticks else "", pos, series)
+
+def decode_context_chart():
+ """Speculative decode against context length: Kyojin now and before, and the rivals where a figure exists at that context."""
+ q = M[0]; R = F.get("rivals", {})
+ ticks = [8192, 16384, 32768, 65536, 131072, 262144]
+ 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"]), "below": True, "first_label": False}]
+ if q.get("before"): series.append({"name": "Kyojin, previous release", "color": COL["qwen"], "pts": ints(q["before"]["decode"]), "dash": True})
+ 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})
+ pts = ints(q["decode"]); cmax = max(pts) if pts else 0
+ head = 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."
+ return draw_lines(head, foot, ticks, lambda c: ck(c), pos, series)
+
os.makedirs(out, exist_ok=True)
-for name, svg in (("prefill", prefill_chart()), ("decode", decode_chart())): open(os.path.join(out, name + ".svg"), "w").write(svg)
+for name, svg in (("prefill", prefill_chart()), ("decode", decode_chart()), ("decode_context", decode_context_chart()), ("prefill_context", prefill_context_chart())): open(os.path.join(out, name + ".svg"), "w").write(svg)
print("wrote", out)
diff --git a/tools/make_readme_table.py b/tools/make_readme_table.py
index db80bdb..982d6e6 100644
--- a/tools/make_readme_table.py
+++ b/tools/make_readme_table.py
@@ -1,16 +1,53 @@
#!/usr/bin/env python3
-"""Fill the {{TABLE}} field of README.md and doc/benchmarks.md from doc/figures.json.
+"""Fill the {{TABLE}}, {{GLM}}, {{RIVALS}} and {{LADDER}} fields of README.md and doc/benchmarks.md from doc/figures.json.
Templates: README.tmpl.md, doc/benchmarks.tmpl.md. usage: python3 tools/make_readme_table.py"""
import json, os
root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
F = json.load(open(os.path.join(root, "doc", "figures.json"))); HP, HC = F["headline_prompt"], F["headline_prefill_ctx"]
def f(v): return "n/a" if v is None else (f"{v:.1f}" if v < 100 else f"{v:.0f}")
+def ck(c): return f"{int(c) // 1024}K"
rows = "".join(f'<tr><td><b>{m["name"]}</b></td><td align="right">{m["pack_gb"]:g} GB</td><td align="right">{m["table"]["prefill"]}</td><td align="right"><b>{m["table"]["decode"]}</b></td></tr>\n' for m in F["models"])
table = ('<table align="center">\n<tr><th align="left">Model</th><th>Pack</th><th>Prefill</th><th>Speculative decode</th></tr>\n' + rows + '</table>')
CT = sorted({int(c) for m in F["models"] if m["id"] != "glm" for c in m["prefill"]})
+in_main = [m for m in F["models"] if all(int(c) in CT for c in m["prefill"])]
def row(m): return f'| {m["name"]} | {m["pack_gb"]:g} GB | ' + " | ".join(f(m["prefill"].get(str(c))) if str(c) in m["prefill"] else "-" for c in CT) + f' | {f(m["spec"]["prose"])} | {f(m["spec"]["chat"])} | {f(m["spec"]["code"])} |\n'
-full = "| Model | Pack | " + " | ".join(f"Prefill {c//1024}K" for c in CT) + " | Spec prose | Spec chat | Spec code |\n|" + "---|" * (len(CT) + 5) + "\n" + "".join(row(m) for m in F["models"] if m["id"] != "glm")
+full = "| Model | Pack | " + " | ".join(f"Prefill {ck(c)}" for c in CT) + " | Spec prose | Spec chat | Spec code |\n|" + "---|" * (len(CT) + 5) + "\n" + "".join(row(m) for m in in_main)
+
+glm = next(m for m in F["models"] if m["id"] == "glm")
+if glm in in_main:
+ glm_block = ""
+else:
+ cs = sorted(int(c) for c in glm["prefill"])
+ glm_block = ("## GLM-5.3-Flash\n\nThe GLM figures were published before this page and are quoted as published (99.7 GB pack, MTP with 2 drafts, `-c 98304`, hook on with the agent-lane server flags, prefill mean of 3, decode mean of 6, temperature 0):\n\n"
+ "| Context | Prefill tok/s | Decode tok/s |\n|---|---|---|\n" + "".join(f'| {f"{round(c / 1024)}K" if c >= 4096 else "3.5K"} | {f(glm["prefill"][str(c)])} | {f(glm["decode"][str(c)])} |\n' for c in cs)
+ + "\nAt temperature 1.0 and top-p 0.95 decode is 26.0 / 28.5 / 26.4 tok/s. These GLM figures were not re-run with the new-user recipe above, so they are left out of the by-text-kind decode chart.\n")
+
+def rivals():
+ R = F.get("rivals")
+ if not R: return "Comparison with other engines: not in this version of the figures file.\n"
+ q = F["models"][0]; S, G = R["strata"], R["gufo"]; Q = F["quality"]
+ cols = [8192, 32768, 65536, 131072, 262144]
+ def cell(d, c): return f(d[str(c)]) if d.get(str(c)) else "-"
+ head = "| tok/s | " + " | ".join(ck(c) for c in cols) + " |\n|---|" + "---|" * len(cols) + "\n"
+ def line(name, d): return f"| {name} | " + " | ".join(cell(d, c) for c in cols) + " |\n"
+ pre = head + line(f"Kyojin", q["prefill"]) + line(f"{G['name']} {G['version']}, measured by us", G["prefill_measured"])
+ dec = head + line("Kyojin", q["decode"]) + line(f"{G['name']}, measured by us", G["decode_measured"]) + line(f"{S['name']}, measured by us", S["decode_measured"])
+ ind = S["independent"]; ip = S["prefill_independent"]
+ out = ("Same machine, one method for every engine we ran: non-thinking chat, an essay request on cold prompts of 8K to 256K tokens, 256 greedy tokens, speculation on, engine-reported prefill. Rival figures are the ones we measured on our machine, with " + f"{S['name']} {S['version']} ({S['pack']} pack) and {G['name']} {G['version']} ({G['pack']} pack)" + ", plus the independent test cited below. Each project also publishes its own figures, on its own machine and with its own method: " + f"[{S['name']}]({S['source_url']}), [{G['name']}]({G['source_url']})" + ".\n\n"
+ "### Prefill\n\n![Prefill against context](img/prefill_context.svg)\n\n" + pre + "\n"
+ f"{S['name']} prefill, independent measurement by {ind['lab']} ([report]({ind['url']}), {ind['date']}; cold prompts of {ind['sizes']}; a different machine and different prompts; the lab states that it did not reproduce the publisher's exact workload and that the cause of the gap is not established): " + " / ".join(f(ip[k]) for k in ("32768", "65536", "120000")) + " tok/s at 32K / 64K / 120K.\n\n"
+ "### Speculative decode\n\n![Speculative decode against context](img/decode_context.svg)\n\n" + dec + "\n"
+ f"Card prompts (chat / prose / code): Kyojin {f(q['spec']['chat'])} / {f(q['spec']['prose'])} / {f(q['spec']['code'])}; {G['name']} {f(G['card_measured']['chat'])} / {f(G['card_measured']['prose'])} / {f(G['card_measured']['code'])}; {S['name']} {f(S['card_measured']['chat'])} / {f(S['card_measured']['prose'])} / {f(S['card_measured']['code'])} (measured by us, client-timed). {G['name']} could not take the 256K prompt: " + G["note_256K"] + ".\n\n"
+ "### Fidelity to the original model\n\n"
+ f"Top-1 agreement and KL divergence against the official FP8 release: {Q['texts']} public neutral texts, {Q['positions']} scored positions, fixed-seed points, one scorer for all three engines, row-cluster bootstrap. The rival engines were patched only to write out their top-20 log-probabilities; their GGUF packs come from the BF16 weights. Run-to-run variation is the KL between two runs of the same engine on the same points.\n\n"
+ "| Engine | Pack | Top-1 | KL | KL run-to-run |\n|---|---|---|---|---|\n"
+ + "".join(f"| {n} | {Q[k]['pack_gb']:g} GB | {Q[k]['top1']:.2f} % | {Q[k]['kl']:.4f} | {Q[k]['kl_variation']:.4f} |\n" for n, k in (("Kyojin", "kyojin"), (S["name"], "strata"), (G["name"], "gufo")))
+ + f"\nSources: [{S['name']}]({S['source_url']}) (v{S['version'].lstrip('v')}, seen {S['seen']}), [{G['name']}]({G['source_url']}) ({G['version']}, seen {G['seen']}). Scripts, prompts and raw outputs are in the repository.\n")
+ return out
+
+reps = F.get("method_ladder_reps", 1)
+ladder = "one request per depth" if reps == 1 else f"median of {reps} requests per depth"
for tmpl, dst, tb in (("README.tmpl.md", "README.md", table), ("doc/benchmarks.tmpl.md", "doc/benchmarks.md", full)):
- s = open(os.path.join(root, tmpl)).read().replace("{{TABLE}}", tb)
+ s = open(os.path.join(root, tmpl)).read().replace("{{TABLE}}", tb).replace("{{GLM}}", glm_block).replace("{{RIVALS}}", rivals()).replace("{{LADDER}}", ladder)
open(os.path.join(root, dst), "w").write(s)
print("ok")