RTAQ: Reasoning-Termination-Aware 2-Bit MoE Quantization

RTAQ (Reasoning-Termination-Aware Quantization, arXiv:2611.37751) solves 2-bit accuracy collapse in Mixture-of-Experts reasoning models. Up to 47% of GPTQ errors come from unclosed reasoning traces failing to emit `</think>`, governed by roughly 2% of routed experts. By protecting termination experts in a knapsack bit budget with DP-optimal codebooks, RTAQ reaches 2.022-bit average width while retaining 94–98% BF16 accuracy, shrinking expert VRAM 6.3x (64.4 GB to 10.3 GB), and hitting 4,880 tok/s.
RTAQ: Reasoning-Termination-Aware 2-Bit MoE Quantization: RTAQ (Reasoning-Termination-Aware Quantization, arXiv:2611.37751) solves 2-bit accuracy collapse in Mixture-of-Experts reasoning models. Up to 47% of GPTQ errors come from unclosed reasoning traces failing to emit `</think>`, governed by roughly 2% of routed experts. By protecting termination experts in a knapsack bit budget with DP-optimal codebooks, RTAQ reaches 2.022-bit average width while retaining 94–98% BF16 accuracy, shrinking expert VRAM 6.3x (64.4 GB to 10.3 GB), and hitting 4,880 tok/s. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.
- Stops Infinite Overthinking Loops: Identifies and protects the ~2% of routed experts responsible for emitting `</think>`, eliminating up to 47% of GPTQ failure cases.
- 6.3x Smaller Routed-Expert VRAM: Compresses Qwen3.6-35B-A3B routed experts from 64.4 GB (BF16) down to 10.3 GB, freeing 3.8x more KV-cache capacity on a single GPU.
- 94–98% BF16 Reasoning Retention: Beats GPTQ, MC-MoE, GSQ, and TileQ at 2.022 average bits, scoring 96.6% on GSM8K and 93.3% on AIME26.
- 2.09x Faster GPU Decoding: Achieves 3,182 tok/s at batch 48 (2.09x) and 4,880 tok/s at batch 128 (1.92x), with 4.0–4.3x faster MoE layers.
import { createAgent } from '@smoke-monkey/harness';const localReasoningAgent = createAgent({agentId: 'rtaq-2bit-moe-engineer',provider: 'vllm',model: 'Qwen3.6-35B-A3B-RTAQ-2.02bit',workspacePath: process.cwd(),permissions: {read_file: 'allow',write_file: 'allow',run_command: 'ask',},generationConfig: {maxTokens: 16384,stopTokens: ['</think>'],temperature: 0.2,},});async function solveArchitectureTask() {const result = await localReasoningAgent.run('Analyze circular dependencies across src/core/ and propose a non-breaking refactor plan.');console.log('MoE Reasoning Output:', result.summary);}solveArchitectureTask().catch(console.error);
Watch: Related Video Guides
A Visual Guide to Mixture of Experts (MoE) in LLMs
What is Mixture of Experts?
What Is RTAQ? The Hidden Role of Termination-Aware Experts
In sparse MoE architectures such as Qwen3.6-35B-A3B, over 97% of model parameters reside inside routed expert weights. Compressing those experts to ~2 bits enables single-GPU serving, yet uniform 2-bit PTQ collapses on AIME and GPQA-Diamond. RTAQ proves that collapse is rarely a knowledge failure: when quantized models successfully emit the closing </think> token, accuracy tracks BF16 closely; up to 47% of GPTQ errors stem from endless reasoning loops that never close.
Routing telemetry reveals that </think> prediction concentrates on a consistent ~2% subset of routed experts overlooked by global Fisher or Hessian norms. RTAQ locks those termination-aware experts at higher precision, allocates the remaining global 2.0-bit budget via knapsack optimization over DP-optimal scalar codebooks, and recalibrates outputs in under one second per expert.
RTAQ vs GPTQ, MC-MoE, GSQ & TileQ on Long-Horizon Reasoning
At an average of 2.022 bits across routed experts, RTAQ outperforms higher-bit competitors (2.125–2.358 bits) across Qwen3.6-35B-A3B and Nemotron-3-Nano-30B-A3B.
| Model & Quantizer | Avg Bits | GSM8K | AIME25 | AIME26 (Strict) | GPQA-Diamond | LCB | Avg Score |
|---|---|---|---|---|---|---|---|
| Qwen3.6-35B-A3B (BF16) | 16.000 | 96.8 | 91.1 | 91.1 | 82.3 | 77.6 | 87.85 |
| RTAQ (Ours) | 2.022 | 96.6 | 90.0 | 93.3 | 78.6 | 70.2 | 85.81 |
| MC-MoE | 2.358 | 96.3 | 88.9 | 85.6 | 71.9 | 72.3 | 83.07 |
| GSQ | 2.125 | 96.0 | 84.4 | 86.7 | 79.8 | 66.4 | 82.74 |
| TileQ | 2.320 | 95.2 | 82.2 | 86.7 | 73.7 | 49.4 | 77.24 |
| GPTQ | 2.250 | 95.7 | 80.0 | 81.1 | 71.2 | 50.1 | 75.79 |
Hardware profiling on a single GPU shows RTAQ shrinks routed-expert memory 6.3x (64.4 GB -> 10.3 GB), expands available KV-cache capacity 3.8x, speeds up MoE layers 4.0–4.3x at batch >= 16, and hits 3,182 tok/s (batch 48, 2.09x BF16) and 4,880 tok/s (batch 128, 1.92x BF16).
Calibrate With Reasoning-Termination Traces
Always include both reasoning-on (`openr1_math_verified`, `nemotron_math_v3`) and reasoning-off/anchor prompts in your 128-document calibration pack so termination experts receive accurate activation statistics.
Profiling Termination Experts & Knapsack Bit Allocation
To reproduce RTAQ's termination-aware protection before exporting a 2-bit MoE checkpoint, log expert router selections specifically at the </think> token position across a 128-sample mixed calibration set.
import torch
def identify_termination_experts(router_logits_at_think_end: torch.Tensor, top_k: int = 8, threshold: float = 0.02):
"""Flag routed experts disproportionately triggered when emitting </think>."""
# router_logits_at_think_end: [num_layers, num_samples, num_experts]
probs = torch.softmax(router_logits_at_think_end, dim=-1)
topk_idx = probs.topk(top_k, dim=-1).indices
num_layers, _, num_experts = probs.shape
freq = torch.zeros((num_layers, num_experts), dtype=torch.float32)
for l in range(num_layers):
freq[l].scatter_add_(0, topk_idx[l].reshape(-1), torch.ones(topk_idx[l].numel()))
freq /= router_logits_at_think_end.shape[1]
# Protect top ~2% termination-critical experts at >= 4-bit precision
k_protect = max(1, int(num_experts * threshold))
return freq.topk(k_protect, dim=-1).indicesRunning High-Concurrency Local Reasoning Agents in Smoke Monkey
Because 2-bit RTAQ frees 3.8x more KV-cache headroom on a single GPU while preventing </think> truncation failures, Smoke Monkey Harness can run long-context repository reasoning loops (16K–64K tokens) concurrently across multiple local agent threads without falling into infinite thought-loop token exhaustion.
Frequently Asked Questions
Q:Why do 2-bit quantized reasoning MoE models get stuck in infinite loops?
RTAQ shows that ~2% of routed experts specifically control emission of the `</think>` token. Standard sensitivity metrics overlook them, causing aggressive quantization to suppress `</think>` and account for up to 47% of GPTQ errors.
Q:How much VRAM does Qwen3.6-35B-A3B need with RTAQ?
RTAQ compresses routed-expert weights from 64.4 GB in BF16 down to 10.3 GB (a 6.3x reduction), allowing the model to serve on a single GPU with 3.8x larger KV-cache capacity.
Q:How long does RTAQ's grid-preserving recalibration take?
RTAQ's third stage reassigns quantized codes with GPTQ-style error compensation and rescales expert outputs in under 1 second per expert.
Q:Does RTAQ hurt non-reasoning or standard coding tasks?
No. RTAQ retains 96.6% on GSM8K and 70.2% on LiveCodeBench at 2.022 bits, outperforming GPTQ (50.1% LCB at 2.250 bits) and TileQ (49.4% LCB at 2.320 bits).
Related Alternatives & Comparisons
Related Architecture Guides
View all guidesBest Open Source Coding Agents in 2026: Free, Local & Fully Hackable Harnesses
MCP Server Security Best Practices: Hardening Model Context Protocol Agents in 2026
Open Source Coding Agent Harness: Build a Forkable, Local AI Engineering Runtime
Build with Smoke Monkey Harness
Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.