ASQ: Agent-guided Semantic-aware Quantization for Large Language Models

Seungdong Yoa, Ye Seul Sim, Suhee Yoon, Sanghyu Yoon, Dongmin Kim, Soonyoung Lee, Junhyun Lee, Bumsoo KimNeurIPS 2026

TL;DR

When we shrink Large Language Models (LLMs) to run on smaller hardware, standard compression methods protect the "loudest" neurons—the ones that fire strongly all the time—while accidentally crushing the quiet, specialized ones that actually know medicine, law, or finance. ASQ (Agent-guided Semantic-aware Quantization) uses an AI agent to spot meaningful keywords in calibration text, tracing how the network lights up around them to protect the model’s true "expert" pathways. Remarkably, this 4-bit compressed model doesn't just preserve specialized knowledge with zero inference overhead—it sometimes even outperforms the uncompressed original.

What Problem Does This Paper Address?

To deploy massive LLMs without melting GPUs, engineers use Post-Training Quantization (PTQ)—shrinking high-precision weights (like 16-bit floats, or FP16) into compact 4-bit integers without retraining the model. Because rounding weights introduces errors, state-of-the-art methods like AWQ run a small batch of "calibration" text through the model, see which input channels have the largest average activations, and scale those weights to protect them from rounding damage.

Here is the catch: loudness does not equal meaning.

Transformers are functionally heterogeneous. Many channels with massive, constant activations are just "structural outliers"—bookkeeping neurons that fire on every token regardless of context. Meanwhile, channels that encode deep, specialized concepts (like "dendrite" or "fiduciary") fire sparsely and quietly. When you average activations across a whole document, these rare semantic signals get washed out. Standard PTQ protects the generic structural plumbing while starving domain-critical neurons of precision—a fatal flaw when deploying compressed models into specialized fields like medicine or law.

Figure 2: Global magnitude vs. semantic im- portance. Red bars mark the 119/128 salient channels missed by magnitude ranking.

Methods

ASQ builds on standard activation-aware weight scaling—where weights are multiplied by a protective scaling factor before 4-bit rounding, and the inverse scale is folded into earlier layers so online inference incurs zero extra cost. What’s novel is how ASQ chooses which channels to protect, unfolding in three stages:

Figure 1: Overview of our proposed method. An auxiliary LLM agent identifies semantically salient positions in the calibration text, which condition dual-pathway scoring to produce channel-wise semantic importance scores for quantization scaling.
  1. Agent-Guided Semantic Search: Instead of treating all calibration text equally, an auxiliary LLM agent (Gemini 2.5 Flash, or even the uncompressed target model itself) reads the raw calibration text and extracts salient keywords. Exact string matching maps these terms to specific token positions ($\mathcal{K}$) without altering the input sequence.
  2. Dual-Pathway Semantic Scoring: ASQ probes how the target model reacts at those exact keyword positions using two signals:
  3. Pathway A (Contrastive Activation Selectivity): Applied to all linear layers, this divides a channel's average activation on keywords by its global average across all tokens. Structural outliers that fire everywhere score near 1.0 and get ignored; quiet "expert" channels that spike specifically on domain terms get high scores.
  4. Pathway B (Attention Routing): Applied to attention output projections ($W_O$), this measures how much attention mass heads direct toward the keyword tokens, capturing how semantic meaning propagates across the sequence.
  5. Semantic-Aware Scaling: ASQ normalizes the combined semantic score and uses it to boost standard magnitude-based scaling. Structurally critical channels keep their base protection, while semantically selective channels get an extra shield of precision.

Datasets

No new datasets are introduced, but the authors enforce a strict zero-shot separation between raw calibration text and unseen downstream Question-Answering (QA) evaluations:

  • Domain Calibration (128 raw text samples each): PMC-Patients V2 (Medical), Pile of Law (Legal), and SEC Filings-10K / EDGAR-CORPUS (Finance). General text experiments use C4.
  • Domain QA Evaluation: PubMedQA, MedQA-USMLE, and MedMCQA (Medical); LexGLUE CaseHOLD (Legal); and MMLU-Economics / FinanceQA (Finance).
  • General Reasoning Evaluation: MMLU general subjects and ARC (Easy & Challenge).

Key Insights and Ideas

  • Magnitude and meaning are nearly orthogonal: When comparing the top 5% of channels picked by global magnitude (AWQ) versus ASQ's semantic score, the Jaccard overlap is near zero (~0.055 overall, and 0.000 in attention output projections). In one medical layer, 119 of the top 128 semantic channels were hiding in the low-magnitude tail.
  • Magnitude scaling can backfire in specialized domains: On Llama-3-8B, standard AWQ actually underperforms naive Round-To-Nearest (RTN) quantization (40.21% vs. 40.55%). Why? AWQ actively shifts precision away from quiet semantic channels, increasing their quantization error by 18.0% over RTN.
  • Quantization as denoising: By concentrating 4-bit capacity on salient channels and aggressively rounding noisy, low-importance ones, ASQ acts like an implicit regularizer—allowing 4-bit models to occasionally beat their 16-bit uncompressed parents.
  • LLMs can compress themselves: Using the FP16 target model as its own keyword-extracting agent ("self-quantization") works nearly as well as using an external API, proving that models already have enough accessible domain awareness to guide their own compression offline and privately.

Key Results

Tested on Meta-Llama-3-8B and Qwen2.5-32B under 4-bit weight-only quantization (W4A16):

Table 1: Zero-shot accuracy (%) comparison across specialized domains. Bold indicates the best performance among 4-bit quantized models. ASQ consistently outperforms existing post-training quantization (PTQ) baselines. Notably, ASQ even surpasses the FP16 baseline in several benchmarks (e.g., PubMedQA, LexGLUE), highlighting its robust semantic preservation.
  • Domain Preservation: On Llama-3-8B, ASQ averages 42.51% across the five domain benchmarks, recovering 99.0% of FP16 accuracy (42.95%) and beating AWQ (+2.30 percentage points) and GPTQ (+5.70 pp). On Qwen2.5-32B, ASQ hits 46.24%, surpassing the dense FP16 baseline (45.94%).
  • Surpassing FP16: Both 4-bit ASQ models beat their FP16 counterparts on PubMedQA (+2.60 pp on Llama, +1.60 pp on Qwen), MedMCQA, and LexGLUE.
  • No Zero-Sum Trade-off: Models calibrated on specialized domains still match or beat AWQ on general reasoning benchmarks (57.37% vs. 57.03% on Llama-3-8B; 60.82% vs. 60.57% on Qwen2.5-32B).
  • Self-Quantization: Using the target model as its own agent drops accuracy by only 0.36 pp (Qwen) to 0.78 pp (Llama) compared to using Gemini, still solidly beating AWQ.

Limitations and Future Work

Not explicitly discussed in a dedicated section in the provided main text. However, a few practical boundaries are apparent from the methodology:

  • Offline Calibration Overhead: While online inference has zero extra overhead, offline calibration requires running an LLM agent (either via external API or local FP16 inference) to extract keywords before quantization.
  • Layer Constraints for Pathway B: Attention routing scores only map cleanly to attention output projections ($W_O$), leaving Q/K/V and feed-forward layers to rely solely on Pathway A, and head-level routing treats all dimensions within a single attention head uniformly.
  • Simulated Quantization: Experiments evaluate W4A16 via FP16 pseudo-quantization rather than low-bit activation quantization (like W4A4/W8A8).

Summary updated

Abstract

Post-training quantization (PTQ) compresses large language models (LLMs) but remains largely semantic-agnostic, relying on global activation magnitude to guide precision allocation. This overlooks the functional heterogeneity of Transformer representations, where semantically meaningful channels are sparsely activated while structurally dominant channels exhibit large but context-insensitive activations. We propose Agent-guided Semantic-aware Quantization (ASQ), a PTQ framework that conditions on semantically informative positions identified by an auxiliary LLM. A dual-pathway scoring mechanism captures both activation selectivity and attention routing toward these positions, producing channel-wise importance scores for scaling. This yields a closer approximation to a semantically conditioned objective and consistently improves low-bit (e.g., W4A16) quantization performance across LLMs. Extensive experiments show consistent gains over state-of-the-art PTQ, preserving general reasoning and even surpassing FP16 performance on several benchmarks in specialized domains, while enabling training-free, privacy-preserving self-quantization with zero inference overhead.
BibTeX
@inproceedings{yoa2026asq,
  author = {Seungdong Yoa and Ye Seul Sim and Suhee Yoon and Sanghyu Yoon and Dongmin Kim and Soonyoung Lee and Junhyun Lee and Bumsoo Kim},
  title = {{ASQ: Agent-guided Semantic-aware Quantization for Large Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=IJweSRZ9jh},
}
Figure