TL;DR
LLM agents performing multi-step tasks are highly effective but computationally expensive. While model quantization reduces inference costs, it often causes catastrophic failures during critical reasoning steps. This paper introduces Dynamic Mixed-Precision Routing (DMR), a framework that uses a lightweight router to dynamically switch between high-precision (BF16) and low-precision (quantized) models at each decision step, maintaining full-precision accuracy while significantly reducing latency and cost.
What Problem Does This Paper Address?
Deploying Large Language Models (LLMs) as interactive agents for long-horizon tasks (like web navigation or robotic planning) incurs substantial computational costs. Post-training quantization (e.g., compressing models to 3-bit or 4-bit weights) is a standard way to improve efficiency, but it severely degrades an agent's performance.
The authors observe that quantized models don't fail uniformly; instead, they perform perfectly well on routine steps (like navigating menus or searching) but fail catastrophically at specific "critical steps" that require complex reasoning or precise action formatting.
Existing LLM routing methods typically operate at the query or episode level, which is too coarse-grained for multi-step agents. Naively applying quantization across an entire trajectory destroys agent robustness, while using full precision everywhere is prohibitively expensive. DMR addresses this by introducing fine-grained, step-level precision routing.
Methods
DMR decouples action generation from precision selection by introducing a lightweight Transformer-based router (comprising only 2–3% of the total model parameters). The framework operates via a two-stage training pipeline:
- KL-Supervised Training (KL-ST): The router is warm-started by learning to predict whether a low-precision model's action distribution will deviate significantly from the high-precision reference. This is framed as a binary classification task based on whether the step-wise KL divergence exceeds a specific threshold.
- RL Refinement via GRPO: To optimize for actual long-term task success rather than just local step-wise similarity, the authors refine the router using Group-Relative Policy Optimization (GRPO). The reward function explicitly balances task success against a latency-based cost penalty.
At inference time, a quantile-based calibration mechanism allows users to dynamically adjust a budget parameter ($K$) to favor either maximum speedup or maximum accuracy without retraining the router.
Datasets
The authors evaluated DMR using the Qwen3-1.7B and Qwen3-4B models across two distinct interactive agent benchmarks:
- ALFWorld: A text-based embodied environment requiring agents to execute multi-step household tasks.
- WebShop: A simulated online shopping environment where agents must search and click through web pages to locate products based on natural language instructions.
Key Insights and Ideas
- The Bimodal Nature of Quantization Sensitivity: Across different benchmarks and model sizes, the step-wise KL divergence between full-precision and quantized models exhibits a highly skewed, bimodal distribution on a log scale. Most steps show near-zero divergence, while a small fraction forms a heavy-tailed high-divergence mode. This confirms that precision sensitivity is highly sparse and step-dependent.
- Step-Level is the Sweet Spot: Routing at the step level provides a principled middle ground. It avoids the coarse inefficiencies of query-level routing and the extreme engineering complexity/overhead of token-level mixed-precision coordination.
- Boundary Location Matters More Than the Exact Threshold ($\tau$): When mapping continuous KL values to binary routing labels, performance is highly robust as long as the threshold sits within the "sparse plateau" between the low-divergence mass and the high-divergence tail. If the threshold cuts through a dense region, the router fails to generalize.
Key Results
DMR consistently outperforms always-quantized baselines and successfully recovers full-precision performance at a fraction of the cost:
- Performance Recovery: On ALFWorld, using Qwen3-4B (AWQ), DMR achieved a 95.1% success rate at $K=0.40$, actually surpassing the full BF16 baseline (94.3%) while maintaining a 1.03× speedup over full precision.
- Severe Degradation Mitigation: In highly challenging setups where quantization completely breaks the model (e.g., Qwen3-1.7B GPTQ on WebShop, where success drops from 59.0% to 30.5%), DMR recovers up to 93% of the success-rate gap (reaching 57.0% success).
- Controllable Trade-offs: By sweeping the budget parameter $K$, users can smoothly navigate the accuracy-latency Pareto frontier, achieving significant speedups when tighter budgets are enforced.
Limitations and Future Work
While DMR demonstrates impressive algorithmic efficiency, the authors note a few limitations:
- Hardware Execution Realities: The current evaluation relies on simulated cost models and fake-quantization checkpoints for certain configurations (like 3-bit GPTQ) due to a lack of native low-bit kernel support in deployment frameworks. Real-world wall-clock speedups will depend heavily on the optimization of underlying low-bit inference engines.
- Scope of Precision: The current framework only routes between two options (one high-precision, one low-precision). Future work could extend DMR to handle a richer hierarchy of precisions (e.g., mixing FP16, INT8, INT4, and INT3).
Summary updated