AIFeed

Show HN: Running a 27B LLM with 176K context on a single RTX 4090

Original text(via HN AI)

NInfer-all RTX 4090 — Local LLM Inference Engine for Windows & CUDA

Run local large language models on NVIDIA GeForce RTX 4090 (24 GB) with native Ada Lovelace SM89 CUDA kernels, a portable Windows build, and OpenAI-compatible serving. An independently maintained C++/CUDA inference project derived from NInfer-all, focused on reproducible inference performance, numerical correctness and long-context stability.

Latest stable release
Latest stable release
GitHub stars
GitHub stars
Release downloads
Release downloads

Hugging Face model collection · Project website · Download release binaries · RTX 4090 guide · Built-in Monitor · Model artifacts · Benchmarks · Build from source · FAQ · Upstream documentation

Start with the stable v0.1.10 portable Windows build, no local CUDA compilation needed. Windows CUDA 13.4 archive · SHA-256 manifest

v0.1.10 downloads and compatibility

PlatformCUDA ToolkitGPU targetAvailability / qualification
Windows x6413.4.3SM89Published; real RTX 4090 smoke verified
Windows x6412.9.2SM89Compatibility build; check release assets
Linux x6413.4.3SM89Compatibility build; check release assets
Linux x6412.9.2SM89Compatibility build; check release assets

All release assets · Linux and CUDA compatibility guide. Additional variants are available only when their archive and checksum manifest appear on the release page. They are not separately GPU-qualified. Linux targets Debian 13 (glibc 2.41 or newer).

What's new: improved exact-capacity hybrid KV-cache admission and Vision recovery, faster n-gram proposal preparation and ASCII NFC normalization, hardened adaptive draft feedback and DirectStorage fallback. The extracted Windows CUDA 13.4 archive passed the fixed 196,608-token Huihui mixed-Vision smoke test (up to 4K), including near-limit cache recovery. No general agent-coding speedup or multi-hour stability guarantee is claimed.

Historical measurement: Recorded serving throughput for a Qwen3.8-27B IQ3_S model with DFlash2 on one RTX 4090: 146.6 tok/s median, 215.5 tok/s P90 across 1,831 completed requests. These are workload-specific observations, not guaranteed rates or a comparison with other inference engines. Measurement details.

If you use NInfer-all RTX 4090 or want to follow its development, consider starring the repository and sharing your own reproducible results. Watch releases · Report an issue or benchmark.

Why NInfer-all RTX 4090?

AreaRTX 4090 focus
Native GPU targetAda Lovelace, compute capability 8.9, native sm_89 ; Windows CUDA 13.4 qualified, Windows/Linux CUDA 12.9 and Linux CUDA 13.4 compatibility workflows
Local LLM servingOpenAI- and Anthropic-compatible APIs, CLI and model-specific launch profiles
Model familiesQwen3.5/3.6/3.8, Flash-Next, Ternary Bonsai 2/2.5, Gemma 4, Flint, DeepSeek-V4.1 and Inkling 2 via upstream
Speculative decodingDFlash2, DSpark, MTP and other model-dependent draft backends; measured draft-width and prefill tuning
Quantization and memoryGGUF conversion, IQ3_S/IQ4_XS, quantized KV cache, hybrid prefix caching and model-dependent host/disk expert residency
Built-in monitoringRead-only browser dashboard, live token rates, NVIDIA GPU sensors, DFlash2 acceptance, KV occupancy and request metadata
EngineeringDevice calibration, CUDA Graph experiments, regression tests, raw benchmark evidence and reproducible builds

Model support is inherited from upstream; not every model or context fits in 24 GB VRAM or has been independently validated by this project. Use a compatible converted .ninfer artifact, not an arbitrary GGUF file.

Inkling 2 Mini AtomicChat Modern AD-IQ3_S — premerged model

Model card and download · 13.90 GiB native NInfer v3 artifact, premerged AtomicChat AD-IQ3_S weights (not GSQ-RCO), vision, DFlash2 and DSpark. No separate Rank-1 adapter is needed. Tested with v0.1.8 on RTX 4090, RK8V4.

Local agent-style coding, 196,608 configured contextSolved in 900 sDecode
DFlash2 K7 fixed115/115267.70 tok/s
DSpark K3 fixed105/105235.03 tok/s
No drafter69/69133.50 tok/s

Separate 163,047-token prompt screening reached 162.05 tok/s DFlash2 decode. Repeated synthetic coding fixtures, not a standardized coding score or a matched comparison to Rank-1. The original Rank-1 artifact remains available.

Inkling 2 Mini GSQ-RCO IQ3_S — experimental Rank-1 model

Rank-1 experiment tools and reproduction layout.

The experimental fixed AtomicChat Rank-1 implementation preserves the original ISTA-DASLab GSQ-RCO IQ3_S weights and adds native adapter support for Inkling 2 on SM89.

RTX 4090, RK8V4, DFlash2 K7OriginalRank-1
HumanEval, matched chat-adapted protocol160/164 (97.56%)160/164 (97.56%)
Mean decode over 164 tasks303.61 tok/s288.30 tok/s

A separate synthetic retrieval test recovered 3/3 keys at 250,006 input tokens. Results are workload-specific, not canonical completion-format HumanEval scores or a guarantee of general coding parity. Vision, tool calling, DSpark and CUDA Graphs have passed local smoke tests.

  • Model repository on Hugging Face — 12.08 GiB, publicly available; experimental Rank-1 model.
  • Current compatibility requirements, provenance and benchmark methodology.
  • Runtime integration and tests.

The guarded model requires a runtime recognizing inkling2_rank1_v1. Use the regular v0.1.8 Windows release or a later compatible runtime. Rank-1 remains experimental, with single-GPU device-resident experts only.

One fixed 30-token coding prompt, 512 committed tokens, RK8V4: no draft 108.3, DSpark K3 240.7 and DFlash2 K7 302.2 tok/s, identical outputs on that prompt. Historical development measurements, not general throughput or a new exact-release benchmark. Full model card.

Built-in Live Monitoring Dashboard

Monitor local inference directly in your browser. NInfer Monitor is compiled into ninfer-serve, including the portable Windows release. No separate Python process, external assets or cloud service is required.

NInfer Monitor desktop dashboard: GPU telemetry, token throughput, DFlash2 acceptance, KV occupancy and recent request events; synthetic demonstration data
NInfer Monitor desktop dashboard: GPU telemetry, token throughput, DFlash2 acceptance, KV occupancy and recent request events; synthetic demonstration data

Screenshot of the actual v0.1.8 native dashboard rendered with synthetic demonstration data. Values are illustrative, not live readings or benchmark results. Full-size screenshot · Mobile screenshot.

Monitoring areaAvailable metrics
InferenceDecode and computed prefill rates, live throughput charts
NVIDIA GPUUtilization, VRAM, temperature and power via optional NVML
DFlash2Accepted/drafted model tokens from matching events in the last 50 requests
Memory and queueDevice KV occupancy, context limit, running/waiting requests
Server activityCompleted/rejected/failed requests, uptime and reused prompt tokens
Request historyLast 50 request events with status, token counts, decode speed and duration; no prompt or response text in this feed

Start ninfer-serve normally and open the dashboard in your browser:


        http://127.0.0.1:8080/monitor
      

Replace 8080 with your configured --port (for example 8099). If API-key authentication is enabled, enter the key in the dashboard password field. Telemetry is read-only and refreshes every three seconds. The optional test chat sends a request only when explicitly submitted. Keep the server bound to localhost unless remote access is deliberately secured. Rates are interval-based server counters, not standardized benchmark measurements; unavailable NVML sensors are displayed as a dash.

Technical documentation · English feature page · Deutsche Funktionsseite · Optional Python monitor

Get started on Windows

  • Download the latest stable Windows release (CUDA 13.4 / SM89). Prereleases are listed separately on the releases page.
  • Download every .7z.* volume and its SHA-256 manifest. Verify the checksums, then extract .7z.001 using 7-Zip. Keep the backend directories intact.
  • Install a compatible NVIDIA driver and Microsoft Visual C++ 2022 runtime. The portable package does not require the CUDA Toolkit.
  • In the extracted directory, download and run a supported model:

        .\download-model.bat qwen38-27b
.\run.bat qwen38-27b
      

The launcher serves a local API at http://127.0.0.1:8080/v1. Model weights are downloaded separately; the archive does not contain them.


        Invoke-RestMethod http://127.0.0.1:8080/v1/models
      

Use a model ID returned by this endpoint in your OpenAI-compatible client. The launcher can reduce its context when memory is insufficient. Keep the server bound to localhost unless you configure appropriate authentication and network access controls.

Optional: checksum-verified installer and GUI launcher.

See the Windows archive guide, CLI options and launch recipes.

SM89 technical articles

  • Native SM89 CUDA: routing, calibration and qualification
  • DFlash2 and MTP on SM89: draft width and memory
  • Interactive Monitor development preview — synthetic metrics and simulated chat, no live server access; not the stable release.

RTX 4090 benchmarks

Benchmark index and December v0.1.10 evidence — per-run agentic coding, Wavecut/RC2 comparisons, prefill, resource policies, exact archive Vision smoke, JSON and CSV downloads. Development measurements are distinguished from the released binary.

Real-world serving

Huihui Qwen3.8-27B GSQ-RCO IQ3_S Vision + DFlash2 + MTP, RTX 4090, CUDA 13.4, DFlash2 K=5:

MetricObserved
Completed requests1,831
Median decode throughput146.6 tok/s
P90 decode throughput215.5 tok/s
Median long-prefill throughput (316 requests)2,345 tok/s

Serving-log methodology and limitations. These are observed per-request rates, not a controlled project-versus-upstream comparison or guaranteed throughput.

Controlled long-context development tests (November 2026)

Five-arm follow-up, candidate 859d76b7 with default settings, versus v0.1.3; same Huihui model and repeated corpus, 512 decode tokens, two repetitions per arm:

Contextv0.1.3 decodeCandidate decodeDelta
32K262.78 tok/s260.46 tok/s-0.88%
64K245.67 tok/s250.22 tok/s+1.85%
128K214.29 tok/s220.86 tok/s+3.07%

A subsequent development candidate (2d37ef0a) recorded +1.89% at 176,128 and +3.07% at 196,608 context in two-pair tests. The earlier 128-token decode campaign showed regressions; neither result establishes a general speedup or qualifies the v0.1.4 release binary.

Full long-context report · Raw five-arm results · Tuning results · Huihui qualification

v0.1.4 short Engine measurements (November 26)

The exact published binary completed Bonsai 2.5 MTP3 and a Huihui no-copy DFlash2/MTP draft-width sweep, with 2,048 input and 128 timed decode tokens. Short fixed-corpus results are not serving throughput or general speed claims. Report and machine-readable data. Limited llama.cpp HTTP pilot (different outputs and cache formats).

Published v0.1.4 long-context and coding qualification (November 26)

Exact release binary, one RTX 4090, Huihui IQ3_S DFlash2; fixed K7, prefill 4096, RK4V4, no N-gram during the controlled Engine sweep (two repeats per cell):

ContextK5 decodeK7 decode
64K242.75 tok/s272.74 tok/s
128K206.39 tok/s240.60 tok/s
176128214.87 tok/s263.93 tok/s

Separate exact-rename tests with ~21.4K-token source prompts reached 568.1 tok/s mean decode with N-gram 15 vs 256.7 without (4/6 exact outputs in both arms). Concurrent prefill reduced short-request TTFT from 21.28 to 1.16 s while a long prompt was prefilling; overall pair time was unchanged. 143 measurements, zero reported infrastructure errors. Workload-specific results, not general serving rates or cross-engine comparisons. Experimental graphs and cuBLAS remain opt-in.

Controlled report · Coding and concurrency · Measured K7 preset · Raw numerical results

Swift 1.5 HTTP decode (October 19)

One observed request per length with 2,048 output tokens; not comparable to the separate Engine or Inkling benchmarks. Full report. Machine-readable chart data.

Release and development status

  • v0.1.3: published portable Windows archive verified on a real RTX 4090 with two successful real-model smoke requests. Verification evidence.
  • v0.1.10: latest stable Windows release, locally GPU-qualified native SM89 CUDA 13.4. 384 native tests passed, 56 historical skips, no failures or new skips; extracted fixed-196K mixed-Vision recovery passed. Roadmap qualification and limitations. Compatibility variants are tracked separately.
  • v0.1.9: previous stable Windows release, native SM89 CUDA 13.4. The final extracted package passed three real-model inference requests with exact output hashes matching the earlier RC2 smoke tests. Validation details and limitations; no multi-hour stability claim.
  • v0.1.8: previous stable Windows release, native SM89 CUDA 13.4, exact extracted archive smoke verified with Inkling 2 DFlash2 K7, DSpark K3 and Qwen DFlash2 K7. Source 71b5582; no exhaustive or long-duration qualification implied.
  • v0.1.4: previous stable Windows release (real GPU smoke verified), with upstream sync, SM89 architecture backports, opt-in flat draft/target graphs, attention buckets, bounded startup calibration and restricted live KV-pressure replay. Exact release verification. See PR #44 and the release pipeline.
  • Experimental graph, recovery and arithmetic paths remain opt-in. A successful hosted build is not real-GPU validation; compatibility assets attached to a stable Windows release do not inherit its GPU qualification.

Build from source (Windows)

Requirements: Visual Studio 2022 C++ Build Tools, CMake, Ninja, CUDA 13.4, a compatible NVIDIA driver and the documented project dependencies.


        git clone https://github.com/spk-c/ninfer-all-rtx4090.git
cd ninfer-all-rtx4090
.\scripts\build-rtx4090.ps1 -Test
.\build-rtx4090\apps\ninfer-calibrate.exe --device 0 --detail
      

The wrapper uses a separate build-rtx4090 directory. Follow the RTX 4090 guide for dependency setup and alternate toolkit versions.

Reproduce benchmarks


        .\scripts\benchmark-rtx4090.ps1 -Model 'C:\models\model.ninfer' -Preset smoke
.\scripts\benchmark-rtx4090.ps1 -Model 'C:\models\model.ninfer' -Preset core
      

For source-to-source comparisons, use matching weights, toolkit, driver, context, KV format, prompt and GPU conditions. See the paired A/B workflow.

RTX 4090 local LLM FAQ

Can I run a 27B LLM locally on a 24 GB RTX 4090? Yes, with a compatible quantized artifact and suitable memory settings. The published v0.1.3 package has a real-model smoke test on the Huihui Qwen3.8-27B IQ3_S DFlash2 artifact. Context size, vision, concurrent sequences and draft weights also consume VRAM. See the verified setup.

Does NInfer support GGUF, DFlash2 and MTP? NInfer uses converted .ninfer artifacts, including supported GGUF-derived quantizations. DFlash2 and MTP require compatible model and draft components. See GGUF formats, speculative decoding options and model downloads.

Can I use a local OpenAI-compatible API for coding agents and chat clients? Yes. Use the local base URL http://127.0.0.1:8080/v1 and the served model ID. API features vary with the model and client; consult the serving reference for tool calls, structured output and supported endpoints.

How do I choose the context window, KV cache and draft count? Start with the documented launcher defaults. Compare rk4v4 and rk8v4, prefill chunk size and speculative draft width on your specific model before changing settings. RTX 4090 tuning guide and long-context evidence explain the tradeoffs.

Is NInfer faster than llama.cpp, Ollama or vLLM? No universal ranking is established by the published RTX 4090 evidence. NInfer is a separate native C++/CUDA engine, not a frontend for those runtimes. A fair comparison needs the same hardware, model, quantization, context, sampling settings and workload, and must report quality and memory as well as throughput.

Upstream and contributions

NInfer-all RTX 4090 is an independent repository with its own development, validation and release process. It retains the original NInfer-all Git history, multi-GPU engine, model support and documentation. Upstream changes can continue to be integrated through Git and validated against the RTX 4090 target. Credit goes to iamwavecut/ninfer-all, Neroued/ninfer, Don-Chad/ninfer-3090 and all contributors. Licensed under Apache-2.0; redistributed CUDA libraries have separate NVIDIA terms.

Report reproducible RTX 4090 issues with your commit/version, driver, model artifact, launch flags and relevant logs using the issue templates. Independent performance results, including negative results, are welcome. Start an issue before proposing an implementation; see CONTRIBUTING.md.

Upstream NInfer-all overview

A C++/CUDA inference engine for the Qwen3.5 model family (Qwen3.6 and Qwen3.8 27B, Qwen3.6-35B-A3B, their fine-tunes, Ternary Bonsai 2 and 2.5 and the 27B looped by Jason Titus's adapter), Qwen3.8-Flash-Next and Edge0's latent-MoE models built on it, Gemma 4 26B-A4B and 31B, Recursive's Flint, DeepSeek-V4.1-Flash and Thinking Machines' looped Inkling 2 Mini, on NVIDIA GPUs from Volta to consumer Blackwell, from 8 GB of memory. It serves the OpenAI, Anthropic and llama.cpp APIs from one GPU, or from up to eight as pipeline stages on Linux. The same chat model answers typed decisions: choice, yes/no and score questions about a state, each option with its probability, through TypeSafe's System One and OpenAI's Decisions APIs.

What's New · Quick start · Supported GPUs · Supported Models · Highlights · Features · Docker · Building · Documentation

NInfer-all continues NInfer through the NInfer-3090 line and carries the work of several forks; CONTRIBUTORS.md credits each of them.

Support GPU testing. Choose a custom amount on GitHub Sponsors to help cover GPU rentals for correctness checks, kernel tuning, and benchmarks. This is a voluntary contribution without sponsor benefits. For compute credits, GPU access, or individual sponsorship terms, contact the maintainer directly.

What's New

  • 2026-12-01: W4A4 GGUF experts; faster Inkling 2 prefill; Inkling 2's LoopCD-Logits.
  • 2026-11-30: Looped Qwen3.8-27B, published; loop adapters for dense Qwen3.5-core models; Inkling 2's LoopCD-Hidden; typed decisions reasoning on near ties; hot expert placement; faster Inkling 2 UD-Q8_K_XL prefill.
  • 2026-11-29: Faster Gemma 4, Flint, Qwen3.6-35B-A3B and GGUF decode.
  • 2026-11-28: Up to 64 requests in every family; Qwen3.5-core MTP beside them; request parking; prompts paced to the decode round; router draining; shared prompt passes and prompt spans; faster many-request decode, Bonsai tensor parallelism and Inkling 2 prefill.
  • 2026-11-27: Tess-4.5-26B-A3B; up to 64 requests in Qwen3.5-core models; wider sampling ranges; Gumbel-sampled DSpark drafts; a KV host tier; models from Hugging Face; an MTP attention window; expert route bias; Gemma 4 31B DFlash and DSpark drafters; a faster CPU expert share.
  • 2026-11-26: Inkling 2 GSQ-RCO artifacts; IQ2_XS in the CPU expert share; https:// MCP servers in the WebUI.
  • 2026-11-25: Ternary Bonsai 2.5 27B, published; PTQ1_0 ternary blocks; Inkling 2 MXFP8 expert banks.
  • 2026-11-24: Inkling 2 DFlash2 drafting and shared loop KV; faster Inkling 2 DSpark drafting and long prompts, and host and disk experts in every MoE family.
  • 2026-11-23: vLLM's bad_words; --no-structured-output-instruction; Inkling 2 on Turing; device profiles for six more GPUs; faster Inkling 2, Flint, Gemma 4, Flash-Next prefill and NVFP4 prompts.
  • 2026-11-22: POST /shutdown and POST /v1/answer_now; Inkling 2 and Flint KV formats; a disk context cache and session slots in every family; thinking budgets in more families; faster Inkling 2 long contexts.
  • 2026-11-21: Inkling 2 Mini and its published artifacts.
  • 2026-11-20: Faster GGUF prompts; device profiles for nine more GPUs.
  • 2026-11-19: Gemma 4 31B, published; Basalt conversion; Q8PLE n-gram tables; Flash-Next FP16 KV.
  • 2026-11-16: System One image boxes and image URLs; Qwen3.8-27B GGUFs with a condensed vocabulary.
  • 2026-11-13: Edge0-145B and Edge0-120B, published; ggml's NVFP4 blocks; Flash-Next and Edge0 sharing n-gram tables; DSpine drafting with a Qwen3.8-27B drafter; adaptive MTP; DeepSeek-V4.1 hot Engram rows.
  • 2026-11-12: Launch configuration files, one per launch recipe.
  • 2026-11-11: Faster prefill and request preparation; disk expert reads from a second drive or into GPU memory; Gumbel-max sampling.
  • 2026-11-10: DFlash2 for Qwen3.6-35B-A3B; Flash-Next Unsloth v3.1 artifacts; the hybrid cache with pipelines and tensor parallelism; DeepSeek-V4.1 FP8/FP4 caches and GPU drafter experts; bf16p KV; faster Flash-Next prefill and decode, cached prompts and context lookup.
  • 2026-11-07: Flash-Next media prompts in the context cache and MTP drafts for media requests.
  • 2026-11-06: Faster Q4_K prompts.
  • 2026-11-05: Faster DeepSeek-V4.1 prefill tail, IQ1_M expert prompts and Engram reads.
  • 2026-11-04: Flash-Next DFlash2 drafting; DeepSeek-V4.1 Coder and llama.cpp-layout conversion; faster Flash-Next tensor parallelism and host-expert concurrency, tensor-parallel prompts and expert parallelism.
  • 2026-11-03: Faster tensor parallelism for Qwen3.5-core models; llama.cpp control vectors and LoRA adapters.
  • 2026-11-02: Tensor-parallel peer writes.
  • 2026-10-30: Bundled media libraries; pre-Blackwell NVFP4; Qwen3.5 FP32 logits; a faster first request; prefill pacing.
  • 2026-10-29: Faster tensor-parallel prefill.
  • 2026-10-27: Faster tensor parallelism; Qwen3.5 invariant attention; DeepSeek-V4.1's STQ drafter.
  • 2026-10-26: Faster Flash-Next disk experts; tensor parallelism for every dense format and DFlash; expert parallelism in every MoE family; DeepSeek-V4.1 CPU expert share, DSpark drafting and images.
  • 2026-10-25: DeepSeek-V4.1-Flash; tensor parallelism for dense Qwen3.5-core models.
  • 2026-10-24: Faster Flint.
  • 2026-10-23: Flint; native releases for Windows and Debian 13.
  • 2026-10-22: Typed decisions; YaRN in every family.
  • 2026-10-20: A CPU share of host experts.
  • 2026-10-18: The hybrid prefix cache by default in the server.
  • 2026-10-17: Pipeline stages across GPU architectures.
  • 2026-10-16: Device profiles for 36 more GPUs; Gemma 4 and Qwen MoE experts in host memory or on disk.
  • 2026-10-14: Turing: the TITAN RTX and RTX 20 series.
  • 2026-10-12: Volta: the Tesla V100.
  • 2026-10-11: Gemma 4 26B-A4B with MTP, images and video.
  • 2026-10-06: Qwen3.8-Flash-Next.
  • 2026-09-26: NInfer-all and Qwen3.8-27B GSQ-RCO IQ3_S.
  • 2026-09-23: Ternary Bonsai 2 27B.

Quick start

Download an artifact (all models) and serve it from the Docker image. The server speaks the OpenAI and Anthropic APIs on http://localhost:8080/v1, answers typed decisions there, and each card picks up its device profile on its own.


        hf download WaveCut/Ternary-Bonsai-2-27B-NInfer-v3 Ternary-Bonsai-2-27B-ninfer-v3.ninfer --local-dir models

docker run --rm --gpus all -p 8080:8080 --ulimit memlock=-1 \
  -v "$PWD/models:/models" -v ninfer-cache:/cache \
  ghcr.io/iamwavecut/ninfer-all:cuda13.4 serve /models/Ternary-Bonsai-2-27B-ninfer-v3.ninfer \
  --model-id bonsai2-27b --max-context 262144 --kv-capacity 262144 --kv-dtype rk8v4 \
  --gdn-state-fp16 --spec dflash2 --draft-tokens 5

curl http://localhost:8080/v1/chat/completions -H 'Content-Type: application/json' \
  -d '{"model":"bonsai2-27b","messages":[{"role":"user","content":"Hello"}]}'

curl http://localhost:8080/v1/systemone -H 'Content-Type: application/json' -d '{
  "state": {"ticket": "My card was charged twice for one order."},
  "questions": {
    "team": {"type": "choice", "instructions": "Which team should handle this?",
             "criteria": {"billing": "payments and refunds", "shipping": "deliveries"}},
    "urgent": {"type": "noul", "instructions": "Does the customer need a reply within the hour?"}}}'
      

The second request is a typed decision: each answer comes with the probability of every option, read from the model's first-token log probabilities of the labels.

Flags for every model and memory size, from an 8 GB card to the largest context: launch recipes, each also a configuration file in configs/ that --config reads.


        ninfer-serve models/Ternary-Bonsai-2-27B-ninfer-v3.ninfer --model-id bonsai2-27b \
  --max-context 262144 --kv-capacity 262144 --kv-dtype rk8v4 --gdn-state-fp16 \
  --spec dflash2 --draft-tokens 5

# The same options from the repository's configuration file.
ninfer-serve --config configs/bonsai2-27b-dflash2.ini

# The repository in place of the path: the file is fetched into the Hugging Face cache first.
ninfer-serve WaveCut/Ternary-Bonsai-2-27B-NInfer-v3 --model-id bonsai2-27b \
  --max-context 262144 --kv-capacity 262144 --kv-dtype rk8v4 --gdn-state-fp16 \
  --spec dflash2 --draft-tokens 5
      

A build listens on 127.0.0.1:8080 unless --host and --port say otherwise. Building shows how to make one.

Supported GPUs

NVIDIA GPUs from Volta (compute capability 7.0) to consumer Blackwell (12.0), from 8 GB of memory: Ternary Bonsai 2 27B runs on an 8 GB RTX 3060 Ti, and Qwen3.8-Flash-Next streams its experts from host memory or disk through 8 GB. The two Docker images each contain all NInfer targets for their CUDA version in a shared runtime: CUDA 12.9 includes Volta, and CUDA 13.4 includes Blackwell. The native release pipeline also assembles a portable Windows or Linux package with both CUDA backends: ninfer-<os>-x64-cuda12.9-13.4-<commit12>. Its small command executables share one runtime per CUDA family. The launcher selects CUDA 12 for Volta, CUDA 13 for consumer Blackwell, and prefers CUDA 13 on overlapping targets when the driver supports it. All selected --devices must fit one backend. Use --cuda-backend auto|12|13 to select it explicitly. No CUDA Toolkit installation is needed. Keep backends/ and help/ beside the executables. Linux also needs the recorded Debian system libraries. --help and --version do not load CUDA.

Every card by name, with what has run on it: Supported GPUs.

Click a section to expand it.

ArchitectureCompute capabilityBuildCUDADocker tagsStatus
Blackwell: GeForce RTX 50, RTX PRO Blackwell12.0120a13.1 or newer, not 13.2.0 or 13.2.1cuda13.4measured; built-in device profiles
Ada Lovelace8.989 , or the 86 build12.8 or newerboth, native 89measured; built-in device profiles
Ampere8.686 (the default)12.8 or newerbothmeasured (the reference card); built-in device profiles
Ampere, A100 class8.08012.8 or newerbothbuilt-in device profiles; not benchmarked
Turing7.57512.8 or newerbothmeasured; built-in device profiles
Volta7.07012.8 or 12.9cuda12.9measured; built-in device profiles
Hopper; data-center Blackwell; GB10; Pascal and oldernoneno build
GPU memoryRunsMeasured on
8 GBTernary Bonsai 2 27B (24,576 tokens with rk4v4 , no MTP); Qwen3.8-Flash-Next and Inkling 2 Mini with their experts in host memory or on diskRTX 3060 Ti; RTX 5060 for Inkling 2 Mini
11 GBTernary Bonsai 2 27B (196,608 tokens with rk4v4 ; 139,264 with MTP)RTX 2080 Ti
12 GBTernary Bonsai 2 27B (266,240 tokens); Qwen3.8-27B GSQ-RCO IQ3_S (8,192 tokens, no MTP); Inkling 2 Mini with its experts in host memoryRTX 3060; also the RTX 5070 for Inkling 2 Mini
16 GBGemma 4 26B-A4B Q4_0 (61,440 tokens); Qwen3.8-27B IQ3_S (241,664 tokens); the official Qwen3.8-27B with --embedding-q4 --lm-head-q4 ; Inkling 2 Mini with its experts in host memoryTesla V100-SXM2-16GB; RTX 5080, 5060 Ti, 4080 Super, 4060 Ti and A4000 for Inkling 2 Mini
24 GBTernary Bonsai 2.5 27B PTQ1_0 (1,032,192 tokens with rk4v4 ); Gemma 4 31B Q4_0 (101,376 tokens; 87,040 with MTP); the official Qwen3.8-27B and its MXFP8 tune; Qwen3.6-35B-A3B groupwise-int on an RTX 3090; Flash-Next with every expert on the GPU over two cards; DeepSeek-V4.1-Flash with its experts in host memory or on diskRTX 3090, RTX 4090, TITAN RTX
32 GBQwen3.6-35B-A3B NVFP4 (Blackwell only)RTX 5090
48 GBFlash-Next Q2_0 with every expert on one cardL40S, RTX PRO 6000
  • Device profiles. A profile picks the kernel route of every operation and width. The binary carries profiles measured on 67 GPU models, from the Tesla V100 and RTX 2060 Super to the RTX PRO 6000 (the Profile column of supported GPUs); a built-in profile applies to the same GPU name, compute capability and SM count. Any other card is calibrated once at first start, which takes from 12 seconds on a Tesla V100 to about six minutes on the smallest cards, and the result is stored for later starts; ninfer-calibrate measures again after a driver or clock change (device profiles). The 70 build runs its own routes, so the V100 profiles hold only the GDN prefill switch, the GGUF load schedules and, for the SXM2 32 GB card, the Q8 MoE prefill frontier.
  • Architecture limits. NVFP4 expert weights need a 120a build. The Turing and Volta builds replace instructions their GPUs lack and reshape kernels to their shared memory (Turing, Tesla V100). Configure accepts no other target, so Pascal and older, Hopper and data-center Blackwell have no build.
  • Speed per card. Performance lists the measured rates of every card.

Supported Models

Each name links to its Hugging Face card. hf download REPO FILE.ninfer --local-dir models fetches a file, and the programs also take the repository itself in place of a path (artifacts from the Hub). The Bonsai, GSQ-RCO, looped, Flash-Next, Edge0, Gemma 4, Flint, DeepSeek-V4.1-Flash and Inkling 2 artifacts use formats that only this engine reads. Rows go from the fewest bits per weight to the most. ✓ means the artifact carries the component, — that it does not. Drafting lists the drafters the artifact carries; a linked one is an artifact of its own. Flash-Next, Edge0 and DeepSeek-V4.1-Flash models also need an n-gram table, an artifact of its own: their Notes link it, and N-gram tables lists them all.

Ternary Bonsai 2 27B

ModelSize, GiBWeightsVisionDraftingNotes
Ternary Bonsai 2 27B8.87ternary, 2.125 bits✓MTP DFlash2 Proposal headBonsai-trained MTP head and DFlash2 adapter

Ternary Bonsai 2.5 27B

ModelSize, GiBWeightsVisionDraftingNotes
PTQ1_06.17ternary PTQ1_0, 1.75 bits✓MTP Proposal headPrismML's MTP head; the longest windows
PQ2_07.37ternary, 2.125 bits✓MTP Proposal headPrismML's MTP head; the faster prompts

Qwen3.8-27B

ModelSize, GiBWeightsVisionDraftingNotes
GSQ-RCO IQ3_S13.99GGUF blocks, 3.5 bits✓MTP DFlash2 Proposal head DSpineISTA-DASLab's GGUF blocks byte for byte with a Q6_K MTP head
Official19.03groupwise-int (Q4/Q5)✓MTP DFlash2 Proposal head DSpineThe official artifact, which the reference tables use
Abliterated19.03groupwise-int (Q4/Q5)✓MTP DFlash2 Proposal head DSpineThe official recipe
Uncensored, HauhauCS Aggressive19.03groupwise-int (Q4/Q5)✓MTP DFlash2 Proposal head DSpineThe tune's MTP head
MXFP8-CRACK16.96groupwise-int✓MTP Proposal head DSpineWithout bundled DFlash2 adapter
DSpine Drafter (Tencent)2.27Q8 layers and a BF16 code bridge——Drafter artifact loaded with --spec dspine --draft-model beside any Qwen3.8-27B artifact

Looped Qwen3.8-27B

ModelSize, GiBWeightsVisionDraftingNotes
Loop adapter v3.1.20.23FP32, as published——An overlay: --loop-adapter attaches it to the official, GSQ-RCO IQ3_S, Ternary Bonsai 2 or 2.5 artifact above; with the official, a mean of 24.75 of 30 on AIME 2025 over four seeds under the release's protocol and grader, against 23.75 for the release's vLLM plugin on the BF16 weights (the base model: 21.75)

The v3.1 loop adapter runs three passes over layers 24-39 with LoopCD-Hidden on the last; the base artifact keeps its own drafters, and without --loop-adapter it runs as before (looped Qwen3.8-27B).

Qwen3.6-35B-A3B

ModelSize, GiBWeightsVisionDraftingNotes
NVFP421.04NVFP4 experts, Q8 projections✓MTP DFlash2 Proposal headRedHatAI's NVFP4 experts code for code, incoai's DFlash2 drafter; sm_120a GPUs only

Qwen3.8-Flash-Next

ModelSize, GiBWeightsVisionDraftingNotes
Coder GSQ-RCO IQ1_M30.76GGUF blocks✓MTP DFlash2Expert-pruned coding build, 256 experts per layer; shared-Q8_0 MTP, incoai's Q4_0 DFlash2 drafter; requires an n-gram table ( IQ4_NL or FP8 )
GSQ-RCO Q2_038.23GGUF blocks: ISTA-DASLab's GSQ-RCO 2.4 bits✓MTP DFlash2Shared-Q8_0 MTP, incoai's Q4_0 DFlash2 drafter; requires an n-gram table ( IQ4_NL or FP8 )
UD-IQ2_XS47.43GGUF blocks: Unsloth Dynamic v3.1✓MTP DFlash2Shared-Q8_0 MTP, incoai's Q4_0 DFlash2 drafter; requires an n-gram table ( IQ4_NL or FP8 )
GSQ-RCO IQ3_S54.24GGUF blocks: ISTA-DASLab's GSQ-RCO 3.5 bits✓MTP DFlash2Shared-Q8_0 MTP, incoai's Q4_0 DFlash2 drafter; requires an n-gram table ( IQ4_NL or FP8 )
UD-IQ3_XXS54.66GGUF blocks: Unsloth Dynamic v3.1✓MTP DFlash2Shared-Q8_0 MTP, incoai's Q4_0 DFlash2 drafter; requires an n-gram table ( IQ4_NL or FP8 )

Edge0

ModelSize, GiBWeightsVisionDraftingNotes
Edge0-120B q3k34.60Q3_K/IQ4_NL latent experts, Q4_0 encoders and decoders✓MTPEdge0's release byte for byte, base model's Vision tower; every expert on one 48 GB card; requires an n-gram table ( FP8 or IQ4_NL )
Edge0-145B q3k47.43Q3_K/IQ4_NL latent experts, Q8_0 encoders and decoders✓MTPEdge0's release byte for byte, base model's Vision tower; experts in host memory or on disk on one 48 GB card; requires an n-gram table ( FP8 or IQ4_NL )
Edge0-120B NVFP439.58NVFP4 latent experts, Q4_0 encoders and decoders✓MTPEdge0's release byte for byte, base model's Vision tower; every expert on one 48 GB card; requires an n-gram table ( FP8 or IQ4_NL )
Edge0-145B NVFP454.41NVFP4 latent experts, Q8_0 encoders and decoders✓MTPEdge0's release byte for byte, base model's Vision tower; experts in host memory or on disk on one 48 GB card; requires an n-gram table ( FP8 or IQ4_NL )

Gemma 4

ModelSize, GiBWeightsVisionDraftingNotes
Gemma 4 31B it heretic i1-IQ4_XS18.89GGUF IQ4_XS blocks—DFlash DSparkcoder3101's heretic (decensored) tune in mradermacher's imatrix GGUF byte for byte; manateelazycat's DFlash drafter for the tune, Hikari07jp's DSpark drafter for the original 31B
Gemma 4 26B-A4B it QAT14.75GGUF Q4_0 blocks✓MTPGoogle's QAT GGUF byte for byte; MTP is Google's QAT assistant
Gemma 4 31B it QAT17.77GGUF Q4_0 blocks✓MTPGoogle's QAT GGUF byte for byte, the dense model; MTP is Google's QAT assistant for it

Flint

ModelSize, GiBWeightsVisionDraftingNotes
Flint UD-Q4_K_XL23.38GGUF blocks, Q8_0 to IQ3_S——Unsloth's UD-Q4_K_XL GGUF byte for byte; drafts by context lookup

DeepSeek-V4.1-Flash

ModelSize, GiBWeightsVisionDraftingNotes
GSQ-RCO IQ1_M117.18GGUF blocks, IQ1_S to IQ2_S experts✓DSparkISTA-DASLab's GGUF byte for byte; experts in host memory or on disk; vision tower (images); DSpark drafter ( --spec dspark ) or context lookup; requires the Engram table
GSQ-RCO Coder IQ2_XXS71.85GGUF blocks, IQ1_M to IQ2_XS experts✓DSparkISTA-DASLab's expert-pruned coding build byte for byte, 192 of 384 experts per block; otherwise as the IQ1_M artifact; requires the Engram table

Inkling 2 Mini

ModelSize, GiBWeightsVisionDraftingNotes
Inkling 2 Mini UD-IQ1_M8.87GGUF blocks, IQ1_S to IQ2_S [gate; up], Q2_0 down banks✓DSpark DFlash2Unsloth's UD-IQ1_M GGUF byte for byte; otherwise as UD-IQ4_XS
Inkling 2 Mini GSQ-RCO IQ2_S9.75GGUF blocks, IQ1_S to IQ2_S [gate; up], Q2_0 and IQ4_NL down banks; BF16 token table and relative projections✓DSpark DFlash2ISTA-DASLab's GSQ-RCO IQ2_S GGUF byte for byte; otherwise as UD-IQ4_XS
Inkling 2 Mini UD-Q2_K_XL10.07GGUF blocks, IQ1_S to IQ2_S [gate; up], Q2_0 and NVFP4 down banks✓DSpark DFlash2Unsloth's UD-Q2_K_XL GGUF byte for byte, its one MXFP4 bank as the same values in Q8_0; otherwise as UD-IQ4_XS
Inkling 2 Mini GSQ-RCO IQ3_S12.03GGUF blocks, IQ1_S to IQ3_S [gate; up], IQ4_NL and Q2_0 down banks; BF16 token table and relative projections✓DSpark DFlash2ISTA-DASLab's GSQ-RCO IQ3_S GGUF byte for byte; otherwise as UD-IQ4_XS
Inkling 2 Mini APEX-I MiniPlus V2.113.48GGUF blocks, IQ3_XXS and IQ3_S experts✓DSpark DFlash2IsValorum's APEX-I MiniPlus GGUF byte for byte with its Q8_0 vision tower; Unsloth's DSpark drafter; otherwise as UD-IQ4_XS
Inkling 2 Mini UD-Q3_K_XL14.09GGUF blocks, NVFP4 and IQ3 experts✓DSpark DFlash2Unsloth's UD-Q3_K_XL GGUF byte for byte; otherwise as UD-IQ4_XS
Inkling 2 Mini UD-IQ4_XS16.05GGUF blocks, NVFP4 experts in 20 of 24 layers✓DSpark DFlash2Unsloth's UD-IQ4_XS GGUF byte for byte; Q8_0 vision tower (images); DSpark drafter, by default for one request at a time, incoai's DFlash2 drafter ( --spec dflash2 ) or context lookup
Tess-4.5-26B-A3B NVFP417.69GGUF blocks, NVFP4 experts in 20 of 24 layers✓DSpark DFlash2Migel Tissera's agentic-coding fine-tune of Inkling 2 Mini, the author's NVFP4 GGUF byte for byte; Q8_0 vision tower; IQ4_NL DSpark drafter
Inkling 2 Mini UD-Q8_K_XL19.07BF16 attention, head and token table; MXFP8 experts in layers 20-23, NVFP4 in the other 20✓DSpark DFlash2Unsloth's UD-Q8_K_XL GGUF byte for byte except layers 20-23's BF16 experts, the same values in MXFP8; a card of 24 GB, or host experts; otherwise as UD-IQ4_XS

Tencent's DSpine drafter for Qwen3.8-27B (2.27 GiB, Q8 layers and a BF16 code bridge) is an artifact of its own, which --spec dspine --draft-model loads beside any Qwen3.8-27B artifact.

N-gram tables

A model names the table it was converted with by digest; pass the table with --ngram-table.

Every Qwen3.8-Flash-Next and Edge0 model reads either of these two tables. The engine accepts any table of the model's shape, in any row format (another table of the same shape). Perplexity: the first 40 KB of WikiText, INT8 KV, one A40.

TableSize, GiBRowsHot-row profileNamed byPerplexity: Flash-Next Q2_0 · Edge0-120B-q3k
IQ4_NL26.92IQ4_NL blocks, 90 bytes a row: the GSQ-RCO and Unsloth releases' table byte for byte✓Flash-Next builds, Coder2.542153 · 5.017691
FP848.38FP8 E4M3 codes and an FP16 scale, 162 bytes a row: Edge0's ple-fp8.gguf codes byte for byte, its one scale in every row✓Edge0 builds2.531971 · 4.964565

DeepSeek-V4.1-Flash models read the Engram table, the release's IQ4_NL rows with a hot-row profile (--ngram-residency ram-hot).

TableSize, GiBRowsHot-row profileNamed by
Engram103.32IQ4_NL blocks: the release's rows✓GSQ-RCO IQ1_M, Coder IQ2_XXS

The official NInfer artifacts (Qwen3.6-27B, Qwen3.6-35B-A3B and Qwen3.8-27B, groupwise-int and nvfp4) load too; the documentation map links them. Weight conversion shows how the Bonsai and GSQ-RCO artifacts are built.

Highlights

Ternary Bonsai 2 27B decodes 397 tok/s on an RTX 5090 with DFlash2, and Ternary Bonsai 2.5 fills that card's 1,048,576-token window with every planted code found. Qwen3.8-Flash-Next decodes 138 tok/s with every expert on one RTX PRO 6000, and 96 tok/s with its experts in host memory on one RTX 5090. DeepSeek-V4.1-Flash decodes 52 tok/s on one RTX 5090, 48 on one RTX PRO 6000 and 39 on one RTX 4090 with its 106.7 GiB of experts in host memory. Inkling 2 Mini decodes 182 tok/s on an RTX 5090, 1.4 to 2.8 times llama.cpp's rate on 25 cards, and runs on an 8 GB card with its experts in host memory. Every table of every card is on the performance page.

Click a section to expand it.

Measured in September 2026, one card each, greedy, one request unless the column says otherwise.

CardShort chat, DFlash2 7 drafts (tok/s)After a 261K-token document (tok/s)261K-token prompt, to the first tokenLargest context, all three codes foundEight requests at once, MTP 3 (tok/s)
RTX 309020290215 s970,752551
RTX 4090256123102 s958,464824
RTX 509039721882 s978,9441,063
RTX PRO 600038121878 s1,048,576, two of three codes1,155

The RTX PRO 6000 (96 GB) starts at the engine's ceiling of 1,048,576 tokens with every KV format and drafter. Filled to it, the model misses the code at 90% (about 943K); up to about 880K it found every code on every card.

Measured in November 2026, one card each, greedy, rk8v4 over a 262,144-token window, one request unless the column says otherwise; the largest context is filled with rk4v4.

CardShort chat, PTQ1_0, no drafter (tok/s)Short chat, PQ2_0, MTP 3 (tok/s)After a 261K-token document, PQ2_0, MTP 3 (tok/s)261K-token prompt, PQ2_0, to the first tokenLargest context, all three codes foundEight requests at once, PQ2_0, MTP 3 (tok/s)
RTX 30909418995199 s1,032,192 (PTQ1_0)576
RTX 409012623211091 s1,019,904 (PTQ1_0)943
RTX 509018934517074 s1,048,5761,157
RTX PRO 600018834917073 s1,048,5761,237

PTQ1_0 (6.17 GiB) decodes one request fastest without a drafter and holds the longest windows; PQ2_0 (7.37 GiB) is the faster one with MTP, with several requests and on prompts. Both decode faster than PrismML's own llama.cpp fork on the RTX PRO 6000, 5090 and 4090 (comparison).

The official groupwise-int artifact, measured in September 2026, one card each, greedy, one request unless the column says otherwise.

CardShort chat, DFlash2 7 drafts (tok/s)Largest context, all three codes foundEight requests at once, MTP 3 (tok/s)
RTX 3090118417,792329
RTX 4090149405,504442
RTX 5090236872,448690
RTX PRO 60002371,048,576, two of three codes739
  • RTX PRO 6000 against RTX 5090. Re-measured in October beside an RTX 5090, both at 600 W, the PRO 6000 came back within 2% of September wherever the drafts accepted the same share. One request's decode is bound by memory bandwidth, and both cards have 1.79 TB/s of GDDR7 (Bonsai 2 without speculation: 167.7 against 170.4 tok/s). The PRO 6000's 188 SMs against 170 show where compute decides: the 261K prompt is 2% faster and eight requests at once 6 to 7% faster (re-check).
  • Draft length. DFlash2 with seven drafts is fastest on short answers; after long documents the best count is three to seven. MTP runs up to fifteen drafts and is fastest at three to five.

The Q2_0 release (35.9 GiB model and 26.8 GiB n-gram table), one request, greedy, October 2026. Decode of a short answer, in tok/s:

CardEvery expert on the GPUsExperts in host memoryExperts on disk, in the page cacheExperts on disk, cold
RTX PRO 6000138 (one card)557635
RTX 5090136 (two cards)987238
RTX 409097 (two cards)744721
RTX 309090 (two RTX 3090 Ti)392820

Prefill of a 4,463-token prompt, in tok/s:

CardEvery expert on the GPUsExperts in host memoryExperts on disk, in the page cacheExperts on disk, cold
RTX PRO 60002,9391,2972,0241,000
RTX 50903,8093,2901,8271,108
RTX 40903,6081,8011,144558
RTX 30901,504663503474
  • The host matters. Host and disk rows depend on the host as much as on the card. The RTX 5090 host had PCIe 5.0 x16, the RTX PRO 6000 and RTX 4090 hosts PCIe 4.0 x16, and the RTX 3090 host PCIe 3.0 x16 and two sockets (the test ran pinned to the GPU's node). The host, disk and cold columns of the three GeForce cards were measured on October 26, the rest on October 5 and 6.
  • Prompt spans. With host or disk experts a prompt prefills in spans of up to eight chunks (sixteen for one request at a time), so each layer's missing experts cross the bus once per span. From the CLI with Q2_0 disk experts in the page cache, a 7,680-token prompt prefilled at 1,830 tok/s on the RTX 5090 and the answer decoded at 115 tok/s, against 450 and 32 chunk by chunk (three cards).
  • Other releases and cards. IQ3_S, the Coder IQ1_M build and the 8 and 12 GB cards are in the expert placements. Six reasoning requests at once on two RTX 5090s produced 193 tok/s of output with Q2_0.

ISTA-DASLab's GSQ-RCO IQ1_M GGUF (112.7 GiB, and its 103.0 GiB Engram table), one request, greedy, thinking off, one GPU, October 2026. The routed experts stay in pinned host memory or in the file, the card caches as many as fit, and CPU threads compute a share of each decode call's missing host experts:

CardExperts cached on the cardHost experts: short answer (tok/s)after 8,086 tokens (tok/s)prefill of 8,086 tokens (tok/s)Disk experts, page cache warm: short answer (tok/s)
RTX PRO 600074%48.045.31,31037.4
RTX 509015%51.542.291216.7
RTX 40907%33.827.59159.5
RTX 30907%19.815.24166.0

The RTX PRO 6000 row is an earlier build that ran prompts chunk by chunk and copied every missing expert; the others ran on October 26 on hosts with PCIe 5.0 (RTX 5090), 4.0 (RTX 4090) and 3.0 (RTX 3090) links (per card). On an RTX 4090 host with 64 CPU cores the build decodes at 38.9 and 31.4 tok/s, against 33.5 and 26.6 when it copies every miss (the CPU share); there Strata 0.2.6 decodes the same GGUF at 34 to 40 tok/s, computing about half the experts on its CPU threads, and prefills at 635 to 690 tok/s (measurements). With host experts the server peaks at 116 GiB of host memory. On October 27, with the release's DSpark drafter (--spec dspark, 3.58 GiB on the card in the STQ encoding the artifact carries), an RTX PRO 6000 decoded five requests 1.28 to 2.07 times as fast as without it, and an RTX 4090 decoded code and reasoning 1.19 and 1.21 times as fast, the other three requests 0.85 to 1.02 times, prefilling at plain speed (the drafter). With --vision it reads images through the release's vision tower (images).

Unsloth's UD-IQ4_XS GGUF with the vision tower and the DSpark drafter (a 15.4 GiB artifact), one request, F16 KV, November 21, 2026, against llama.cpp on the same GGUF (Unsloth's build b12588-mix-c0c3de8; mainline llama.cpp does not load it). A prompt of 10,000 tokens and a decode of 128, in tok/s, NInfer-all / llama.cpp:

CardExpertsPrefill of 10,000 tokensDecode
RTX 5090on the card6,664 / 2,318182.1 / 96.9
RTX 4090on the card4,537 / 2,307140.1 / 75.0
RTX 3090on the card2,046 / 1,236112.0 / 59.5
RTX 5080in host memory3,238 / 1,377116.5 / 41.3
RTX 3060 12 GBin host memory759 / 38748.8 / 24.8
RTX 5060 8 GBin host memory1,074 / 29333.1 / 14.7

On cards of 8 to 16 GB the routed experts stay in pinned host memory and the card caches the most used, while llama.cpp places the model with its own --fit. From disk (--expert-residency disk) the RTX 5060 prefills 591 tok/s and decodes 9.6. While one request runs, the release's DSpark drafter decodes the same text 1.06 to 1.33 times as fast with the experts on the card. Every card, the drafter and the hosts are in Inkling 2 Mini's measurements.

With the Docker image, or the same --config on a native release:


        hf download WaveCut/Inkling-2-Mini-UD-IQ4_XS-NInfer-v3 Inkling-2-Mini-UD-IQ4_XS-ninfer-v3.ninfer --local-dir models

# 24 GB and more: every expert on the card, images, DSpark, a 64K-token context.
docker run --rm --gpus all -p 8080:8080 --ulimit memlock=-1 -w / \
  -v "$PWD/models:/models" -v ninfer-cache:/cache \
  ghcr.io/iamwavecut/ninfer-all:cuda13.4 serve --config /opt/ninfer/configs/inkling2-mini.ini

# 8 to 16 GB: the experts in 13.1 GiB of pinned host memory, a 32K-token context
# (the 8 GB RTX 5060 above ran with --max-context 12288).
docker run --rm --gpus all -p 8080:8080 --ulimit memlock=-1 -w / \
  -v "$PWD/models:/models" -v ninfer-cache:/cache \
  ghcr.io/iamwavecut/ninfer-all:cuda13.4 serve --config /opt/ninfer/configs/inkling2-mini-host.ini
      

Features

Click a section to expand it.

  • Qwen3.5 family. Dense and MoE (Qwen3_5ForCausalLM, Qwen3_5MoeForCausalLM) with MTP, DFlash (35B-A3B) and DFlash2 (Qwen3.8-27B, 35B-A3B) drafters, Vision for images and video, and groupwise-int, FP8, NVFP4 and ternary weights. Native MoE routed experts can stay in pinned host memory or the artifact's files, brought into whole-layer GPU banks with an optional device cache (expert residency). NVFP4 expert banks prefill through W4A4 and need a 120a build.
  • GGUF block formats. Releases that pick a ggml type per tensor, such as ISTA-DASLab's GSQ-RCO, convert without requantization and multiply their blocks in place. The 3.5-bit Qwen3.8-27B IQ3_S release holds 10.95 GiB of weights instead of 15.9, scores WikiText-2 perplexity 7.071 (the official artifact: 7.286) and decodes at 59.9 tok/s against the official artifact's 40.3 on an RTX 3090 (GGUF block formats).
  • Ternary Bonsai 2 27B. PrismML's ternary Qwen3.8-27B runs from t2_g128_fp16 weights: 2.125 bits per weight, imported without rounding, with the Hadamard rotations fused into the norms and gates and integer activations for its projections. The bonsai2_27b_ternary recipe adds ProCreations' MTP head and DFlash2 adapter and an exact proposal head.
  • Ternary Bonsai 2.5 27B. PrismML's second ternary release in both of its forms: PQ2_0 as t2_g128_fp16, and PTQ1_0 (1.75 bits per weight) as its own 28-byte blocks, multiplied in place by kernels of their own. Both artifacts carry PrismML's MTP head in its Q4_0 blocks, the release's Vision tower and an exact proposal head (measurements).
  • Loop adapters. Jason Titus's Looped Qwen3.8-27B adapter runs the core layers 24-39 three times a token with low-rank updates and LoopCD-Hidden on the last pass, over any Qwen3.8-27B artifact of its geometry: the official and GSQ-RCO IQ3_S weights and Ternary Bonsai 2 and 2.5. --loop-adapter attaches the published adapter, an overlay file of its own, to any of them. Every pass keeps its own keys, values and states; the context cache, CUDA Graphs, every drafter, pipeline stages and tensor parallelism run per visit, and --loop-passes, --loop-cd-omega and --loop-cd-ref change the depth and LoopCD at startup.
  • Qwen3.8-Flash-Next. The 125B-parameter MoE (512 experts, about 6B active) from the GSQ-RCO GGUF releases, with its experts on the GPUs, in pinned host memory with a GPU cache (--expert-residency host) or in the artifact's files read into a GPU cache (--expert-residency disk, under 1 GB of RAM). It serves up to eight requests with prefix reuse, structured output, images and video, and MTP drafting. On two RTX 5090s the Q2_0 release scores 93.3% on AIME 2025 and 86.4% on GPQA-Diamond (Qwen3.8-Flash-Next).
  • Gemma 4 26B-A4B. Google's QAT Q4_0 GGUF release, imported block for block (13.4 GiB), or a mixed-format GGUF of it: the sliding-window and full-attention blocks (the latter caching values only), the dense MLP beside 128 routed experts, every --kv-dtype format, up to eight concurrent requests with prefix reuse through host memory and shared system prompts, tool calls and structured output, images and video through the release's vision tower (on the GPU, streamed from pinned memory or on CPU threads), and Google's multi-token-prediction assistant for speculative decoding. On an RTX 3090 it prefills a 10,000-token prompt at 6,045 tok/s and decodes at 215 tok/s, 190 after 10,000 tokens, against llama.cpp's 4,697, 169 and 152 on the same GGUF; with two drafts a round chat answers decode at 291 tok/s instead of 209 (Gemma 4).
  • Gemma 4 31B. The dense model from Google's QAT Q4_0 GGUF (16.4 GiB on the GPU) with its own QAT assistant and the vision tower, on one 24 GB card: on an RTX 3090 it holds 101,376 tokens of F16 context and decodes 42 tok/s plainly, 95 to 110 tok/s with two drafts a round (Gemma 4 31B).
  • Flint. Recursive's 39.8B coding MoE (2.5B active), from a llama.cpp GGUF such as Unsloth's UD-Q4_K_XL, imported block for block (23.4 GiB): sliding-window and position-free full-attention blocks with learned sinks, 256 routed experts beside a shared one, up to eight concurrent requests with prefix reuse through host memory, the model's own reasoning, GLM-4.7 tool calls, structured output, typed decisions, context-lookup drafting, and experts on the GPU, in pinned host memory or in the artifact's files. On an RTX 5090 it prefills a 10,000-token prompt at 14,656 tok/s and decodes at 348 tok/s, 315 after 10,000 tokens, against llama.cpp's 8,679, 223 and 209 on the same GGUF; on an RTX 3090, with its experts in host memory, at 5,755, 161 and 140 against llama.cpp's 2,553, 80 and 77 with four blocks' experts on the CPU (Flint).
  • DeepSeek-V4.1-Flash. DeepSeek's 40-block MoE (384 routed experts, 6 per token) from ISTA-DASLab's GSQ-RCO IQ1_M GGUF, imported block for block, with its Engram table: four-stream hyper-connections, latent attention over a 128-position window and indexer-selected compressed latents with the release's FP8 and FP4 roundings, Engram rows read from the table's file or RAM, up to eight concurrent requests with prefix reuse through host memory, reasoning, DSML tool calls, structured output, typed decisions, images through the release's vision tower, the release's DSpark drafter and context-lookup drafting. Its 106.7 GiB of routed experts stay in pinned host memory or in the artifact's files, read into bounded buffers rather than mapped, and CPU threads compute a share of each decode call's missing host experts. Prompts run block by block in spans of up to 16,384 tokens, so each block's experts cross the bus once per span. On one RTX 4090 with its experts in host memory it decodes at 31.4 to 38.9 tok/s and prefills 8,086 tokens at 938 tok/s; on the same host Strata 0.2.6 decodes at 34 to 40 tok/s and prefills at 635 to 690 (DeepSeek-V4.1-Flash).
  • Inkling 2 Mini. Thinking Machines' looped 26.4B MoE (3.4B active per token), the engine's first looped transformer, from Unsloth's UD-IQ4_XS GGUF (15.4 GiB), its UD-IQ1_M to UD-Q3_K_XL (8.2 to 13.4 GiB), its UD-Q8_K_XL (18.5 GiB), IsValorum's APEX-I MiniPlus (12.8 GiB) or ISTA-DASLab's GSQ-RCO IQ2_S and IQ3_S (8.4 and 10.6 GiB) imported block for block: 24 stored layers run as 48 visits, the 12 core layers three times with messages between passes, sliding-window and full attention with a learned distance table and sinks, depth attention over the earlier layers' states, 128 routed experts, up to eight concurrent requests with prefix reuse through host memory, the model's own reasoning and tool-call blocks, structured output, typed decisions, images through the release's vision tower, the release's DSpark drafter, incoai's DFlash2 drafter (--spec dflash2) and context-lookup drafting, and experts on the GPU, in pinned host memory or in the artifact's files. On an RTX 3090 it prefills a 10,000-token prompt at 2,031 tok/s and decodes at 111.4 tok/s, 95.9 after 10,000 tokens, against llama.cpp's 1,228, 58.6 and 55.9 on the same GGUF; DSpark decodes greedy answers 1.14 to 1.41 times as fast (Inkling 2 Mini).
  • CPU share of host and disk experts. With Flash-Next, Gemma 4, Flint, Inkling 2 or native Qwen3.5/3.6 MoE experts off the GPU, or DeepSeek-V4.1-Flash's experts in host memory, CPU threads compute a share of each decode call's cache misses from host memory while the GPU copies the rest, bit for bit equal to the GPU's products (--expert-dma-share auto). The pool takes min(physical cores, usable CPUs / 2) threads by default, where usable CPUs are the affinity mask bounded by a container's CPU quota (15 threads on a 30-CPU quota); --expert-cpu-threads N sets another count (common options).
  • MTP, DFlash and DFlash2 with 1 to 15 drafts; the artifact's proposal head drafts by default when it stores one. Under MTP and DFlash a sampled request keeps a draft only while it equals the model's own keyed draw, so every emitted token is the model's sample; DFlash2 verifies its proposal distribution by rejection sampling.
  • Gemma 4 drafts with Google's multi-token-prediction assistant (--spec mtp, 1 to 7 drafts), four blocks that read the model's own KV cache; its verification rows are bit for bit plain decode rows, so the output is the one plain decoding gives.
  • DeepSeek-V4.1-Flash drafts with the release's DSpark drafter (--spec dspark, 1 to 5 drafts kept while its confidence holds): three blocks that read the backbone's last three blocks' streams. Its verification rows are bit for bit plain decode rows. In beamster's STQ encoding, which the published artifact carries (3.58 GiB on the card), it decodes 1.28 to 2.07 times as fast on an RTX PRO 6000; on an RTX 4090, whose expert cache it shrinks, it decodes code and reasoning 1.19 and 1.21 times as fast and other requests 0.85 to 1.02 times.
  • Inkling 2 Mini drafts with the release's DSpark drafter (--spec dspark, 1 to 7 drafts), three non-causal blocks over the target's tapped states and a recurrent head that corrects the target head's logits; without --spec it drafts while the Engine serves one request at a time, 3 drafts a round adapting to their survival, and the output is plain decoding's. On an RTX 3090 it decodes greedy answers 1.14 to 1.41 times as fast and sampled ones 0.99 to 1.24 times; over two RTX 3090s with --tensor-parallel, where it also drafts by default, 1.33 to 1.70 and 1.18 times.
  • A DSpine drafter is an artifact of its own (--spec dspine --draft-model PATH): 1 to 15 drafts on Qwen3.5-core models and Qwen3.8-Flash-Next, 1 to 7 on Gemma 4, Flint, DeepSeek-V4.1 and Inkling 2. Tencent's drafter for Qwen3.8-27B, converted, decodes a code answer 3.08 times and a prose answer 1.86 times as fast as plain decoding on an RTX 5090, where DFlash2 reaches 3.29 and 2.05 (measurements).
  • Flint, which has no drafter, DeepSeek-V4.1-Flash without --spec and Inkling 2 draft by context lookup (--lookup-ngram N, 1 to 7 drafts): what followed the last N tokens' earlier occurrence (the one the sequence was already copying while it still matches, else the newest), verified in one pass of decode rows.
  • --adaptive-mtp picks each round's width from measured draft survival and round cost: an MTP round's, and on Qwen3.5-core models a DFlash, DFlash2 or DSpine round's (--draft-tokens or half).
  • N-gram copy drafting beside the neural drafter (on with --spec) verifies up to 15 tokens copied from earlier prompt, tool-result or output text (ngram copy proposals).
  • Ten KV formats, from bf16 to rk2v4-e8 at 216 bytes per token and KV head; rk8v4 is the all-round choice, rk4v4 holds the native 262,144-token window of Qwen3.8-27B on a 24 GB card, and bf16p keeps BF16's bits in 784 bytes instead of 1,024 (context and memory).
  • Up to 1,048,576 tokens of context, four times the native window, with plain RoPE or YaRN (--rope-yarn, for Qwen3.5, Qwen3.8-Flash-Next and Gemma 4; Flint's full-attention blocks and Inkling 2's attention carry no rotation and DeepSeek-V4.1's compressed blocks the release's own YaRN, so none of them takes scaling).
  • A hybrid prefix cache by default, which shares content-addressed KV blocks and sparse state snapshots across requests on the device and in pinned host memory; or a checkpoint catalog (--use-original-prefix-caching) with an optional disk tier that survives restarts (--disk-kv-path, --disk-kv-restore) and endpoint and branch anchors that let an edited or regenerated turn resume where it left the conversation. Gemma 4, Flint, DeepSeek-V4.1, Inkling 2 and Flash-Next keep state images in pinned host memory with a disk tier, a prefix cache file and session slots of their own (Serving).
  • Precision trades that buy context: --embedding-q4, --lm-head-q6, --gdn-state-fp16 (quality trades).
  • A token embedding kept in mapped host memory, which frees its VRAM for context with no change to the output: the server's default for Qwen3.5-family models on Linux whose KV pool takes free memory and that run without drafting or with more than eight requests (--embedding-residency auto), or host explicitly.
  • OpenAI Responses and Chat Completions, Anthropic Messages, llama.cpp's /completion, /tokenize, /detokenize, /apply-template, /v1/rerank, /metrics, /slots and /props, streaming, tool calls, structured output through xgrammar (--structured-output), token log probabilities and prompt grafts (HTTP serving).
  • Typed decisions. /v1/systemone (TypeSafe's System One API, as llama.cpp, vLLM and Ollama serve it) and /v1/decisions (OpenAI's Decisions API) answer choice, yes/no and score questions about a state with the served chat model: one prompt per question, the answer read from the first token's exact label log probabilities, the state prefilled once and every question run after it as a branch of one read; up to 200 questions, 255 options, Runoff's order-independent choices, a conversation as the state, images and video as data URLs (with --vision), and a margin by which a client escalates near ties (typed decisions).
  • Model suspend. --model-suspend lets an idle server give its device memory back without exiting and take it again on the next request, retained conversations included. Ternary Bonsai 2 27B on an RTX 3090: 7.9 GiB down to 0.3 GiB in 0.33 s, back in 1.1 s (model suspend).
  • Several models behind one server. With --models-dir or a llama.cpp-style --models-preset, ninfer-serve is a router with llama.cpp's model API; with --model-suspend a model sleeps instead of unloading: two 27B models on one 24 GB RTX 3090 swap in 1.8 s instead of an 11.6 s cold load (several models).
  • Control vectors and direction LoRA adapters. Qwen3.5-core models load llama.cpp control vectors and the rank-one LoRA adapters that abliteration tools write, such as AtomicChat's for Ternary Bonsai 2 27B; a request sets adapter scales through llama.cpp's lora field (LoRA adapters and control vectors).
  • Built-in read-only NInfer Monitor at /monitor (GPU sensors, live token rates, KV occupancy, DFlash2 acceptance and request metadata), monitoring documentation, optional Python sidecar, request logs with rotation, and llama.cpp's WebUI, built into the Linux packages and the Docker images.
  • Device route profiles. Each card's measured profile picks the kernel route for every operation and width: built in for the cards in supported GPUs, measured once at first start on any other (device profiles).
  • Pipeline stages. --devices 0,1,... splits the layers over up to eight GPUs on Linux, each stage owning its weights, KV and state; the cards may differ where the build runs on each, such as RTX 30 with RTX 40 cards on the 86 build (pipeline stages). --tensor-parallel divides every layer over the devices instead: each holds a share of the GDN heads, of the attention's KV heads with their cache and of the dense FFN rows or MoE experts in any weight format, sized to the card, and reads only those per token (tensor parallelism), Qwen3.8-Flash-Next its GDN key heads, attention KV heads and routed experts. Gemma 4, Flint, DeepSeek-V4.1-Flash and Inkling 2 divide only their routed experts this way.
  • FP8 A8 and NVFP4 W4A4 tensor-core routes on every 120a build, an FP4 tensor-core prompt kernel for an NVFP4 KV cache, and programmatic dependent launches on Blackwell.

Docker

The release pipeline packages two Debian 13 / Linux x64 images from the native Linux archives. Each image contains one executable with all NInfer architectures supported by its CUDA variant. The image build does not compile NInfer again.

Image tagToolkitEmbedded GPU architectures
ghcr.io/iamwavecut/ninfer-all:cuda12.9CUDA 12.9.2sm_70 , sm_75 , sm_80 , sm_86 , sm_89
ghcr.io/iamwavecut/ninfer-all:cuda13.4CUDA 13.4.3sm_75 , sm_80 , sm_86 , sm_89 , sm_120a

Choose cuda12.9 for Volta and cuda13.4 for Blackwell. Both cover Turing, Ampere and Ada. Both support a layer pipeline (--devices) across different architectures included in that image. The host needs a compatible NVIDIA driver and the NVIDIA Container Toolkit. Windows archives, Linux archives and Docker images use the same two architecture sets:

Each archive and image contains all device images inside its outline. These are the project's build targets, not the complete list of architectures supported by NVIDIA's Toolkits. See the release process for build and verification status.

  • Tags. cuda12.9 and cuda13.4 update after both Linux CUDA builds and both Docker jobs succeed for the current master. Windows builds do not block them. Pin a build with cuda12.9-<commit12> or cuda13.4-<commit12>, where commit12 is the first 12 hexadecimal characters of its commit SHA. Both images must build before either floating tag moves. The pipeline no longer updates latest or multi tags.
  • Volumes. /models holds artifacts, /cache the device profile measured on first start, and /grafts/<model>/ optional prompt grafts.
  • Verification. The new image variants still need a complete build and GPU inference checks. Earlier image tests on RTX 3090 and RTX 5090 do not establish these variants' runtime behavior.

The container's command chooses what runs:

commandruns
serve , ninfer , perplexity , calibrate [args]that binary with any artifact and flags; serve listens on 0.0.0.0:8080 unless its flags or --config files give host or port . The image keeps the configuration files in /opt/ninfer/configs : docker run -w / ... serve --config /opt/ninfer/configs/<file>.ini
run <model> [profile] (the default: run qwen38-27b )the launcher profiles of scripts/run.sh for the official qwen38-27b and qwen36-35b-a3b , with its NINFER_* overrides ( -e NINFER_SPEC=mtp , -e NINFER_CONTEXT=131072 , ...)
download <model>scripts/download-model.sh into /models : qwen38-27b , qwen36-27b or qwen36-35b-a3b

The official Qwen3.8-27B with the measured tuned profile, on http://localhost:8080/v1:


        docker run --rm -v "$PWD/models:/models" ghcr.io/iamwavecut/ninfer-all:cuda13.4 download qwen38-27b
docker run --rm --gpus all -p 8080:8080 --ulimit memlock=-1 \
  -v "$PWD/models:/models" -v ninfer-cache:/cache \
  ghcr.io/iamwavecut/ninfer-all:cuda13.4 run qwen38-27b
      

compose.yaml wires the GPU, the port and the volumes for the same: docker compose run --rm ninfer download qwen38-27b, then docker compose up -d. NINFER_CUDA_TAG=cuda12.9 docker compose up -d selects the Volta-capable image; Compose defaults to cuda13.4. The published images use their multiarch binary automatically. docker build -t ninfer . builds a separate Ubuntu image from source (--build-arg ARCHS=86 for one architecture, --build-arg 'ARCHS=75;86;120a' for the multi-architecture build).

Building


        scripts/fetch-media-sources.sh
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_ARCHITECTURES=86
cmake --build build --target ninfer-serve ninfer-calibrate
      

The first command downloads the FFmpeg and dav1d releases that a Linux build compiles in.

CMAKE_CUDA_ARCHITECTURES takes one build from supported GPUs, or a list of them for a pipeline across cards of different architectures (several architectures).

120a runs the mma.sync compatibility path, which the ternary route needs. CUDA 12.8 or newer builds 75, 80, 86 and 89, and 70 needs CUDA 12.8 or 12.9. A 120a build needs CUDA 13.1 or newer except 13.2.0 and 13.2.1: those releases, 12.8 and 12.9 miscompile sm_120a kernels, and configure refuses them (CUDA toolkits). The Linux and Windows guides cover dependencies, the opt-in build options and the launcher scripts; tests and benchmarks have their own guides.

License

Apache-2.0, as upstream. The Bonsai artifacts' weights come from PrismML, ProCreations and Qwen, all Apache-2.0; their cards list the notices. The Qwen3.8-Flash-Next artifacts carry the Qwen Community License 1.0 of their model.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by HN AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗