sangharshadhyeta/Strata-HotRod
Tentang
Run Qwen3.8-Flash-Next (125B) on an RTX 3060 12 GB with 30 GB of RAM, streaming experts from the SSD. 50-70 tok/s, 262K context. A fork of Strata.
AI dan pembelajaran mesinPertumbuhan bintang terukur
- dalam 24 jam
- +2
- dalam 7 hari
- +8
- dalam 15 hari
- Mengumpulkan riwayat
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
Asli Coming Soon: A system which rewires the model around the way you use it.
Watch this first: NoPlaceLikeLocalhost
For Inkling2mini: UnbiasedStrata

This repo is for the hosters who like to get under the hood, tinker, tune and make things their own. Who believe in building, not just buying; in ingenuity over expensive hardware; and in pushing what they've got to do what others thought it couldn't.
And in the spirit of open source, sharing what they build, learning from each other, and making the whole community better along the way.
Take the machine you have. Make it your own. Share what you learn. See what it'll do.
Strata-HotRod
111 GB of model. 30 GB of RAM. 12 GB of VRAM. Zero cloud.
A 125-billion-parameter AI on one gaming card, streaming from your SSD.
Nothing leaves your PC.
🔥 hot experts on the card → 🌡️ warm in RAM → ❄️ cold on the SSD
Speed · The app · How it works · Install · Where from · Credits
🧊 78 - 111 GBof model on a 30 GB PC (IQ3_S and UD-Q4_K_XL) |
🔥 50-70 / 15-25tokens/s on one RTX 3060: IQ3_S (131K context, short answers) |
🐋 341 GBDeepSeek-V4.1-Flash: see the upstream-dsv41 branch |
⚡ 0.4 sto pick up a 45K-token conversation (next turn, from the saved state) |
A fork of Strata by Niko1221 and contributors (MIT). Strata keeps Qwen's experts in RAM and reads from the SSD when RAM is short; its docs call that path much slower. This fork works on that path: it spreads the experts over the card, RAM and the SSD and guesses ahead which ones to read, so the 78 GB IQ3_S runs on 30 GB of RAM at 50-70 tokens/s (131K context, short answers; the table below has the long prompts) further tested on their rig by NoPlaceLikeLocalhost - (scorbo2) Benchmark , and Unsloth's 111 GB UD-Q4_K_XL on the same PC at 15-25 tokens/s in short tests on 14 Nov (131K context, three questions, a 29K-token prompt read at 300-420 tokens/s; the learners were still cold, and it has not been measured as widely as IQ3_S).
🐋 Looking for DeepSeek-V4.1-Flash? It is on another branch.
Go to the
upstream-dsv41branch: it has its own engine (strata-dsv41), its own install steps and its own README, for the full model (IQ2_XXS, 7.5-8 tokens/s over a whole answer on this PC, peaking near 10) and the Coder (a half-expert coding version, about 9 tokens/s). Everything on this page,setup.pyincluded, is for Qwen3.8-Flash-Next. The two branches are kept apart on purpose.
Can Qwen3.8-Flash-Next run on an RTX 3060 12 GB with low RAM?
Yes. On one RTX 3060 12 GB with 30 GB of RAM and an NVMe SSD, this fork runs Qwen3.8-Flash-Next (Qwen 3.8 Flash Next, 125B) as the 78 GB IQ3_S at 50-70 tokens/s (131K context; 262K fits). The experts that do not fit in RAM are read from the SSD, and a look-ahead guesses ahead which ones. Measured on one PC: see How fast and the "Not tested" list at the bottom.
How much RAM does it need? This fork was measured on 30 GB. Strata's setup recommends 64 GB for IQ3_S and says that with less RAM it reads the rest from the SSD, much slower.
Does it need a cloud service? No. Everything runs on your PC. Setup downloads the model once from Hugging Face.
Tested on one machine, with one model. Other cards, AMD, Windows, macOS and other model sizes may work in upstream Strata; we have not run them, so we do not describe them here.
How fast
Measured on one PC: RTX 3060 12 GB, i5-12400F, 30 GB RAM, NVMe (the full list is below). A token is about ¾ of a word. Every answer in these runs was read and checked.
| Qwen3.8-Flash-Next IQ3_S 131K context, 24 Oct | tokens/s |
|---|---|
| Code (a Python function, 500-650 tokens) | 52 – 55 |
| Reasoning (a two-train problem, ~1,000 tokens) | 66 – 71 |
| Story (a paragraph, 100-150 tokens) | 50 – 53 |
| Stage, same PC | tokens/s |
|---|---|
| Stock Strata, 10 Oct (32K) | 17.2 |
| I/O prefetch on (test T1) | 27.2 |
| Stand-ins from rank 2 + draft head | 44.6 |
| Merged version (SPEC 20 step 9o) | 58.4 |
| Final, 24 Oct | 50 – 70 |
The 111 GB UD-Q4_K_XL ran at 15–22 tokens/s (14 Nov, learners still cold). DeepSeek-V4.1-Flash (341 GB) ran at about 5 tokens/s on 31 Oct, and 7.5–8 over a whole answer on 13 Nov. These rest on fewer runs than the 78 GB result.
| Long prompts (262K context, 20 Oct) | Read in | Answer written at |
|---|---|---|
| 8,554 tokens | 16.9 s | 52 - 54 tokens/s |
| 45,398 tokens | 67 - 68 s | 38 - 41 tokens/s |
| The same 45K conversation, next turn | 0.4 - 0.5 s | 34 - 45 tokens/s |
The first message of a chat is the slow part: it waits on the SSD for the model's experts. Follow-ups reuse what was already read. A 262K context costs about 8% against 131K, because more of the attention's memory streams from RAM.
The machine
| Graphics card | NVIDIA GeForce RTX 3060, 12 GB (driver 610.57, CUDA 13.3) |
| Processor, RAM | Intel Core i5-12400F (6 cores, 12 threads), 30 GB |
| Disk | 500 GB NVMe (WD Blue SN5000) on a PCIe 3.0 link; the model files live on it |
| System | Rocky Linux 9.6, built with gcc-toolset-13 |
| Engine | Strata 0.1.45 (upstream, merged 17 Oct 2026) plus this fork's changes |
| Model | Qwen3.8-Flash-Next, IQ3_S (about 3.5 bits per weight, 78 GB of files) by ISTA-DASLab |
| Context | 262K tokens (the longest prompt served here: 114K; a community run served 196K) |
Answer quality
Strata replaces some of a token's experts with similar ones already on the card to stay fast. In a small test (50 maths questions, 30 coding questions, answers read by hand): 47 of 50 and 30 of 30 correct, against 48 of 50 and 30 of 30 with nothing replaced. A test this small cannot show a difference of one or two answers either way. Since 24 Oct every JSON and code answer in the structured-output checks has been valid. Detail: SPEC.md.
Re-check on and off (9 Nov): 3 short and 3 long answers (2,500 tokens each, a CPU explanation, a 150-line program, a multi-step tank problem), run twice, every answer read in full with its thinking: all correct and clean in both settings (no loops, stray tokens or broken words); 42-44 tokens/s with the re-check off, 31-34 with it on.
MMLU-Pro (30 Oct): 87.1% - 183 of 210 questions (15 from each of its 14 subjects), thinking on, 32K context, temperature 0, the stand-ins on; every answer finished cleanly (no cut-offs or loops). For comparison, published Vals scores: Qwen3.8-27B 84.3%, Qwen3.8 Max 88.6%.
What you see

The Monitor: speed, card load and memory, the experts on the card, each request's hit rate.

The Chat: under every answer, the number of tokens and the speed.
How it works
The model has 512 experts per layer and picks 10 for every token; only some fit on the card. Everything this fork adds is about the ones that do not.
Stand-in experts. A missing expert is replaced by one already on the card only when
|
A look-ahead that learns. Experts for 1, 2 and 4 layers ahead are guessed on the card and read from the SSD before they
are needed. Each guess is the router's own score plus a small correction learned live from the real routing; its size is
chosen per layer by a live contest, and it falls back to the plain router if it ever does worse. For Qwen3.8 IQ3_S a trained one is published (release, 5.1 MB: 89 / 81 / 74% of the needed experts guessed 1 / 2 / 4 layers ahead on a later week's traffic, where the plain router guessed 78 / 64 / 56%) setup does not download it by default (since 21 Nov the look-ahead starts empty and trains on your PC during the calibration; |
Three tiers: card → RAM → SSD. The hottest experts on the card, the next in a RAM tier sized from free memory, the rest on the SSD. Swap rounds move a chat's experts onto the card in the background. |
Long prompts, long memory. Prompts are read layer by layer, each layer's experts once, straight from the SSD. Past 64K the attention's memory streams from RAM, and a long conversation resumes from a saved state in under a second. |
Draft and check. A small draft head guesses the next words; the big model checks several at once. |
Nothing hand-set. Budgets, reserves of RAM and video memory, and what the look-ahead learned are measured on your PC and kept across restarts. |
| Needed experts guessed (live, 24 Oct) | Plain router | Learned look-ahead |
|---|---|---|
| 1 layer ahead | 77-79% | 85-88% |
| 2 layers ahead | 66-69% | 76-79% |
| 4 layers ahead | 55-58% | 66-71% |
Every change and its measurement: docs/HOTROD-DETAILS.md · the predictor study: docs/PREDICTOR-EXPERIMENTS.md · the full log of ideas tried: docs/perf-ideas.md · earlier experiments from a separate fork: docs/EARLIER-EXPERIMENTS.md.
New on main (22 Nov): the engine tunes itself (an online tuner; calibration that runs by default and trains the learners on your PC; a final check that keeps the chosen set only if it beats the defaults by more than 3%), the learned residency profile is on for every model, the pin-segment reserve is computed, prompt stand-ins treat every token alike, co-prefill is on by default and the batch windows accept drafts probabilistically. Fixes: a read-ahead copy race, a stale pin after a failed read, STOP before QUIT, prompt-cache metadata, NaN kept a NaN in the bf16 conversions, the shared-expert combine's rounding, a GGUF header bounds check, the PLE shard identity, the peer tier's reserve. From the commit log; each is not benchmarked on its own, and Qwen's decode speed did not move with them (22 Nov, three prompts at 262K on UD-Q4_K_XL: 19.9 tokens/s against 19.3 on the 18 Nov build; a 13.6K-token read 343 against 338 tokens/s).
New on main (9 Nov): the flip re-check is opt-in (STRATA_FRAGILE_RECHECK=1; off: 42-44 vs 31-34 tokens/s on this
PC at 262K, answers correct in both); the shift cap is opt-in (STRATA_SHIFT_CAP=1); the stand-in learner learns from the
real experts again (it had read zeros since 8 Nov); a substitute-correction learner with a flip mode
(STRATA_SUBFIT_APPLY=flip, needs the re-check; it applies a pair's correction only where its own held-out test shows a
gain - none has on Qwen IQ3_S yet).
New in v0.1.45-hotrod.2 (31 Oct): the learned look-ahead v2 (trained with a rank-weighted loss) is the one setup
downloads; the expert placement comes from routing traces (tools/placement/solve.py); the Monitor's decode timeline
runs only when you press Record (it cost 5-13% always on). Opt-in: the draft head's experts in slots with the rest
computed exactly from RAM (STRATA_MTP_SLOTS, STRATA_MTP_ZC), and the look-ahead ring weighted by each layer's CPU
cost (STRATA_RING_COST).
Every setting
Each model has its own config (strata-iq3_s.json here): engine settings go in its "env" (a blank value means the
engine's default), engine flags in "args", server settings at the top level. Every switch, flag and server key, with
its default and what it does: docs/FEATURES-qwen.md (generated from the code by
tools/features_ref.py).
DeepSeek-V4.1-Flash too
For DeepSeek, go to the upstream-dsv41 branch: its
README there is the one to follow. The same ideas ported to upstream Strata's DeepSeek engine run DeepSeek-V4.1-Flash
(Starw1's uncensored GSQ-RCO IQ2_XXS backbone with DeepSeek's MXFP8 Engram, 341 GB of files) on this same PC at 7.5-8
tokens/s over a whole answer (the best answers peak near 10; 13 Nov, six runs of three questions; 6.33 on 6 Nov before later changes), and its Coder version (half the experts, about 285 GB) at about 9. That
branch is upstream Strata 0.2.7.1 plus this fork's DeepSeek work, with its own engine, strata-dsv41; the two branches are kept
apart and ported by hand.
What it adds to upstream's DeepSeek engine, on by default when the ring is on (=0 turns each off):
- A VRAM ring (
DS4_RING=32): the learned look-ahead's guesses for the next 1-2 layers are copied from a page-locked RAM store into card slots; a pick uses its slot only if the copy has landed in time. - Sticky ring (
DS4_RING_STICKY): a landed copy stays until its slot is needed, so a later token that picks the same expert reuses it (about 80,000 reuses in one answer). - The prompt pass's buffers as ring slots (
DS4_LEND,DS4_LEND_RING): the 1 GB the chunked prompt pass keeps on the card holds 99-100 more ring slots while the model answers, and is handed back before a long prompt. - A self-adjusting copy limit (
DS4_RING_INFLIGHT, auto): copies in flight follow the measured decode speed (128-token averages, a 3% dead band; it settles at 11-12 on this PC).=fixedkeeps 12. - Stand-ins with their re-check and self-tuning budget, the learned look-ahead and the learned VRAM reserve, as on Qwen.
- The RAM store gives back its coldest idle chunk (unpinned first) when RAM runs short, and takes chunks back later.
- Pictures: with Unsloth's
mmproj-BF16.ggufin the pack (--mmprojtopack_gguf.py) and--vision on, the engine's own vision tower reads images (319 MiB of VRAM; checked on a known picture: shapes, colours, positions and text right). Known issue: with the tower on, the RAM store is sized 0 and the ring turns off (a free-RAM drop is taken for a unified-memory machine); the fix is pending.
Measured and left opt-in: STRATA_LA_TAIL_READ=3 (a learned read-ahead of lower-ranked guesses: 23% slower, the drive is
already at its limit here) and DS4_PCIE_BALANCE=1 (Qwen's dynamic balance ported: its copies arrive too late and it is
not yet safe - do not turn it on). DeepSeek's limit on this PC is the NVMe at about 2.8 GB/s.
Install
You need a recent NVIDIA driver, the CUDA 13 toolkit, gcc-toolset-13 (Rocky Linux 9; other distributions are untested),
Python 3.10 or newer with venv and free disk on an NVMe: setup refuses to start below about 137 GB free for IQ3_S on a PC whose
RAM cannot hold the experts (its low-RAM mode, like this 31 GB PC): the 84 GB download, a 50 GB copy of the experts it writes for that mode,
and room for the MTP layer (setup.py's check, need = to_fetch + MTP + arena). Rocky / Alma / RHEL 9 ship python3 as 3.9, which is
too old: install sudo dnf install -y python3.12 python3.12-pip first (setup.sh looks for python3.13 down to
python3.10 by name, then python3). The CUDA 13 toolkit and the NVIDIA driver are not installed for you.
What was tested from an empty folder (13 Nov, RTX 3060, Rocky Linux 9, CUDA 13.3, gcc-toolset-13): the git clone and
setup.sh --check (which is how the Python problem above was found), a CMake configure of the clone with setup's CUDA flags,
and setup.sh --model IQ3_S ... --build in the fresh clone up to its disk check (PC check, the .venv and its packages, the
questions; it then stopped at the disk check, because this PC does not have that much free next to the files already on it: the
84 GB model download, the compile and the first start were not run from an empty folder). The engine and model on this PC were
installed by the same steps earlier.
sudo dnf install -y git gcc-toolset-13
git clone https://github.com/sangharshadhyeta/Strata-HotRod.git
cd Strata-HotRod
scl enable gcc-toolset-13 -- ./setup.sh --model IQ3_S --context 131072 --build --yes --no-start
--buildcompiles this fork's engine; without it setup downloads upstream's, which lacks these changes. The compiled engine was checked against the one measured here: the same speed.- For Qwen3.8 IQ3_S setup does not download the learned look-ahead by default: it starts empty on your PC, trains during the calibration and keeps learning. To start from the published one, run setup with
HOTROD_PREDICTOR_DOWNLOAD=1(5.1 MB, SHA-256 checked, intodata/; kept if the file is already there). It is thepredictor-qwen38-iq3s-v3release (v2 trained for another week of real use). - For 262K context set
--max-context 262144in the config'sargs. --model IQ3_Sis the size tested here. Setup says it wants a 64 GB PC; naming it is the consent, and it runs on 30 GB.--models-dir /path/on/nvmeputs the model files elsewhere.
Run inside a memory limit (94% of RAM; two uncapped runs once froze this PC):
systemd-run --scope -p MemoryMax=$(awk '/MemTotal/ {printf "%dK", $2 * 0.94}' /proc/meminfo) -p MemorySwapMax=0 \
.venv/bin/python serve/server.py --engine strata --config strata-iq3_s.json \
--port 8095 --host 0.0.0.0 --api-key YOUR_KEY
When it prints ready: http://127.0.0.1:8095/v1, open http://127.0.0.1:8095. For this PC only, leave out --host and
--api-key.
On your own PC the engine fits itself to the machine; the first hour of use is that fitting, so it starts slower:
Measured at start: the VRAM reserve (learned per card and context), the RAM tier (sized from free memory) and which experts sit on the card or in RAM (the most used first).
Measured while it serves (with the re-check on): the stand-in budget and the mask's depth, each by an alternating speed test over the same stretch of text (the faster setting is kept only when it does not add flips). A faster or slower drive moves them where they belong on that machine. With the re-check off (the default) the values already learned are used as they are: the stand-in budget bounds the stand-ins, fixed (
"STRATA_ROUTE_BUDGET_FIXED": "0"lets any resident stand-in in, about 3% faster).Learned from your use: the look-ahead, the mask and the stand-ins (below).
Learned files sit in
data/, named by the model's id:standin-tune-<id>.txt,mask-learn-<id>.bin,standin-learn-<id>.bin,subfit-learn-<id>.bin,predictor-<id>.bin, plusram-reserve.json. They hold this machine's values: when you move an install to another PC, delete all butpredictor-<id>.bin(the look-ahead belongs to the model and carries over) and let them relearn.For better certainty, turn the flip re-check on - add to the config's
"env":"STRATA_FRAGILE_RECHECK": "1"The few tokens a stand-in could have flipped (6-8 in 100 here) are then recomputed with the real experts, and the learning below runs. It costs about a quarter of the speed (31-34 instead of 42-44 tokens/s on this PC at 262K). Every answer we read was correct either way; turn it on for long or high-stakes answers, or to let the engine keep fitting itself.
The learned mask (7 Nov, CUDA; needs the re-check and route-resident stand-ins): each re-checked token measures how much the masked experts changed the output; the least harmful of the little-used experts are masked, the proven-harmless ones at every rank, and the depth follows the speed test. The look-ahead learns the picks that cost a read 4x harder (
STRATA_LA_EXACT_W, default 4) and gives the experts the mask removed no weight."STRATA_MASK": "0"and"STRATA_LA_EXACT_W": "1"turn them off (do so on AMD or Apple). Opt-in (all need the re-check):"STRATA_STANDIN_LEARN": "1","STRATA_STANDIN_BALANCE": "1"(no gain shown yet) and"STRATA_SUBFIT_APPLY": "flip"(the substitute corrections).What to watch in the server log after a request (the tests and learners need the re-check on):
auto mask testandauto budget test(each test's speeds and what it kept),mask learn:(share, masked, at all ranks, re-check divergence) andlook-ahead learner:(its guess rates against the plain router).Smaller machines: lower
--max-contextfirst (the KV cache is the largest fixed cost); setup refuses a PC that cannot hold the fixed weights.
Update: scl enable gcc-toolset-13 -- ./update.sh --build (new code, engine rebuilt where it changed, model kept).
DeepSeek-V4.1-Flash
About 345 GB free on an NVMe (139 GB of model, the 203 GB Engram table, 1 GB for pictures), the
same toolchain, and the Qwen checkout above, installed with --build (that step downloads the pinned llama.cpp into its
third_party/llama.cpp, which the DeepSeek engine builds against; a fresh clone does not have it). These are
the commands this PC was set up with; the branch's own setup.py --model Starw1-2.00bpw-MXFP8 downloads the same files
and makes the pack, but that route is untested here.
# the DeepSeek branch beside the Qwen checkout (run from inside Strata-HotRod, where the Qwen install left you)
git fetch origin upstream-dsv41 && git worktree add ../Strata-HotRod-ds upstream-dsv41
cd ../Strata-HotRod-ds
PY=../Strata-HotRod/.venv/bin/python # the Qwen install's venv runs this branch's server and tools too
# the engine (sm_86 = RTX 30-series; set yours)
scl enable gcc-toolset-13 -- bash -c 'cmake -G Ninja -S . -B build-dsv41 -DCMAKE_BUILD_TYPE=Release \
-DSTRATA_ENABLE_CUDA=ON -DSTRATA_BUILD_TESTS=OFF -DSTRATA_BUILD_DSV41=ON -DSTRATA_NATIVE_EXPERTS=ON \
-DCMAKE_CUDA_ARCHITECTURES=86-real -DSTRATA_GGML_DIR=$PWD/../Strata-HotRod/third_party/llama.cpp \
&& ninja -C build-dsv41 strata-dsv41'
# the model (M: the folder for the files): Starw1's 4 shards + the MXFP8 Engram, Unsloth's metadata shard,
# and for pictures Unsloth's mmproj-BF16.gguf in $M/..
M=/mnt/nvme/models/deepseek41-flash/GSQ-RCO-IQ2_XXS
$PY - "$M" <<'EOF'
import sys
from huggingface_hub import hf_hub_download, snapshot_download
m = sys.argv[1]
snapshot_download("Starw1/DeepSeek-V4.1-Flash-1017-Uncensored-GSQ-RCO-IQ2_XXS-MXFP8-Engram-GGUF", local_dir=m)
hf_hub_download("unsloth/DeepSeek-V4.1-Flash-1017-GGUF", "DeepSeek-V4.1-Flash-1017-UD-Q8_K_XL-00001-of-00009.gguf",
local_dir=m + "/unsloth")
hf_hub_download("unsloth/DeepSeek-V4.1-Flash-1017-GGUF", "mmproj-BF16.gguf", local_dir=m + "/..")
EOF
# the pack (a few MB of index beside the files; no weights are copied)
$PY tools/dsv41/pack_gguf.py --model $M \
--shards DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ2_XXS-0000{1,2,3,4}-of-00004.gguf \
--engram $M/DeepSeek-V4.1-Flash-Engram-MXFP8.gguf \
--engram-meta $M/unsloth/DeepSeek-V4.1-Flash-1017-UD-Q8_K_XL-00001-of-00009.gguf \
--mmproj $M/../mmproj-BF16.gguf --out /mnt/nvme/strata-data/packs/ds41v
cp data/dsv41/profile-2.00.bin /mnt/nvme/strata-data/packs/ds41v/expert-profile.bin
# the learned look-ahead (8 MB, trained on this pack's 384 experts; the engine loads it at start and keeps learning). Optional: without it
# the look-ahead starts empty and learns from your use. Setup's DeepSeek route is not used here, so this is a manual download.
P=/mnt/nvme/strata-data/packs/ds41v/hotrod-predictor.bin
curl -L -o $P https://github.com/sangharshadhyeta/Strata-HotRod/releases/download/predictor-ds41-starw1-v2/hotrod-predictor-ds41-starw1-v2.bin
echo "3e27dbab99643d7bc3f6cf72d5a7a28b5cd3a4ca6625c4d4b2a1672a75d5def9 $P" | sha256sum -c - # must say OK; delete the file if not
The config strata-ds41.json (the ring and stand-ins are switched on here; everything above follows from them):
{
"exe": "/path/to/Strata-HotRod-ds/build-dsv41/strata-dsv41",
"args": ["--pack", "/mnt/nvme/strata-data/packs/ds41v", "--max-context", "262144", "--eos", "1",
"--vision", "on", "--dspark", "auto"],
"cwd": "/path/to/Strata-HotRod-ds",
"tokenizer": "/mnt/nvme/strata-data/packs/ds41v/tokenizer",
"model_name": "deepseek-v4.1-flash",
"arch": "deepseek41",
"engine_ready_s": 3600,
"env": {"DS4_RING": "32", "DS4_RING_PIN": "1", "STRATA_STANDIN": "1"},
"answer_room": false,
"reasoning_budget_tokens": 0
}
"answer_room": falseand"reasoning_budget_tokens": 0: no limit but the context (otherwise DeepSeek's thinking stops at 32,768 tokens and a client's cap keeps a quarter for the answer).--vision off(or leaving out--mmprojwhen packing) gives text only, and today the faster setup (see the known issue).- Run it as Qwen, in the same memory limit, from
Strata-HotRod-dswith$PY serve/server.py --engine strata --config strata-ds41.json. The first start at a new context size learns its VRAM reserve; if it printsring: off (... would not fit), start it once more. - On your own PC it fits itself to the machine as Qwen does (above); its learned files sit in the pack folder
(
standin-tune.txt,vram-reserve.txt,mask-learn.bin,standin-learn.bin,hotrod-predictor.bin) - when you move a pack to another PC, delete all buthotrod-predictor.bin. The learned mask and the look-ahead's weighting are on by default with the stand-ins ("DS4_MASK": "0"turns the mask off); stand-in learning and balance are opt-in.
Using it
Any OpenAI-compatible client works with http://127.0.0.1:8095/v1 and your API key:
curl http://127.0.0.1:8095/v1/chat/completions \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"model":"strata","temperature":1.0,"top_p":0.95,"max_tokens":300,
"messages":[{"role":"user","content":"Name the three largest cities in India."}]}'
- Thinking is on by default; the chat menu picks off, low, medium or high.
- Sampling: with no temperature set, decoding is greedy. The model card recommends temperature 1.0, top-p 0.95, top-k 20 with thinking on, and 0.7 / 0.8 / 20 with it off.
- Reading while you type: the chat page sends your draft as you pause, so Send only reads what changed. Programs can do
the same with
"strata_prefill": true(orX-Strata-Prefill: 1, or/v1/prefill). - Pictures (optional): add a
"vision"section to the config; a message can then carry animage_url(docs/IMAGES.md). - One request at a time; others wait their turn.
Every option: docs/DETAILS.md (upstream's reference; it covers more than we tested).
Not tested
- Any other graphics card, any AMD card, Windows, macOS or another Linux.
- Any other model or size (Q2_0, IQ2_XS, IQ3_XXS, Coder, Swift, Unsloth's files).
- Several requests at once.
- Two graphics cards beyond one community run (2x RTX 3060 12 GB, issue #2: the peer tier, +2 to +4 tok/s decode, long-prompt reads 25-30% faster; see docs/SECOND_GPU.md).
- A prompt that fills the whole 262K window on the reference PC (the longest served here: 114K tokens; a community run served 196K in the 262K window on 64 GB, issue #2).
Where this came from
This fork began as solid.cpp (August to October 2026), a llama.cpp fork used
to find out what really works for a mixture-of-experts model that does not fit the card; the lessons that survived measurement
were ported into Strata one concept at a time. A copy of that work is kept on the
legacy-solid branch: the illustrated write-up
(index.html), the formal Technical Note
(print/technical-note.html, with the references), solid.cpp's changed
sources and notes, CITATIONS.md (every project, paper, model and person
credited) and UPSTREAM.md (exactly what is whose).
What this is not. One PC, one card, one drive; AMD, Intel and Apple paths were not tested here. Figures are the author's own measurements and have not been independently reproduced.
Credits and license
The model is Qwen3.8-Flash-Next by the Qwen team, compressed by ISTA-DASLab. Strata is by Niko1221 and its contributors;
this fork keeps its MIT License and copyright notice. The engine uses parts of
llama.cpp / ggml, and the picture encoder uses llama.cpp's mtmd. A few parts and
every model have their own licenses: docs/HOW_IT_WORKS.md. Security: SECURITY.md.
The DeepSeek engine comes from Project Maya by Peasant Smith (mw00) and its
contributors (MIT; its notice is kept in third_party/project-maya on the DeepSeek branch).
The author's part, about 540 commits in solid.cpp and about 630 (Qwen) and
120 (DeepSeek) on top of Strata, was done with Claude Code as an AI coding assistant.
Ideas this fork builds on
Several changes were first built and measured in solid.cpp, a llama.cpp fork for MoE expert caching, and ported here one concept at a time. Prior art behind them:
- leloch/llama.cpp (moe-cache-pr): the original GPU-resident MoE expert cache.
- thecodacus/llama.cpp (prefetch-experts, from the Codacus channel): expert prefetch overlapped with compute.
- JustVugg/colibri: LFRU eviction and the Expert Atlas method; its router-prediction experiment showed where a predictor stops paying.
- FlashML-org/FreeToken: the hit/miss split for expert uploads.
- antirez/ds4: the three-tier layout and explicit reads instead of mmap.
- aswinkumar99/qwen3.8-flash-next-expert-traces
(CC-BY-4.0): the expert-predictor study on this model; the learned look-ahead uses its training target (the router's top-32
scores plus a hinge), and
--expert-predictor ondownloads its published predictor. - vLLM: a reference for the model's code, and not reserving memory for unused context.
- Papers: FlexGen (2303.06865) and MoE-Lightning (2411.11217) for layer-by-layer prompts; Stream2LLM for reading the prompt while it is written; the expert-prefetch literature (Speculating Experts 2603.19289, PILOT / Fate 2502.12224, FineMoE, SP-MoE 2510.10302, ProMoE, PowerInfer-2).
Later research that points the same way as the stand-ins
These are independent papers, read after the stand-ins were built. They support the idea that a pretrained mixture-of-experts model tolerates a changed tail of experts; none of them tests substituting by what is resident on the card, so they are supporting evidence and not a proof of the rule used here.
- Expert-Sample (Certain Head, Uncertain Tail, 2602.02443): keeps the top
k/2 + 1experts of a token fixed and replaces the rest with others drawn from a wider rank pool, with no training. On Qwen3-30B-A3B, Qwen3-Next-80B-A3B, GPT-OSS-20B and Ling-Lite-1.5 the problems a model already solved stayed solved (the drop was 0.1% on the two models where the authors report it). It is the same shape as the stand-in rule, an exact head and a substituted tail; they substitute for diversity, the stand-ins substitute by residency. - Roster of Experts (2509.17238): perturbs the router of a pretrained MoE with Gumbel noise at inference and treats the result as an ensemble, again without training.
- Elbow routing (2608.04401): a training-free rule that uses fewer experts when the router is confident (7.6 of 8 on average on one small model, within 0.33 points of accuracy). It spends exactness where the router weight is large, as the stand-in budget does. Our own check on this model found the router's weight spread too wide for it to prune anything here (mean 9.99 of 10 experts).
- C3PO (2504.07964): re-mixes the routing weights of a pretrained MoE per sample at test time and reports accuracy gains, so a model's routing choices are not fixed points.
- HOBBIT (2411.01433): mixed-precision expert offloading. It scores each expert by
its gate weight, keeps the important ones exact, loads the medium ones at lower precision and skips only the least
important, with thresholds on the cumulative gate weight. That is the same idea as
STRATA_TAIL_WEIGHT(skip by router weight, not by rank); HOBBIT swaps in low-precision copies where this fork skips or substitutes a resident expert. The authors report that skipping about 10% of the experts costs more than 1% perplexity; the threshold here is a setting for that reason, and the default has not been shown to be free of cost. - Cache-conditional experts (2412.00099): biases a pretrained MoE's routing toward experts that are already in the cache, with no training, and reports more than half of the cache misses removed for a small perplexity cost (0.1 to 3%). It is the closest published relative of the stand-ins, which also trade a missed expert for one that is resident; they bias the router, the stand-ins replace the expert after routing.
- GSQ (2604.18556) and RCO (2605.00649): two papers from
the same group. GSQ is a post-training scalar quantizer that learns, per weight, which grid point to take (Gumbel-Softmax
relaxation) against a block-output reconstruction loss on calibration text. RCO allocates a fixed budget (bits per layer or
expert, or experts kept) by optimising the allocation against the model's own calibration loss, with the weights themselves
left untouched.
STRATA_LAYER_SENSborrows only RCO's idea of spending a fixed budget unevenly across layers, using a measured per-layer error map instead of RCO's gradient-based search, and the engine's per-layer learning (STRATA_LAYER_LEARN) now measures that error itself from the work it does anyway, so each layer settles on its own skip threshold (0.078-0.169 on Qwen; the cost of a skip rises 3-5 times from the middle layers to the last twelve). GSQ's idea of choosing the rounding against block-output reconstruction on calibration text, and RCO's of spending a fixed budget unevenly, are what the data-aware low-rank copies (STRATA_LOWRANK, 4-bit factors fitted against the layer's own activations) borrow; the copies are opt-in and not shown to beat skipping in the engine. Details and the measured coherence: docs/HOTROD-DETAILS.md.
Jelajahi proyek terkait
Memuat…