⚠️ REQUIRED — jangtq_runtime.safetensors sidecar must be downloaded
Osaurus uses the native Swift JANGTQ runtime. Every JANGTQ bundle on
OsaurusAI ships a small jangtq_runtime.safetensors sidecar (~10 KB–~165 KB)
alongside the weight shards. The Swift loader will refuse to start with
the error
Error: Model '<name>' declares JANGTQ (weight_format: "mxtq") but is
missing required sidecar file 'jangtq_runtime.safetensors'.
Re-download the full model or obtain the sidecar from the original
publisher.
if the file is absent.
If your local copy doesn't have it (older download, partial sync, etc):
The file holds the deterministic codebooks + Hadamard rotation signs the
Swift loader uses to decode *.tq_packed weights. It must match the seed
the bundle was quantized with (mxtq_seed=42).
JANGTQ (codebook + Hadamard) — weight_format: mxtq in jang_config.json
Avg bits/param
~2.15
Disk
~57 GB
Context length
192 K tokens
Chat template
Always-reasoning (<think> opened at assistant start)
What is JANGTQ?
JANGTQ (JANG TurboQuant) is a codebook-based quantization format for MoE
models on Apple Silicon. Routed expert weights stay in a compact codebook +
Hadamard-rotated form at runtime — no decompression to affine — and the
matmul path uses custom Metal kernels that read packed uint32 weights, look
up centroids in a small codebook, and accumulate dot products against a
Hadamard-rotated input (QuIP# rotate-input-once math).
Result vs uniform 2-bit affine: smaller on disk, higher quality, runs at
~89 % of affine 2-bit speed.
Bit Allocation
Component
Bits
Format
Routed expert MLP (gate / up / down)
2
JANGTQ codebook + Hadamard
Attention (Q / K / V / O)
8
Affine (nn.QuantizedLinear, group_size=64)
Shared expert
8
Affine
Embed tokens / LM head
8
Affine
Router gate
fp16
Unquantized nn.Linear
RMSNorms / RoPE / biases
fp16
Unquantized
The routed experts are 98 % of parameters and the natural compression target.
Everything else stays at 8-bit affine so the quality-critical hot path runs
at full precision.
Important Settings
MiniMax M2.7 is an always-reasoning model. The chat template
unconditionally opens <think> at each assistant turn.
Setting
Value
Notes
Temperature
1.0
Required — temp=0 can cause thinking loops
Top-P
0.95
Top-K
40
Repetition Penalty
1.1
Optional, helps prevent loops
max_tokens
≥ 8192
Give reasoning room to converge
Strip <think>…</think> from the response before using the final answer.
Usage
This model requires the jang-tools loader — stock mlx_lm.load() does not
recognize weight_format: mxtq. The loader applies Metal kernel
monkey-patches at load time (fused gate+up+SwiGLU, gather TQ, multi-block
Hadamard, router compile, QKV fusion).
<think> and <tool_call> are non-special tokens by design — the
application layer parses them. Osaurus and vmlxCapabilityDetector read
this block verbatim and wire the qwen3 reasoning parser + minimax tool
parser automatically, so streamed responses route reasoning_content and
tool_calls into the OpenAI-compatible SSE fields instead of leaking into
content.