atlas

Research map / Architectures and efficiency / Quantization

CodeGEMM: A Codebook-Centric Approach to Efficient GEMM in Quantized LLMs

NeurIPS 2025 · Architectures and efficiency › Quantization · approach: KV cache quantization · 0 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 CodeGEMM, a codebook-centric GEMM kernel that precomputes centroid-activation partial sums in a Psumbook so code indices gather results instead of dequantizing weights, speeding up 2-bit codebook-quantized Llama-3 inference.

Problem

Codebook-based weight-only quantization achieves strong 2-bit accuracy, but existing kernels rely on dequantization that repeatedly fetches centroids from a codebook, causing latency and cache pressure.

Approach

Replace dequantize-then-multiply with a Psumbook of precomputed inner products between centroids and input activations; code indices directly gather and accumulate these partial sums, reducing computation by roughly m/v and cache footprint by v.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use Psumbook precomputed inner products instead of dequantizing codebook weightsCodeGEMM versus dequantization-based codebook kernels · Llama-3 8B and 70B, 2-bit linear layerslatency: 332.45 -> 152.69 (8B); 1111.36 -> 293.82 (70B)Helped
use CodeGEMM-m1v4g128 instead of AQLM-1x16Llama-3.1-70B · Llama-3.1-70Bthroughput: 5.5 -> 51.2 tok/sHelped
add PV-Tuning to CodeGEMM-m1v4g128 (ablation)CodeGEMM-m1v4g128 · Llama-3.1-8B-Instructaverage accuracy: 53.93 -> 63.96Helped
add PV-Tuning to CodeGEMM-m2v8g128 (ablation)CodeGEMM-m2v8g128 · Llama-3.1-8B-Instructaverage accuracy: 52.67 -> 63.76Helped
use m1v4 instead of m2v8 (ablation)CodeGEMM · Llama-3.1-8B-Instructaverage accuracy: 52.67 -> 53.93Helped
use m1v4 instead of m2v8 (ablation)CodeGEMM · Llama-3.1-8B-Instructthroughput: 214.4 -> 228.3 tok/sHelped
use fine-grained group normalization (g=32) instead of g=128 (ablation)CodeGEMM-m1v4 · Llama-3.1-70Baverage accuracy: 70.11 -> 73.15Helped
increase tile height from 2048 to 4096 (ablation)CodeGEMM-m1v4, tw32 · Llama linear layers, M=1, N=4096, K=4096latency: 25.07 -> 27.60 μsHurt
increase tile width from 32 to 128 (ablation)CodeGEMM-m1v4, th2048 · Llama linear layers, M=1, N=4096, K=4096latency: 25.07 -> 26.81 μsHurt
increase tile width from 32 to 64 (ablation)CodeGEMM-m1v4, th2048 · Llama linear layers, M=1, N=8192, K=8192latency: 36.02 -> 35.33 μsHelped
increase the number of codebooks while holding average bit precision fixed (ablation)CodeGEMM with row-wise normalization (g=-1) · WikiText-2perplexityHelped
use smaller group size for finer-grained normalization (ablation)CodeGEMM · WikiText-2perplexityHelped

Surprising findings

Limitations

Experimental setup

Datasets: WikiText-2

Benchmarks: WikiText-2 perplexity MMLU WinoGrande HellaSwag ARC-Easy ARC-Challenge

Metrics: kernel latency (us) tokens/s perplexity accuracy GFLOPS/W memory utilization

Baselines: AQLM QuIP# QTIP LUT-GEMM FlexRound VPTQ GPTQ cuBLAS FP16

Builds on: AQLM GPTQ LUT-GEMM PV-Tuning

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