LakoMoor's picture
Update model card: vision and MTP sidecars
7799e14 verified
|
Raw History Blame Contribute Delete
7.93 kB
metadata
language:
  - en
license: apache-2.0
library_name: q-volta
pipeline_tag: text-generation
base_model: thinkingmachines/Inkling-2-Mini
tags:
  - quantized
  - moe
  - looped-transformer
  - long-context
  - v100
  - cpu-inference
  - gptq
  - q-volta
Q Project logo

Inkling-2-Mini-QVolta

Inkling-2-Mini (26.4B MoE, looped) in one 9.9 GiB file: ~120 tok/s on a Tesla V100 and 256K context on a 16 GB card

Size Engine License

Engine code Base model Qwen3.8-27B-QVolta

This is a research release, not a drop-in replacement for the original checkpoint. The experts are re-quantized to 3 bits on top of the vendor's NVFP4/MXFP8 weights, which costs quality (numbers below). The file loads only in Q-Volta (not in transformers, vLLM or llama.cpp). The vision tower and the MTP drafter are separate optional files in this repository (see below). Quality on tool calling, code and long context was not evaluated.

What this is

Inkling-2-Mini (Thinking Machines Lab, Apache-2.0) is a 26.4B-parameter MoE (3.4B active; 128 experts, top-8) whose middle 12 of 24 layers run three times with shared weights, with local (window 1024) and global attention. The original checkpoint is 19.5 GB in NVFP4/MXFP8. This repository holds a text-only conversion in Q-Volta's single-file .qv container (header + JSON tensor index + bit-plane data):

file size recipe
inkling2-mini-q3a5.qv 9.89 GiB experts 3-bit (GPTQ with a Hessian shrunk towards the pooled one, group 128, 8-bit metadata); attention 5-bit; embedding / unembedding 4-bit; norms, router, conv kernels and loop gates fp16/fp32

| inkling2-mini-vision.qv | 0.60 GiB | optional sidecar: the vision tower (23-layer ViT, fp16, 0.639 GB), image input through image_url | | inkling2-mini-mtp.qv | 0.25 GiB | optional sidecar: the MTP block-8 drafter (5-bit matrices), exact speculative decoding |

Calibration: 8,192 tokens of the reference model's own activations on wikitext/code text; the golden prompts and the README were not calibrated on.

Honest results

All numbers: one machine (Tesla V100-SXM2-16GB; Xeon E5-2683 v4), one engine version, raw data in the repository.

Quality (CPU reference in fp32 on the same weights, 2,047 held-out wiki+code tokens / 511 README tokens):

NLL held-out (nats/token) NLL README
original checkpoint (reference) 1.4479 1.7561
this file (Q3A5) 1.4643 (+0.016) 1.7620 (+0.006)
4-bit experts (12.7 GiB), for comparison, not published 1.4636 1.7824

Top-1 over 32 greedy tokens vs the reference on four prompts: 32/32, 32/32, 32/32, 29/32. Mean absolute logit error on the reference top-20: 1.33 (max 10.3), so individual logits move noticeably. Our reference was checked against the Hugging Face implementation (PR #51050, bf16 on CPU): 32/32, 32/32, 32/32, 31/32 tokens, top-20 max |Δ| 0.22-2.05; dequantization is bit-identical; the log-scaling path used above 8K tokens was only checked at the attention-module level, not for the whole model.

Speed through qv_server on the V100 (int4 KV cache, single requests, one run each):

request result
31-token prompt, 256 new tokens decode 120 tok/s
16,045-token prompt prefill 1,924 tok/s, decode 111 tok/s

Engine benchmarks (CUDA graph): decode 122 tok/s at ctx 25, 114 at 4K, 101 at 32K, 76 at 128K, 57 at 256K (decode over an unwritten cache at that position: speed only); prefill 2,764 tok/s at a 4K prompt (chunk 4096), 766 tok/s for a 256K prompt (334 s). With int4 KV the largest context that fit on the 16 GB card was about 580K tokens (15.7 of 15.8 GiB); passkey retrieval worked at 8K, 32K, 128K and 256K (one prompt each: this shows the pipeline works, not retrieval quality). CPU backend (AVX2, 32 threads): decode 11 tok/s, prefill about 70 tok/s.

Vision (sidecar): image tokens = ceil(h/40) x ceil(w/40) (224x224 -> 36, 1024x1024 -> 676). Pixels match the Hugging Face processor to 1.2e-7 on PNGs (JPEG: one 8-bit level, different decoder); embeddings vs the Hugging Face fp32 tower: relative L2 2e-6..1e-5 (CPU), 5.6e-4..4.1e-3 (CUDA fp16). Encoder on the V100: 5.5 ms (224x224), 23 ms (512x512), 186 ms (1024x1024); time to first token through the server 0.22 / 0.32 / 0.71 s. With this 3-bit text model, a red square on blue and a rendered "HELLO" were described correctly in a small check; end to end the greedy tokens matched the fp32 reference for 9 of 32 steps on CUDA (31 of 32 on CPU) on one image prompt, so expect drift. No WebP/HEIC/video; GIF = first frame. Not evaluated on any benchmark.

MTP (sidecar): the draft graph is taken from the vLLM Inkling2 implementation (the Hugging Face PR has no MTP code). Output is bit-identical to plain greedy decoding (12 of 12 checks). Speed on the V100 is text dependent: 0.55x to 1.73x over a 20-configuration matrix, about 1.25x on code at short context, and no gain on chat prose through the server (draft acceptance is low there). Depth 1 is never faster than plain; use depth 3. Enable it only if your workload is code or repetitive text.

Where it is weaker / not done: decode is latency-bound at about a third of the bandwidth limit; the model thinks by default, so reasoning appears in content unless the template's thinking switch is used; concurrent requests are queued in the released engine version (multi-sequence decoding is being developed).

Usage

git clone https://github.com/Q-Project-LM/q-volta && cd q-volta
cmake -S . -B build -G Ninja -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc && ninja -C build
./build/qv_server --model inkling2-mini-q3a5.qv --tokenizer tokenizer.json \
    --backend cuda --kv int4 --max-ctx 131072 --port 8080      # OpenAI / llama-server compatible API
# images: put inkling2-mini-vision.qv next to the model (auto) or pass --vision-file; MTP: --mtp --mtp-depth 3 --mtp-file inkling2-mini-mtp.qv
# CPU: --backend cpu --threads 32

Details and flags: docs/INKLING_RUN.md; Docker: docs/DOCKER.md.

License and attribution

The weights are a quantized derivative of thinkingmachines/Inkling-2-Mini, released by Thinking Machines Lab under Apache-2.0 (copied here as LICENSE). The original model card also links a Model Acceptable Use Policy; check it before use. Tokenizer, chat template and generation config are copied unchanged from the original repository. The quantization is by the Q Project. No safety tuning of its own: it inherits the base model's behaviour. Research and education only.