AlgFormer evidence

What attention costs

At the same shape and the same parameter count, reading a 1,984-token prompt takes 182 ms with softmax attention and 7.08 ms with holographic attention. Each further token takes 181 µs against 3.60 µs, and the serve cache holds 2,253 KB against 3.40 KB. Softmax reading grows with the square of the length (exponent 1.9) and holographic reading grows in step with it (1.0).

  • Two attention cores at one shape
  • Losses shown

Headline

less time to read a 1,984-token prompt with holographic attention
26 times
less time for each further token, which stays flat as the context grows
50 times
smaller serve cache, constant in the length of the context
663 times

Where it is slower

Every loss in this record, stated once
  • Holographic attention holds a limited number of items cleanly in one bundle, and HoloShape reports how many for a shape (the capacity table). Softmax attention has no such bound, at the cost of everything above.

How it was measured

Stated once, for every figure on this page
Workload
Both cores are built at 32 channels, 8 shifts and 2 layers, which gives them the same parameter count, and driven with the same random tokens. For each context length the run reads the prompt through the serve cache, then produces 16 more tokens and averages them. Cache memory is the managed memory kept alive by the primed cache.
Engines
AlgFormer (softmax attention); HoloFormer (holographic attention)
Check
Both cores are warmed at every length before timing, so compilation has settled. The two have identical parameter counts.
Statistic
Median of 7 runs per length, on one thread.
Machine
16 logical processors; the run used one thread.
Ties
This measures cost only. It says nothing about which core predicts better.

Results

Time and memory by context length
Tokens in contextRead the prompt, softmax (ms)Read the prompt, holographic (ms)One more token, softmax (µs)One more token, holographic (µs)Cache, softmax (KB)Cache, holographic (KB)
640.350.217.603.2090.63.40
1281.010.4512.53.501633.40
2563.370.9922.43.803073.40
51212.22.4445.64.105953.40
1,02444.24.1697.23.901,1713.40
1,9841827.081813.602,2533.40
The shape HoloShape derives from a width, and the capacity of a holographic bundle at that shape
WidthShiftsLayersDerived context (tokens)Crosstalk edge (tokens)Reads back 90% clean (tokens)
3232112851261
646435122,048245
12812862,0488,192983
25625688,19232,7683,932
5125121132,768131,07215,728

Limits

  • Absolute times depend on the machine. The way each cost grows with the context length is the finding.
  • One shape and one random token stream. The growth exponents are fitted between the 128-token and the longest measurement.
  • Cost only, not quality.

Related