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.

README refresh per platform with 1.8.9 numbers (#141)

Yaniss Amazouz375e9dac6790
diff --git a/README.md b/README.md
index ccc8533..a7dd0d7 100644
--- a/README.md
+++ b/README.md
@@ -1,107 +1,91 @@
<p align="center"><img src="assets/yamz-banner.svg" alt="Yamz" width="640"></p>
<p align="center">
-Open source. Our own quantised builds of GLM and Qwen. Built on <a href="https://github.com/turboderp-org/exllamav3">ExLlamaV3</a>, with speculative decoding, for 100 GB-class models in 128 GB.</p>
+Open source. Our own quantised builds of GLM, Qwen, MiMo, DeepSeek, Flint and Nanbeige. Built on <a href="https://github.com/turboderp-org/exllamav3">ExLlamaV3</a>, with speculative decoding, for 100 GB-class models in 128 GB and 30 B-class models in 24 GB.</p>
<p align="center">
<a href="LICENSE"><img alt="MIT" src="https://img.shields.io/badge/licence-MIT-444444"></a>
-<img alt="gfx1151" src="https://img.shields.io/badge/AMD-gfx1151%20%7C%20ROCm%207-444444">
+<img alt="AMD" src="https://img.shields.io/badge/AMD-gfx1151%20%7C%20ROCm%207-444444">
+<img alt="NVIDIA" src="https://img.shields.io/badge/NVIDIA-RTX%203090%20%7C%20CUDA-444444">
+<img alt="Apple" src="https://img.shields.io/badge/Apple-M3%20Ultra%20%7C%20MLX-444444">
<img alt="Python" src="https://img.shields.io/badge/python-3.12-444444">
<a href="https://huggingface.co/yamz-labs"><img alt="Hugging Face" src="https://img.shields.io/badge/weights-Hugging%20Face-444444"></a>
<a href="https://x.com/YamzLabs"><img alt="X" src="https://img.shields.io/badge/news-%40YamzLabs-444444"></a>
</p>
-<table align="center">
-<tr><th align="left">Model</th><th>Pack</th><th>Prefill</th><th>Speculative decode</th></tr>
-<tr><td><b>Qwen3.8-Flash-Next</b></td><td align="right">95 GB</td><td align="right">1480 at 8K<sup>1</sup></td><td align="right"><b>47.5 to 73.2</b></td></tr>
-<tr><td><b>GLM-5.3-Flash</b></td><td align="right">99.73 GB</td><td align="right">652 at 8K</td><td align="right"><b>27.4 to 36.8</b></td></tr>
-<tr><td>MiMo-V2.6-Flash <sub>(1.5)</sub></td><td align="right">105.8 GB</td><td align="right">760 at 8K</td><td align="right">28.9 to 37.0</td></tr>
-<tr><td>DeepSeek-V4.1-Flash <sub>(experimental, SSD tier)</sub></td><td align="right">185 GB</td><td align="right">187 to 257 at 8K</td><td align="right">5 to 11 <sub>(plain)</sub></td></tr>
-</table>
-
-
-<p align="center"><sub>Tokens per second on one Ryzen AI Max+ 395 with 128 GB. Prefill at the context shown in each cell, speculative decode across chat, prose and code prompts. DeepSeek-V4.1-Flash is larger than memory: most experts are read from the NVMe (about 3 GB/s), so its prefill is warm/cold and its decode is plain decoding on real sessions; a tool turn of about 2K tokens waits 21 to 35 s for the first token. Details: <a href="doc/DS41.md#speed">doc/DS41.md</a>. Method, sources and full tables: <a href="doc/benchmarks.md">doc/benchmarks.md</a>.<br><sup>1</sup> Flash-Next prefill is measured with its 24.4 GiB n-gram table streamed from disk (the default since 1.7.0, saves ~22 GiB of RAM). RAM placement (<code>EXL3_NGRAM_STREAM=0</code>) gives about 1580 and costs those 22 GiB; releases up to 1.6 placed it in RAM automatically, which is where the earlier 1621 came from.</sub></p>
-
-<p align="center">
-<img src="doc/img/prefill.svg" alt="Prefill speed against context length" width="49%">
-<img src="doc/img/decode_models.svg" alt="Speculative decode speed against context length" width="49%">
-</p>
-
-<p align="center"><b>Long context: up to 500K tokens</b></p>
+Kyojin serves large language models on three kinds of machine. Pick yours.
-<table align="center">
-<tr><th align="left">Model</th><th>128K</th><th>256K</th><th>500K</th></tr>
-<tr><td><b>Qwen3.8-Flash-Next</b></td><td align="right">1505 / 54.8</td><td align="right">1399 / 46.9</td><td align="right">1224 / 48.1</td></tr>
-<tr><td><b>GLM-5.3-Flash</b></td><td align="right">649 / 30.8</td><td align="right">619 / 34.3</td><td align="right">567 / 26.4</td></tr>
-</table>
+## Summary
-<p align="center"><sub>Prefill / speculative decode, tokens per second, Kyojin 1.5.10 on one Ryzen AI Max+ 395 with 128 GB. One real document read as a growing prompt (500K = 499,712 tokens); prefill as reported by the server. Both models recalled two facts hidden at 40 % and 85 % of a ~500K-token prompt (needle test, Kyojin 1.5.3, 15/10).</sub></p>
+Tokens per second, served through the real server with real text. Each row says its Kyojin version, date and machine.
-500K needs <code>-c 524288</code> at launch. Qwen also needs <code>--cache-bits 8</code>: past 262K it uses the 8-bit cache.
+| Machine | Best model | Prefill | Decode | Kyojin | Date |
+|---|---|---|---|---|---|
+| [Strix Halo](#strix-halo-amd), Ryzen AI Max+ 395, 128 GB | Qwen3.8-Flash-Next | 1480 at 8K | 52.2 at 8K | 1.8.9 (prefill), 1.5.10 (decode) | 2026-11-04, 2026-10-17 |
+| [RTX 3090](#rtx-nvidia), 24 GB | Qwen3.8-27B | 1621 at 5K | 74.6 at 5K | 1.8.9 | 2026-11-04 |
+| [RTX 3090](#rtx-nvidia), 24 GB | Flint V1 | 6282 at 4K | 133.5 at 4K | 1.5.10 | before 2026-11-04 |
+| [Mac Studio](#mac-apple-silicon), M3 Ultra, 256 GB | DeepSeek V4.1 Flash | 3001 at 8K | 62 at 8K | 1.8.9 | 2026-11-04 |
-## Made with our models
+Decode on Strix Halo and RTX uses speculative decoding. Full tables and method are on the platform pages.
-One prompt each, written by the model running on Kyojin and published as it came out. [Open the gallery](https://yamz-labs.github.io/gallery/).
-
-<table align="center">
-<tr><td align="center" width="33%"><a href="https://yamz-labs.github.io/gallery/#pagoda"><img src="doc/img/gallery/glm-pagoda.webp" alt="Voxel pagoda, GLM-5.3-Flash"></a><br><sub><b>Voxel pagoda</b><br>GLM-5.3-Flash</sub></td><td align="center" width="33%"><a href="https://yamz-labs.github.io/gallery/#pagoda"><img src="doc/img/gallery/qwen-pagoda.webp" alt="Voxel pagoda, Qwen3.8-Flash-Next"></a><br><sub><b>Voxel pagoda</b><br>Qwen3.8-Flash-Next</sub></td><td align="center" width="33%"><a href="https://yamz-labs.github.io/gallery/#pagoda"><img src="doc/img/gallery/mimo-pagoda.webp" alt="Voxel pagoda, MiMo-V2.6-Flash"></a><br><sub><b>Voxel pagoda</b><br>MiMo-V2.6-Flash</sub></td></tr>
-</table>
-
-**Uncensored mode.** Each model has an optional mode that makes it refuse far less. The engine applies it at load and the weights stay untouched: ready-made packs for [GLM-5.3-Flash](https://huggingface.co/yamz-labs/GLM-5.3-Flash-EXL3-Yamz-Uncensored) and [MiMo-V2.6-Flash](https://huggingface.co/yamz-labs/MiMo-V2.6-Flash-MOPD-EXL3-Yamz-Uncensored), and a preset inside the [Qwen3.8-Flash-Next pack](https://huggingface.co/yamz-labs/Qwen3.8-Flash-Next-EXL3-Yamz) that is off by default. How it works: [doc/refusal_hook.md](doc/refusal_hook.md).
+## Strix Halo (AMD)
-These are first versions. Speed, context length and model support keep improving.
+One Ryzen AI Max+ 395 with 128 GB runs 100 GB-class models: Qwen3.8-Flash-Next at 1480 tok/s prefill (8K) and 47.5 to 73.2 tok/s decode, GLM-5.3-Flash at 652 prefill and 27.4 to 36.8 decode (Kyojin 1.5.10, 2026-10-17; Flash-Next prefill on 1.8.9). Long context goes up to 500K tokens. DeepSeek-V4.1-Flash (763B) runs from the SSD, slowly.
-## DeepSeek-V4.1-Flash
+Tables, charts, quickstart and DeepSeek: [doc/strix.md](doc/strix.md). Install: [doc/install.md](doc/install.md).
-**Experimental.** A demonstration that a 763B model runs exactly on one 128 GB machine. It is slow and not meant for daily agent use: real decode is about 5 to 11 tokens per second, and a tool turn adding about 2K tokens takes about 20 to 35 seconds before the first token (the SSD floor is about 24 s).
+## RTX (NVIDIA)
-DeepSeek-V4.1-Flash-1017 (763B parameters, about 16B active) runs on one 128 GB machine with an NVMe: the 172 GiB EXL3 pack is larger than memory, so the engine keeps a pool of experts in RAM and reads the others from the SSD, exactly. It uses the model's own DSpark draft stages and the original Engram tables (about 190 GB, downloaded from the DeepSeek repository). Pack: [yamz-labs/DeepSeek-V4.1-Flash-EXL3-Yamz](https://huggingface.co/yamz-labs/DeepSeek-V4.1-Flash-EXL3-Yamz). Setup, SSD tier, Engram and speeds: [doc/DS41.md](doc/DS41.md).
+One RTX 3090 with 24 GB runs Qwen3.8-27B (1.8.9: 74.6 tok/s decode and 1621 prefill at 5K, 62.5 and 1118 at 150K) and Flint V1 (up to 262144 tokens of context with a 6-bit KV cache). Build: [tools/cuda/README.md](tools/cuda/README.md).
-## NVIDIA RTX 3090
+Tables, engine comparison and commands: [doc/rtx.md](doc/rtx.md).
-Kyojin also runs on NVIDIA (sm_80 and up, tested on one RTX 3090 with 24 GB). It uses the same sources as the ROCm build; the CUDA path adds a quantized-KV decode attention kernel, a Flint sliding-window ring with whole-forward CUDA graphs, a grouped MoE prefill tier, an sm_86 GEMM layout and a decode GEMV policy. Build: [tools/cuda/README.md](tools/cuda/README.md). Switches: [doc/env_vars.md](doc/env_vars.md#nvidia-cuda-sm_80).
+## Mac (Apple Silicon)
-Measured on the 3090 with real text, greedy, one user, KV cache quantized (Flint 6/6 bits, Qwen27 4/4 bits), tokens per second:
+Kyojin for Apple Silicon is a separate repository: [Yamz-Labs/kyojin-mac](https://github.com/Yamz-Labs/kyojin-mac). It runs on MLX with custom Metal kernels, serves an OpenAI-compatible API and reads GGUF, EXL3 and MLX packs.
-| model | | 4K | 16K | 32K | 64K | 128K | 256K |
-|---|---|---|---|---|---|---|---|
-| Flint V1 (3.43 bpw, 17 GiB) | decode | 133.5 | 127.0 | 122.9 | 119.5 | 102.6 | 81.3 |
-| | prefill | 6282 | 6956 | 5938 | 4449 | 2995 | 1807 |
+Kyojin 1.8.9 on a Mac Studio M3 Ultra, 256 GB, served, 2026-11-04 (from the kyojin-mac README):
-| model (server, vision on) | | 5K | 39K | 79K | 150K | 250K |
-|---|---|---|---|---|---|---|
-| Qwen3.8-27B (EXL3 4.0 bpw, MTP + n-gram) | decode | 70.6 | 65.9 | 64.3 | 55.1 | 49.9 |
-| | prefill | 1356 | 1143 | 977 | 787 | 611 |
+| Model and cell | tok/s |
+|---|---|
+| DeepSeek V4.1 Flash, prefill 8K | 3001 |
+| DeepSeek V4.1 Flash, decode at 8K | 62 |
+| DeepSeek V4.1 Flash, prefill 128K | 2681-2768 |
+| DeepSeek V4.1 Flash, decode at 128K | 57 |
+| DeepSeek V4.1 Flash, prefill at 983K | 2199-2291 |
+| DeepSeek V4.1 Flash, decode at 983K | 48-49 |
+| DeepSeek V4.1 Flash, 4 sessions, 8K, aggregate decode | 112 |
+| Qwen 35B-A3B UD-Q4_K_XL (GGUF), prefill 8K | ~7000 |
+| Qwen 35B-A3B UD-Q4_K_XL (GGUF), decode at 8K | 175 |
+| Qwen 27B NVFP4, prefill 8K | 1577-1630 |
+| Qwen 27B NVFP4, decode at 8K (no draft) | 41-43 |
-Plain decode without speculation on Qwen27: 45.6 tok/s at 4K, 41.5 at 32K, 37.2 at 128K, 32.8 at 256K. Both models fit 256K tokens of context in 24 GB (peak 21 GiB for Flint, 20.5 GiB for Qwen27 with the vision tower).
+More cells and memory use: [kyojin-mac](https://github.com/Yamz-Labs/kyojin-mac#speed).
-Run at 256K:
+## Models
-```bash
-# Flint V1: 256K with 6-bit K and V (fp16 KV fits about 131K)
-python tools/flint/serve.py --model ./flint-pack -c 262144 --kv 6,6
-# Qwen27: 256K, 4-bit K and V, vision and the MTP drafter on
-python tools/qwen/serve.py --model ./qwen27-pack -c 262144 --k-bits 4 --v-bits 4
-```
+All packs are EXL3 and live on [Hugging Face](https://huggingface.co/yamz-labs). Serve commands: [doc/models.md](doc/models.md). The Mac repository also reads GGUF and MLX packs. A cell says "not measured" when we have no served number for that machine.
-On NVIDIA both servers turn on the CUDA graph and these cache widths by default; `--kv` and `--k-bits`/`--v-bits` override them. The quantized caches are lossy: the Flint 6/6 cache measures about +9 % KL against fp16 and Qwen27 4/4 measures 1.4e-3 KL and finds the needle 3 times out of 3 at 256K (2 of 3 at 128K, the miss being a refusal wording that fp16 shares on other texts); `tools/flint/kvgate.py` and `tools/qwen/kvgate.py` rerun both checks.
+| Pack | Size | Machines | Format | Measured |
+|---|---|---|---|---|
+| [Qwen3.8-Flash-Next-EXL3-Yamz](https://huggingface.co/yamz-labs/Qwen3.8-Flash-Next-EXL3-Yamz) | 95.4 GB | Strix Halo | EXL3 | Strix: 1480 prefill at 8K |
+| [GLM-5.3-Flash-EXL3-Yamz](https://huggingface.co/yamz-labs/GLM-5.3-Flash-EXL3-Yamz) | 100.1 GB | Strix Halo | EXL3 | Strix: 652 prefill at 8K |
+| [GLM-5.3-Flash-EXL3-Yamz-Uncensored](https://huggingface.co/yamz-labs/GLM-5.3-Flash-EXL3-Yamz-Uncensored) | 100.1 GB | Strix Halo | EXL3 | not measured |
+| [MiMo-V2.6-Flash-MOPD-EXL3-Yamz](https://huggingface.co/yamz-labs/MiMo-V2.6-Flash-MOPD-EXL3-Yamz) | 105.0 GB | Strix Halo | EXL3 | Strix: 760 prefill at 8K (Kyojin 1.5) |
+| [MiMo-V2.6-Flash-MOPD-EXL3-Yamz-Uncensored](https://huggingface.co/yamz-labs/MiMo-V2.6-Flash-MOPD-EXL3-Yamz-Uncensored) | 105.0 GB | Strix Halo | EXL3 | not measured |
+| [DeepSeek-V4.1-Flash-EXL3-Yamz](https://huggingface.co/yamz-labs/DeepSeek-V4.1-Flash-EXL3-Yamz) | 184.7 GB | Strix Halo (SSD tier), Mac | EXL3 | Strix: 187 to 257 prefill at 8K; Mac: 3001 prefill, 62 decode at 8K |
+| [Flint-40B-A2.5B-EXL3-Yamz](https://huggingface.co/yamz-labs/Flint-40B-A2.5B-EXL3-Yamz) | 17.9 GB | RTX 3090 | EXL3 3.43 bpw | RTX: 6282 prefill, 133.5 decode at 4K (Kyojin 1.5.10) |
+| [Nanbeige4.3-33B-EXL3-Yamz](https://huggingface.co/yamz-labs/Nanbeige4.3-33B-EXL3-Yamz) | 18.7 GB | RTX 3090 | EXL3 4.0 bpw | not measured |
-Against other engines on the same card (same prompts, greedy, decode | prefill, tokens per second):
+**Uncensored mode.** Each model has an optional mode that makes it refuse far less. The engine applies it at load and the weights stay untouched: ready-made packs for [GLM-5.3-Flash](https://huggingface.co/yamz-labs/GLM-5.3-Flash-EXL3-Yamz-Uncensored) and [MiMo-V2.6-Flash](https://huggingface.co/yamz-labs/MiMo-V2.6-Flash-MOPD-EXL3-Yamz-Uncensored), and a preset inside the [Qwen3.8-Flash-Next pack](https://huggingface.co/yamz-labs/Qwen3.8-Flash-Next-EXL3-Yamz) that is off by default. How it works: [doc/refusal_hook.md](doc/refusal_hook.md).
-| Qwen3.8-27B | 4K | 32K | 128K | ~250K | max context |
-|---|---|---|---|---|---|
-| Kyojin, K4V4 (no speculation) | 44.6 \| 1130 | 43.0 \| 1074 | 37.6 \| 794 | 25.3 \| 582 | 262144 |
-| ExLlamaV3 upstream, K4V4 | 41.6 \| 1109 | 38.2 \| 896 | 30.2 \| 709 | 24.7 \| 524 | 262144 |
-| llama.cpp Q4_K_M, KV q4_0 | 40.5 \| 1246 | 33.9 \| 1275 | 21.6 \| 880 | 14.8 \| 628 | 262144 |
-| llama.cpp Q4_K_M, KV q8_0 | 38.7 \| - | 24.1 \| 900 | - | - | about 196K |
+## Made with our models
-| Flint V1 | 4K | 32K | 128K | ~250K | max context |
-|---|---|---|---|---|---|
-| Kyojin, KV 6/6 | 136.6 \| 4275 | 127.1 \| 4436 | 103.0 \| 2639 | 82.2 \| 1733 | 262144 |
-| llama.cpp Q3_K_XL, KV f16 | 123.1 \| 4630 | 111.3 \| 4262 | 78.5 \| 2411 | - | 131072 tested |
-| llama.cpp Q3_K_XL, KV q8_0 | 112.8 \| 4624 | 83.9 \| 4209 | 43.8 \| 2399 | 27.4 \| 1562 | 262144 |
+One prompt each, written by the model running on Kyojin and published as it came out. [Open the gallery](https://yamz-labs.github.io/gallery/).
-Kyojin leads on decode at every depth and on the context that fits; llama.cpp prefills Qwen27 10 to 19 % faster up to 32K. These two tables come from one earlier measurement session (single user, same prompts for every engine, Kyojin without the later prefill work), so the Kyojin rows are lower than in the first two tables. Weights differ between engines (EXL3 against GGUF), so quality is not compared.
+<table align="center">
+<tr><td align="center" width="33%"><a href="https://yamz-labs.github.io/gallery/#pagoda"><img src="doc/img/gallery/glm-pagoda.webp" alt="Voxel pagoda, GLM-5.3-Flash"></a><br><sub><b>Voxel pagoda</b><br>GLM-5.3-Flash</sub></td><td align="center" width="33%"><a href="https://yamz-labs.github.io/gallery/#pagoda"><img src="doc/img/gallery/qwen-pagoda.webp" alt="Voxel pagoda, Qwen3.8-Flash-Next"></a><br><sub><b>Voxel pagoda</b><br>Qwen3.8-Flash-Next</sub></td><td align="center" width="33%"><a href="https://yamz-labs.github.io/gallery/#pagoda"><img src="doc/img/gallery/mimo-pagoda.webp" alt="Voxel pagoda, MiMo-V2.6-Flash"></a><br><sub><b>Voxel pagoda</b><br>MiMo-V2.6-Flash</sub></td></tr>
+</table>
## Contributors
@@ -118,7 +102,7 @@ Thank you to everyone who tests Kyojin on their own machine and writes precise r
## Quickstart
-Install ROCm torch and build once ([doc/install.md](doc/install.md)), then:
+**Strix Halo (AMD).** Install ROCm torch and build once ([doc/install.md](doc/install.md)), then:
```bash
git clone https://github.com/Yamz-Labs/kyojin && cd kyojin
@@ -126,17 +110,29 @@ hf download yamz-labs/Qwen3.8-Flash-Next-EXL3-Yamz --local-dir ./qwen-pack
python tools/qwen/serve.py --model ./qwen-pack --port 8000 -c 131072
```
-The server speaks the OpenAI API on port 8000. GLM and MiMo commands: [doc/models.md](doc/models.md).
+**RTX (NVIDIA).** Build for CUDA once ([tools/cuda/README.md](tools/cuda/README.md)), then:
+
+```bash
+hf download yamz-labs/Flint-40B-A2.5B-EXL3-Yamz --local-dir ./flint-pack
+python tools/flint/serve.py --model ./flint-pack -c 262144 --kv 6,6
+```
+
+**Mac (Apple Silicon).** Follow the [kyojin-mac](https://github.com/Yamz-Labs/kyojin-mac#install) install, then:
+
+```bash
+python -m kyojin_mlx.serve.server /path/to/model --sessions 4 --ctx 32768 --port 8080
+```
-**Memory vs speed (Qwen3.8-Flash-Next).** The 24.4 GiB n-gram table is streamed from disk by default: about 1480 tok/s prefill at 8K and 22 GiB of RAM left free. Add `--ngram-ram` (or set `EXL3_NGRAM_STREAM=0`) to load it into RAM: about 1580 tok/s at 8K, 22 GiB more RAM used. Same switch for any PLE model; results are identical.
+Every server speaks the OpenAI API. More commands: [doc/models.md](doc/models.md).
## Read more
- [Install and first launch](doc/install.md): requirements, build, per-shell setup, first-launch tuning, [system settings for full speed](doc/install.md#system-settings-for-full-speed)
-- [Models](doc/models.md): Qwen, GLM and MiMo weights, serve commands, options
+- [Strix Halo](doc/strix.md), [RTX](doc/rtx.md) and [Mac](https://github.com/Yamz-Labs/kyojin-mac) pages
+- [Models](doc/models.md): weights, serve commands, options
- [Benchmarks](doc/benchmarks.md): how the figures are measured, where each comes from, full tables, share yours with `tools/bench.sh`
- [Troubleshooting](doc/troubleshooting.md), [refusal hook](doc/refusal_hook.md), [development](doc/development.md), [credits and licence](doc/credits.md)
-Reports and pull requests are welcome: see [CONTRIBUTING.md](CONTRIBUTING.md). Kernel notes: [README.strix-halo.md](README.strix-halo.md). Upstream guide: [README.upstream.md](README.upstream.md).
+Reports and pull requests are welcome: see [CONTRIBUTING.md](CONTRIBUTING.md). Kernel notes: [doc/strix-halo.md](doc/strix-halo.md). Upstream guide: [doc/upstream.md](doc/upstream.md).
MIT licence. Built on [ExLlamaV3](https://github.com/turboderp-org/exllamav3) by turboderp, with the first AMD ports by [vcruz305](https://github.com/vcruz305/exllamav3-amd) and [sdougbrown](https://github.com/sdougbrown/exllamav3): [full credits](doc/credits.md). News: [@YamzLabs on X](https://x.com/YamzLabs).
diff --git a/README.tmpl.md b/README.tmpl.md
deleted file mode 100644
index ebce092..0000000
--- a/README.tmpl.md
+++ /dev/null
@@ -1,124 +0,0 @@
-<p align="center"><img src="assets/yamz-banner.svg" alt="Yamz" width="640"></p>
-
-<p align="center">
-Open source. Our own quantised builds of GLM and Qwen. Built on <a href="https://github.com/turboderp-org/exllamav3">ExLlamaV3</a>, with speculative decoding, for 100 GB-class models in 128 GB.</p>
-
-<p align="center">
-<a href="LICENSE"><img alt="MIT" src="https://img.shields.io/badge/licence-MIT-444444"></a>
-<img alt="gfx1151" src="https://img.shields.io/badge/AMD-gfx1151%20%7C%20ROCm%207-444444">
-<img alt="Python" src="https://img.shields.io/badge/python-3.12-444444">
-<a href="https://huggingface.co/yamz-labs"><img alt="Hugging Face" src="https://img.shields.io/badge/weights-Hugging%20Face-444444"></a>
-<a href="https://x.com/YamzLabs"><img alt="X" src="https://img.shields.io/badge/news-%40YamzLabs-444444"></a>
-</p>
-
-{{TABLE}}
-
-
-<p align="center"><sub>Tokens per second on one Ryzen AI Max+ 395 with 128 GB. Prefill at the context shown in each cell, speculative decode across chat, prose and code prompts. DeepSeek-V4.1-Flash is larger than memory: most experts are read from the NVMe (about 3 GB/s), so its prefill is warm/cold and its decode is plain decoding on real sessions; a tool turn of about 2K tokens waits 21 to 35 s for the first token. Details: <a href="doc/DS41.md#speed">doc/DS41.md</a>. Method, sources and full tables: <a href="doc/benchmarks.md">doc/benchmarks.md</a>.</sub></p>
-
-<p align="center">
-<img src="doc/img/prefill.svg" alt="Prefill speed against context length" width="49%">
-<img src="doc/img/decode_models.svg" alt="Speculative decode speed against context length" width="49%">
-</p>
-
-{{LONG}}
-
-## Made with our models
-
-One prompt each, written by the model running on Kyojin and published as it came out. [Open the gallery](https://yamz-labs.github.io/gallery/).
-
-<table align="center">
-<tr><td align="center" width="33%"><a href="https://yamz-labs.github.io/gallery/#pagoda"><img src="doc/img/gallery/glm-pagoda.webp" alt="Voxel pagoda, GLM-5.3-Flash"></a><br><sub><b>Voxel pagoda</b><br>GLM-5.3-Flash</sub></td><td align="center" width="33%"><a href="https://yamz-labs.github.io/gallery/#pagoda"><img src="doc/img/gallery/qwen-pagoda.webp" alt="Voxel pagoda, Qwen3.8-Flash-Next"></a><br><sub><b>Voxel pagoda</b><br>Qwen3.8-Flash-Next</sub></td><td align="center" width="33%"><a href="https://yamz-labs.github.io/gallery/#pagoda"><img src="doc/img/gallery/mimo-pagoda.webp" alt="Voxel pagoda, MiMo-V2.6-Flash"></a><br><sub><b>Voxel pagoda</b><br>MiMo-V2.6-Flash</sub></td></tr>
-</table>
-
-**Uncensored mode.** Each model has an optional mode that makes it refuse far less. The engine applies it at load and the weights stay untouched: ready-made packs for [GLM-5.3-Flash](https://huggingface.co/yamz-labs/GLM-5.3-Flash-EXL3-Yamz-Uncensored) and [MiMo-V2.6-Flash](https://huggingface.co/yamz-labs/MiMo-V2.6-Flash-MOPD-EXL3-Yamz-Uncensored), and a preset inside the [Qwen3.8-Flash-Next pack](https://huggingface.co/yamz-labs/Qwen3.8-Flash-Next-EXL3-Yamz) that is off by default. How it works: [doc/refusal_hook.md](doc/refusal_hook.md).
-
-These are first versions. Speed, context length and model support keep improving.
-
-## DeepSeek-V4.1-Flash
-
-**Experimental.** A demonstration that a 763B model runs exactly on one 128 GB machine. It is slow and not meant for daily agent use: real decode is about 5 to 11 tokens per second, and a tool turn adding about 2K tokens takes about 20 to 35 seconds before the first token (the SSD floor is about 24 s).
-
-DeepSeek-V4.1-Flash-1017 (763B parameters, about 16B active) runs on one 128 GB machine with an NVMe: the 172 GiB EXL3 pack is larger than memory, so the engine keeps a pool of experts in RAM and reads the others from the SSD, exactly. It uses the model's own DSpark draft stages and the original Engram tables (about 190 GB, downloaded from the DeepSeek repository). Pack: [yamz-labs/DeepSeek-V4.1-Flash-EXL3-Yamz](https://huggingface.co/yamz-labs/DeepSeek-V4.1-Flash-EXL3-Yamz). Setup, SSD tier, Engram and speeds: [doc/DS41.md](doc/DS41.md).
-
-## NVIDIA RTX 3090
-
-Kyojin also runs on NVIDIA (sm_80 and up, tested on one RTX 3090 with 24 GB). It uses the same sources as the ROCm build; the CUDA path adds a quantized-KV decode attention kernel, a Flint sliding-window ring with whole-forward CUDA graphs, a grouped MoE prefill tier, an sm_86 GEMM layout and a decode GEMV policy. Build: [tools/cuda/README.md](tools/cuda/README.md). Switches: [doc/env_vars.md](doc/env_vars.md#nvidia-cuda-sm_80).
-
-Measured on the 3090 with real text, greedy, one user, KV cache quantized (Flint 6/6 bits, Qwen27 4/4 bits), tokens per second:
-
-| model | | 4K | 16K | 32K | 64K | 128K | 256K |
-|---|---|---|---|---|---|---|---|
-| Flint V1 (3.43 bpw, 17 GiB) | decode | 133.5 | 127.0 | 122.9 | 119.5 | 102.6 | 81.3 |
-| | prefill | 6282 | 6956 | 5938 | 4449 | 2995 | 1807 |
-
-| model (server, vision on) | | 5K | 39K | 79K | 150K | 250K |
-|---|---|---|---|---|---|---|
-| Qwen3.8-27B (EXL3 4.0 bpw, MTP + n-gram) | decode | 70.6 | 65.9 | 64.3 | 55.1 | 49.9 |
-| | prefill | 1356 | 1143 | 977 | 787 | 611 |
-
-Plain decode without speculation on Qwen27: 45.6 tok/s at 4K, 41.5 at 32K, 37.2 at 128K, 32.8 at 256K. Both models fit 256K tokens of context in 24 GB (peak 21 GiB for Flint, 20.5 GiB for Qwen27 with the vision tower).
-
-Run at 256K:
-
-```bash
-# Flint V1: 256K with 6-bit K and V (fp16 KV fits about 131K)
-python tools/flint/serve.py --model ./flint-pack -c 262144 --kv 6,6
-# Qwen27: 256K, 4-bit K and V, vision and the MTP drafter on
-python tools/qwen/serve.py --model ./qwen27-pack -c 262144 --k-bits 4 --v-bits 4
-```
-
-On NVIDIA both servers turn on the CUDA graph and these cache widths by default; `--kv` and `--k-bits`/`--v-bits` override them. The quantized caches are lossy: the Flint 6/6 cache measures about +9 % KL against fp16 and Qwen27 4/4 measures 1.4e-3 KL and finds the needle 3 times out of 3 at 256K (2 of 3 at 128K, the miss being a refusal wording that fp16 shares on other texts); `tools/flint/kvgate.py` and `tools/qwen/kvgate.py` rerun both checks.
-
-Against other engines on the same card (same prompts, greedy, decode | prefill, tokens per second):
-
-| Qwen3.8-27B | 4K | 32K | 128K | ~250K | max context |
-|---|---|---|---|---|---|
-| Kyojin, K4V4 (no speculation) | 44.6 \| 1130 | 43.0 \| 1074 | 37.6 \| 794 | 25.3 \| 582 | 262144 |
-| ExLlamaV3 upstream, K4V4 | 41.6 \| 1109 | 38.2 \| 896 | 30.2 \| 709 | 24.7 \| 524 | 262144 |
-| llama.cpp Q4_K_M, KV q4_0 | 40.5 \| 1246 | 33.9 \| 1275 | 21.6 \| 880 | 14.8 \| 628 | 262144 |
-| llama.cpp Q4_K_M, KV q8_0 | 38.7 \| - | 24.1 \| 900 | - | - | about 196K |
-
-| Flint V1 | 4K | 32K | 128K | ~250K | max context |
-|---|---|---|---|---|---|
-| Kyojin, KV 6/6 | 136.6 \| 4275 | 127.1 \| 4436 | 103.0 \| 2639 | 82.2 \| 1733 | 262144 |
-| llama.cpp Q3_K_XL, KV f16 | 123.1 \| 4630 | 111.3 \| 4262 | 78.5 \| 2411 | - | 131072 tested |
-| llama.cpp Q3_K_XL, KV q8_0 | 112.8 \| 4624 | 83.9 \| 4209 | 43.8 \| 2399 | 27.4 \| 1562 | 262144 |
-
-Kyojin leads on decode at every depth and on the context that fits; llama.cpp prefills Qwen27 10 to 19 % faster up to 32K. These two tables come from one earlier measurement session (single user, same prompts for every engine, Kyojin without the later prefill work), so the Kyojin rows are lower than in the first two tables. Weights differ between engines (EXL3 against GGUF), so quality is not compared.
-
-## Contributors
-
-Thank you to everyone who tests Kyojin on their own machine and writes precise reports.
-
-- [@felladrin](https://github.com/felladrin): pull requests for the GLM start-up, the GPU target lookup, the bench tool tests, the troubleshooting page, `--sessions` in the Qwen server and `tools/bench.sh --json`; bug reports, an independent benchmark and issue triage.
-- [@MangetsuC](https://github.com/MangetsuC): the GLM image path without solver searches (first image of a new size in seconds) and the dense GEMM tune primer.
-- [@nobert](https://github.com/nobert): the Prometheus `/metrics` endpoint, merged for GLM and MiMo.
-- [@morrisfamily](https://github.com/morrisfamily): benchmark report on a BOSGAME Beyond-Max.
-- [@ChrisC381](https://github.com/ChrisC381): reported the GLM difference between paired jobs.
-- [@dturini12](https://github.com/dturini12): reported streaming without `finish_reason`; fixed and confirmed.
-- [@mostlygeek](https://github.com/mostlygeek): proposal for a container setup.
-- [@kamjin3086](https://github.com/kamjin3086): benchmark of Kyojin 1.6 against another engine and the report of a host freeze at start-up; both led to fixes in 1.7.
-
-## Quickstart
-
-Install ROCm torch and build once ([doc/install.md](doc/install.md)), then:
-
-```bash
-git clone https://github.com/Yamz-Labs/kyojin && cd kyojin
-hf download yamz-labs/Qwen3.8-Flash-Next-EXL3-Yamz --local-dir ./qwen-pack
-python tools/qwen/serve.py --model ./qwen-pack --port 8000 -c 131072
-```
-
-The server speaks the OpenAI API on port 8000. GLM and MiMo commands: [doc/models.md](doc/models.md).
-
-## Read more
-
-- [Install and first launch](doc/install.md): requirements, build, per-shell setup, first-launch tuning, [system settings for full speed](doc/install.md#system-settings-for-full-speed)
-- [Models](doc/models.md): Qwen, GLM and MiMo weights, serve commands, options
-- [Benchmarks](doc/benchmarks.md): how the figures are measured, where each comes from, full tables, share yours with `tools/bench.sh`
-- [Troubleshooting](doc/troubleshooting.md), [refusal hook](doc/refusal_hook.md), [development](doc/development.md), [credits and licence](doc/credits.md)
-
-Reports and pull requests are welcome: see [CONTRIBUTING.md](CONTRIBUTING.md). Kernel notes: [README.strix-halo.md](README.strix-halo.md). Upstream guide: [README.upstream.md](README.upstream.md).
-
-MIT licence. Built on [ExLlamaV3](https://github.com/turboderp-org/exllamav3) by turboderp, with the first AMD ports by [vcruz305](https://github.com/vcruz305/exllamav3-amd) and [sdougbrown](https://github.com/sdougbrown/exllamav3): [full credits](doc/credits.md). News: [@YamzLabs on X](https://x.com/YamzLabs).
diff --git a/bench_mtp.py b/bench_mtp.py
deleted file mode 120000
index e5e1a1b..0000000
--- a/bench_mtp.py
+++ /dev/null
@@ -1 +0,0 @@
-tools/strix_halo/bench_mtp.py
\ No newline at end of file
diff --git a/doc/development.md b/doc/development.md
index 61ece2e..b309295 100644
--- a/doc/development.md
+++ b/doc/development.md
@@ -8,4 +8,4 @@ for t in tests/test_ablit_runtime_cpu.py tests/test_uncensor_bundled_cpu.py tool
Run each file separately because three files share a name (`test_serve.py`). These tests need no GPU and no built extension. GPU tests need a built extension and a free GPU.
## Build on CUDA
-The CUDA build is the upstream one and is unchanged. Install a CUDA 12.4 or newer build of PyTorch, then `pip install -r requirements.txt && pip install .`. `README.upstream.md` has the full upstream guide (wheels, PyPI, uv, Windows, architecture list, conversion tool, examples). `README.strix-halo.md` has the kernel notes and benchmark harnesses.
+The CUDA build is the upstream one and is unchanged. Install a CUDA 12.4 or newer build of PyTorch, then `pip install -r requirements.txt && pip install .`. [upstream.md](upstream.md) has the full upstream guide (wheels, PyPI, uv, Windows, architecture list, conversion tool, examples). [strix-halo.md](strix-halo.md) has the kernel notes and benchmark harnesses.
diff --git a/doc/figures.json b/doc/figures.json
index 480f4c2..8ad4d6c 100644
--- a/doc/figures.json
+++ b/doc/figures.json
@@ -35,7 +35,7 @@
"499712": 48.1
},
"table": {
- "prefill": "1621 at 8K",
+ "prefill": "1480 at 8K<sup>1</sup>",
"decode": "47.5 to 73.2"
},
"before": {
diff --git a/doc/models.md b/doc/models.md
index ac28d86..b349290 100644
--- a/doc/models.md
+++ b/doc/models.md
@@ -37,6 +37,16 @@ Architecture: `mimo_v2` with a DFlash drafter. Pack: `yamz-labs/MiMo-V2.6-Flash-
DS41_PACK=./ds41-pack DS41_ENGRAM_DIR=./engram_fp8 DS41_DRAFT=5 tools/ds41/ds41_serve.sh
```
+## Flint-40B-A2.5B (NVIDIA)
+
+Mixture-of-experts model for coding agents, 3.43 bpw EXL3, 17.9 GB. Pack: `yamz-labs/Flint-40B-A2.5B-EXL3-Yamz`. Tested on one RTX 3090 (24 GB), 262144 tokens of context with a 6-bit KV cache. Numbers: [rtx.md](rtx.md).
+
+`hf download yamz-labs/Flint-40B-A2.5B-EXL3-Yamz --local-dir ./flint-pack`, then `python tools/flint/serve.py --model ./flint-pack -c 262144 --kv 6,6`.
+
+## Nanbeige4.3-33B (NVIDIA)
+
+Dense model for agents and coding, 4.0 bpw EXL3, 18.7 GB. Pack: `yamz-labs/Nanbeige4.3-33B-EXL3-Yamz`. Tested on one RTX 3090 (24 GB), about 77K tokens of context. The pack card has the exact `tools/qwen/serve.py` command.
+
## Options shared by the servers
- `--sessions N` (Qwen server): decode up to N requests together; the default is 1. Details and measurements: `tools/qwen/SERVE.md`.
diff --git a/doc/rtx.md b/doc/rtx.md
new file mode 100644
index 0000000..d3f8300
--- /dev/null
+++ b/doc/rtx.md
@@ -0,0 +1,54 @@
+# NVIDIA RTX 3090
+
+Kyojin also runs on NVIDIA (sm_80 and up, tested on one RTX 3090 with 24 GB). It uses the same sources as the ROCm build; the CUDA path adds a quantized-KV decode attention kernel, a Flint sliding-window ring with whole-forward CUDA graphs, a grouped MoE prefill tier, an sm_86 GEMM layout and a decode GEMV policy. Build: [tools/cuda/README.md](../tools/cuda/README.md). Switches: [doc/env_vars.md](env_vars.md#nvidia-cuda-sm_80).
+
+Machine for every table on this page: one NVIDIA RTX 3090, 24 GB. Real text, greedy, one user, KV cache quantized (Flint 6/6 bits, Qwen27 4/4 bits), tokens per second.
+
+**Flint V1.** Kyojin 1.5.10 (measured before 2026-11-04; Kyojin 1.8.9 not re-measured yet).
+
+| model | | 4K | 16K | 32K | 64K | 128K | 256K |
+|---|---|---|---|---|---|---|---|
+| Flint V1 (3.43 bpw, 17 GiB) | decode | 133.5 | 127.0 | 122.9 | 119.5 | 102.6 | 81.3 |
+| | prefill | 6282 | 6956 | 5938 | 4449 | 2995 | 1807 |
+
+**Qwen3.8-27B.** Server, vision on, MTP + n-gram. Kyojin 1.8.9, served, 2026-11-04 for 5K to 150K (1 warm-up, 1 rep; 3 reps and the median at 150K); the 250K column is Kyojin 1.5.10 (not re-measured yet).
+
+| model (server, vision on) | | 5K | 39K | 79K | 150K | 250K (1.5.10) |
+|---|---|---|---|---|---|---|
+| Qwen3.8-27B (EXL3 4.0 bpw, MTP + n-gram) | decode | 74.6 | 69.7 | 71.2 | 62.5 | 49.9 |
+| | prefill | 1621 | 1544 | 1353 | 1118 | 611 |
+
+Plain decode without speculation on Qwen27 (Kyojin 1.5.10): 45.6 tok/s at 4K, 41.5 at 32K, 37.2 at 128K, 32.8 at 256K. Both models fit 256K tokens of context in 24 GB (peak 21 GiB for Flint, 20.5 GiB for Qwen27 with the vision tower).
+
+Run at 256K:
+
+```bash
+# Flint V1: 256K with 6-bit K and V (fp16 KV fits about 131K)
+python tools/flint/serve.py --model ./flint-pack -c 262144 --kv 6,6
+# Qwen27: 256K, 4-bit K and V, vision and the MTP drafter on
+python tools/qwen/serve.py --model ./qwen27-pack -c 262144 --k-bits 4 --v-bits 4
+```
+
+On NVIDIA both servers turn on the CUDA graph and these cache widths by default; `--kv` and `--k-bits`/`--v-bits` override them. The quantized caches are lossy: the Flint 6/6 cache measures about +9 % KL against fp16 and Qwen27 4/4 measures 1.4e-3 KL and finds the needle 3 times out of 3 at 256K (2 of 3 at 128K, the miss being a refusal wording that fp16 shares on other texts); `tools/flint/kvgate.py` and `tools/qwen/kvgate.py` rerun both checks.
+
+Against other engines on the same card (Kyojin 1.5.10; same prompts, greedy, decode | prefill, tokens per second):
+
+| Qwen3.8-27B | 4K | 32K | 128K | ~250K | max context |
+|---|---|---|---|---|---|
+| Kyojin, K4V4 (no speculation) | 44.6 \| 1130 | 43.0 \| 1074 | 37.6 \| 794 | 25.3 \| 582 | 262144 |
+| ExLlamaV3 upstream, K4V4 | 41.6 \| 1109 | 38.2 \| 896 | 30.2 \| 709 | 24.7 \| 524 | 262144 |
+| llama.cpp Q4_K_M, KV q4_0 | 40.5 \| 1246 | 33.9 \| 1275 | 21.6 \| 880 | 14.8 \| 628 | 262144 |
+| llama.cpp Q4_K_M, KV q8_0 | 38.7 \| - | 24.1 \| 900 | - | - | about 196K |
+
+| Flint V1 | 4K | 32K | 128K | ~250K | max context |
+|---|---|---|---|---|---|
+| Kyojin, KV 6/6 | 136.6 \| 4275 | 127.1 \| 4436 | 103.0 \| 2639 | 82.2 \| 1733 | 262144 |
+| llama.cpp Q3_K_XL, KV f16 | 123.1 \| 4630 | 111.3 \| 4262 | 78.5 \| 2411 | - | 131072 tested |
+| llama.cpp Q3_K_XL, KV q8_0 | 112.8 \| 4624 | 83.9 \| 4209 | 43.8 \| 2399 | 27.4 \| 1562 | 262144 |
+
+Kyojin leads on decode at every depth and on the context that fits; llama.cpp prefills Qwen27 10 to 19 % faster up to 32K. These two tables come from one earlier measurement session (single user, same prompts for every engine, Kyojin without the later prefill work), so the Kyojin rows are lower than in the first two tables. Weights differ between engines (EXL3 against GGUF), so quality is not compared.
+
+
+## Quickstart
+
+Build for CUDA once ([tools/cuda/README.md](../tools/cuda/README.md)), then use the commands under "Run at 256K" above. Packs: [Flint-40B-A2.5B](https://huggingface.co/yamz-labs/Flint-40B-A2.5B-EXL3-Yamz), [Nanbeige4.3-33B](https://huggingface.co/yamz-labs/Nanbeige4.3-33B-EXL3-Yamz).
diff --git a/README.strix-halo.md b/doc/strix-halo.md
similarity index 98%
rename from README.strix-halo.md
rename to doc/strix-halo.md
index 29b1b0f..53d2dfe 100644
--- a/README.strix-halo.md
+++ b/doc/strix-halo.md
@@ -1,6 +1,6 @@
# exllamav3 on AMD Strix Halo (gfx1151)
-> **Just want to run a model?** Start with the [README](README.md) and [doc/install.md](doc/install.md). This page keeps the kernel notes of the gfx1151 port.
+> **Just want to run a model?** Start with the [README](../README.md) and [doc/install.md](install.md). This page keeps the kernel notes of the gfx1151 port.
> **This tree adds AMD GPU functionality to ExLlamaV3 that upstream does not have.** Upstream is
> CUDA-only; the `sdougbrown/exllamav3` base adds a ROCm/HIP decode path for **gfx12 (RDNA 4)**
diff --git a/doc/strix.md b/doc/strix.md
new file mode 100644
index 0000000..c1b80ba
--- /dev/null
+++ b/doc/strix.md
@@ -0,0 +1,51 @@
+# Strix Halo (AMD)
+
+Kyojin was built for this machine first: one Ryzen AI Max+ 395 with 128 GB of unified memory, ROCm 7, gfx1151. Model list: [models.md](models.md). Install: [install.md](install.md). Kernel notes: [strix-halo.md](strix-halo.md).
+
+<table align="center">
+<tr><th align="left">Model</th><th>Pack</th><th>Prefill</th><th>Speculative decode</th></tr>
+<tr><td><b>Qwen3.8-Flash-Next</b></td><td align="right">95 GB</td><td align="right">1480 at 8K<sup>1</sup></td><td align="right"><b>47.5 to 73.2</b></td></tr>
+<tr><td><b>GLM-5.3-Flash</b></td><td align="right">99.73 GB</td><td align="right">652 at 8K</td><td align="right"><b>27.4 to 36.8</b></td></tr>
+<tr><td>MiMo-V2.6-Flash <sub>(1.5)</sub></td><td align="right">105.8 GB</td><td align="right">760 at 8K</td><td align="right">28.9 to 37.0</td></tr>
+<tr><td>DeepSeek-V4.1-Flash <sub>(experimental, SSD tier)</sub></td><td align="right">185 GB</td><td align="right">187 to 257 at 8K</td><td align="right">5 to 11 <sub>(plain)</sub></td></tr>
+</table>
+
+<p align="center"><sub>Tokens per second on one Ryzen AI Max+ 395 with 128 GB (Radeon 8060S, gfx1151, ROCm). Kyojin 1.5.10, measured 2026-10-17, except the Flash-Next prefill: Kyojin 1.8.9, 2026-11-04. Prefill at the context shown in each cell, speculative decode across chat, prose and code prompts. DeepSeek-V4.1-Flash is larger than memory: most experts are read from the NVMe (about 3 GB/s), so its prefill is warm/cold and its decode is plain decoding on real sessions; a tool turn of about 2K tokens waits 21 to 35 s for the first token. Details: <a href="DS41.md#speed">DS41.md</a>. Method, sources and full tables: <a href="benchmarks.md">benchmarks.md</a>.<br><sup>1</sup> Flash-Next prefill is measured with its 24.4 GiB n-gram table streamed from disk (the default since 1.7.0, saves about 22 GiB of RAM). RAM placement (<code>EXL3_NGRAM_STREAM=0</code>) gives about 1580 and costs those 22 GiB; releases up to 1.6 placed it in RAM automatically, which is where the earlier 1621 came from.</sub></p>
+
+<p align="center">
+<img src="img/prefill.svg" alt="Prefill speed against context length" width="49%">
+<img src="img/decode_models.svg" alt="Speculative decode speed against context length" width="49%">
+</p>
+
+<p align="center"><b>Long context: up to 500K tokens</b></p>
+
+<table align="center">
+<tr><th align="left">Model</th><th>128K</th><th>256K</th><th>500K</th></tr>
+<tr><td><b>Qwen3.8-Flash-Next</b></td><td align="right">1505 / 54.8</td><td align="right">1399 / 46.9</td><td align="right">1224 / 48.1</td></tr>
+<tr><td><b>GLM-5.3-Flash</b></td><td align="right">649 / 30.8</td><td align="right">619 / 34.3</td><td align="right">567 / 26.4</td></tr>
+</table>
+
+<p align="center"><sub>Prefill / speculative decode, tokens per second, Kyojin 1.5.10 on one Ryzen AI Max+ 395 with 128 GB. One real document read as a growing prompt (500K = 499,712 tokens); prefill as reported by the server. Both models recalled two facts hidden at 40 % and 85 % of a ~500K-token prompt (needle test, Kyojin 1.5.3, 15/10).</sub></p>
+
+500K needs <code>-c 524288</code> at launch. Qwen also needs <code>--cache-bits 8</code>: past 262K it uses the 8-bit cache.
+
+## Quickstart
+
+Install ROCm torch and build once ([install.md](install.md)), then:
+
+```bash
+git clone https://github.com/Yamz-Labs/kyojin && cd kyojin
+hf download yamz-labs/Qwen3.8-Flash-Next-EXL3-Yamz --local-dir ./qwen-pack
+python tools/qwen/serve.py --model ./qwen-pack --port 8000 -c 131072
+```
+
+The server speaks the OpenAI API on port 8000. GLM and MiMo commands: [models.md](models.md).
+
+**Memory vs speed (Qwen3.8-Flash-Next).** The 24.4 GiB n-gram table is streamed from disk by default: about 1480 tok/s prefill at 8K and 22 GiB of RAM left free. Add `--ngram-ram` (or set `EXL3_NGRAM_STREAM=0`) to load it into RAM: about 1580 tok/s at 8K, 22 GiB more RAM used. Same switch for any PLE model; results are identical.
+
+## DeepSeek-V4.1-Flash
+
+**Experimental.** A demonstration that a 763B model runs exactly on one 128 GB machine. It is slow and not meant for daily agent use: real decode is about 5 to 11 tokens per second, and a tool turn adding about 2K tokens takes about 20 to 35 seconds before the first token (the SSD floor is about 24 s).
+
+DeepSeek-V4.1-Flash-1017 (763B parameters, about 16B active) runs on one 128 GB machine with an NVMe: the 172 GiB EXL3 pack is larger than memory, so the engine keeps a pool of experts in RAM and reads the others from the SSD, exactly. It uses the model's own DSpark draft stages and the original Engram tables (about 190 GB, downloaded from the DeepSeek repository). Pack: [yamz-labs/DeepSeek-V4.1-Flash-EXL3-Yamz](https://huggingface.co/yamz-labs/DeepSeek-V4.1-Flash-EXL3-Yamz). Setup, SSD tier, Engram and speeds: [DS41.md](DS41.md).
+
diff --git a/doc/strix.tmpl.md b/doc/strix.tmpl.md
new file mode 100644
index 0000000..2fe81ce
--- /dev/null
+++ b/doc/strix.tmpl.md
@@ -0,0 +1,35 @@
+# Strix Halo (AMD)
+
+Kyojin was built for this machine first: one Ryzen AI Max+ 395 with 128 GB of unified memory, ROCm 7, gfx1151. Model list: [models.md](models.md). Install: [install.md](install.md). Kernel notes: [strix-halo.md](strix-halo.md).
+
+{{TABLE}}
+
+<p align="center"><sub>Tokens per second on one Ryzen AI Max+ 395 with 128 GB (Radeon 8060S, gfx1151, ROCm). Kyojin 1.5.10, measured 2026-10-17, except the Flash-Next prefill: Kyojin 1.8.9, 2026-11-04. Prefill at the context shown in each cell, speculative decode across chat, prose and code prompts. DeepSeek-V4.1-Flash is larger than memory: most experts are read from the NVMe (about 3 GB/s), so its prefill is warm/cold and its decode is plain decoding on real sessions; a tool turn of about 2K tokens waits 21 to 35 s for the first token. Details: <a href="DS41.md#speed">DS41.md</a>. Method, sources and full tables: <a href="benchmarks.md">benchmarks.md</a>.<br><sup>1</sup> Flash-Next prefill is measured with its 24.4 GiB n-gram table streamed from disk (the default since 1.7.0, saves about 22 GiB of RAM). RAM placement (<code>EXL3_NGRAM_STREAM=0</code>) gives about 1580 and costs those 22 GiB; releases up to 1.6 placed it in RAM automatically, which is where the earlier 1621 came from.</sub></p>
+
+<p align="center">
+<img src="img/prefill.svg" alt="Prefill speed against context length" width="49%">
+<img src="img/decode_models.svg" alt="Speculative decode speed against context length" width="49%">
+</p>
+
+{{LONG}}
+
+## Quickstart
+
+Install ROCm torch and build once ([install.md](install.md)), then:
+
+```bash
+git clone https://github.com/Yamz-Labs/kyojin && cd kyojin
+hf download yamz-labs/Qwen3.8-Flash-Next-EXL3-Yamz --local-dir ./qwen-pack
+python tools/qwen/serve.py --model ./qwen-pack --port 8000 -c 131072
+```
+
+The server speaks the OpenAI API on port 8000. GLM and MiMo commands: [models.md](models.md).
+
+**Memory vs speed (Qwen3.8-Flash-Next).** The 24.4 GiB n-gram table is streamed from disk by default: about 1480 tok/s prefill at 8K and 22 GiB of RAM left free. Add `--ngram-ram` (or set `EXL3_NGRAM_STREAM=0`) to load it into RAM: about 1580 tok/s at 8K, 22 GiB more RAM used. Same switch for any PLE model; results are identical.
+
+## DeepSeek-V4.1-Flash
+
+**Experimental.** A demonstration that a 763B model runs exactly on one 128 GB machine. It is slow and not meant for daily agent use: real decode is about 5 to 11 tokens per second, and a tool turn adding about 2K tokens takes about 20 to 35 seconds before the first token (the SSD floor is about 24 s).
+
+DeepSeek-V4.1-Flash-1017 (763B parameters, about 16B active) runs on one 128 GB machine with an NVMe: the 172 GiB EXL3 pack is larger than memory, so the engine keeps a pool of experts in RAM and reads the others from the SSD, exactly. It uses the model's own DSpark draft stages and the original Engram tables (about 190 GB, downloaded from the DeepSeek repository). Pack: [yamz-labs/DeepSeek-V4.1-Flash-EXL3-Yamz](https://huggingface.co/yamz-labs/DeepSeek-V4.1-Flash-EXL3-Yamz). Setup, SSD tier, Engram and speeds: [DS41.md](DS41.md).
+
diff --git a/README.upstream.md b/doc/upstream.md
similarity index 94%
rename from README.upstream.md
rename to doc/upstream.md
index c3e4196..e9448e8 100644
--- a/README.upstream.md
+++ b/doc/upstream.md
@@ -13,31 +13,31 @@
> **Measured** on Qwen3.8-Flash-Next-EXL3 (3.05 bpw) on one gfx1151: decode **4.27 → 34.9 tok/s mean**
> (41.1 peak), perplexity unchanged at 4.2259.
>
-> 👉 **See [`README.strix-halo.md`](README.strix-halo.md)** for the AMD build instructions, env knobs,
+> 👉 **See [`strix-halo.md`](strix-halo.md)** for the AMD build instructions, env knobs,
> benchmark harnesses and measured results. The Installation section below is upstream's and is
> **CUDA-specific** — do not follow it for AMD.
>
> NVIDIA/CUDA code paths are untouched; everything here is behind `USE_ROCM` / arch guards.
<p align="center">
- <img src="doc/logo.png" width="640" alt="Llama 3.1 8B Instruct quantization benchmark across bits per weight">
+ <img src="logo.png" width="640" alt="Llama 3.1 8B Instruct quantization benchmark across bits per weight">
</p>
[Installation](#installation) · [Supported models](#architecture-support) · [Examples](#examples) · [Quantization](#exl3-quantization) · [Community](#community)
ExLlamaV3 is an inference library for running local LLMs on modern consumer GPUs, with flexible quantization and parallel inference.
-- **Quantization** - [EXL3](doc/exl3.md), based on QTIP, plus 2–8 bit cache quantization.
+- **Quantization** - [EXL3](exl3.md), based on QTIP, plus 2–8 bit cache quantization.
- **Parallel inference** - Flexible tensor-parallel and expert-parallel inference for consumer hardware setups.
- **CPU offloading** - Allows large MoE models to run with limited GPU resources. AVX2 and AVX512 support.
- **Generation** - Continuous, dynamic batching, speculative decoding, multimodal support.
-- **Integrations** - Broad [HF model support](#architecture-support), a [Transformers plugin](examples/transformers_integration.py), and an OpenAI-compatible API via [TabbyAPI](https://github.com/theroyallab/tabbyAPI/).
+- **Integrations** - Broad [HF model support](#architecture-support), a [Transformers plugin](../examples/transformers_integration.py), and an OpenAI-compatible API via [TabbyAPI](https://github.com/theroyallab/tabbyAPI/).
> [!TIP]
> **Looking for a server?** [TabbyAPI](https://github.com/theroyallab/tabbyAPI/) is the official and recommended backend server. It provides an OpenAI-compatible API for local or remote inference, HF model downloading, embedding model support, and HF Jinja2 chat templates. Its startup script manages and installs prerequisites to help you get started.
<p align="center">
- <img src="doc/qb_kld.png" width="640" alt="Llama 3.1 8B Instruct quantization benchmark across bits per weight">
+ <img src="qb_kld.png" width="640" alt="Llama 3.1 8B Instruct quantization benchmark across bits per weight">
</p>
## Installation
@@ -190,7 +190,7 @@ A number of example scripts are provided to showcase the features of the backend
For instance, a versatile CLI chatbot:
<p align="center">
- <img src="doc/chatpy.png" width="640" alt="Llama 3.1 8B Instruct quantization benchmark across bits per weight">
+ <img src="chatpy.png" width="640" alt="Llama 3.1 8B Instruct quantization benchmark across bits per weight">
</p>
```sh
@@ -274,8 +274,8 @@ The working directory is temporary storage for state checkpoints and for storing
until the converted model can be compiled. It should have enough free space to store an entire copy
of the output model.
-See the [conversion guide](doc/convert.md) for more information, or the
-[self-calibration guide](doc/optimize.md).
+See the [conversion guide](convert.md) for more information, or the
+[self-calibration guide](optimize.md).
## EXL3 quantization
@@ -284,7 +284,7 @@ SOTA quantization available to users on consumer hardware. The conversion proces
simple and efficient and requires only an input model (in HF format) and a target bitrate. By
computing Hessians on the fly and thanks to a fused Viterbi kernel, the quantizer can convert a
model in a single step, taking a couple of minutes for smaller models, up to a few hours for larger
-ones (70B+) on a single high-end consumer GPU (see the [conversion guide](doc/convert.md)).
+ones (70B+) on a single high-end consumer GPU (see the [conversion guide](convert.md)).
For more information, see the [**QTIP**](https://arxiv.org/abs/2406.11235) and [**QuIP#**](https://arxiv.org/abs/2402.04396) papers, as well as this
[excellent writeup](https://www.together.ai/blog/even-better-even-faster-quantized-llms-with-qtip) on **QTIP** from together.ai.
@@ -321,7 +321,7 @@ supporters (🐈❤️!) The following projects in particular deserve a special
- [Flash Linear Attention](https://github.com/fla-org/flash-linear-attention) (chunked linear-attention prefill kernels, vendored under `exllamav3/vendor/fla`)
<p align="center">
- <img src="doc/cat.png" width="40" alt="">
+ <img src="cat.png" width="40" alt="">
</p>
diff --git a/load_qwen.py b/load_qwen.py
deleted file mode 120000
index 1e585bc..0000000
--- a/load_qwen.py
+++ /dev/null
@@ -1 +0,0 @@
-tools/strix_halo/load_qwen.py
\ No newline at end of file
diff --git a/tools/make_readme_table.py b/tools/make_readme_table.py
index 3ee6b5e..39ea244 100644
--- a/tools/make_readme_table.py
+++ b/tools/make_readme_table.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
-"""Fill the {{TABLE}}, {{LONG}}, {{DECODE}}, {{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"""
+"""Fill the {{TABLE}}, {{LONG}}, {{DECODE}}, {{RIVALS}} and {{LADDER}} fields of doc/strix.md and doc/benchmarks.md from doc/figures.json.
+Templates: doc/strix.tmpl.md, doc/benchmarks.tmpl.md. README.md is written by hand. usage: python3 tools/make_readme_table.py"""
import json, os, re
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"]
@@ -61,7 +61,7 @@ def long_block():
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)):
+for tmpl, dst, tb in (("doc/strix.tmpl.md", "doc/strix.md", table), ("doc/benchmarks.tmpl.md", "doc/benchmarks.md", full)):
s = open(os.path.join(root, tmpl)).read().replace("{{TABLE}}", tb).replace("{{LONG}}", long_block()).replace("{{DECODE}}", dec_block).replace("{{RIVALS}}", rivals()).replace("{{LADDER}}", ladder)
open(os.path.join(root, dst), "w").write(s)
print("ok")
diff --git a/tools/pub_to_figures.py b/tools/pub_to_figures.py
index c16e796..b704381 100644
--- a/tools/pub_to_figures.py
+++ b/tools/pub_to_figures.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-"""Turn the publication measurements into doc/figures.json, then regenerate the charts and the README tables.
+"""Turn the publication measurements into doc/figures.json, then regenerate the charts and the doc tables.
Inputs, in the --scratch directory:
curve_{glm,qwen}_c272384.json served depth curve: points["8192"].."262144" (timings, usage)
@@ -175,7 +175,7 @@ def main(argv=None):
ap.add_argument("--keep-card", action="store_true",
help="do not read bench_*.md: keep the published card values (spec, decode range); date = curve date")
ap.add_argument("--skip-500k", action="store_true", help="do not read the 500K curves (partial dry run)")
- ap.add_argument("--root", default=ROOT, help="repository root (doc/figures.json, tools/, README templates)")
+ ap.add_argument("--root", default=ROOT, help="repository root (doc/figures.json, tools/, doc templates)")
ap.add_argument("--commit", help="short hash of the measured commit (default: git HEAD of --root)")
ap.add_argument("--dry-run", action="store_true", help="print the diff of doc/figures.json; write nothing")
ap.add_argument("--no-render", action="store_true", help="update figures.json only; skip the charts and tables")
diff --git a/tools/strix_halo/prompt_sweep.py b/tools/strix_halo/prompt_sweep.py
index 3e32025..7e79c12 100644
--- a/tools/strix_halo/prompt_sweep.py
+++ b/tools/strix_halo/prompt_sweep.py
@@ -47,7 +47,7 @@ print(f"{'tok/s':>8} {'accept':>8} prompt")
print("-" * 78)
for p in PROMPTS:
r = subprocess.run(
- [str(REPO / ".venv/bin/python"), str(REPO / "bench_mtp.py")] + args + ["-p", p],
+ [str(REPO / ".venv/bin/python"), str(REPO / "tools/strix_halo/bench_mtp.py")] + args + ["-p", p],
capture_output=True, text=True, env=env, timeout=1800)
out = r.stdout + r.stderr
m = re.search(r"decode:\s+([0-9.]+) tok/s", out)
diff --git a/tools/test_pub_to_figures.py b/tools/test_pub_to_figures.py
index 40aa68a..e9023f7 100644
--- a/tools/test_pub_to_figures.py
+++ b/tools/test_pub_to_figures.py
@@ -27,7 +27,7 @@ def make_root(tmp_path):
for name in ("make_charts.py", "make_readme_table.py", "pub_to_figures.py"):
shutil.copy(os.path.join(HERE, name), root / "tools" / name)
shutil.copy(os.path.join(FIX, "figures.json"), root / "doc" / "figures.json")
- shutil.copy(os.path.join(ROOT, "README.tmpl.md"), root / "README.tmpl.md")
+ shutil.copy(os.path.join(ROOT, "doc", "strix.tmpl.md"), root / "doc" / "strix.tmpl.md")
shutil.copy(os.path.join(ROOT, "doc", "benchmarks.tmpl.md"), root / "doc" / "benchmarks.tmpl.md")
return root
@@ -60,7 +60,7 @@ def test_dry_run_prints_diff_and_writes_nothing(tmp_path, capsys):
rc = p2f.main(["--root", str(root), "--scratch", str(scratch), "--commit", "abc1234", "--dry-run"])
assert rc == 0
assert (root / "doc" / "figures.json").read_text(encoding="utf-8") == before
- assert not (root / "README.md").exists() and not (root / "doc" / "img").exists()
+ assert not (root / "doc" / "strix.md").exists() and not (root / "doc" / "img").exists()
out = capsys.readouterr().out
assert out.startswith("--- a/doc/figures.json")
assert '+ "commit": "abc1234",' in out
@@ -91,7 +91,7 @@ def test_writes_schema_and_renders(tmp_path, capsys):
assert F["rivals"] == old["rivals"] and F["quality"] == old["quality"]
# the renderers ran
assert (root / "doc" / "img" / "prefill.svg").exists()
- assert "1502 at 8K" in (root / "README.md").read_text(encoding="utf-8")
+ assert "1502 at 8K" in (root / "doc" / "strix.md").read_text(encoding="utf-8")
assert "wrote" in capsys.readouterr().out