● New paper · Oct 12, 2026 · Quantization

CASK-Q. Quantize the interaction, not just the weights.

Centered Causal Attention Sketches for Joint Query–Key Quantization — a new calibration algorithm that keeps what attention actually computes intact at 2 and 3 bits.

The Decentralized Compute Company16 pagesPDFOpen source
TDCC cloud logo
TDCCResearch · 2026
2-bit · output error
−25.20%

vs independent Q/K reconstruction

3-bit · output error
−28.13%

vs independent Q/K reconstruction

Paired seeds won
60/60

30/30 at 2-bit, 30/30 at 3-bit

Size on disk
+0 B

identical serialized weights, equal update count

01 / Abstract

Low-bit quantization breaks the query–key interaction. CASK-Q calibrates for it directly.

Low-bit quantization perturbs the interaction between query and key projections, not just each projection separately. We introduce CASK-Q, a calibration objective for jointly optimizing scalar-quantized query/key weights using randomized sketches of row-centered causal attention-logit error. An exact prefix-sum identity evaluates the sketch in O(Ndr) arithmetic for sequence length N, head dimension d, and sketch width r, without constructing an N×N logit matrix. We characterize the estimator's mean and variance, prove a sharp global attention-divergence bound, and derive an exact O(Nd²) prefix-moment comparator. In a controlled 30-seed synthetic-attention experiment, CASK-Q reduces mean held-out attention-output normalized mean-squared error by 25.20% at nominal 2-bit and 28.13% at nominal 3-bit relative to independent query/key reconstruction, with identical serialized weight sizes and equal update counts.

02 / Results

Same bits. Same bytes. Less attention error.

Held-out attention-output NMSE over 30 synthetic teacher/data seeds (lower is better). CASK-Q matches the accuracy of dense joint calibration while never materializing the full attention-logit matrix.

Fig. 1 · Output NMSELower is better

Nominal 2-bit

Nominal 3-bit

Source: Table 3 of the paper. Paired 95% bootstrap intervals for the reduction vs independent: [22.48%, 28.13%] at 2-bit, [24.50%, 31.47%] at 3-bit.
Table · Independent vs CASK-QOutput NMSE
TrackBitsIndependentCASK-QReductionWins
Equal-update, 30 seeds20.086000.06432−25.20%30/30
Equal-update, 30 seeds30.026010.01870−28.13%30/30
Equal-time (2 s budget), 10 seeds20.076160.05474−28.12%10/10
Equal-time (2 s budget), 10 seeds30.024110.01761−26.96%10/10
Post-export, permuted covariance20.185290.15389−16.95%28/30
Post-export, heavy-tailed t₃30.055450.04639−16.34%22/30
Table · Calibration loss runtimefwd + bwd
Calibration loss, fwd + bwd (CPU, d=64, r=8)N=128N=512N=2048N=4096
Dense logits0.64 ms4.90 ms112.80 ms608.41 ms
CASK sketch1.66 ms5.76 ms23.29 ms48.08 ms
At long context the sketch is 12.6× faster than the dense calibration loss (N=4096); at short context dense is faster. Reference PyTorch implementations on one AMD EPYC 9V74 thread (Table 9).

03 / Method

How CASK-Q works.

01 / CENTER

Measure the error softmax can see.

The target is the causal attention-logit error with each row's mean removed — exactly the component softmax is invariant to is dropped.

02 / SKETCH

Probe it with shared random signs.

Teacher and student share fresh Rademacher probes. A prefix-sum identity computes the sketch in O(Ndr) without ever building an N×N matrix.

03 / CALIBRATE

Train Q and K together.

Gradients flow into both quantizers at once, so a perturbation in one projection can compensate for the other. Export stays plain scalar codes + FP16 scales.

Fig. 2 · The sketched objectiveCore identities

zi⊤ = qi⊤(Ti − viui⊤/i) / √d,   Ti = Σj≤i kjRj⊤,   L̂R = Σi ‖ẑi − zi‖²  ·  𝔼[L̂R] = ‖D‖F²,   KL(p‖q) ≤ ¼‖δc‖²

The paper proves the estimator is unbiased with variance shrinking as 1/r, gives a sharp bound linking the centered error to attention KL divergence, and supplies an exact deterministic prefix-moment comparator. Twenty-six numerical tests check value and gradient agreement against the dense objective.

The implementation, experiment scripts, results and exported weights are open source: github.com/the-decentralized-compute-company/quantization.

04 / Scope

What the paper does — and doesn't — claim.

  • 01Experiments use controlled synthetic single-head attention teachers, not pretrained language models.
  • 02The baseline is independent Q/K reconstruction on the same quantizer — a controlled ablation, not GPTQ, GSQ or another published system.
  • 03Dense joint calibration reaches similar accuracy; CASK-Q's edge is avoiding the N×N matrix at long context.
  • 04Downstream perplexity, full-model compression and inference kernels are the next evaluation step.

05 / Cite

Cite this work.

BibTeX
@techreport{tdcc2026caskq,
  title       = {CASK-Q: Centered Causal Attention Sketches for Joint Query--Key Quantization},
  author      = {{The Decentralized Compute Company}},
  institution = {The Decentralized Compute Company},
  year        = {2026},
  month       = oct,
  url         = {https://decentralizedcompute.company/cask-q.html},
  note        = {Code: https://github.com/the-decentralized-compute-company/quantization}
}

06 / Token · $COMPUTE · One ecosystem · Just shipping

Research ships. $COMPUTE powers it.

$COMPUTE is the token of The Decentralized Compute Company. Every drop on the October calendar — from our own decision model to the GPU marketplace — lands on the same network, and CASK-Q is the research layer underneath it.

Lower-bit models with less attention error mean bigger models on everyday GPUs, laptops and PCs: more of the network's hardware becomes useful compute.

  • 01CASK-Q: joint Q/K quantization, −25–28% attention-output error at equal size.
  • 02Everyday PCs → decentralized compute nodes.
  • 03Open-source AI chip + compiler.
  • 04GPU marketplace: rent, sell, monetize.

Stay safeThe only official $COMPUTE contract address is the one posted by @computecompany. TDCC will never DM you first or ask for your seed phrase. Nothing on this page is financial advice.