Layer 1: compressed_sparse_attention
shape=[16, 20] keys → queries ↓
m=4 · k=2 · 4 entries
0
The
1
quick
2
brown
3
fox
4
jumps
5
over
6
the
7
lazy
8
dog
9
ate
10
a
11
small
12
red
13
fish
14
this
15
morning
C0
C1
C2
C3
Sliding K=V cache
Compressed cache
⊕
cat dim=-1
q 0
The
q 1
quick
q 2
brown
q 3
fox
q 4
jumps
q 5
over
q 6
the
q 7
lazy
q 8
dog
q 9
ate
q10
a
q11
small
q12
red
q13
fish
q14
this
q15
morning
attended-to
masked (not causally ready)
indexer-masked (top-k did not pick)
Compressed cache contents
C0 = compress( The, quick, brown, fox )
C1 = compress( jumps, over, the, lazy )
C2 = compress( dog, ate, a, small )
C3 = compress( red, fish, this, morning )