atlas

Research map / Large language models / Language, safety and interpretability

any4: Learned 4-bit Numeric Representation for LLMs

ICML 2025 · Large language models › Language, safety and interpretability · approach: Pruning and circuits in LLMs · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes any4, a learned per-row 4-bit weight codebook (k-means-style weighted by activation statistics from one hand-written calibration prompt) for LLM weight-only PTQ, plus the tinygemm LUT-based GEMM library.

Problem

Choosing the 4-bit numeric representation for weight-only LLM quantization: int4, fp4 and nf4 are fixed formats that may not match the actual weight distribution, and strong accuracy often requires preprocessing (AWQ, GPTQ, Hadamard transforms) or large calibration sets.

Approach

Learn an arbitrary 16-entry lookup table per row of each weight matrix via weighted k-means over group-scaled weights, with weights set by the mean absolute input activation per channel, so no weight or activation preprocessing is needed and calibration uses a single handwritten prompt.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use any4 rather than nf4 for 4-bit quantizationLlama3.2 1B · WikiText-2perplexity: 10.99 -> 10.63Helped
Use any4 rather than nf4 for 4-bit quantizationLlama3 8B · MMLUaccuracy: 60.7% -> 61.0%Helped
Use any4 rather than GPTQ INT4Llama3 70B · WikiText-2perplexity: 3.3 -> 3.2Helped
Use one handwritten prompt for calibration instead of 128 C4 samples of sequence length 2048 (ablation)any4 on Llama3.2 1B · C4perplexity: 14.05 -> 13.95Helped
Calibrate on Pile instead of C4 (ablation)any4 on Llama3.2 1B · C4perplexity: 14.05 -> 13.99Helped
Calibrate on C4 with 512-token sequences instead of 2048-token sequences (ablation)any4 on Llama3.2 1B · C4perplexity: 14.05 -> 13.96Helped
Increase quantization group size from 128 to 1024 (ablation)any4 on Llama3.2 1B · C4perplexity: 13.95 -> 14.34Hurt
Decrease quantization group size from 128 to 64 (ablation)any4 on Llama3.2 1B · C4perplexity: 13.95 -> 13.75Helped
Include activations in the LUT minimization objective rather than minimizing weights only (ablation)any4 on Llama3.2 1B · WikiText-2perplexity: 6.680 -> 6.496Helped
Include group scales in the objective alongside weights and activations (ablation)any4 on Llama3.2 1B · WikiText-2perplexity: 6.496 -> 6.487Helped
Initialize k-means with random centroids rather than k-means++ (ablation)any4 on Llama3.2 1B · WikiText-2perplexity: 10.63 -> 10.66Hurt
Initialize k-means with uniform int4 values rather than k-means++ (ablation)any4 on Llama3.2 1B · WikiText-2perplexity: 10.63 -> 10.83Hurt

Surprising findings

Limitations

Experimental setup

Datasets: handwritten calibration prompt WikiText-2 C4 Penn Treebank CodeParrot

Benchmarks: WikiText-2 C4 PTB CodeParrot HumanEval MBPP MMLU HellaSwag GSM8K BBH BigBench

Metrics: perplexity pass@1 accuracy latency speedup

Baselines: INT4 (RTN) FP4 NF4 GPTQ AWQ QuIP SqueezeLLM

Builds on: NormalFloat4 (nf4) k-means clustering AWQ GPTQ QuIP

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy