LOOKAT: 64× KV-cache compression via lookup-table attention, no retraining

January 15, 20266 min

Overview

Decision SnapshotNeeds Validation

Clear method and convincing small-scale experiments on GPT-2 show big bandwidth savings, but results come from 3 sample sets and require hardware kernel work for deployment.

Citations0

Evidence Strength0.70

Confidence0.75

Risk Signals10

Trust Signals

Findings with numeric evidence: 4/4

Findings with evidence refs: 4/4

Results with explicit delta: 5/5

Reproducibility

Status: No open assets linked

Open source: Unknown

At A Glance

Cost impact: 80%

Production readiness: 65%

Novelty: 60%

Authors

Aryan Karmore

Links

Abstract / PDF

Why It Matters For Business

LOOKAT can cut KV-cache memory and DRAM bandwidth on edge devices by tens of times without retraining, enabling larger context or lower-cost hardware for real-time inference.

Who Should Care

Summary TLDR

LOOKAT replaces standard attention scoring with a lookup-table method built from product quantization and asymmetric distance computation (ADC). By compressing keys into small codebook indices and precomputing query×codebook dot-products, LOOKAT avoids dequantizing keys and cuts KV-cache bandwidth drastically. On GPT-2 experiments it reaches 64× compression with ~0.957 cosine output fidelity and Spearman rank correlation >0.95, without training or architecture changes. Main limits: values stay FP16 and lookup kernels need hardware support.

Problem Statement

KV-cache memory grows with sequence length and dominates edge inference memory. Standard INT4/INT8 quantization lowers storage but still needs dequantization, so bandwidth remains the bottleneck. The paper asks: can attention scoring be computed directly on compressed keys to remove the dequantization bandwidth cost?

Main Contribution

Show attention scoring is equivalent to inner-product retrieval and can use product quantization + ADC.

Introduce LOOKAT: compute attention scores from codebook indices via precomputed lookup tables, avoiding key dequantization.

Key Findings

LOOKAT achieves 64× KV-cache compression while keeping model output close to FP16.

Numbers64× compression → cosine sim 0.957

Practical UseYou can store 64× fewer bytes for keys and still keep outputs near original on evaluated GPT-2 cases; this reduces memory pressure on edge devices.

Evidence RefTable 1; Section 4.3

LOOKAT preserves attention ranking structure.

NumbersSpearman ρ ≈ 0.950.96 across configs

Practical UseTop attention targets stay the same, so tasks that need relative importance (e.g., retrieval, QA) likely keep working.

Evidence RefTable 1; Section 4.3

Results

MetricValueBaselineDeltaSplit / DatasetEvidenceEvidence Ref
LOOKAT-2 cosine similarity (output fidelity)0.957FP16 baseline 1.000−0.043 vs FP16GPT-2, mixed text samplesTable 1 reports LOOKAT2 (64×) cosine sim 0.957Table 1
LOOKAT-4 cosine similarity (output fidelity)0.950FP16 baseline 1.000−0.050 vs FP16GPT-2, mixed text samplesTable 1 reports LOOKAT4 (32×) cosine sim 0.950Table 1

What To Try In 7 Days

Profile your model's KV-cache bandwidth; confirm attention scoring is the bottleneck.

Implement a PQ+ADC prototype for keys (m=4) and measure per-query DRAM load reduction.

Run functional checks on a few representative prompts to compare top-k attention overlap with FP16.

Optimization Features

Token Efficiency
reduces per-token KV memory to 1–16 bytes depending on m
Infra Optimization
suitable for low-bandwidth edge DRAM; reduces DRAM traffic for attention
Model Optimization
product quantization of key vectorsasymmetric distance computation for scoring
System Optimization
shifts bottleneck from memory bandwidth to small compute and memory for tablesrequires optimized lookup kernels on target hardware
Training Optimization
no retraining required (post-processing codebooks)
Inference Optimization
precompute lookup tables per query (m × 256 dot-products)replace per-key FP16 loads with byte indices + lookups

Reproducibility

Code AvailableNo
Data AvailableNo
Open Source StatusUnknown
LicenseUnknown

Risks & Boundaries

Limitations

Only compresses keys; values remain FP16 so total memory savings are partial.

Codebook quality depends on calibration data and domain; results reported on three small sample types.

When Not To Use

When you need exact attention magnitudes rather than relative ordering.

If your hardware cannot support fast table lookups or optimized byte-index kernels.

Failure Modes

Long contexts degrade fidelity (cosine drops ~10% at 1024 tokens).

High KL divergence in some samples can alter attention mass distribution.

Core Entities

Models

GPT-2

Metrics

Cosine SimilarityKL DivergenceSpearman Rank CorrelationAccuracy

Datasets

natural language prose (samples)Python source code (samples)technical mixed text (samples)