Reproduce “FlexQuant: A Flexible and Efficient Dynamic Precision Switching Framework for LLM Quantization” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Fangxin Liu, Zongwu Wang, JinHong Xia, Junping Zhao, Shouren Zhao, Jinjin Li, Jian Liu, Li Jiang and 1 more

FlexQuant adapts weight precision during autoregressive decoding to reduce repeated weight-memory access. It uses smoothed perplexity entropy of the model’s next-token distribution to trigger precision changes and KL divergence to rank less-sensitive layers for lowering first. On LongWriter, it reports a 1.3× speedup over FP16 in GPU time per output token, with quality varying by metric.

Key insights

  • The precision requirements for LLM weights can gradually decrease during autoregressive decoding as the generation context length grows, correlating with an increase in the model's 'fault tolerance'.
  • Perplexity Entropy (PPLE) effectively quantifies this 'fault tolerance', providing a reliable metric to schedule precision adjustments token-wise.
  • Different linear layers within LLMs exhibit heterogeneous sensitivities to quantization, allowing for a strategic, layer-wise mixed-precision approach guided by KL divergence to minimize accuracy loss.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.