potentialpaper

Shift-Accumulate Attention: Multiplier-Free Query-Key Products for Transformer Decoding

Keep the title, authors and abstract in paper.json

potentialpaper · 2026-11-23 19:33 UTC · a8e329f51b78 ·

.potentialpaper/metadata.json modified

+++ b/.potentialpaper/metadata.json
@@ -1,19 +1,5 @@
{
- "layout": 5,
- "identifiers": [
- {
- "scheme": "openreview",
- "value": "kk4xPkadff"
- }
- ],
- "title": "Shift-Accumulate Attention: Multiplier-Free Query-Key Products for Transformer Decoding",
- "authors": [],
- "abstract": "Power-of-two quantisation turns a multiplication into a bit shift, but it has\nso far been applied primarily to the post-softmax attention--value product. We\nreformulate the earlier and larger score product,\n$\\mathbf{S}=\\mathbf{Q}\\mathbf{K}^{T}$, by quantising the key cache to a signed\npower-of-two fixed-point representation, so that every scalar multiplication\nbecomes a sign flip, a shift, and an integer accumulation. We call the resulting\ndatapath ShiftAtten. A fixed-point headroom condition makes every shift a\nnon-negative left shift, rendering the accumulation exact with respect to the\nquantised operands. A mantissa-extended power-of-two family then trades\nadditional shift--add operations for accuracy across 4- to 8-bit\nrepresentations, while a shift-exact online softmax extends the same treatment\nto the attention--value product.\n\nFused CUDA kernels for a 1.1\\,B-parameter Llama decoder on an RTX 4090 reach\n$4.60\\times$ the throughput of FP16 scaled dot-product attention at a 32k\ncontext length with a $2.5\\times$ smaller KV cache. We separate the gain into\n$2.53\\times$ from the narrower representation and $1.81\\times$ from kernel\nengineering. On zero-shot reasoning, the 8-bit representation achieves\n$61.61$ percent versus $61.51$ percent for FP16, while at 4 bits it loses only\n$0.94$ percentage points compared with $2.68$ points for uniform INT4,\ndespite worse perplexity and tensor-level error.\n\nA cost model calibrated by kernel disassembly shows that the remaining\nbottleneck is instruction issue rather than memory bandwidth: current GPUs\nprovide a packed four-way integer multiply--accumulate but no corresponding\npacked shift primitive, and PTX scalar shift--accumulate is emulated. We\ntherefore propose DS4A, a packed four-way shift-dot-accumulate instruction.\nUnder the same kernel structure, DS4A is projected to reach $6.51\\times$ FP16\nthroughput, compared with $4.94\\times$ for an optimised INT8 MAC kernel,\nbecause the power-of-two representation moves 101 bytes per cached token\nversus 133 bytes for INT8.",
- "year": 2027,
- "venue": "ICLR 2027 (under review)",
- "source": "openreview",
- "license": {
- "metadata": "CC0-1.0",
- "abstract": "CC0-1.0"
- }
+ "layout": 6,
+ "kind": "paper",
+ "key": "58979142-0954-480a-863b-c17affc34691"
}

paper.json added

+++ b/paper.json
@@ -0,0 +1,9 @@
+{
+ "title": "Shift-Accumulate Attention: Multiplier-Free Query-Key Products for Transformer Decoding",
+ "authors": [],
+ "abstract": "Power-of-two quantisation turns a multiplication into a bit shift, but it has\nso far been applied primarily to the post-softmax attention--value product. We\nreformulate the earlier and larger score product,\n$\\mathbf{S}=\\mathbf{Q}\\mathbf{K}^{T}$, by quantising the key cache to a signed\npower-of-two fixed-point representation, so that every scalar multiplication\nbecomes a sign flip, a shift, and an integer accumulation. We call the resulting\ndatapath ShiftAtten. A fixed-point headroom condition makes every shift a\nnon-negative left shift, rendering the accumulation exact with respect to the\nquantised operands. A mantissa-extended power-of-two family then trades\nadditional shift--add operations for accuracy across 4- to 8-bit\nrepresentations, while a shift-exact online softmax extends the same treatment\nto the attention--value product.\n\nFused CUDA kernels for a 1.1\\,B-parameter Llama decoder on an RTX 4090 reach\n$4.60\\times$ the throughput of FP16 scaled dot-product attention at a 32k\ncontext length with a $2.5\\times$ smaller KV cache. We separate the gain into\n$2.53\\times$ from the narrower representation and $1.81\\times$ from kernel\nengineering. On zero-shot reasoning, the 8-bit representation achieves\n$61.61$ percent versus $61.51$ percent for FP16, while at 4 bits it loses only\n$0.94$ percentage points compared with $2.68$ points for uniform INT4,\ndespite worse perplexity and tensor-level error.\n\nA cost model calibrated by kernel disassembly shows that the remaining\nbottleneck is instruction issue rather than memory bandwidth: current GPUs\nprovide a packed four-way integer multiply--accumulate but no corresponding\npacked shift primitive, and PTX scalar shift--accumulate is emulated. We\ntherefore propose DS4A, a packed four-way shift-dot-accumulate instruction.\nUnder the same kernel structure, DS4A is projected to reach $6.51\\times$ FP16\nthroughput, compared with $4.94\\times$ for an optimised INT8 MAC kernel,\nbecause the power-of-two representation moves 101 bytes per cached token\nversus 133 bytes for INT8.",
+ "license": {
+ "metadata": "CC0-1.0",
+ "abstract": "CC0-1.0"
+ }
+}