Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

bench: rope-scaling needles past the trained 262K (linear 2, yarn 2)

Jakub Luwierskif4ae11b736b6
diff --git a/bench/results/2026-09-28-rope-scaling/README.md b/bench/results/2026-09-28-rope-scaling/README.md
new file mode 100644
index 000000000..e1e2e4770
--- /dev/null
+++ b/bench/results/2026-09-28-rope-scaling/README.md
@@ -0,0 +1,49 @@
+# Rope scaling: needle recall past the trained 262K
+
+The feature (engine 0.1.18): `--rope-scaling none|linear|yarn` extends the context past the model's
+trained 262,144 positions by rescaling the rotary angles - llama.cpp's types, ggml's `rope_yarn`
+arithmetic, one process config applied at the cos/sin table (default path) and as kernel constants
+(`--native-rope`, the native indexer, prefill). The three tables here are the first end-to-end check
+that a scaled run actually recalls past the trained end.
+
+**Hardware:** RTX 4070 Ti SUPER 16 GB, Ryzen 9 5900X (no AVX-512 - the IQ3_XXS native pack runs its
+expert kernels on AVX-2), 125 GB RAM, Linux. **Engine:** this branch built from source (the log records
+`rope scaling ... --max-context ... against a trained context of 262144` at startup). The runs below
+were taken on the rope tree built over the 0.1.17-era base; the branch then rebased onto main (engine
+0.1.20) - the drift touches none of the rope files - and the rebase was re-validated: `rope_parity`
+green, a 64-token greedy run token-identical to the plain 0.1.20 build, and the yarn 262k probe
+repeated green (see the last table row). Baseline arm A also re-checked the default is the stock
+model: a 64-token greedy run produces the same token ids as the ready-made 0.1.17 engine, and
+`rope_parity` holds the `none` table bit-identical to the pre-scaling builder.
+**Method:** `tools/needle_bench.py` against a running server (launch recipes in `config-*.json`),
+`temperature 0`, thinking off, depth 50%, one probe per length.
+
+| Arm | Scaling | Context | Probe | Prompt tokens | Result | Probe time |
+| --- | --- | --- | --- | --- | --- | --- |
+| A | none | 262,144 | 1k @ 50% | 1,442 | FOUND | 4 s |
+| A | none | 262,144 | 32k @ 50% | 31,763 | FOUND | 27 s |
+| A | none | 262,144 | 128k @ 50% | 128,328 | FOUND | 86 s |
+| B | linear, factor 2 | 560,000 | 262k @ 50% | 274,222 | FOUND | 232 s |
+| B | linear, factor 2 | 560,000 | 512k @ 50% | 527,051 | FOUND | 619 s |
+| C | yarn, factor 2 | 560,000 | 262k @ 50% | 274,215 | FOUND | 236 s |
+| C | yarn, factor 2 | 560,000 | 512k @ 50% | 526,988 | FOUND | 615 s |
+| C | yarn, factor 2 | 560,000 | 262k @ 50% (the rebase re-check) | 273,708 | FOUND | 235 s |
+
+All 8 of 8 probes found the needle; JSON per arm: `needle-A-none.json`, `needle-B-linear2.json`,
+`needle-B-linear2-512k.json`, `needle-C-yarn2.json` (+ the rebase re-check in
+`needle-C-yarn2-rebased.json`); server and engine logs alongside.
+
+What this establishes, and what it does not:
+
+- **Past the trained end the model still reads.** 512k probes are 2.01x the trained 262,144 - position
+ interpolation (B) and YaRN (C) both hold a mid-context lookup there.
+- **Scaled runs within the trained range are a slightly different model.** `yarn`'s mscale applies at
+ every position (a 64-token greedy prompt diverges from the stock run after ~19 tokens); arm A is the
+ stock model, arms B/C are not, by design.
+- **One depth, one needle, one machine.** A single probe per (length, arm) at depth 50% says "recall
+ works there", not "no degradation anywhere" - a full depth sweep and a longer-length ladder (768K,
+ 1M) on the bench machine (64 GB RAM there vs 125 GB here, so 262K IQ3_XXS fits either way) is the
+ natural follow-up. 512K prompts prefill at ~850-950 tokens/s on this card; the probe time is almost
+ entirely prefill.
+- **The `560,000` context** in arms B/C is headroom for the needle harness's tokenizer overshoot
+ (a "512k" probe tokenizes to ~527k); 524,288 exactly would refuse the probe.
diff --git a/bench/results/2026-09-28-rope-scaling/config-A-none-262144.json b/bench/results/2026-09-28-rope-scaling/config-A-none-262144.json
new file mode 100644
index 000000000..528fc9f6f
--- /dev/null
+++ b/bench/results/2026-09-28-rope-scaling/config-A-none-262144.json
@@ -0,0 +1,38 @@
+{
+ "exe": "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata/build/strata",
+ "cwd": "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata",
+ "tokenizer": "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata-data/packs/iq3_xxs/tokenizer",
+ "model_name": "qwen3.8-flash-next-iq3_xxs-rope-scaling",
+ "lib_dirs": [
+ "/usr/local/cuda/bin",
+ "/usr/local/cuda/lib64"
+ ],
+ "port": 8130,
+ "args": [
+ "--pack",
+ "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata-data/packs/iq3_xxs",
+ "--native",
+ "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata-data/models/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf",
+ "--ple-gguf",
+ "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata-data/models/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf",
+ "--expert-profile",
+ "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata/data/expert-profile.bin",
+ "--expert-cache",
+ "auto",
+ "--prefill",
+ "auto",
+ "--spec",
+ "4",
+ "--spec-min-p",
+ "0.5",
+ "--mtp",
+ "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata-data/mtp/rt",
+ "--kv",
+ "int8",
+ "--kv-resident",
+ "32768",
+ "--max-context",
+ "262144"
+ ],
+ "log": "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata/bench/results/2026-09-28-rope-scaling/engine-A-none-262144.log"
+}
\ No newline at end of file
diff --git a/bench/results/2026-09-28-rope-scaling/config-B-linear2.json b/bench/results/2026-09-28-rope-scaling/config-B-linear2.json
new file mode 100644
index 000000000..30b31d7d6
--- /dev/null
+++ b/bench/results/2026-09-28-rope-scaling/config-B-linear2.json
@@ -0,0 +1,42 @@
+{
+ "exe": "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata/build/strata",
+ "cwd": "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata",
+ "tokenizer": "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata-data/packs/iq3_xxs/tokenizer",
+ "model_name": "qwen3.8-flash-next-iq3_xxs-rope-scaling",
+ "lib_dirs": [
+ "/usr/local/cuda/bin",
+ "/usr/local/cuda/lib64"
+ ],
+ "port": 8130,
+ "args": [
+ "--pack",
+ "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata-data/packs/iq3_xxs",
+ "--native",
+ "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata-data/models/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf",
+ "--ple-gguf",
+ "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata-data/models/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf",
+ "--expert-profile",
+ "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata/data/expert-profile.bin",
+ "--expert-cache",
+ "auto",
+ "--prefill",
+ "auto",
+ "--spec",
+ "4",
+ "--spec-min-p",
+ "0.5",
+ "--mtp",
+ "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata-data/mtp/rt",
+ "--kv",
+ "int8",
+ "--kv-resident",
+ "32768",
+ "--max-context",
+ "560000",
+ "--rope-scaling",
+ "linear",
+ "--rope-scale",
+ "2"
+ ],
+ "log": "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata/bench/results/2026-09-28-rope-scaling/engine-B-linear2-524288.log"
+}
\ No newline at end of file
diff --git a/bench/results/2026-09-28-rope-scaling/config-C-yarn2.json b/bench/results/2026-09-28-rope-scaling/config-C-yarn2.json
new file mode 100644
index 000000000..6172a63a8
--- /dev/null
+++ b/bench/results/2026-09-28-rope-scaling/config-C-yarn2.json
@@ -0,0 +1,42 @@
+{
+ "exe": "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata/build/strata",
+ "cwd": "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata",
+ "tokenizer": "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata-data/packs/iq3_xxs/tokenizer",
+ "model_name": "qwen3.8-flash-next-iq3_xxs-rope-scaling",
+ "lib_dirs": [
+ "/usr/local/cuda/bin",
+ "/usr/local/cuda/lib64"
+ ],
+ "port": 8130,
+ "args": [
+ "--pack",
+ "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata-data/packs/iq3_xxs",
+ "--native",
+ "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata-data/models/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf",
+ "--ple-gguf",
+ "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata-data/models/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf",
+ "--expert-profile",
+ "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata/data/expert-profile.bin",
+ "--expert-cache",
+ "auto",
+ "--prefill",
+ "auto",
+ "--spec",
+ "4",
+ "--spec-min-p",
+ "0.5",
+ "--mtp",
+ "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata-data/mtp/rt",
+ "--kv",
+ "int8",
+ "--kv-resident",
+ "32768",
+ "--max-context",
+ "560000",
+ "--rope-scaling",
+ "yarn",
+ "--rope-scale",
+ "2"
+ ],
+ "log": "/home/jakub/workspace/deepseek-harness/harnes_workspace/Strata/bench/results/2026-09-28-rope-scaling/engine-C-yarn2-524288.log"
+}
\ No newline at end of file
diff --git a/bench/results/2026-09-28-rope-scaling/kv-sweep-tgs.json b/bench/results/2026-09-28-rope-scaling/kv-sweep-tgs.json
new file mode 100644
index 000000000..526b7514e
--- /dev/null
+++ b/bench/results/2026-09-28-rope-scaling/kv-sweep-tgs.json
@@ -0,0 +1,121 @@
+[
+ {
+ "length": "128k",
+ "round": 0,
+ "kind": "decode",
+ "prompt_tok": 128401,
+ "read": 52,
+ "gen": 357,
+ "read_tok_s": 79.2,
+ "gen_tok_s": 56.3,
+ "drafts_ok": 182,
+ "drafts_all": 305,
+ "seg_blocks": 3284340,
+ "seg_mib": 370.0,
+ "seg_misses": 91744,
+ "seg_hit_pct": 97.207,
+ "kib_per_token": 1061.29
+ },
+ {
+ "length": "128k",
+ "round": 1,
+ "kind": "read",
+ "prompt_tok": 128357,
+ "read": 128357,
+ "gen": 24,
+ "read_tok_s": 1389.2,
+ "gen_tok_s": 41.7,
+ "drafts_ok": 11,
+ "drafts_all": 23,
+ "seg_blocks": -3253560,
+ "seg_mib": -391.7,
+ "seg_misses": -97147,
+ "seg_hit_pct": 97.014,
+ "kib_per_token": -3.12
+ },
+ {
+ "length": "128k",
+ "round": 1,
+ "kind": "decode",
+ "prompt_tok": 128402,
+ "read": 52,
+ "gen": 388,
+ "read_tok_s": 76.5,
+ "gen_tok_s": 54.6,
+ "drafts_ok": 195,
+ "drafts_all": 363,
+ "seg_blocks": 3752616,
+ "seg_mib": 463.5,
+ "seg_misses": 114911,
+ "seg_hit_pct": 96.938,
+ "kib_per_token": 1223.26
+ },
+ {
+ "length": "512k",
+ "round": 0,
+ "kind": "read",
+ "prompt_tok": 522983,
+ "read": 522983,
+ "gen": 24,
+ "read_tok_s": 868.4,
+ "gen_tok_s": 42.4,
+ "drafts_ok": 13,
+ "drafts_all": 16,
+ "seg_blocks": -3808056,
+ "seg_mib": -387.8,
+ "seg_misses": -96113,
+ "seg_hit_pct": 97.476,
+ "kib_per_token": -0.76
+ },
+ {
+ "length": "512k",
+ "round": 0,
+ "kind": "decode",
+ "prompt_tok": 523028,
+ "read": 52,
+ "gen": 402,
+ "read_tok_s": 63.3,
+ "gen_tok_s": 48.4,
+ "drafts_ok": 221,
+ "drafts_all": 348,
+ "seg_blocks": 3580056,
+ "seg_mib": 920.4,
+ "seg_misses": 228658,
+ "seg_hit_pct": 93.613,
+ "kib_per_token": 2344.5
+ },
+ {
+ "length": "512k",
+ "round": 1,
+ "kind": "read",
+ "prompt_tok": 522984,
+ "read": 522984,
+ "gen": 24,
+ "read_tok_s": 857.1,
+ "gen_tok_s": 35.5,
+ "drafts_ok": 9,
+ "drafts_all": 18,
+ "seg_blocks": -3555408,
+ "seg_mib": -905.8,
+ "seg_misses": -225016,
+ "seg_hit_pct": 93.671,
+ "kib_per_token": -1.77
+ },
+ {
+ "length": "512k",
+ "round": 1,
+ "kind": "decode",
+ "prompt_tok": 523029,
+ "read": 52,
+ "gen": 402,
+ "read_tok_s": 61.3,
+ "gen_tok_s": 42.8,
+ "drafts_ok": 192,
+ "drafts_all": 388,
+ "seg_blocks": 4005216,
+ "seg_mib": 1079.9,
+ "seg_misses": 268221,
+ "seg_hit_pct": 93.303,
+ "kib_per_token": 2750.79
+ }
+]
\ No newline at end of file
diff --git a/bench/results/2026-09-28-rope-scaling/needle-A-none.json b/bench/results/2026-09-28-rope-scaling/needle-A-none.json
new file mode 100644
index 000000000..099bd36b6
--- /dev/null
+++ b/bench/results/2026-09-28-rope-scaling/needle-A-none.json
@@ -0,0 +1,29 @@
+[
+ {
+ "length": "1k",
+ "depth": 50,
+ "prompt_tokens": 1442,
+ "seconds": 3.7,
+ "found": true,
+ "word": "meadow-copper-504",
+ "answer": "meadow-copper-504"
+ },
+ {
+ "length": "32k",
+ "depth": 50,
+ "prompt_tokens": 31763,
+ "seconds": 27.5,
+ "found": true,
+ "word": "falcon-quartz-940",
+ "answer": "falcon-quartz-940"
+ },
+ {
+ "length": "128k",
+ "depth": 50,
+ "prompt_tokens": 128328,
+ "seconds": 86.1,
+ "found": true,
+ "word": "willow-cobalt-696",
+ "answer": "willow-cobalt-696"
+ }
+]
\ No newline at end of file
diff --git a/bench/results/2026-09-28-rope-scaling/needle-B-linear2-512k.json b/bench/results/2026-09-28-rope-scaling/needle-B-linear2-512k.json
new file mode 100644
index 000000000..e93f21d45
--- /dev/null
+++ b/bench/results/2026-09-28-rope-scaling/needle-B-linear2-512k.json
@@ -0,0 +1,11 @@
+[
+ {
+ "length": "512k",
+ "depth": 50,
+ "prompt_tokens": 527051,
+ "seconds": 619.0,
+ "found": true,
+ "word": "meadow-copper-504",
+ "answer": "meadow-copper-504"
+ }
+]
\ No newline at end of file
diff --git a/bench/results/2026-09-28-rope-scaling/needle-B-linear2.json b/bench/results/2026-09-28-rope-scaling/needle-B-linear2.json
new file mode 100644
index 000000000..7a9878776
--- /dev/null
+++ b/bench/results/2026-09-28-rope-scaling/needle-B-linear2.json
@@ -0,0 +1,16 @@
+[
+ {
+ "length": "262k",
+ "depth": 50,
+ "prompt_tokens": 274222,
+ "seconds": 232.2,
+ "found": true,
+ "word": "meadow-copper-504",
+ "answer": "meadow-copper-504"
+ },
+ {
+ "length": "512k",
+ "depth": 50,
+ "error": "HTTP Error 400: Bad Request"
+ }
+]
\ No newline at end of file
diff --git a/bench/results/2026-09-28-rope-scaling/needle-C-yarn2-rebased.json b/bench/results/2026-09-28-rope-scaling/needle-C-yarn2-rebased.json
new file mode 100644
index 000000000..659f51a3d
--- /dev/null
+++ b/bench/results/2026-09-28-rope-scaling/needle-C-yarn2-rebased.json
@@ -0,0 +1,11 @@
+[
+ {
+ "length": "262k",
+ "depth": 50,
+ "prompt_tokens": 273708,
+ "seconds": 234.8,
+ "found": true,
+ "word": "meadow-copper-504",
+ "answer": "meadow-copper-504"
+ }
+]
\ No newline at end of file
diff --git a/bench/results/2026-09-28-rope-scaling/needle-C-yarn2.json b/bench/results/2026-09-28-rope-scaling/needle-C-yarn2.json
new file mode 100644
index 000000000..2dfa146db
--- /dev/null
+++ b/bench/results/2026-09-28-rope-scaling/needle-C-yarn2.json
@@ -0,0 +1,20 @@
+[
+ {
+ "length": "262k",
+ "depth": 50,
+ "prompt_tokens": 274215,
+ "seconds": 235.5,
+ "found": true,
+ "word": "meadow-copper-504",
+ "answer": "meadow-copper-504"
+ },
+ {
+ "length": "512k",
+ "depth": 50,
+ "prompt_tokens": 526988,
+ "seconds": 615.0,
+ "found": true,
+ "word": "falcon-quartz-940",
+ "answer": "falcon-quartz-940"
+ }
+]
\ No newline at end of file