Tequila: Trapping-free Ternary Quantization for Large Language Models

Hong Huang, Decheng Wu, Rui Cen, Guanghua Yu, Zonghang Li, Kai Liu, Jianchen Zhu, Peng Chen, Xue Liu, Dapeng Wu · DOI

Abstract

Ternary quantization, which restricts model weights to $\{-1, 0, 1\}$, offers a path toward highly efficient Large Language Model (LLM) deployment on edge devices. However, aggressive quantization typically results in significant accuracy loss. We present Tequila, a trapping-free optimization strategy that addresses the "deadzone trapping" phenomenon—where weights become stuck at zero due to noisy gradients. By reactivating these weights as adaptive biases through a differentiable pathway, Tequila recovers model capacity with negligible inference overhead. Our results on LLaMA-3.2 models show that Tequila outperforms existing ternary methods, achieving performance within 1% of full-precision models and a 3.0× inference speedup on standard CPUs.

Introduction

Deploying LLMs on resource-constrained devices like smartphones and laptops requires drastic reductions in memory and computational requirements. Ternary quantization is particularly attractive because it replaces complex floating-point multiplications with simple additions. Despite its potential, the transition from full-precision (BF16) to ternary often incurs a prohibitive "accuracy gap."

The Deadzone Trapping Problem

The primary obstacle in ternary quantization is the "deadzone." During Quantization-Aware Training (QAT), weights within a specific range around zero are quantized to zero. Standard training uses the Straight-Through Estimator (STE) to approximate gradients, but this often produces noisy and uninformative signals for weights in the deadzone. This leads to "deadzone trapping," where a large portion of the model's parameters oscillate at the quantization boundary without contributing to the model's learning capacity.

Visualizing deadzone trapping in standard ternary quantization versus the trapping-free distribution achieved by Tequila.

The Tequila Method: Reactivating Dead Weights

Tequila introduces a "trapping-free" optimization strategy that transforms these idle parameters into functional components of the model.

Differentiable Reactivation

Instead of allowing dead weights to remain at zero, Tequila maps them to a small, learnable reactivation parameter ($\lambda$). This creates a smooth, differentiable path for gradients, allowing weights to escape the deadzone and find more optimal values during training.

Adaptive Biases and Offline Fusion

The signal from reactivated weights is treated as a dynamic bias term. A key insight of Tequila is that because LLM activations are generally symmetric, these biases can be approximated as input-agnostic. This allows the reactivation terms to be precomputed and folded into the model's existing bias parameters. Consequently, the enhanced model capacity is realized during training, but the final inference engine remains a "pure" ternary model with zero additional computational overhead.

Experimental Evaluation

We evaluated Tequila using LLaMA-3.2 (1B and 3B) models. The models underwent QAT using 10 billion tokens from the UltraFineWeb dataset. Performance was assessed across several zero-shot benchmarks, including PIQA, ARC-Easy/Challenge, HellaSwag, GPQA-Diamond, and WinoGrande.

Key Results

Tequila demonstrates a significant leap in performance for ternary LLMs, effectively closing the gap with full-precision counterparts.

Zero-shot benchmark results comparing Tequila against full-precision (BF16) and state-of-the-art ternary quantization methods.
  • Superior Accuracy: Tequila consistently outperformed state-of-the-art (SOTA) baselines such as BitNet and TernaryLLM. On the ARC benchmark, it achieved an accuracy gain of over 4% compared to previous best-in-class ternary methods.
  • Near-Full-Precision Performance: The 3B Tequila model performed within 1% of the original BF16 LLaMA-3.2 model, demonstrating that extreme compression does not necessitate extreme accuracy loss.
  • Hardware Efficiency: On an Intel 8263C CPU, Tequila provided a 3.0× inference speedup over the full-precision model, matching the speed of standard ternary implementations.
  • Data Efficiency: High performance was achieved with only 10B tokens, significantly less than the 100B+ tokens required by some competing methods.

Conclusion

Tequila redefines the utility of the "deadzone" in quantized models. By treating zero-quantized weights as a source of adaptability rather than lost capacity, Tequila enables highly efficient, trapping-free optimization. This approach provides a practical framework for deploying high-performance LLMs on edge hardware without compromising on speed or accuracy.

Summary updated

BibTeX
@inproceedings{huang2026tequila,
  author = {Hong Huang and Decheng Wu and Rui Cen and Guanghua Yu and Zonghang Li and Kai Liu and Jianchen Zhu and Peng Chen and Xue Liu and Dapeng Wu},
  title = {{Tequila: Trapping-free Ternary Quantization for Large Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=9CZzD5LWdy},
}
Figure