Skip to content

About

Run Qwen3.8-27B at 140 tok/s on a single RTX 3090, up to 2x llama.cpp. Fast local LLM inference server with OpenAI- and Anthropic-compatible APIs, 256K context, native Windows and Linux.

Topics

Resources

Contributing

Stars

96 stars

Watchers

2 watching

Forks

 
 

Latest commit

 

History

3,890 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NInfer-3090

Release License Host checks Stars Downloads Decode, one RTX 3090 Models on Hugging Face Fit calculator: try it live

Illustrative animation: NInfer-3090 decodes Qwen3.8-27B 2.1x faster than llama.cpp on an RTX 3090, from published figures. Click for the MP4.

Illustrative animation, drawn at published decode speeds. The llama.cpp figure is a third party's, from a different machine and prompt set, so read the ratio as indicative. The measurements and caveats are in the Qwen3.8-27B model card.

Download · Quick start · Models · Benchmarks · Documentation · Hugging Face

NInfer-3090 throughput on one RTX 3090

On one RTX 3090, ahead of every other engine's published Qwen3.8-27B figure but one: 194.6 tok/s on code against open-jet's 140 (1.39x), 133.2 on chat against syv-ai HyperQwen's 131.2, 47.7 without speculation against 42.9, 421 tok/s at eight requests against 407, and 1.2x the prefill speed. The loss: at 98K tokens of context we decode 94.0 tok/s against open-jet's 95.9. Their figures are their own, from other machines; sources and conditions: RTX 3090 comparison.

Qwen3.8-27B on one RTX 3090: ashalliants/ninfer-3090 against the best published figures, per workload

Also first class on a 32 GB Tesla V100, where it is faster than the next-best engine we could run or find on the same card for every model it serves: 1.34x llama.cpp's decode on Qwen3.6-35B-A3B, 1.21x Lapilli's on Qwen3.8-27B (1.38x prefill), 1.02x Lapilli's on Flash-Next, and 1.34x the fastest reported Inkling-2-Mini decode (Strata's). Per-model charts, the losses and every source: Tesla V100 comparison.

Tesla V100 32 GB: ashalliants/ninfer-3090's speed-up over the next-best engine on the same card, per model, for decode and prefill

Run a 27B model at about 140 tokens per second on one gaming GPU. NInfer-3090 is a local LLM server with a drop-in OpenAI and Anthropic API, so Claude Code, Codex, Cursor, Cline and other tools can point at your own RTX 3090 instead of a paid service. On the same card it decodes up to 2.1x faster than llama.cpp (how that was measured).

Under the hood it is a specialized C++20/CUDA inference engine for Qwen3.8-27B, Qwen3.6 and, as a Windows preview, the 512-expert Qwen3.8-Flash-Next on one 24 GB NVIDIA GeForce RTX 3090, or split as a pipeline across several GPUs on Linux. The native SM86 runtime loads the official groupwise .ninfer artifacts, serves OpenAI- and Anthropic-compatible APIs, and supports paged KV, compatible-prefix reuse, structured JSON output, CUDA Graphs, MTP and DFlash2 speculative decoding, vision, reasoning-effort control, ReplaySSM state transactions, and concurrent cohorts through C8. A 32 GB Tesla V100 (sm_70, built from source on Linux) runs Qwen3.8-27B and Qwen3.8-Flash-Next too, and is the first home of Inkling-2-Mini: V100 guide. Inkling-2-Mini runs on the RTX 3090 as well, on Windows and Linux, with 137,216 tokens of context (all 262,144 on the opt-in low-bit KV).

Two cards, both first class: the RTX 3090 (24 GB, sm_86) and the Tesla V100 32 GB (sm_70). This project is built for, and tuned on, exactly these two GPUs. Every kernel route, schedule and launcher default, and every NInfer figure published here for a single card, is measured on a physical 3090 or V100, never carried over from another card. The exceptions are stated where they appear: the third-party llama.cpp baseline in the animation above; the 27B's 262,144-token context under the default profile, which is extrapolated; the pipeline-parallel figures, measured on rented 2x RTX 3090 and 2x RTX A4000 boxes (pipeline stages); and sm_80, an added compatibility target with no measured figures. Other NVIDIA GPUs may build and run, but they are not targets: no tuning, no published numbers, no guarantees.

New: Inkling-2-Mini (Thinking Machines, 2026-11-20), a 26B-total looped MoE (5.4B active per token) with 128 experts, now runs on one Tesla V100 with images, its full 262,144-token context and its own DSpark speculative drafter (up to 120.7 tok/s), served to up to 8 requests at once over the same OpenAI and Anthropic APIs. It runs on one RTX 3090 too: 104 tok/s and 137,216 tokens of context, or the full 262,144 with images and DSpark on the opt-in low-bit KV. See Inkling-2-Mini.

Inkling-2-Mini: exact, and the fastest V100 figures we know of.

  • Nothing re-quantized on our side. The artifact is Unsloth's UD-Q8_K_XL (their KLD reference quant) converted losslessly: unpacking the expert records reproduces every source tensor byte for byte.
  • Speculation that never changes the answer. With DSpark on, greedy output equals plain greedy decode, and a sampled request draws the same tokens plain sampling draws under the same seed, on every DSpark request measured (model card). Unsloth's DSpark notes for llama.cpp say its greedy output with the drafter "is not guaranteed to be bit identical to a run without it".
  • Faster on the same card. On one Tesla V100 32 GB at 200 W, NInfer decodes 110.7 tok/s with DSpark and 78.0 plain (12-chat averages at the full 262,144-token context with images and INT8 KV; 120.7 on maths at 250 W), and prefills 2,727 tok/s at 8K with --prefill-chunk 8192 (131,072 context), 2,170 at the default chunk (2,125 with DSpark and images at the full 262,144). The other published V100 port, Csavoldi's Inkling port onto Lapilli (report, official NVFP4 experts), reports 69 tok/s writing without a drafter (its DSpark kernels need sm_120a) and 850 tok/s reading a short prompt. Those figures are theirs, from a different machine and prompts, so read the ratios as indicative.
  • Opt in to more speed. --speed fast trades a little accuracy for speed (structured output 163.5 tok/s against 133.1 exact, 12 chats +8.5% on a V100); the default stays exact. See the spec.

Performance by model and card

Every figure below was measured on the card in its row: one GPU, one model, defaults unless noted. Decode is one stream unless the column says otherwise.

Model Card Max context Prefill Decode, one stream Decode, all lanes
Qwen3.8-27B (dense) RTX 3090 262,144 3,222 tok/s at 4K 194.6 tok/s on code, 133 on chat, 94.0 at 98K context (DFlash2 + n-gram copies, 315 W); 140 on chat in an earlier session 477 tok/s at C8 (MTP3; 421 at 315 W)
Qwen3.6-35B-A3B (MoE) RTX 3090 262,144, shared by 3 lanes 8,848 tok/s at 4K 313 tok/s (MTP3 + draft head) 453 tok/s at C6 (MTP3)
Ternary Bonsai 2 27B RTX 3090 262,144 (with DFlash2, 9.6 GiB free) 2.8-2.9K tok/s 88-90 plain; 238 mean over 12 chats, 372 maths (DFlash2, 7 drafts, Windows; 235 and 364 under WSL); 74 after a 245K-token document 573 tok/s at C8 (MTP3; 572.5 under WSL)
Qwen3.8-Flash-Next (preview, Windows) RTX 3090 32K default 2,345-2,422 tok/s at 4K-128K 108-113 tok/s (MTP), 78-81 plain ~115 tok/s at C2 (MTP; 103-125, Linux)
Qwen3.8-27B Tesla V100 32 GB 262,144 ~1,020 tok/s at 4.4K 147 tok/s on code (DFlash2 K7 + n-gram 15, 200 W, master d309f3d8); 116.5 thinking and 190 on structured JSON (DFlash2); 72-79 story, Chinese and French (MTP3); 69.5 at 43K and 56.7 at 172K context (MTP3; 53.0 and 26.4 before) 122 tok/s at C2 (MTP3, 200 W); 95 with DFlash2 K7 (90 before)
Qwen3.8-27B, NVIDIA NVFP4 QAD (new: higher accuracy) Tesla V100 32 GB 262,144, two lanes, with vision 746 tok/s at 3.8K; 204 at 22 tokens (one request, ninfer) 90 tok/s on code, 59 story (MTP3, served, 200 W); 40.6 plain (one request, ninfer)
Qwen3.8-Flash-Next Tesla V100 32 GB 262,144 ~990 tok/s at 3.8K (250 W) 129.6 tok/s (MTP7 + draft vocabulary, code); 103-106 thinking, 82-83 story, 81 Chinese, 77 French (200 W); flat from 10K to 221K context
Qwen3.6-35B-A3B (MoE) Tesla V100 32 GB 65,536 tested 3,984 tok/s at 4.2K, 3,118 at 40.2K (200 W) 253.7 tok/s on code, 265 thinking, 303 structured JSON, 172.6-192.7 story, Chinese, French and conversation (MTP3 + draft head, 200 W); 319 structured JSON with DFlash K7; 155 plain 197-200 tok/s at C2 (MTP3, story + code)
Inkling-2-Mini (new) RTX 3090 137,216 plain, 89,088 with DSpark and vision; 262,144 with both on --kv-dtype rk4v4 (lossy, opt-in) 2,421 tok/s at 8.4K, 65,536 context with vision (Windows; 2,410 under WSL); 2,416 at 1.2K 104 tok/s plain (12 chats, WSL; 101.8 on Windows); 115.5 best with DSpark (code) 282 tok/s at C8 (plain, WSL; 277 on Windows)
Inkling-2-Mini (new) Tesla V100 32 GB 262,144 with DSpark and vision 2,727 tok/s at 8K, 131,072 context, --prefill-chunk 8192 (200 W); 2,170 at the default chunk (1,962 at 1K, 1,339 at 100K); 2,125 at 8K at the full 262,144 with DSpark and vision 120.7 tok/s (DSpark, maths, 250 W); 110.7 average over 12 chats, 78.0 plain (262,144 with vision, INT8 KV, 200 W) 198 tok/s at C8 (plain)

RTX 3090 rows use the Linux launcher defaults (rk4v4 KV) unless marked Windows. The 27B's code, chat, 98K-context and 315 W C8 figures were measured on 2026-11-26 under Windows at a 315 W limit (master 178d3b5e; the 98K figure with the small-T P-tile fix, conditions); its 477 at C8 on 2026-10-02 at the stock 350 W. The V100 was measured over a 3.3 GB/s eGPU link (PCIe Gen3 x4) on a 59 GiB host: Qwen rows on 2026-11-18 (the two-lane figure 2026-11-20; the 27B's single-stream decode re-measured 2026-11-25 at 200 W on master d309f3d8 (the comparison-chart run) and its plain and two-lane figures 2026-11-24, with --verify-a8 and the int8-activation DFlash2 drafter, both the default in a V100 build, conditions; Flash-Next decode re-measured 2026-11-25 at 200 W with the router's flags, with the MTP draft vocabulary now derived from the tokenizer; conditions; Qwen3.6-35B-A3B on 2026-11-25 at 200 W, conditions), Inkling-2-Mini on 2026-11-22 (master dad1623b, 250 W limit; the 12-chat decode figures re-measured 2026-11-23 at 200 W; prefill re-measured 2026-11-24 at 200 W with --prefill-cublas, the layers 20-23 experts on the tensor-core kernels). Inkling-2-Mini on the RTX 3090: 2026-11-23 under WSL and natively on Windows (master 311ad169a), 315 W limit, its layers 20-23 experts held as their exact MXFP8 re-encoding (the default there). Ternary Bonsai 2 27B's context and C8 figures: 2026-11-23, WSL and Windows, 315 W limit (method). Flash-Next's two-lane figure is the median of four runs on a rented Linux RTX 3090 (420 W limit, 2026-11-11; method). A blank cell has not been measured. Full methods: RTX 3090 benchmarks, V100 guide, Inkling-2-Mini spec.

Two Qwen3.8-27B builds, so you can pick. qwen38-27b (the default) is this fork's own Q4/Q5 conversion and the fastest. qwen38-27b-qad is NVIDIA's quantization-aware-distilled NVFP4 checkpoint, which NVIDIA trained to match the BF16 model (within half a point on GPQA Diamond, IFBench and MMMU Pro by NVIDIA's own evaluation), and it reads closer to full precision than the default here too (lower perplexity on every domain measured). It is slower: served on a Tesla V100 with MTP3 it decodes 90 tok/s on code and 59 on prose against the default's 110 and 77 with MTP3, and it has no DFlash2 for the default's faster code decode. Measured on the V100 only so far. Model card · V100 numbers

Qwen3.8-Flash-Next (preview, Windows) runs on the same card too: a 512-expert MoE at 2 bits per weight with its experts pinned in host RAM, at 1.15-1.18x Strata's plain decode and 109-113 tok/s with MTP. A second, 3-bit build (Unsloth's UD-IQ3_XXS) reads about 7% better by perplexity at roughly half the speed, so you can pick. Details · every re-measurement

Qwen3.8-27B on one RTX 3090: llama.cpp against NInfer-3090 (llama.cpp figures from a third party's published run)

Qwen3.8-27B: upstream artifact vs this fork's 3090 conversion

The default 27B is this fork's own conversion (model card): an importance-weighted encoder with signed scales and fewer bytes per decoded token, for a smaller file, output closer to full precision, and faster decode on the same card.

The goal is the most rippin' Qwen inference stack for the 3000 series. It is a community project maintained on a best-effort basis: issues and PRs are very welcome, but support and feature requests are not guaranteed.

Sponsored by NeverMetered — hosted Qwen3.8-27B for coding agents, priced by parallel streams instead of tokens. No per-token bills, no 5-hour windows and no weekly caps: point Claude Code, Codex, Cursor, Cline or anything else that speaks the OpenAI or Anthropic API at it and let your agents run all day. No 3090 of your own, or want your agents off your desktop's GPU? Plans start with a day pass, and every verified account gets a few free requests a day. Thank you to NeverMetered for supporting this project.

Model files are v3. A v2 .ninfer from an earlier release is refused at load. Upgrade it instead of re-downloading — see Models.

Contents

Quick start

You do not need to build anything. Prebuilt archives for Windows x64 and Linux x64 are on the latest release, each with ninfer-serve, the CLI, the benchmark tool, every launcher and, on Windows, the DLLs. Both platforms need an RTX 3090 or 3090 Ti and a recent NVIDIA driver. A Tesla V100 32 GB has its own Linux archive (below).

Windows 11 — download ninfer-rtx3090-windows-x64-*.zip, unzip it, and from that folder:

.\download-model.bat qwen38-27b          # downloads qwen3_8_27b.ninfer (~19 GB, resumable)
.\run.bat qwen38-27b                      # serves on 127.0.0.1:8080, one user, up to 188,416 tokens, DFlash2

Double-clicking either file asks which model instead; Qwen3.8-27B is the recommended choice. The MoE alternative, qwen36-35b-a3b, serves more lanes.

Linux — download ninfer-rtx3090-linux-x64-*.tar.gz, and:

tar -xzf ninfer-rtx3090-linux-x64-*.tar.gz && cd ninfer-rtx3090-linux-x64-*/
./download-model.sh qwen38-27b           # downloads qwen3_8_27b.ninfer (~19 GB, resumable)
./run.sh qwen38-27b                      # one user, 262,144 tokens (headless), DFlash2 + draft head, vision

Tesla V100 32 GB (Linux) — download ninfer-v100-linux-x64-*.tar.gz (the 3090 archives do not start on a V100), unpack it, and use its V100 launcher, which listens on the network, so set NINFER_API_KEY first:

tar -xzf ninfer-v100-linux-x64-*.tar.gz && cd ninfer-v100-linux-x64-*/
./download-model.sh qwen38-27b           # ~19 GB, resumable
NINFER_API_KEY=<a secret> ./run-v100.sh qwen38-27b   # MTP3 with INT8 KV, 262,144 tokens; also qwen38-flash-next, qwen36-35b-a3b

For NVIDIA's higher-accuracy NVFP4 QAD build of the same 27B (slower decode), use qwen38-27b-qad in both commands.

V100 guide for Flash-Next, Inkling-2-Mini and the measurements.

Then point your harness at http://127.0.0.1:8080/v1. It is an OpenAI-compatible endpoint (the Anthropic Messages API is served too), so anything that speaks /v1/chat/completions works; leave the API key blank.

The downloaders fetch qwen38-27b, qwen38-27b-qad, qwen36-35b-a3b or qwen36-27b. Each pins a HuggingFace revision, stages under a revision-scoped name so a resume can only ever continue the same artifact, and verifies size and SHA-256 before promoting it.

The platform guides cover GPU checks, Docker, native builds and model mounts: Linux · Windows.

Launchers and profiles

Command (run.bat / run.sh) Best for
run qwen38-27b Recommended. Qwen3.8-27B, one user, DFlash2, cuBLAS prefill; 188K on Windows, 262K headless
NINFER_SPEC=mtp + run qwen38-27b Qwen3.8-27B at the full 262K with two lanes, MTP3 instead of DFlash2
run qwen38-27b-qad NVIDIA's NVFP4 QAD build of Qwen3.8-27B: closer to full precision, slower decode; MTP3, two lanes, 262K (preview: measured on the V100, not yet on the RTX 3090)
run qwen36-35b-a3b Qwen3.6-35B-A3B, MTP3, cuBLAS prefill, vision; 213K with two lanes on Windows, 262K with three on Linux
run qwen38-27b int8 Reference profile: one user, INT8 KV (the quality default), 64K context
run qwen38-27b c8 Reference profile: eight lanes at 8K, highest aggregate throughput
run.bat qwen38-flash-next Preview, Windows. Qwen3.8-Flash-Next from the IQ2_XS GGUF: one user, 32K, MTP speculation with the drafter artifact, images with the vision artifact; needs ~38 GiB of free host RAM (~40 with images). See Qwen3.8-Flash-Next
run.bat qwen38-flash-next-iq3 Preview, Windows. The same model from Unsloth's UD-IQ3_XXS GGUF: better text quality, about half the speed, text only; needs ~42 GiB of available host RAM and runs with --partial-ram-residency. See which build

Every default profile serves images (vision in overlay residency, which costs about 10 MiB of device reservation), uses rk4v4 KV, and backs the context cache with 8 GiB of pinned host RAM (--host-context-mib 8192): one budget that retained conversation state, KV pages and the snapshots of paused requests share once they leave the card. It is host memory, not GPU memory, and Windows now pins all of it too (earlier releases clamped it there to about 4.6 GiB).

Overrides, from the environment: NINFER_HOST, NINFER_PORT, NINFER_MODEL, NINFER_SERVER, NINFER_CHAT_TEMPLATE, NINFER_ALLOWED_HOST (more names the server answers to, such as gpubox.lan; see Host and Origin checks) for every profile, plus NINFER_CONTEXT, NINFER_CONCURRENCY, NINFER_KV_CAPACITY, NINFER_KV_DTYPE, NINFER_SPEC, NINFER_DRAFT_TOKENS, NINFER_PREFILL_CHUNK, NINFER_VISION, NINFER_HOST_CONTEXT_MIB (8192), NINFER_MIN_P (0.03) and NINFER_PRESENCE_PENALTY (0.5) for the default ones; the last two are the loop guard, and default leaves the registered sampling preset in force. On Qwen3.8-Flash-Next those two are passed only when set, so its registered presets stay in force by default, and NINFER_REASONING_LOOP applies there too. Other serving flags are opt-in overrides too: NINFER_AUTO_HOST_CACHE=on, NINFER_MAX_OUTPUT_TOKENS, NINFER_MLP_A8_DECODE=on, NINFER_CONTEXT_STORE and NINFER_REASONING_LOOP=stop|conclude (listed with their caps at the top of run.sh / run.bat). Any other ninfer-serve flag works the same way as NINFER_<FLAG> (--cors is NINFER_CORS=on, --prefill-stall-budget-ms 40 is NINFER_PREFILL_STALL_BUDGET_MS=40). The reasoning-loop guard stays off unless set: it has not yet fired on a real Qwen3.8 run, and its thresholds were measured on other models (serving, under --reasoning-loop). The launchers bind 127.0.0.1; NINFER_HOST=0.0.0.0 exposes the server to the LAN, unauthenticated. On Windows, set NINFER_SPEC=mtp && run.bat qwen38-27b; on Linux, NINFER_SPEC=mtp ./run.sh qwen38-27b.

Custom chat templates. NINFER_CHAT_TEMPLATE points the launcher at a local Jinja file, which overrides the artifact's built-in template for that run — handy for a model-specific fixed template instead of the maintained one. It maps straight to ninfer-serve's own --chat-template FILE (docs/serving.md), so it works the same way if you drive the server binary directly, e.g. from an unpacked release archive without the launcher:

# Linux, release archive root (add whatever other serving flags you'd normally pass)
./ninfer-serve models/qwen3_8_27b.ninfer --host 127.0.0.1 --port 8080 \
  --chat-template my-template.jinja
# Windows, release archive root (add whatever other serving flags you'd normally pass)
ninfer-serve.exe models\qwen3_8_27b.ninfer --host 127.0.0.1 --port 8080 `
  --chat-template my-template.jinja

The template engine (third_party/llama-jinja) is from the same family llama.cpp uses, so templates written for llama.cpp — including third-party "fixed" chat templates distributed for specific models — generally work unmodified. Changes to the file take effect on the next restart.

Lanes share one KV pool. --kv-capacity is the pool and --max-context the per-request cap, and the launchers set both to the profile's context. Any one request can use the full context, but the lanes' requests together hold at most that many tokens at a time, so two users can't each keep a 200K conversation resident. Requests take KV pages as they advance rather than reserving them up front; when the pool runs short the server first drops retained cache entries, then pauses the younger request (saving a snapshot to host memory, or replaying its tokens later) and resumes it once there is room. A lane adds only its fixed state, not a second pool.

If the GPU is busy (a desktop, a browser or a game holding VRAM), the default profiles still start: their context is a ceiling, and the server starts at the largest context that fits the memory free at launch, keeping 256 MiB spare, and prints one line saying what it chose (context lowered to 172,032 tokens (asked for 188,416) ...). Closing what holds the GPU and restarting gets the full context back. If not even 32,768 tokens fit, it stops and says how much memory is missing. An explicit NINFER_CONTEXT (or NINFER_KV_CAPACITY) is honoured as given and fails loudly; NINFER_FALLBACK=off makes the profile's context exact. Directly, ninfer-serve --max-context N --fit-context MIN does the same. By hand, drop a lane first, then speculation (worth 992 MiB on the 35B-A3B), and vision last.

To size a profile that is not listed, open the fit calculator. It takes a model, a KV format and a context length and tells you whether it fits in 24 GiB, the largest context you could run instead, and what the choice costs in decode speed and perplexity. Every constant in it is measured on an RTX 3090 against this fork. It is a single self-contained file with no network access, so docs/config-calculator.html also works opened straight from a checkout.

The fit calculator: Qwen3.8-27B with an int8 KV cache at 32,768 tokens fits in 17.27 of 22.50 GiB, with a memory budget bar and the largest context that fits. Click to open the live page.

The measurement history behind every default is in launcher profiles.

Qwen3.8-27B

The recommended model. A dense model rather than an MoE, so slower per token but more predictable:

.\download-model.bat qwen38-27b          # downloads qwen3_8_27b.ninfer (~19 GB, resumable)
.\run.bat qwen38-27b                      # one user, up to 188,416 tokens, DFlash2, cuBLAS prefill, rk4v4, vision
./download-model.sh qwen38-27b
./run.sh qwen38-27b                       # one user, 262,144 tokens (headless), same flags

The default is the fast profile — about 1.7x the previous prefill and 1.39x the decode:

--spec dflash2 --draft-tokens 7 --lm-head-draft --ngram-draft-tokens 15
--prefill-cublas --prefill-chunk 4096 --kv-dtype rk4v4 --gdn-state-fp16 --vision --vision-residency overlay

--ngram-draft-tokens 15 copies text the conversation already contains (a file it read, a tool result) instead of drafting it: agent turns that write back a file decode 53-76% faster. It stays on with NINFER_CONCURRENCY=2, where the other lane is slowed by at most about 3% when it isn't copying. Set NINFER_NGRAM=off to turn it off.

--adaptive-draft-tokens 3 is an opt-in extra (not in any profile): it captures a second, narrower DFlash2 round and runs it while a request's drafts are mostly rejected. See the CLI guide.

NINFER_SPEC=mtp swaps to --spec mtp --draft-tokens 3 and --prefill-chunk 2048, which runs the full 262,144 tokens with two lanes sharing the pool. From three lanes (NINFER_CONCURRENCY=3 or more) it caps each request at 131,072 tokens instead and sizes the lanes' shared pool to the card (--kv-capacity auto --device-state-slots 0): four long agent sessions then run at once rather than two: 119.9 tok/s aggregate against 98.7 (+21%), and the worst first-token wait 13 s instead of 41 s.

Every qwen38-27b profile except none (not qwen38-27b-qad, whose token embedding is Q8) keeps only the token embedding's first 8,192 rows in VRAM (--hot-embedding-rows 8192; the rest is read from pinned RAM): the same output bit for bit, no measured speed change, and 622 MiB more for the KV cache. NINFER_HOT_EMBEDDING_ROWS=0 turns it off. Measurements are in performance.

Profile lanes context KV measured beside a desktop
tuned (default, DFlash2), Windows 1 188,416 rk4v4 starts with 1.48-1.61 GiB spare (2026-11-26, desktop holding 1.5 GiB); without the hot embedding rows it fitted to 182,272 that day; 196,608 started once in two tries
tuned (default, DFlash2), Linux 1 262,144 rk4v4 headless extrapolation; fitted to the free memory if it does not fit
NINFER_SPEC=mtp 2 262,144 rk4v4 starts with 1.90 GiB free on Windows (1.17 GiB without the hot embedding rows, 2026-11-26)
NINFER_SPEC=mtp NINFER_CONCURRENCY=4 4 131,072 each, pool sized to the card rk4v4 pool 330,240 tokens on Windows, 932 MiB free (2026-11-26): four 75-84K-token agent sessions all run at once, 119.9 tok/s aggregate against 98.7 with the old one-context pool
int8 1 65,536 int8 2.85 GiB left unused

Accuracy vs context: the profiles keep plain rk4v4 on purpose. It is the smallest KV format, which is what lets them reach the full context (at a 32K cache rk8v4 decodes faster; see below), but it is also the 27B's lossiest (+3.56 mnat NLL against int8). If you would rather trade some context for accuracy, add a per-layer mix yourself:

--kv-dtype ΔNLL vs int8 KV bytes/token Trade on a 24 GB card (not yet measured on a 3090)
rk4v4 (profile default) +3.56 17,920 smallest, most context
rk4v4x12,int8x4 +1.69 21,888 half the loss; 22% more KV per token plus an INT8 attention workspace (2.26 GiB more than rk4v4 at 262,144 on the V100), so the fitted context comes down
rk4v4x4,int8x12 −0.13 29,824 int8-level accuracy; 66% more KV per token, so expect a clearly shorter context

The launchers fit the context to the free memory, so a mix runs; it just holds fewer tokens. On the V100, rk4v4x12,int8x4 was no slower than rk4v4 (decode +3%, 162K prefill +18%).

DFlash2 takes one lane because its advantage is largest at one stream (+38.6% decode at C1, +31.6% at C2), and its draft weights use most of the ~1.45 GB that the full context needs beside a desktop. The 27B is tighter than the 35B-A3B because of the model, not the tuning: 16 full-attention layers × 4 KV heads × 256 head_dim is 3.2× the KV per token of the 35B-A3B's 10 × 2 × 256. The linear memory model behind these contexts is in launcher profiles.

Fast prefill costs context. The tuned profile's cuBLAS prefill at chunk 4096 is part of every context figure above. Its runtime reservation against leaner settings, measured 2026-10-02 (ninfer_bench, DFlash2 K=7, rk4v4, 4K prompt; about 17 KiB of KV per token):

Prefill setting runtime reservation prefill context it costs
cuBLAS, chunk 4096 (launcher default) 1,536 MiB 3,246 tok/s —
default route, chunk 4096 1,285 MiB 1,900 tok/s cuBLAS itself: ~250 MiB, ~15K tokens
cuBLAS, chunk 2048 1,298 MiB 2,975 tok/s ~240 MiB, ~14K tokens
default route, chunk 1024 797 MiB 1,773 tok/s whole setup: ~740 MiB, ~44K tokens

On the 27B the speed comes from the cuBLAS route itself — a larger chunk on the default route barely helps — so the launcher trades about 44K tokens of context for 83% faster prefill, which pays for itself in agent sessions that ingest long prompts. NINFER_PREFILL_CHUNK=2048 keeps 92% of the speed for ~14K tokens back. (The 35B-A3B makes the same trade differently: there the chunk size, not the route, carries most of the gain; see its section.)

The default Qwen3.8-27B artifact stores its token embedding as Q4 and its head as Q6, so the --embedding-q4 and --lm-head-q6 load-time transcodes the upstream file needed are not passed. --gdn-state-fp16 (FP16 recurrent state, -72 MiB per device state slot) is measured free on quality. The 27B's StateImage is 74.5 MiB with the FP16 state; retained ones beyond the card's slots, KV pages and paused requests' snapshots share the 8 GiB of pinned host RAM that --host-context-mib 8192 sets aside — host, not device. Lower it with NINFER_HOST_CONTEXT_MIB if the box is short on RAM (0 keeps the cache on the card).

Qwen3.6-35B-A3B

The MoE alternative, for more lanes. The launchers run rk4v4 KV (twice INT8's context per GiB for +0.21% perplexity), MTP3 speculation plus the draft head, vision, and since 2026-10-02 the cuBLAS prefill route at chunk 4096 (8,848 tok/s on a 4K prompt, against 5,470 on the old default route at chunk 512). That route's larger runtime reservation costs context beside a desktop:

Profile (rk4v4, MTP3 + draft, vision) lanes context starts beside a desktop
Linux — default 3 262,144 not re-measured with the cuBLAS route; fitted to the free memory if it does not fit
Windows — default 2 212,992 yes, 220 MiB free (229,376 refused, 27 MB short)
NINFER_PREFILL_CHUNK=1024 on Windows 2 262,144 yes, 138 MiB free; 7,140 tok/s prefill, default route
NINFER_CONCURRENCY=4 4 262,144 no, 48 MB short; a headless card should fit

Measured 2026-09-24. With rk8v4 the same profile needed the ~1.5 GiB a desktop holds, so Windows ran one user at 147,456 tokens; rk4v4 stores the same context in 31% less memory.

Qwen3.8-Flash-Next (preview)

The 48-layer, 512-expert Qwen3.8-Flash-Next runs in two builds that you choose between (below). The first is the ISTA DASLab GSQ-RCO IQ2_XS GGUF, converted exactly (no re-quantization) into a 39.2 GB .ninfer plus a 29.1 GB n-gram volume beside it (tools/convert/qwen4_exp.py; plan). It also runs on a 32 GB Tesla V100 under Linux with its full 262,144-token context (V100 guide). Start it with:

set NINFER_MODEL=K:\ninfer-models\qwen4exp\qwen4exp-iq2xs-mtp-vision.ninfer
run.bat qwen38-flash-next

The -mtp artifact is the same conversion with Strata's MTP drafter added (--mtp-gguf, weight conversion); with it the launcher turns on MTP speculation (up to 3 drafts per round), which gives the same output as plain decoding. The -mtp-vision artifact also carries the vision tower from the model's mmproj GGUF (--mmproj); with it the launcher passes --vision, and the server answers OpenAI and Anthropic requests with images (a 768 x 512 image is 384 tokens and encodes in about 0.1 s; the tower waits in host RAM and borrows VRAM from the expert cache only while it encodes). A plain qwen4exp-iq2xs.ninfer runs without speculation.

It pins all 33 GiB of routed experts in host RAM (startup refuses, saying how much is missing, when Windows cannot keep 2 GiB free beside them), keeps the most-used ~11,000-12,500 experts in a VRAM cache whose state is saved beside the model so the next start is warm, and serves one request at a time at up to 32K tokens with INT8 KV. Repeated and continued prompts reuse their prefix from a 4 GiB pinned host-RAM cache (NINFER_PREFIX_CACHE=off turns it off): a repeated 28K-token prompt starts answering in 0.1 s instead of 11.7 s, and the next turn of that conversation in 0.95 s (measurements). Checkpoints can also live on local disk (--context-nvme-mib, with RAM as their cache, or alone with --host-context-mib 0) and survive a restart (--context-store DIR, NINFER_CONTEXT_STORE in the launcher). One lane is the default; NINFER_CONCURRENCY=2 opts into two (three or more are refused). Measured on this RTX 3090 with a warm expert cache: decode after 1K / 8K / 32K prompts is 108-109 / 111 / 112-113 tok/s with MTP and 81 / 80 / 78 without (Strata with MTP 105 / 112 / 107, plain 71 / 70 / 66); prefill is 2,345 / 2,422 / 2,372 tok/s at 4K / 32K / 128K with the volume on NVMe (Strata 1,912 / 2,397 / 2,184). Re-run on 2026-10-13 on this release's binary with the model and volume on the C: NVMe drive, plain decode and prefill reproduced (82 / 83 / 81 tok/s, 2,350-2,450 tok/s at 8K-30K); MTP decode on that run's own prompts (document summaries rather than the earlier prompt set) was 96-98 tok/s, 1.16-1.22x plain, because speculation pays off less on text that is harder to predict. Decode speed and its breakdown are in the plan; the server reference is docs/serving.md.

Which Flash-Next build?

run.bat qwen38-flash-next-iq3 serves the same model from Unsloth's Dynamic v3.1 UD-IQ3_XXS GGUF (about 3.0 bits per routed weight against 2.35 for the IQ2_XS build). It reads better and runs slower, and it cannot take images. Measured on this RTX 3090 with a warm expert cache, the model and the n-gram volume on one SATA SSD, 512 generated tokens, medians of 5 requests after a 1K / 8K / 30K prompt (model card has the ranges):

IQ2_XS (qwen38-flash-next) UD-IQ3_XXS (qwen38-flash-next-iq3)
Perplexity, six fixed texts, 5,114 positions (lower is better) 6.315 5.859 (-7.2%; paired -0.075 +- 0.012 nats)
Decode with MTP, tok/s 115 / 111 / 106 61 / 62 / 64
Decode without MTP, tok/s 84 / 86 / 83 46 / 55 / 56
Prefill, tok/s 1,142 / 2,225 / 2,293 650 / 894 / 905
Images yes no
Available RAM needed to start about 40 GiB about 42 GiB

Pick IQ2_XS for speed and images, UD-IQ3_XXS for the best text quality. The UD-IQ3_XXS build keeps its experts partly in VRAM and partly in pinned host RAM (--partial-ram-residency, on in the launcher), which is why it takes no images and prefills slower. Both read one n-gram volume, downloaded once by download-model. The quality figures compare the two builds with each other on short fixed texts, not with the unquantized model. How its files are made, including the one place the converter rounds, is in weight conversion.

A later session measured a batch of opt-in speed options from #383 ("Basalt learnings") against off, each on an RTX 3090, ABBA A/B, 12 repetitions: --prefill-cpu-share 0.4 is the clear win on prefill (+15.47% median, every repetition faster); --moe-gate-up-registers the best decode-side gain (+2.49%). The launchers' tuned configuration (scripts/profiles/qwen38-flash-next-tuned.json, plus --mtp-joint-acceptance and --gdn-async-commit, which they add with --spec mtp) turns on every option that measured as a confirmed win or wash; the full per-option table, including the regressions left off (--ngram-prefetch, --cpu-verify-misses, --hc-int8, --ggml-decode-mma), is in docs/performance.md and docs/serving.md. These are per-option deltas against off, not a combined number: no run measured every winning option stacked together.

A later session built a genuinely batched draft-and-verify across both lanes of NINFER_CONCURRENCY=2 (today's two-lane mode otherwise always falls back to plain, non-speculative decoding the moment a second request joins a round). It works and is bitwise-exact, but ships off by default behind a new flag, --mtp-rows-verify: a reproducible bug leaves one of the two lanes' acceptance near zero every round once they genuinely speculate together, which currently makes 2-lane decode slower than the plain fallback it would replace. Correctness is unaffected either way. Details, the six other bugs found and fixed getting there, and what the flag needs (--mtp-joint-acceptance) are in docs/maintainer/mtp-multi-row-lanes-design.md and docs/performance.md.

Keep the n-gram volume on your fastest drive. The 29 GB .ngram file is read on every prompt, the 40 GB model only once at load. If the model sits on a SATA SSD or a hard disk, copy just the .ngram file to an NVMe drive and point the launcher at it; the model can stay where it is:

set NINFER_NGRAM_VOLUME=C:\ninfer-models\qwen4exp\qwen4exp-iq2xs.ninfer.ngram
run.bat qwen38-flash-next

With the plain model on a SATA SSD, that made prefill 1.37x / 1.11x / 1.13x faster at 4K / 32K / 128K prompts and steadier from one prompt to the next; plain decode barely moved (+0.8%). The plain and -mtp artifacts share one volume (the -mtp conversion reuses it), so one copy serves both. The launcher stops with a message if the file is missing, and the server refuses a volume that belongs to another conversion.

Building from source

Only needed if you are changing the code — the release archives are prebuilt for sm_86. A Tesla V100 (sm_70) always builds from source: scripts/v100_build.sh, then scripts/run-v100.sh (see the V100 guide).

scripts/build.ps1 (Windows) and scripts/build.sh (Linux/WSL) pin the toolchain this project needs and fail with a message naming the real cause when one is missing. Three things are not the defaults on a typical machine: MSVC 14.4x from VS 2022 BuildTools (CUDA 12.8 rejects VS 2026's 14.50), CUDA 12.8 forced through CUDACXX, and the Ninja generator. Both builds need CUDA 12.8 or newer and CMake 3.28 or newer; Linux uses GCC 13 with system packages or the pinned vcpkg manifest.

.\scripts\build.ps1                  # configure + build into build-ninja
.\scripts\build.ps1 -Test            # ... and run the test suite
.\scripts\build.ps1 -Package         # ... and build the release archive
./scripts/build.sh --test --package

On Bazzite and other distributions the Dockerfile is the shortest path: docker build --tag ninfer-3090:sm86 .. NixOS is supported through flake.nix. The Linux and Windows guides have the details.

Features

  • Native SM86 CLI and server applications for Linux and Windows, with prebuilt release archives and launchers that pick measured flags.
  • OpenAI Chat Completions, Responses, and Anthropic Messages APIs.
  • Structured JSON output (response_format / text.format / output_config.format), enforced during sampling under every speculative backend.
  • MTP3 and DFlash2 speculative decoding, with ReplaySSM keeping speculation inside 24 GB.
  • Seven KV-cache formats, from bf16 to the 4-bit-key rk4v4 that reaches the native 262K context, plus per-layer INT8-family mixes (--kv-dtype rk4v4x12,int8x4).
  • Image understanding on Qwen3.8-27B and Qwen3.6-35B-A3B, with overlay residency that keeps the vision tower off the device between images.
  • Prefix reuse and a host-tier context cache for repeated or shared prompts, backed by one pinned Host budget (--host-context-mib) that --auto-host-cache can size from the machine's free RAM.
  • none, low, medium, and xhigh reasoning effort on Qwen3.8.
  • Concurrent cohorts of one to eight requests.
  • Layer-pipeline execution across several GPUs on Linux, verified on real 2x RTX 3090 and 2x RTX A4000 hardware.
  • Per-request prompt grafts: named phantom-KV prefixes injected by token replay or direct KV injection, including under MTP and DFlash2 speculation.
  • Per-request LoRA adapters on the dense models: PEFT adapters loaded with --lora NAME=PATH and selected with "lora": "NAME", served beside the base model (LoRA adapters).

Serving APIs

The server supports:

  • OpenAI Chat Completions;
  • OpenAI Responses Core with streaming and local continuation state;
  • Anthropic Messages;
  • constrained output: JSON mode, JSON Schema, GBNF grammar, choice and regex, plus strict and forced tool calls (docs);
  • compatible-prefix reuse of retained conversations, with a checkpoint at the stable boundary before each response, so a client that resends the last reply rewritten (its reasoning dropped, say) recomputes only from there; editing an earlier message may fall back to an earlier checkpoint or a full prefill;
  • retained conversations survive a restart in a local context store (--context-store), optionally copied to an S3-compatible bucket (docs);
  • Prometheus metrics at GET /metrics (docs) and a read-only GET /props;
  • a live dashboard page at GET /dashboard: throughput, draft acceptance, lanes and GPU readings (docs);
  • prompt-rendered function tools and parsed tool calls (returned to the client, not executed);
  • bounded pending-request admission and JSONL request logs.

See HTTP serving and CLI usage.

Qwen3.8 reasoning effort

Qwen3.8-27B supports distinct reasoning-effort modes. xhigh injects the checkpoint's extended deliberation instruction, asking it to validate assumptions and consider alternatives — a real prompt-template change, not a sampling alias.

Value Qwen3.8 behavior
none Disable thinking
low Keep reasoning brief and focused
medium Use normal Qwen3.8 thinking
xhigh Use extended deliberation and verification

OpenAI Chat Completions accepts a top-level reasoning_effort field:

{
  "model": "qwen3.8-27b",
  "messages": [{"role": "user", "content": "Solve this carefully..."}],
  "reasoning_effort": "xhigh",
  "max_tokens": 4096
}

OpenAI Responses uses "reasoning": {"effort": "xhigh"}. Anthropic Messages uses "output_config": {"effort": "xhigh"}. For the native CLI, pass --reasoning-effort low|medium|xhigh, or --no-thinking to disable reasoning. Chat Completions returns hidden reasoning separately as message.reasoning_content.

Speculative decoding with DFlash2

Qwen3.8-27B artifacts carrying the DFlash2 companion weights support --spec dflash2 with draft counts 1..15 and either full or optimized proposal heads; CLI usage discusses the draft count. DFlash2 runs with --vision, verified against the committed image_chart fixture: target verification carries its own continuation RoPE position, so a multimodal row keeps its per-sequence rope_delta through verification. On that fixture it accepts 85.7% of drafts (7.00 tokens/round) and produces byte-identical output to the non-speculative vision run. --spec dflash (v1) is a 35B-A3B backend and is refused by a 27B artifact.

How cohort batching works

The C number is the maximum number of requests NInfer can run together. C1 favors one interactive user; C8 can combine up to eight active requests into each GPU step for much higher total output.

Follow-up requests do not need to arrive at the same instant. When a running request finishes, the next waiting request can join at a safe generation boundary. Empty or finished lanes are skipped, so a C8 server also works normally with only one, two, or four active users.

This is deliberately more bounded than datacenter-style dynamic batching. The maximum number of users and GPU memory are chosen when the server starts. In return, memory use stays predictable on a 24 GB card and the server can reuse fast CUDA Graphs instead of rebuilding work continuously.

Models

Model Artifact Size Notes
Qwen3.8-27B pinned v3 artifact 17.68 GiB Recommended. Validated at C1–C8 with ReplaySSM. This fork's 3090 conversion: imatrix-weighted encoder, 4-bit embedding, 6-bit head. Carries vision, MTP and the DFlash2 bundle for --spec dflash2
Qwen3.8-27B, NVIDIA NVFP4 QAD (new) pinned v3 artifact 18.99 GiB Higher accuracy, slower. NVIDIA's quantization-aware-distilled NVFP4/FP8 checkpoint imported exactly (model card), with vision, MTP and the row above's DFlash2 drafter. Lower perplexity than the row above on every domain measured; on a V100 MTP3 decodes 90 tok/s on code against its 110 (DFlash2, NINFER_SPEC=dflash2: 116 on code, slower than MTP3 on prose). Measured on the Tesla V100; not yet on the RTX 3090
Ternary Bonsai 2 27B pinned v3 artifact 8.87 GiB Prism ML's ternary Qwen3.8-27B (2.125 bits per weight), this fork's 3090 conversion with vision, MTP, DFlash2 and a proposal head. 6.7 GiB of weights; on one RTX 3090 about 88-90 tok/s plain and 235 on average over 12 chats with --spec dflash2 --draft-tokens 7 (250-300 on code and arithmetic), 572 tok/s aggregate at 8 requests with MTP3, the full 262,144-token context, prefill 2.8-2.9k tok/s, quick-corpus perplexity 5.627. Run it with ninfer or ninfer-serve directly: it has no run.bat profile yet
Qwen3.6-35B-A3B pinned v3 artifact 21.23 GiB Carries the DFlash bundle for --spec dflash
Qwen3.6-27B pinned v3 artifact 16.29 GiB Supported with more runtime headroom
Qwen3.8-Flash-Next (preview) pinned v3 artifact 38.20 GiB in two files + 27.13 GiB n-gram volume Windows, one request at a time (two lanes opt-in), 64 GB RAM. This fork's exact conversion of the GSQ-RCO IQ2_XS GGUF with the MTP drafter and vision tower. Keep the n-gram volume on NVMe
Inkling-2-Mini (new, V100 and RTX 3090) pinned v3 artifact 22.27 GiB with DSpark and vision Tesla V100 32 GB (Linux, up to 8 requests at once) or RTX 3090 (measured under WSL and on Windows). This fork's exact conversion of Unsloth's UD-Q8_K_XL GGUF: lossless, unpacking the expert records reproduces every source tensor byte for byte. See Inkling-2-Mini
Qwen3.8-Flash-Next, UD-IQ3_XXS (preview) pinned v3 artifact 53.17 GiB in two files + the 27.13 GiB n-gram volume of the row above Windows, one request at a time, 64 GB RAM (about 42 GiB available), text only. This fork's conversion of Unsloth's Dynamic v3.1 UD-IQ3_XXS GGUF with the MTP drafter: lower perplexity than the row above, about half the speed

download-model qwen38-27b, qwen38-27b-qad, bonsai2-27b, qwen36-35b-a3b, qwen36-27b or inkling2-mini (.bat on Windows, .sh on Linux) fetches the pinned revision into models/ and verifies it. download-model qwen38-flash-next fetches the Flash-Next model, its second file and the n-gram volume the same way (qwen38-flash-next-iq3 fetches the UD-IQ3_XXS build, which reuses the same volume if it is already there); it asks which folder the volume goes in (NINFER_NGRAM_DIR answers in advance), because the volume is read on every prompt and an NVMe drive prefills 1.1-1.4x faster than a SATA SSD. Optional bundles cost nothing in VRAM unless selected: the DFlash and DFlash2 weights are bound only with --spec dflash/--spec dflash2.

Upgrading a v2 file. This release reads only the v3 .ninfer container; v1 and v2 files are refused at load. Upgrade an existing official v2 file instead of re-downloading it:

python tools/upgrade_ninfer_v2_to_v3.py models/qwen3_8_27b.ninfer models/qwen3_8_27b.v3.ninfer

The upgrade needs only the Python standard library, runs on Windows and Linux, keeps every weight byte, and installs the maintained chat template (weight conversion). A load error about the container version means either an older executable reading a v3 file, or this executable reading a v1/v2 file that needs the upgrade. Many of the published RTX 3090 figures were measured against the v2 revisions (18dfc887 for Qwen3.8-27B, c8b8c1c0/560f227e for Qwen3.6-35B-A3B), whose weight bytes are unchanged in v3. Qwen3.8-27B figures published before 2026-10 used upstream's weights (neroued/Qwen3.8-27B-NInfer 1cbd84e7, 19.03 GiB); the current pin is a different encoding with fewer weight bytes per token and needs this fork's executables.

Every downloader shipped here is pinned and verified, with one deliberate exception. The Nix app download-qwen36-35b-v2 tracks upstream main to try a newer artifact than the measured one, so it has no size or hash to check and cannot safely resume. It writes to its own filename, refuses to resume, and is not the artifact the tests or the published figures use.

Inkling-2-Mini (new, V100 and RTX 3090)

Inkling-2-Mini is Thinking Machines' 26.2B-total MoE, 3.4B active per layer pass and 5.4B per token: 24 layers, of which the middle 12 run three times per token (48 layer visits), 128 experts with top-8 sigmoid routing, NVFP4 experts on layers 0-19, and a learned relative attention bias instead of RoPE. It takes text and images; it has no video input.

On one Tesla V100 32 GB, ninfer-serve serves it over the OpenAI chat, Anthropic messages and Responses routes, with streaming, tool calls, reasoning and thinking budgets, and images with --vision. Its own trained block drafter, DSpark, speculates on greedy and sampled requests (--spec dspark); greedy output is plain decoding's, and a sampled request draws plain sampling's tokens under the same seed. Measured through ninfer-serve on master dad1623b (2026-11-22, 250 W limit, PCIe Gen3 x4 eGPU) unless a figure says 200 W:

  • Decode: up to 120.7 tok/s with DSpark (a maths prompt; code 115.4, lists 99.8, prose 88.2), and 93.4-94.4 tok/s on average over 12 chat requests against 78.5-78.8 plain. Sampled at temperature 0.8, 83.5 against 74.9 plain. Re-measured on master dc867300 (2026-11-23) at 200 W in the full serving configuration (--max-context 262144 --vision --kv-dtype int8, both adapters loaded but unused): 94.3 tok/s with DSpark (94.32-94.37 over two legs, 61.0% of drafts accepted) against 78.0 plain (78.03-78.04). Cheaper drafting rounds (2026-11-28: int8-activation drafter projections, a 4-bit drafter head copy, one-launch history copies; greedy output unchanged) raise DSpark to 108.9 tok/s in the same configuration (99.4 on the master build before them, same box and day). Candidate picks and up to 7 drafts a round on V100 builds (2026-11-28, same output) take it to 110.7 tok/s, and structured output from 140.7 to 170.2 at 8,192 context.
  • Prefill (200 W, 2026-11-24, real-text prompts; the --prefill-cublas default of a V100 build: the prefill's controllers, router and busiest experts on cuBLAS, and layers 20-23's BF16-bank experts on the tensor-core kernels): up to 2,727 tok/s (a 7,974-token prompt, TTFT 2.92 s, at --max-context 131072 --prefill-chunk 8192); 2,227 at 34K and 1,577 at 100K at that chunk. At the default chunk (2048, which the engine picks) 2,170 tok/s at 8K (TTFT 3.68 s), 1,962 at 1K (0.55 s), 1,839 at 34K and 1,339 at 100K (74.8 s). At the full 262,144 with DSpark and vision (chunk 2048): 2,125 tok/s at 8K (TTFT 3.75 s), 1,930 at 1K, 1,809 at 34K and 1,324 at 100K. Those are 3-9% above the layers 20-23 experts on cuBLAS (2,071, 1,807, 1,764 and 1,300 at 131,072; 2,033, 1,779, 1,734 and 1,285 at 262,144), and 0.6-1.2% at chunk 8192. A wider chunk prefills a long prompt faster but resumes a chat only at its multiples (see prefix reuse), and with FP16 KV it does not fit beside DSpark and vision at 262,144. A 230-token image prompt answers its first token in 375-398 ms (250 W).
  • Context: the full 262,144 tokens with DSpark and vision on. Decode at 100K context runs at 48 tok/s.
  • Low-bit KV (opt-in, lossy): --kv-dtype rk4v4 (or int8, rk8v4) codes the 8 global KV rings in 4 or 8 bits: plain decode 41.1 tok/s at 200K context against 34.8 (+18%), 53.2 against 47.8 at 100K; it frees 5,952 MiB at 262,144 (int8: 3,968), so DSpark keeps its Q8 head and whole-context window beside vision (12 chats 93.4 against 89.4 tok/s). KLD from FP16 is 2.8x the FP32 noise floor for rk4v4 and 1.06x for int8; needles at 100K and 200K are found. One request at a time; prefill past 100K is 5-8% slower. Off by default.
  • Several requests: --max-concurrency up to 8, 198.2 tok/s aggregate at 8 (121.8 at 2, 170.5 at 4), each request's tokens the same as alone. Requests at N > 1 decode without DSpark.
  • Adapters: two opt-in uncensoring adapters (--lora, --graft, selected per request) take the refusals on 20 harmful prompts from 20/20 to 0/20, and decode 4-5% slower than without an adapter. Other requests run the base model unchanged.
  • Accuracy: with the exact FP32 program (--kv-dtype fp32), greedy text matches CPU llama.cpp (Unsloth's PR at the same revision) on 58 of 58 checked positions, and image prompts on 48 of 48 tokens from identical pixels. The defaults (FP16 KV, tensor-core prefill) differ from it by about as much as reordering FP32 sums.
  • Prefix reuse: on by default; a prompt that starts with the same tokens and images resumes from a snapshot kept in pinned host memory (236 MiB), and the result reports reused_prompt_tokens. A chat's second turn at 8K answers in 1.03 s instead of 3.93 s (200 W, 262,144 with DSpark, vision and INT8 KV; 6,144 positions reused at the default chunk 2048; 1.77 s at --prefill-chunk 4096, 3.04 s at 8192, which reuses nothing below 8,192), at 34K in 1.51 s instead of 21.4 s (250 W).
  • Not yet: the context store and host cache tiers, JSON-schema output and logprobs.

On an RTX 3090 (24 GB) the same artifact runs, measured under WSL on 2026-11-23 (315 W limit). Its layers 20-23 experts, 7.6 GiB of BF16 in the file, are the checkpoint's MXFP8 values: the 3090 holds them as MXFP8 (3.9 GiB), re-encoded at load and checked exact, so every output is the same, bit for bit (--mxfp8-experts, automatic when the BF16 weights would leave under 4 GiB free; the V100 keeps BF16).

  • Decode: 104 tok/s plain, the mean over 12 greedy chats (103.3-103.9 at 64K and 131K context). 2.9% faster than holding the experts in BF16 (100.6), since a token reads half the bytes for those layers.
  • Context: 137,216 tokens plain; 118,784 with DSpark; 106,496 with vision; 89,088 with both (--fit-context finds the largest multiple of 1,024 that fits beside the desktop; a busier desktop leaves less). With the opt-in low-bit global rings (--kv-dtype rk4v4, lossy, one request at a time) the full 262,144 fits plain (1.5 GiB to spare) and with DSpark and vision both on; decode after a 111,650-token prompt is 69.5 tok/s against 58.7 with FP16 rings (+18%), and the 12 chats run at 102.7.
  • Prefill: 2,410 tok/s on an 8.4K-token prompt (TTFT 3.5 s) and 1,784 on 1.2K (0.65 s), at 65,536 context with vision on. Long prompts, every token computed: at 131,072 context (FP16 rings, chunk 512) 1,650 tok/s at 8.4K, 1,440 at 36K (TTFT 25 s) and 1,090 at 112K (1 m 43 s); at 262,144 with rk4v4 (chunk 2048) 1,424 at 112K (78 s), 1,030 at 200K (3 m 13 s) and 887 at 254K (4 m 46 s), decode after them 69.5, 56.0 and 49.9 tok/s.
  • Several requests: --max-concurrency up to 8, 282 tok/s aggregate at 8 (153 at 2, 228 at 4), each request's tokens the same as alone. Asked for 262,144 at 8, each request gets 11,520 positions.
  • Native Windows (2026-11-23, master 311ad169a, same card and limit): the same start, log and greedy text as under WSL. Plain decode 101.4-101.8 tok/s over the 12 chats (2% under WSL); prefill at 65,536 with vision 2,421 tok/s at 8.4K (TTFT 3.5 s) and 2,416 at 1.2K (0.48 s; the first prompt after a start is slower); at 131,072, 1,640 at 8.4K, 1,449 at 36K and 1,077 at 112K (1 m 44 s). --fit-context found 128,000-136,192 plain, 113,664-116,736 with DSpark, 101,376-105,472 with vision and 80,896-87,040 with both, depending on what the desktop held; rk4v4 fits all 262,144 with DSpark and vision. --max-concurrency 8: 277 tok/s aggregate (224 at 4, 150 at 2).
  • DSpark gains less here than on the V100, because plain decode is already fast: 103.5 against 103.3 tok/s on the 12 chats, 115.5 on a code prompt, but 73-74 against 98 for a short reply after a 1.2K-token prompt. Leave it off unless the work is mostly code.
scripts/download-model.sh inkling2-mini      # WarlaxZ/Inkling-2-Mini-NInfer-V100, 22.3 GiB, pinned and verified
#   on Windows: scripts\download-model.bat inkling2-mini
ninfer-serve models/inkling2-mini-q8.ninfer --vision --spec dspark                        # Tesla V100
ninfer-serve models/inkling2-mini-q8.ninfer --vision --max-context 65536                  # RTX 3090

The model card has the file hashes and sources. To convert it yourself, take the three GGUFs from unsloth/Inkling-2-Mini-GGUF and the tokenizer files and chat template from the thinkingmachines/Inkling-2-Mini checkpoint (CKPT below), then:

CKPT=/path/to/Inkling-2-Mini   # the thinkingmachines/Inkling-2-Mini checkpoint directory
python3 -m tools.convert --recipe inkling2_gguf --device cpu \
  --model Inkling-2-Mini-UD-Q8_K_XL.gguf \
  --mtp-gguf dspark-Inkling-2-Mini-Q8_0.gguf \
  --mmproj mmproj-BF16.gguf \
  --resource tokenizer.json=$CKPT/tokenizer.json \
  --resource tokenizer_config.json=$CKPT/tokenizer_config.json \
  --resource chat_template.jinja=$CKPT/chat_template.jinja \
  --out models/inkling2-mini-q8.ninfer

The design, the conversion map and every measurement are in docs/maintainer/inkling2-model.md.

Performance on an RTX 3090

Headline numbers; the full measurements, methods, rejected experiments and earlier baselines are in performance. Upstream's per-model pages under docs/performance/ were measured on an RTX 5090 and are not a statement about this fork.

Latest benchmarks

Qwen3.8-Flash-Next (preview, Windows), same card. A 512-expert MoE at 2 bits per weight, with all 33 GiB of experts pinned in host RAM: 1.15-1.18x Strata's plain decode (81 / 80 / 78 tok/s after a 1K / 8K / 32K prompt against 71 / 70 / 66), 109-113 tok/s with MTP (the launcher default, same tokens as plain decoding; 102.6 after a 128K prompt, in a separate run with the context raised above this release's 32K default) and 2,345 tok/s prefill at 4K, 1.23x Strata's, when the n-gram volume sits on NVMe. One request at a time by default (two lanes opt-in with NINFER_CONCURRENCY=2), 32K context in this release. Details below.

Re-measured on the v0.16.0 release binaries through ninfer-serve (2026-10-14, launcher flags, real text, medians of four requests): 112 / 113 / 104 tok/s decode with MTP after a 1.3K / 8.8K / 29K-token prompt against 84 / 82 / 83 without (1.34x to 1.38x at the shorter two, 1.26x at 29K), at 1,281 to 2,328 tok/s prefill, and a repeated 29K prompt answers its first word in 0.14 s. Measure only after the model and .ngram volume have been read from disk once: a first run after clearing RAM read 93 tok/s decode and a third of the prefill speed. Prefix reuse also works across forked conversations on both Flash-Next and the 27B: after a 1+2 conversation was continued as 1+2+3 and forked as 1+2+4, each branch could be continued again and reused its whole shared prefix, so a 14K-token branch step reached its first word in about 1.3-1.6 s against 5.7-6.5 s cold. Details.

A batch of opt-in options from #383 ("Basalt learnings") were measured on an RTX 3090 (2026-11-11, each against the same option off, ABBA, 12 reps): +15.47% prefill with --prefill-cpu-share 0.4 (the clear win, every repetition faster), +2.49% decode with --moe-gate-up-registers (the best decode-side gain). The launchers' tuned configuration (scripts/profiles/qwen38-flash-next-tuned.json, plus --mtp-joint-acceptance and --gdn-async-commit, which they add with --spec mtp) turns on every option that measured as a win or a wash; two options measured as clear regressions and stayed off (--ngram-prefetch, --cpu-verify-misses). Details.

Qwen3.8-Flash-Next on one RTX 3090: NInfer-3090 against Strata 0.1.38 on the same GGUF

The 27B speed rows were re-measured on 2026-10-02 for the 3090 conversion download-model now fetches, in one sitting with upstream's artifact on the same binaries. Decode is tools/bench/run_chat_decode.py on syv-ai's eight thinking-off prompts (1,024 tokens, INT8 KV, greedy), where upstream's artifact gives 127 tok/s at C1 and 482 at C8. The 27B prefill is ninfer_bench pp4096 on the cuBLAS route the launcher enables, chunk 4096, rk4v4 KV, re-measured 2026-10-24 on an RTX 3090 at its stock 350 W under Linux (+0.156% perplexity for the route). The earlier 187 and 523 came from runs whose workload was not recorded and that this harness does not reproduce on either artifact. The 35B prefill was measured on 2026-10-02 with its launcher settings (cuBLAS route, chunk 4096, rk4v4; 5,470 tok/s on the previous default-route chunk 512). Its one-stream decode is ninfer_bench tg512 with MTP3 and the draft head, rk8v4 KV, on the v0.16.0 release binaries (2026-10-14); its all-lanes figure is ninfer_bench with six concurrent requests of 128 tokens each, MTP3, INT8 KV and a 4,096-token context (2026-10-24, stock 350 W, Linux). The 27B's 262,144 was measured with MTP3 and the draft head; the default DFlash2 profile reaches it on a headless card by extrapolation, and the server fits the context to the free memory where it does not. Sources and conditions are in the sections below.

Faster than v0.15.1

Qwen3.8-27B on one RTX 3090: v0.15.1 against this release

Measured 2026-10-13 on one RTX 3090, with the launcher's settings, as interleaved runs in one sitting (so the pairs compare; the headline table above is an earlier session's absolute figures):

  • Long prompts are read faster. A 16K prompt prefills 6% faster, 32K 12% and 64K 19% (1,823 to 2,172 tok/s). Prompts of 4K and below gain 1-2%.
  • Agent turns that write a file back decode faster. Text copied from the prompt decodes at 454 tok/s against 243 at 2K context (+87%) and 403 against 254 at 32K (+59%). That is the best case; a replay of whole agent sessions (four sessions of Read, Edit and explain turns, up to 117K tokens) gained 42% decode at one lane, with turns that explain rather than copy unchanged to 5% slower. Method and tables: performance.
  • Unchanged: decode of text that is not a copy (-0.2% to -0.4%, same cost per round), and memory, apart from 18 MiB more reserved for copying.

Full table, method and what was not measured: performance/qwen3.8-27b.

Qwen3.8-27B

Decode by speculative backend and concurrency. Aggregate decode tok/s through the serving route, thinking off, greedy; measured 2026-09-19 on upstream's artifact with a workload that was not recorded (the headline table above is the reproducible re-measurement):

C MTP3 DFlash2 K=7 change
1 135.0 187.1 +38.6%
2 238.2 313.5 +31.6%
4 387.4 406.2 +4.9%
8 522.8 does not fit —

Prefill reaches 2,989 tok/s at 4K with --prefill-cublas --prefill-chunk 4096 (+0.156% perplexity) and 1,649 tok/s on the default route. NInfer processes one long prefill at a time, so cohort batching speeds up decode but not prompt ingestion.

Re-measured on the v0.16.0 release binaries (2026-10-14, the launcher's tuned settings, rk4v4 KV). Prefill is 3,143 tok/s at 4K and 2,893 at 16K in ninfer_bench. Through ninfer-serve on real text, DFlash2 K=7 with n-gram copies decodes 126 tok/s after a 1.3K-token prompt, 126 after 8.8K and 110 after 29K; MTP3 gives 116, 119 and 114. ninfer_bench decodes from a one-token seed, so its speculative rows (for example DFlash2 at 61 tok/s) are far below chat speed and only compare builds. Method, the KV-format comparison and the tests run: performance.

Against every other engine's published figures (2026-11-26). On one RTX 3090 at 315 W, with the launcher's settings, NInfer decodes 194.6 tok/s on code (open-jet reports 140), 133.2 on syv-ai's eight chat prompts (HyperQwen reports 131.2 greedy), 47.7 without speculation (open-jet 42.9, llama.cpp 41.5) and 421 tok/s at eight requests (HyperQwen 407), and prefills 2,367 tok/s at 1.2K tokens (HyperQwen 1,940 at 1K). At 98K tokens of context it decodes 94.0 tok/s against open-jet's 95.9, the one workload where another engine reports more. The other figures are their authors' own; chart, method and sources: RTX 3090 comparison.

Against vLLM on the same card (2026-10-02). On the eight thinking-off prompts of syv-ai/qwen38-27b-rtx3090 with MTP3 and INT8 KV, NInfer decodes 118.9 tok/s at C1 and 477 at C8 with the default 27B artifact (2026-10-02; upstream's artifact on the same binaries: 112.7 and 482), against the 111-124 and 407.3 that project reports for patched vLLM. Their card is capped at 250 W against this one's 350 W and they report 5-8% run-to-run spread, so C1 is parity and C8 a lead, measured on different machines. That comparison predates DFlash2 and the cuBLAS prefill route.

An opt-in integer-activation MLP route for cohort decode (--mlp-a8-decode) adds about 1.3% at C8 for a small, oracle-bounded change in output; details.

Qwen3.6-35B-A3B

Aggregate decode with several requests at once, measured 2026-10-24 on an RTX 3090 at its stock 350 W: ninfer_bench --concurrency N, 128 output tokens per request from a one-token prompt, MTP3, INT8 KV, a 4,096-token context, greedy, mean of three repetitions after a warm-up:

Concurrent requests Aggregate decode MTP acceptance
1 231.1 tok/s 51.3%
2 323.0 tok/s 56.3%
4 411.3 tok/s 56.1%
6 452.8 tok/s 55.3%

Single-stream decode with the launcher's speculation (MTP3 and the draft head) measures 311.0 tok/s in ninfer_bench tg512 with rk8v4 KV on the same card and day, against 199.4 without speculation. Re-measured on the v0.16.0 release binaries (2026-10-14): prefill 8,468 tok/s at 4K and 7,749 at 16K (ninfer_bench, rk8v4, cuBLAS route); through ninfer-serve with the launcher's settings, 5,351 to 7,481 tok/s prefill and 272-286 tok/s decode at 1.3K to 29K-token prompts, and 312.7 tok/s in ninfer_bench tg512 with MTP3 against 204.5 without (method and caveats).

A longer 512-token-per-request check reached 286.8 tok/s at C1 and 399.1 aggregate tok/s at C2. Compatible-prefix reuse was validated end to end: a repeated 26-token prompt reused 24 tokens, reducing measured prefill from 371 ms to 10 ms.

Vision

  • Qwen3.8-27B: a 1,920×1,080 image expanded to 2,074 prompt tokens and was read correctly, with MTP3, INT8 KV and a 32K context: 3.29 s TTFT, 98.1 tok/s decode, 96.7% MTP acceptance.
  • Qwen3.6-35B-A3B: three 1,920×1,080 images, 2,081 prompt tokens each, were read correctly with 3.76–4.07 s TTFT and about 159 tok/s decode. That v0.6 test ran without speculation at 32K, because vision was then resident on the device; the overlay residency the launchers now use is what lets vision run beside MTP3 at the full context.

The artifacts also declare multi-image and video support; these tests validated still images.

Choosing a KV format

All seven SM86 KV formats, measured on Qwen3.8-27B (this fork's 3090 conversion). Size and perplexity are what most people weigh; the decode column is the one that surprises, because the smallest formats are not the fastest.

KV profile Bytes/token KV at 2,048 tokens Perplexity vs bf16 Decode at 32K depth
bf16 65,536 128.00 MiB 4.302517 — 44.03 tok/s
int8 33,792 66.00 MiB 4.302505 −0.0003% 45.91 tok/s
fp8 33,024 64.50 MiB 4.302770 +0.0059% 39.92 tok/s
rk8v4 26,112 51.00 MiB 4.308870 +0.148% 46.29 tok/s
k8v4 25,728 50.25 MiB 4.307089 +0.106% 36.22 tok/s
nvfp4 18,432 36.00 MiB 4.312298 +0.227% 39.33 tok/s
rk4v4 17,920 35.00 MiB 4.311406 +0.207% 45.64 tok/s

Measured 2026-10-24 in one session on an RTX 3090 at its stock 350 W under Linux. Perplexity is ninfer-perplexity on the fixed ninfer-ppl-1m-v1 corpus, --quick, context/stride 4096/2048, 261,167 scored tokens — the same corpus and window for every row. Decode is ninfer_bench -pg 32768,128: 128 timed steps on top of a 32,768-token prefill, no speculation, the mean of three repetitions after a warm-up. Attention re-reads the whole cache each step, so a format's cost only shows at depth. The fit calculator has the 4K and 16K points and the same sweep for the 35B-A3B, Bonsai and Qwen3.6-27B.

Which to use:

  • int8 is the quality default. Its perplexity is indistinguishable from bf16 — within 0.00002, below this harness's own reproducibility — and it has the flattest decode curve on the 27B (−4.5% from 4K to 32K).
  • rk4v4 is what the launchers use, for context: 31% smaller than rk8v4 at nearly the same decode and prefill speed, for +0.21% perplexity over int8. It is the format that reaches the native 262,144-token context on the 27B, even alongside MTP3 and the draft head.
  • rk8v4 is the fastest format at a 32K cache on both the 27B (46.3 tok/s) and the 35B (187.6 tok/s), 23% smaller than int8, for +0.15% perplexity.
  • nvfp4 is superseded by rk4v4, which is 3% smaller, scores better, and decodes 16% faster at 32K on both models.
  • fp8 scores within 0.006% of bf16, better than any smaller format, but costs 26% more KV than rk8v4 and 14% of its decode speed at 32K.
  • k8v4 is 1.5% smaller than rk8v4 with slightly better perplexity, but has the worst falloff measured: −23% from 4K to 32K on both models.

With speculation the gap stays small. With MTP3 and the draft head (ninfer_bench -pg P,128, same session), int8 decodes 157.7 tok/s after a 4K prompt against 154.0 on rk8v4 and 153.0 on rk4v4, and all three are level after 32K (143.3-145.0 tok/s). Pick the format for context and quality; under speculation it moves decode speed by 3% at most.

NVFP4 A4 and FP8 A8 weight and activation kernels are a separate axis and need Blackwell; see Current limits.

RotorQuant (rk8v4)

Keys keep the rotated INT8 group-64 encoding; values are stored as signed 4-bit codes, two per byte, over a group-32 scale. Values use a finer group than keys because four bits resolve a group to only 15 levels, so a single outlier would otherwise set the quantization step for 64 neighbours. Halving the value group to 32 costs one extra FP16 scale per 64 dimensions and halves the perplexity penalty, from +0.146% to +0.082%, without costing any context at the automatic-sizing boundary — but recovers only about 15% of the acceptance loss, because acceptance turns on exact token agreement rather than mean error. Values are not rotated: upstream's kv_cache_append contract stores values from the represented BF16 source directly, and measurement showed that is sufficient, so there is no inverse-rotation pass over the attention output.

Lloyd-Max 4-bit keys (rk4v4)

rk4v4 keeps rk8v4's value plane and halves its keys: each rotated key dimension is a 4-bit index into the 16-level Lloyd-Max quantizer for a Gaussian, with one FP16 scale per 64 dimensions. That is the TurboQuant idea (rotate, then snap each coordinate to a fixed non-uniform codebook) without its 1-bit residual stage, which measured no better.

Each codebook level is stored as a fixed INT8 code, so an expanded key is an ordinary rotated INT8 key and attention keeps rk8v4's INT8 tensor-core QK path unchanged. Both attention kernels load the packed keys into registers ahead of use and expand them with byte permutes straight into the existing INT8 key tile, which adds no shared memory; that is what keeps it off the slow path the nvfp4 and k8v4 kernels take (see TODO.md, "KV decode falloff").

Measured together on one RTX 3090 (stock 350 W, Linux), Qwen3.8-27B, this fork's 3090 conversion, 2026-10-24:

KV profile Bytes/token Perplexity vs int8 Decode 4K / 16K / 32K Prefill at 32K
int8 33,792 4.302505 — 48.1 / 46.8 / 45.9 tok/s 1,610 tok/s
rk8v4 26,112 4.308870 +0.148% 49.3 / 47.7 / 46.3 tok/s 1,608 tok/s
rk4v4 17,920 4.311406 +0.207% 49.1 / 47.3 / 45.6 tok/s 1,597 tok/s
nvfp4 18,432 4.312298 +0.228% 47.3 / 43.2 / 39.3 tok/s 941 tok/s

Perplexity is ninfer-perplexity --quick on ninfer-ppl-1m-v1 (4096/2048). Decode is ninfer_bench -pg P,128, no speculation, the mean of three repetitions after a warm-up; prefill is the same runs' 32,768-token prompt on the default route. rk4v4 decodes within 1.5% of rk8v4 at every depth and prefills within 1%. Qwen3.6-35B-A3B, same protocol: rk4v4 decodes at 97-98% of rk8v4 (182.9 against 187.6 tok/s at 32K) and 16% faster than nvfp4 (157.5). Across the attention op benchmark's 18 decode/verify shapes it is at a geometric mean of 1.001x rk8v4's time and 2-3x faster than nvfp4 at 32K.

Context on Qwen3.8-27B, measured with --kv-capacity auto and the standard 1 GiB headroom with a desktop running (1.8 GiB in use):

One request int8 rk8v4 rk4v4
no speculation 171,648 tokens 228,032 tokens 262,144 (native maximum; 1.75 GiB still free)
MTP3 + draft head — 182,336 tokens 262,144 (native maximum)
KV payload at 131,072 tokens — 3.19 GiB 2.19 GiB

For a shared pool serving several lanes, the same memory holds 1.46x as many rk4v4 tokens as rk8v4 tokens.

Per-layer mixes (--kv-dtype rk4v4x12,int8x4, opt-in)

The 27B keeps its whole KV cache in 16 full-attention layers, and they are not equally sensitive: on Qwen3.8-27B the last four carry half of rk4v4's perplexity penalty and the first four none of it. --kv-dtype also takes a per-layer spec, runs of FORMATxCOUNT over those layers in model order, mixing int8, rk8v4 and rk4v4 (the MTP layer stays int8), so the bytes go where they buy the most. It is opt-in and lossy like its members; nothing defaults to it.

Measured on a Tesla V100 at 200 W (2026-11-23), ninfer-perplexity on the held-out corpus, --quick, context/stride 65,536/32,768 (391,000 tokens, 6 domains); ΔNLL is the paired per-domain difference from int8 in millinats, with its standard error over the domains:

KV Bytes/token Perplexity ΔNLL vs int8
int8 33,792 4.16760 —
rk4v4x4,int8x12 29,824 4.16706 −0.13 (se 0.36)
rk4v4x4,int8x4,rk4v4x4,int8x4 25,856 4.17029 +0.65 (se 0.32)
rk8v4 26,112 4.17761 +2.41 (se 0.73)
rk4v4x12,int8x4 21,888 4.17463 +1.69 (se 0.47)
rk4v4 17,920 4.18245 +3.56 (se 0.58)
  • rk4v4x4,int8x12 is int8 within noise in 12% fewer bytes.
  • rk4v4x12,int8x4 halves rk4v4's penalty for 22% more bytes, and beats rk8v4 in 16% fewer.
  • rk4v4x4,int8x4,rk4v4x4,int8x4 has rk8v4's size at a quarter of its penalty.

Speed on the V100 through ninfer-serve with MTP3 (the V100 router's 27B flags, two interleaved runs per format, which agreed within 0.1%): rk4v4x12,int8x4 decodes 3% faster than rk4v4 at 40K and 162K (43.5 / 20.9 against 42.2 / 20.3 tok/s) and prefills a 162K prompt 18% faster; rk4v4x4,int8x12 decodes like int8 at 40K (48.4 against 47.9 tok/s) and 5% slower at 162K (24.4 against 25.7), and prefills 30% slower at 40K. The 12 short chats are level (62.7-63.7 tok/s). The RTX 3090 has not been measured with a mix; its sizes are the same, so a mix trades context for perplexity there. Details in quality-trade-experiments.md.

Several GPUs: pipeline stages (--devices A,B,...)

--devices 0,1 splits the model's layers into one pipeline stage per GPU. Each stage owns its layers whole: weights, the KV cache of its attention layers, the recurrent state of its GDN layers and the scratch it runs in. The point is memory. A model that does not fit one card, or a context that does not, spreads across several, and every card's memory is usable for KV.

ninfer-serve model.ninfer --devices 0,1
ninfer model.ninfer --devices 0,1,2 --stage-layers 20,22,22 --prompt "..."
  • --stage-layers A,B,... sets the layers per stage. Without it the split follows each device's free memory, so the first GPU, which also carries the embedding and head, takes fewer layers and the most KV cache fits on every card at once.
  • The first GPU also holds the embedding, the output head and the round state. The last stage sends the residual back to it, one extra hop per forward pass.
  • It is a memory feature, not a speed feature. The stages run in sequence and each reads only its own weights, so a single stream decodes about as fast as one GPU, minus the boundary hops.
  • Linux only for real multi-GPU. Repeating one id (--devices 0,0) puts several stages on one card, saves no memory, and exercises the whole stage path; it is how the path is tested without a second GPU, and it works on Windows too.
  • Works with a split: the context cache and prefix reuse (including pausing and replaying a request under KV pressure), CUDA graphs, MTP, DFlash/DFlash2 (the draft stays on the first device and the target layers it reads cross back to it), every KV format, and resident vision (the tower and its encode stay on the first device, so the first stage's layer budget carries it), --vision-residency overlay (its window borrows only the first device's memory), prompt grafts, and worker failure recovery.
  • Check vision on a split with tools/vision_smoke.py. It starts ninfer-serve with the flags you give it, sends a single image and concurrent multi-image requests, and exits 1 on any failure, for example python tools/vision_smoke.py --exe ./ninfer-serve --model models/qwen3_8_27b.ninfer -- --devices 0,1 --vision-residency overlay --max-concurrency 2 --max-context 24576 --kv-capacity 49152 --kv-dtype int8. (Releases up to v0.16.0 fail overlay vision on a split with "Paged KV page ranges are only defined for a single-rank pool"; resident vision is not affected.)
  • Boundary transfers stage through pinned host memory. Peer access is not needed, and no consumer PCIe pair measured so far offers it. Measured with tools/tp_probe.cu on rented 2x A4000 and 2x 3090 PCIe boxes, a staged transfer took about 0.03 ms at a decode-sized payload and several milliseconds at a prefill-chunk-sized one, depending on the slot's link width.

Measured on two rented Linux boxes (Qwen3.6-27B, int8 KV, no peer access on either): on 2x RTX 3090 (PCIe 3.0 x16) greedy output is byte-identical to one card, decode is 48.5 tok/s against 46.9 on one card (105.3 against 100.2 with MTP3), prefill is unchanged, and --kv-capacity auto resolves the full 262,144-token context that one 24 GB card refuses. On 2x RTX A4000 the 27B runs at 262,144 tokens with 24.1 tok/s decode (52.6 with MTP3) and 825 tok/s prefill. The tables, the cases checked and the design are in docs/maintainer/pipeline-parallel-plan.md.

Current limits

  • One model per process, on one GPU or split into pipeline stages with --devices (Linux). No tensor parallelism and no CPU/GPU weight offload. The pipeline on the current context engine has been verified only with stages sharing one GPU (--devices 0,0); distinct GPUs are unverified on this build.
  • Concurrency is fixed at startup and limited to 1-8; the compact 35B-A3B fits C1-C6 at 4K and Qwen3.8-27B fits C8/8K with MTP3 through ReplaySSM.
  • The shared KV pool is fixed at startup and is not divided statically among request lanes.
  • This is bounded small-scale batching, not preemptive large-scale continuous batching.
  • Tool calls are returned to the client but are not executed by NInfer.
  • Qwen3.8-Flash-Next (preview) serves one request at a time by default (NINFER_CONCURRENCY=2 opts into two lanes, a small gain on a burst of agent requests) with INT8 KV. It has been built and run on Windows only (Linux is neither built nor tested; its disk tier reads and writes one request at a time there).
  • This fork targets sm_86. NVFP4 A4, FP8 A8 and TMA weight and activation kernels require Blackwell and are unavailable; FP8 and NVFP4 weights are admitted through their A16 dequantizing routes. KV-cache storage is a separate axis: all seven KV formats, including row-scaled FP8 E4M3, run on SM86.
  • sm_80 (Ampere GA100, e.g. an unlocked NVIDIA CMP 170HX) is an added but unmeasured compatibility target: it shares sm_86's instruction set and runs Qwen3.8-27B correctly at roughly 3090-like speed with no route tables tuned for it yet.
  • sm_70 (Tesla V100 32 GB) is a first-class, measured target alongside the RTX 3090: it is built and run on a physical V100-PCIE-32GB, where Qwen3.8-27B, Qwen3.8-Flash-Next and Inkling-2-Mini are tuned and measured. Ampere-only instructions are emulated only where no Volta route exists. It builds from source on Linux; see the V100 guide and the Volta port notes.

Release history

v0.14.2: --host-cache-max-mib caps the RAM cache on shared machines. This release also added --max-prefill-lanes and a GET /slots with session-file fields. The current GET /slots is read-only and reports each lane's progress (see docs/serving.md). See the v0.14.2 release notes.

v0.14.1: a stability fix for ninfer-serve. A large or unplannable request no longer fails every running request (internal error generation) or clears the context cache; only that request fails, and a latched engine now exits so a supervisor can restart it. See the v0.14.1 release notes.

v0.14.0: --auto-host-cache. One flag now sizes the RAM tier of the context cache from the machine, so a server that exists to serve long agent conversations keeps them cached after they leave the GPU instead of re-reading them from scratch. It replaces four hand-tuned flags and respects a container's memory limit. Also: vision together with a multi-GPU --devices split, a download-model step that fetches the godmode graft when you have access, a repetition guard in the tuned launcher profiles, and a compiler cache that cuts a full rebuild from over ten minutes to about one and a half. 5 merged PRs — see the v0.14.0 release notes for what each does and what was not verified.

Previous: v0.13.0 (a smaller, closer-to-Q8 Qwen3.8-27B, per-request thinking_budget), v0.12.0 (real multi-GPU, structured JSON output, a self-healing engine), v0.11.0 (prefill roughly 2x faster, DFlash2 the recommended decode backend), v0.10.0 (tensor-core small-T kernels: MTP3 decode 1.5x at C1 and 1.7x at C8), v0.9.1, v0.9.0.

Upstream

NInfer-3090 is derived from Neroued/ninfer. The upstream project targets RTX 5090/sm_120a; this fork carries the Windows and Linux SM86 compatibility layer, compact 35B artifact support, and RTX 3090-specific schedules and memory planning.

Upstream NInfer is a personal project its author develops out of interest. If you find it useful, you can support upstream on Ko-fi. Support is entirely voluntary. It is not a purchase or investment and does not come with financial returns, promised services or features, or a role in project decisions.

The Qwen3.8-Flash-Next work adapts code from Infernix by wallawalla47 (Apache-2.0), itself a fork of NInfer: so far the n-gram volume format, the model's config keys and n-gram hash derivation, the offloaded sparse-MoE Op (its contract, routing, dispatch, staging, CPU worker team and miss service, and its canonical-arithmetic method), the model's forward pass, and its Program pieces: the VRAM expert cache (LFRU frames, warm-start state), the RAM and VRAM ledgers, the elastic VMM KV pool, the VRAM monitor, the Engine instance, and the image path's RoPE positions and encode window. Each adapted file says so in its header.

Contributors

See CONTRIBUTORS.md for the complete, maintained credit list.

  • airtonix added Linux and Docker build and release support in PR #1.
  • ColeWheatley contributed SM86 runtime-count/GDN residency fixes, ECC diagnostics, and the GeForce-safe Docker fix in PR #7.
  • justinlime added NixOS build support in PR #5.
  • sry9681 contributed the device-wide GPU-memory startup fix in PR #6.
  • iamwavecut contributed the swscale destination-alignment JPEG safety fix in PR #11.
  • nasedkinpv contributed the tool-call parser crash fix in PR #12.
  • wmehanna contributed in-place system-turn rendering for Claude Code prefix reuse in PR #13.
  • mgscreativa contributed the thinking-budget boundary fix, so a request near the end of its output window no longer fails with thinking_budget_capacity_insufficient, in PR #156 (continued and finished in this PR), and found and fixed the premature KV-loan race behind a std::bad_alloc on large vision prompts in PR #138; its KV-lending gate was kept in PR #145.

Support the project

If NInfer-3090 saved you time or got more out of your RTX 3090, please star the repository. It helps other 3090 owners find a build that is maintained, benchmarked and released from one place. Bug reports and measurements from other cards are just as welcome.

Contributing

Please read the Pull Request Policy before opening an issue or pull request. It explains how to keep changes focused and how to document correctness, performance, VRAM, and compatibility evidence.

License

Apache License 2.0. See LICENSE.

About

Run Qwen3.8-27B at 140 tok/s on a single RTX 3090, up to 2x llama.cpp. Fast local LLM inference server with OpenAI- and Anthropic-compatible APIs, 256K context, native Windows and Linux.

Topics

Resources

Contributing

Stars

96 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages