Skip to content

Run frontier MoE models on hardware you already own — pure C, zero deps, experts streamed from disk. Tiny engine, immense model. 🐦

C

docs(qwen36): the layer split is speed-weighted; Ollama's one-card number for the record

kreuzzelg31b87238c0d1
diff --git a/docs/ENVIRONMENT.md b/docs/ENVIRONMENT.md
index 65570478..dfcf5630 100644
--- a/docs/ENVIRONMENT.md
+++ b/docs/ENVIRONMENT.md
@@ -467,7 +467,7 @@ and the CPU/GPU execution split.
| `Q36_MAXT` | conservative engine default | Lower the served/context capacity; it cannot raise the model's compiled safety ceiling. |
| `COLI_VULKAN` | `0` | `VK=1` build: the dense trunk on the Vulkan device, and the routed experts on the shared expert tier (`COLI_VK_TIER*`, `COLI_VK_DENSE`, see [Vulkan](#vulkan-any-gpu-with-a-vulkan-12-driver)). With the tier on, the engine keeps the expert history `COLI_USAGE` (default `<snap>/.coli_usage`), saved at every run and serve turn end; it keeps none otherwise. |
| `Q36_DN_GPU` | `0` (off) | CUDA expert tier: a decode token runs every DeltaNet layer whose in_proj and out_proj sit on one card end to end on that card (conv, recurrence, gated norm; state resident in VRAM). Measured on the 35B, 3070, trunk in VRAM: DeltaNet 16.2 -> 10.8 ms/token, the token 39.4 -> 33.3 ms. See [qwen36-cuda-tier.md](qwen36-cuda-tier.md#the-deltanet-layer-on-the-card-q36_dn_gpu1). |
-| `QT_HOME` | `expert` | CUDA expert tier on two or more cards: `layer` homes every expert of a layer on one card (layer ranges in proportion to the allowances, `QT_LAYER_SPLIT=<n>` layers on the first card), with the layer's trunk and, for the last layer, lm_head alongside -- a pipeline instead of a per-layer join. See [qwen36-cuda-tier.md](qwen36-cuda-tier.md#two-cards-as-a-pipeline-qt_homelayer). |
+| `QT_HOME` | `expert` | CUDA expert tier on two or more cards: `layer` homes every expert of a layer on one card (layer ranges weighted by allowance / probed dense-GEMV time per card, `QT_LAYER_SPLIT=<n>` layers on the first card overrides), with the layer's trunk and, for the last layer, lm_head alongside -- a pipeline instead of a per-layer join. See [qwen36-cuda-tier.md](qwen36-cuda-tier.md#two-cards-as-a-pipeline-qt_homelayer). |
| `Q36_OFFER_SHEXP` | `0` (off) | Offer the shared expert to the VRAM placer. Off by default: on the card it costs 6.3 ms/token (3070) to 11-12.7 ms (with a slower second card) against 3.7-4.0 on the CPU, where it hides behind the expert group. |
## Qwen3.8 engine (`qwen38`)
diff --git a/docs/qwen36-cuda-tier.md b/docs/qwen36-cuda-tier.md
index 846ffb75..70939f8d 100644
--- a/docs/qwen36-cuda-tier.md
+++ b/docs/qwen36-cuda-tier.md
@@ -282,8 +282,9 @@ By default expert `eid` is homed on device `eid % n_gpus` in *every* layer,
so each layer's group is issued to both cards and `qt_take` waits for the
slower one -- measured on the 3070 + Quadro RTX 4000 pair, `take` 5.2 ms per
token against 0.2 on one card. `QT_HOME=layer` homes every expert of a layer
-on one device, chosen per layer range in proportion to the cards' allowances
-(or `QT_LAYER_SPLIT=<n>` layers on the first card), puts the layer's trunk
+on one device, chosen per layer range by each card's allowance divided by
+the time it needs for a dense GEMV (probed at startup with a 64 MB int8
+matrix; `QT_LAYER_SPLIT=<n>` layers on the first card overrides), puts the layer's trunk
components on the same device and lm_head on the last layer's, and issues a
group to exactly one device: the token runs the first layers on one card and
the rest on the other, like llama.cpp's layer split. Budgets, warmstart, LFRU
@@ -296,7 +297,9 @@ to 9.4 ms at 99.7 % residency, but the pipeline ends level with the 3070 alone
-- 33.6 ms/token at a 28/12 split against 31.8-33.1 -- because lm_head (+2.8
ms) and twelve DeltaNet layers (+1.6 ms) now run on the slower card. Two equal
cards would keep the MoE gain without that price. Cold, two cards win either
-way (45.3 against 52.3 ms), since more experts are resident at once.
+way (45.3 against 52.3 ms), since more experts are resident at once. For the
+record, Ollama 0.34.4 on the same pair shows the same shape: 38.1 tok/s on the
+3070 alone, 36.6-37.5 on both cards, 33.0 on the Quadro alone.
## Measured (Threadripper 3945WX 12C, RTX 3070 8 GB + Quadro RTX 4000 8 GB, Qwen3.6-35B-A3B int4, 200-token decode)