okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

albedocmake: strata_kernels links strata_kernels_cpu (iq_kernels.cu reads the latent colscale table from expert_layout.cpp; strata-q36ref failed to link)a4af4df61

main
10 files

files

README.md3.5 KiB
config-A-none-262144.json1.3 KiB
config-B-linear2.json1.4 KiB
config-C-yarn2.json1.4 KiB
kv-sweep-tgs.json2.2 KiB
needle-A-none.json499 B
needle-B-linear2-512k.json171 B
needle-B-linear2.json254 B
needle-C-yarn2-rebased.json171 B
needle-C-yarn2.json340 B

Rope scaling: needle recall past the trained 262K

The feature (PR #84, experimental): --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.

ArmScalingContextProbePrompt tokensResultProbe time
Anone262,1441k @ 50%1,442FOUND4 s
Anone262,14432k @ 50%31,763FOUND27 s
Anone262,144128k @ 50%128,328FOUND86 s
Blinear, factor 2560,000262k @ 50%274,222FOUND232 s
Blinear, factor 2560,000512k @ 50%527,051FOUND619 s
Cyarn, factor 2560,000262k @ 50%274,215FOUND236 s
Cyarn, factor 2560,000512k @ 50%526,988FOUND615 s
Cyarn, factor 2560,000262k @ 50% (the rebase re-check)273,708FOUND235 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: