Files
strata/docs/GYRO.md
T
Laurent 926171c779 docs/GYRO.md: 2026-10-03 results (5090 #2, Gyro-M, 3090, AMD smoke); fix Gyro-S size
Gyro-S is 58.5 GB (54.5 GiB). Gyro-M and AMD have now run end to end;
long-prompt prefill is measured. The measured section now has the int8
decode numbers (rc1 includes them and --prefill auto), the server
protocol, Gyro-M and the 24 GB RTX 3090; the cache-size rows stay,
labelled as the 2026-10-02 build.

Ported from agentionai/Strata rc2 c494121 (rc2 = 9ff02c9), author Laurent.
2026-10-15 21:31:20 +02:00

7.9 KiB

Gyro (agentionai rotor quants) on Strata

Validated on Linux with an RTX 5090 (32 GB, CUDA 13.0, sm_120; 2026-10-02 and 2026-10-03) and an RTX 3090 (24 GB, sm_86; 2026-10-03). A short end-to-end run on AMD (Strix Halo, gfx1151, ROCm) passed on 2026-10-03.

The targets are the published files of agentionai/Qwen3.8-Flash-Next-Gyro-GGUF, used unchanged:

File Experts GPU memory for the experts Status
Qwen3.8-Flash-Next-Gyro-S-TQ1_0.gguf (58.5 GB) TQK6 gate/up, TQK7 down, block-128 Hadamard 24.0 GiB validated end to end (RTX 5090, RTX 3090)
Qwen3.8-Flash-Next-Gyro-M-TQ2_0.gguf (92.0 GB) TQ2_T, block-128 Hadamard 29.9 GiB validated end to end (RTX 5090, RTX 3090); the experts do not all fit a 32 GB card, auto streams the rest

Both files carry their own experts in the trellis types TQ2_T/TQK6/TQK7 and record the activation rotation in prism.hadamard.* metadata. Strata reads both natively (set STRATA_APR=1). About half of each file is the n-gram (PLE) table, which stays on disk and is read row by row; it is not loaded into RAM or VRAM.

The draft head is Strata's own MTP runtime, prepared from the original model's MTP weights as for the other Qwen3.8-Flash-Next models. It is not the GGUF draft file from the Gyro repository.

Quick setup

Gyro support lives on the rc1 branch of the agentionai fork:

git clone -b rc1 https://github.com/agentionai/Strata && cd Strata

tools/gyro_setup.sh does every step below on Linux:

tools/gyro_setup.sh --model S --backend cuda --cuda-arch 120       # RTX 50 series
tools/gyro_setup.sh --model S --backend cuda --cuda-arch 89        # RTX 40 series
tools/gyro_setup.sh --model S --backend hip  --hip-arch gfx1201    # Radeon RX 9070 / AI PRO R9700 (experimental)

It prints the command that starts the server. The steps, by hand:

1. Build

Strata's GGML dependency must be the agentionai llama.cpp fork, which has the trellis types:

git clone --depth 1 https://github.com/agentionai/llama.cpp ../agention-llama.cpp
# NVIDIA. RTX 50 series: use CUDA 13 (CUDA 12.8 crashes the prompt path on sm_120: issues #220, #224)
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON \
  -DCMAKE_CUDA_ARCHITECTURES=120 -DSTRATA_GGML_DIR=$PWD/../agention-llama.cpp
# AMD (experimental: kernel parity validated on gfx1151, plus a short end-to-end run there)
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_HIP=ON -DSTRATA_PREFILL_MMQ=ON \
  -DCMAKE_HIP_ARCHITECTURES=gfx1201 -DSTRATA_GGML_DIR=$PWD/../agention-llama.cpp
cmake --build build -j
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt

2. Download and pack

.venv/bin/pip install huggingface_hub hf_transfer
HF_HUB_ENABLE_HF_TRANSFER=1 .venv/bin/hf download agentionai/Qwen3.8-Flash-Next-Gyro-GGUF \
  Qwen3.8-Flash-Next-Gyro-S-TQ1_0.gguf --local-dir models
STRATA_GGUF_PY=../agention-llama.cpp/gguf-py .venv/bin/python tools/iq_pack.py \
  --gguf models/Qwen3.8-Flash-Next-Gyro-S-TQ1_0.gguf --out packs/gyro-s --compat-bf16
build/native_expert_parity --load-check packs/gyro-s models/Qwen3.8-Flash-Next-Gyro-S-TQ1_0.gguf

The pack is 1.5 GB (dense weights, tokenizer, the Hadamard and expert tables); the experts are read from the GGUF. Keep the GGUF on a fast local SSD: the n-gram table is read from it for every token. --load-check must end with 0 failures.

3. Draft head

.venv/bin/python tools/mtp_fetch.py fetch --out mtp
.venv/bin/python tools/mtp_pack.py --src mtp --experts q2_0 --out mtp/mtp-q2_0.gguf
.venv/bin/python tools/mtp_rt.py --gguf mtp/mtp-q2_0.gguf --out mtp/rt
cp data/draft_vocab.bin mtp/rt/draft_vocab.bin

4. Serve

Save as strata-gyro-s.json at the repository root:

{
  "exe": "build/strata",
  "args": [
    "--pack", "packs/gyro-s",
    "--native", "models/Qwen3.8-Flash-Next-Gyro-S-TQ1_0.gguf",
    "--expert-profile", "data/expert-profile.bin", "--expert-cache", "auto",
    "--prefill", "auto", "--spec", "4", "--spec-min-p", "0.5",
    "--mtp", "mtp/rt", "--max-context", "131072", "--kv", "int8"
  ],
  "cwd": ".",
  "tokenizer": "packs/gyro-s/tokenizer",
  "model_name": "gyro-s-strata",
  "log": "strata-gyro-s.log",
  "host": "127.0.0.1",
  "port": 8080
}
STRATA_APR=1 .venv/bin/python -m serve.server --engine strata --config strata-gyro-s.json --port 8080

The web interface is at http://127.0.0.1:8080; API clients use http://127.0.0.1:8080/v1 (OpenAI) or /v1/messages (Anthropic). --expert-cache auto sizes the expert cache to the free VRAM: on a 32 GB card at 128k context it holds 23,464 of 24,576 experts (22.9 GiB). On smaller cards it holds fewer and streams the rest from RAM; nothing else changes.

Measured

All runs: greedy or the stated sampling, same prompt tokens as llama.cpp, MTP draft --spec 4 --spec-min-p 0.5, int8 KV. "llama.cpp" is the agentionai fork with the CUDA trellis fixes (branch cuda-tq-fixes).

RTX 5090 (32 GB), Gyro-S, all experts on the GPU (2026-10-03)

Decode tokens/s, single prompts of 34-177 tokens, 384 new tokens, --max-context 16384 (all 24,576 experts cached):

prose JSON code
Strata 139.9 221.3 209.0

Server, tools/gyro_setup.sh config (128k context, 23,463 experts cached), thinking off, temperature 0.7, top-k 20, top-p 0.95, min-p 0.05, 512 new tokens, 3 repetitions:

prose JSON code copy
Strata 131.7 200.1 195.2 201.8
llama.cpp, MTP draft 116.8 213.0 179.0 220.7
llama.cpp, no draft 121.8 123.2 122.5 121.2

Long real-text prompts, prefill tokens/s: 4k tokens 3,456 (llama.cpp 2,520), 16k tokens 4,883 (llama.cpp 2,471).

RTX 5090, Gyro-M (2026-10-03)

The experts (29.9 GiB) do not all fit next to the KV cache; auto caches 18,007 of 24,576. Same server protocol: prose 113.8, JSON 170.8, code 153.0, copy 175.7 tokens/s; prefill 4k 3,369, 16k 4,854 tokens/s. llama.cpp needs -ncmoe 8 for this file on a 32 GB card and decodes at 70.8 tokens/s without a draft.

RTX 3090 (24 GB), 2026-10-03

Same server protocol, 128k context, auto cache:

experts cached prose JSON code copy prefill 4k prefill 16k
Gyro-S 15,756 31.8 45.2 42.2 45.1 1,402 1,863
Gyro-M 11,811 27.8 39.4 34.4 37.7 1,363 1,910
llama.cpp, Gyro-S, -ncmoe 10, 32k context, no draft (10 layers on the CPU) 16.0 16.2 16.2 16.5 468 (-ncmoe 11) 479

On a 24 GB card, cache misses run on the CPU, so the CPU matters: this box had a Zen 2 EPYC (AVX2, no AVX-512). The llama.cpp row is the build before the CUDA trellis fixes; those added about 3 % at 24 GB, where the CPU layers dominate.

Smaller caches (RTX 5090, 2026-10-02, before the int8 decode kernels)

Expert cache prose JSON code
24,576 slots (all experts) 116.4 194.3 173.5
22,000 slots 111.4 175.7 166.1
9,000 slots (about a 16 GB card's room) 81.4 74.0 96.8
3,000 slots (about an 8 GB card's room) 48.0 52.4 57.9

The smaller caches were emulated on the 5090 (fast GPU, PCIe 5.0 x16 at ~51 GB/s). A real 8 or 16 GB card is a slower GPU, often on a slower link: read those rows as "it stays usable", not as a prediction for a specific card. The decoded output was read and is fluent and correct; token-level parity against llama.cpp has not been checked. A real chat at 128k context worked through the web interface.

Known limits

  • Not measured yet: token parity against llama.cpp.
  • Benchmark mode only: strata --tokens-file ... --max-new N decodes N tokens past the end of the answer; compare speeds only up to the answer's end.
  • AMD: the trellis kernels pass parity on gfx1151 (ROCm 7.2.1) and a short end-to-end run there generated correctly (~28-31 tokens/s); no speed tuning or RDNA4 run yet.
  • Gyro-M: 29.9 GiB of experts do not all fit a 32 GB card next to the KV cache; auto streams the rest.