Verification

Every claim on this site is checked by a test in the repository. The golden model is the reference: a Python program with the same integer formats, which the RTL is compared against on every run.

What is checked

LayerWhat it checksHow it runs
Unit blocks Each arithmetic block against the golden model, including exhaustive sweeps of the exp2 and reciprocal inputs, and the DMA burst timing cycle by cycle. bash sim/run_unit.sh (cocotb with Verilator)
Tile core One tile against the golden trace, including causal masking and multi-group blocks. sim/test_attn_tile.py
Engine, end to end Output bit for bit; HBM read and write bytes; tile count; K/V loads; busy cycles against the closed-form model. Every sequence length 4 to 32, causal and not, all block sizes, both schedules, overlap on and off, and random HBM latency. Random seeds on top. SEEDS=200 bash sim/run_e2e.sh
Golden model Quantization, exp2 and reciprocal, both schedules against float attention, traffic formulas, presets, and that the committed LUT table matches its generator. pytest sim/golden
Lint Verilator with all warnings on, for every module and the full design. bash sim/lint.sh
WebAssembly The compiled module, on golden fixtures for each schedule: output, bytes, tiles, cycles, the last tile's state, probabilities, and the K/V buffer in use. node wasm/test.mjs
Web app Quantization and tile order against the shared fixtures, the visualizer and each docs page in a real browser, at phone width and in both colour schemes. pnpm test, pnpm test:e2e

All of these run in GitHub Actions on every pull request. The workflows are rtl.yml, wasm.yml and web.yml.

Output error

Maximum error of the engine's output against float attention, per preset, in float units. These numbers come from the golden model, which the RTL matches bit for bit.

PresetNCausalMax error
toy_sentence12yes0.0049
previous_token16yes0.0105
attention_sink16yes0.0254
uniform16no0.0028
self16no0.0260
random16no0.0163

Accuracy study

The recorded study (sim/golden/study_results_1000seeds.txt), in V units (one int8 step of V). dp is the datapath error on the INT8 inputs. tot is the error against float attention on the original inputs.

NCausaldp maxdp meantot maxtot mean
4no 0.6240.0665 6.4310.3839
4yes 0.5910.0418 8.0850.3209
8no 0.8490.0640 10.9420.4172
8yes 0.8490.0486 8.8550.3728
16no 1.0610.0661 9.0160.4541
16yes 0.9810.0529 9.3830.4065
32no 1.2600.0691 11.9040.4722
32yes 1.0230.0563 13.0760.4403

Cycles at N = 32

Busy cycles at N = 32, non-causal, with 10 cycles of HBM latency. The sequential FLASH rows match the closed-form schedule exactly. The overlap and NAIVE rows are pinned baselines from the RTL, and the test fails if they change.

ConfigurationBusy cycles
FLASH, Q block 4 rows, no overlap4113
FLASH, Q block 4 rows, overlap2937
FLASH, Q block 16 rows, no overlap2133
FLASH, Q block 16 rows, overlap1657
NAIVE10961

FPGA

The engine behind a UART synthesizes for an ECP5 (LFE5U-85F) with no latches. The UART protocol is simulated: the results read back over the serial line match the golden model, and the cycle and byte counts match the models (bash sim/run_fpga.sh). Synthesis runs in CI (fpga.yml).

Not verified yet