BOLT-3 / ATTENTION
24 GATEDDELTANET + 8 BOLT3ATTN (3 COLD [11,19,27]) • 0 PURE SOFTMAX • QWEN/QWEN3.5-4B

Streaming Dual-Field Memory for Bounded-State LLMs.

Scroll through how Bolt-3.3 retrofits hybrid models (Qwen/Qwen3.5-4B) and dense Transformers (Qwen/Qwen3-4B, meta-llama/Llama-3.2-3B-Instruct) into bounded-memory architectures with Tri-Partitioned Attractors, 4×32-token Sub-Block Tier-2 Digests, Pinned Async DMA, and a Native AVX-512F/AVX2+FMA CPU Engine (18.96 tok/s Q4_0).

75% → 100%
4-Needle NIAH (64k / 128k)
Neural: 18/24 & 15/24 • --tier2 (21 tok/s + Host): 24/24 vs Donor SWA 8/24 & 9/24
88.0% / 83.5%
IFEval / GSM8K @ 8192
Donor: 87.5% / 80.5% • OptB_NoMres_R6: 86.0% (0.0622 KL)
-58.4%
Pure Neural RAM @ 64k (O(1) >32k)
873 MB vs 2,097 MB Donor (1.27x tok/s); Tier-2 adds O(N) Host/Disk
1.005×
Val PPL vs Donor (KL 0.0080)
Top1 97.75% + TruthfulQA mc1 71.73% / mc2 34.15%

How Bolt-3 Compresses & Routes Past Context

Scroll down step-by-step. Each stage scrubs the pinned architecture canvas as tokens flow from the local chunk window into Attractors, Gershgorin residual memory, and sparse Option-B Cold blocks.

STAGE 01 • THE MEMORY BOTTLENECK

Unbounded Softmax KV Grows Linearly Forever

Standard GQA Transformers like Qwen/Qwen3-4B append every new token's Key and Value across all 36 layers. At 65,536 tokens, exact bfloat16 KV caches consume 9,216 MB and memory-bandwidth saturation cuts decode throughput from 59.4 tok/s down to 29.6 tok/s.

KV_Bytes = L(36) * 2 * HKV(8) * HD(128) * T * 2B → 9.22 GB @ 64k
STAGE 02 • SINK + 4C UNIFIED LOCAL RING

Chunked Execution (C = 128, 4C = 512 Ring) & CUDA Graph

Bolt-3.1 processes sequences in C = 128 token chunks. It permanently pins the first n_sinks = 4 tokens plus a unified circular loc_chunks = 4 ring (512 exact local tokens). During single-token decode, _Bolt3GraphRunner writes in-place via index_copy_ with zero allocation.

buf_k = [ sink(4) | ak_eff(128) | loc_ring(512) | (cold) ]
STAGE 03 • TRI-PARTITIONED DIVERSITY ATTRACTORS

Un-Smeared Cosine Merge & Multi-Band Eviction (S = 128)

Evicted local tokens enter S = 128 tri-partitioned slots: S_hh = 64 heavy-hitters, S_land = 48 landmarks, and S_proto = 16 un-smeared high-novelty prototypes biased by kappa * log(mass). On 16 WikiText-103 16k docs, Attractors cut KL vs SWA_W512 from 0.1705 → 0.1279 (-25.0%, M_res on) or 0.1033 (-39.4%, NoMres R6), beating equal-byte SWA and plain-HF Donor-SWA.

S = S_hh(64) + S_land(48) + S_proto(16)  |  bias = kappa * log(mass)
STAGE 04 • GERSHGORIN M_RES (CARTRIDGE SUBSYSTEM)

Algebraic Delta State (M_res [HKV, HD, HD]) for .vsa Cartridges

Overflow tokens write into a fixed float32 delta matrix (beta_proj, eta_proj, trained via L_mem) enabling exact 0.0-residual forget() subtraction for external .vsa neural cartridges. On standard QA/LM without cartridges, swapping M_res's 1.0 MiB/layer budget into +2C local ring tokens (OptB_NoMres_R6, same GPU bytes) lowers KL (0.0622 vs 0.0750) and lifts GSM8K@8192 to 86.0%.

M_res ← gamma * M_res + K_ev^T @ ((V - K_ev @ M_res) * beta / gershgorin)
STAGE 05 • OPTION-B SPARSE COLD-ARMED LAYERS

Sparse Mid-Deep Exact Buckets Capped Past 32,768 Tokens

In bolt3.1-qwen3.5-4b.pth, 24 native GatedDeltaNet layers and 5 pure O(1) layers pair with 3 mid-deep Cold-Armed layers ([11, 19, 27]) holding up to max_cold_blocks = 256 with cold_hit deduplication. Past 32k, oldest blocks invert RoPE (-ok_pos) and overflow into Attractors & M_res, locking state flat near 873 MB.

cold_cap ∈ {0, 16, 32, 64, 128, 256}  |  overflow: ok_kr = apply_rope_pos(ok_p, -ok_pos)
STAGE 06 • NEURAL CARTRIDGES & EXACT FORGET

Disk-Backed .vsa State Cartridges (0.0 Erase Residual)

Bolt3MemoryBank pre-encodes external documents into disk .vsa cartridges and routes queries by normalized embedding cosine similarity (37.44 ms avg route, 100% recall on 4/4 benchmarks). Because updates to M_res are linear delta traces, forget() subtracts gamma^k * delta with 0.0 algebraic residual.

states[li] ← states[li] - (gamma_delta ** n_res_steps) * delta  (res = 0.0)
STAGE 07 • BOLT-3.3 SUB-BLOCK TIER-2 DIGESTS & PINNED DMA

4×32-Token Sub-Boxes (42% Tighter) + Async Pinned Paging

RoPE rotates keys across a 128-token block, loosening coarse single-box [kmin, kmax] bounds. Bolt-3.3 splits every cold/Tier-2 block into 4 tight 32-token sub-boxes (vol4/vol1 = 0.58, backward-compatible with 4D digests) to cut false positives in topk=8 retrieval with zero retraining, while _Tier2BlockStore pins host RAM blocks and issues non_blocking=True H2D DMA transfers.

kmin/kmax: (B, HKV, N_blk, 4, HD)  |  ub = max_sub(q+ · kmax + q- · kmin)
STAGE 08 • BOLT-3.3 NATIVE AVX-512F / AVX2+FMA CPU ENGINE

18.96 tok/s CPU Decode via Split-Half Q4_0 + Fused SwiGLU

bolt3/cpu_engine.py auto-compiles native C++/OpenMP SIMD kernels with explicit AVX-512F & AVX2+FMA split-half Q4_0 (int4) and Q8_0 (int8) GEMV/GEMM plus FusedSwiGLUMLP (fusing gate_proj + up_proj into 1 GEMV). On meta-llama/Llama-3.2-3B-Instruct (12 threads), int4 hits 18.96 tok/s decode & 60.25 tok/s prefill (3.81e-6 vs PyTorch dequant), with int8 at 14.74 tok/s and bf16 at 11.62 tok/s.

python -m bolt3 serve --ckpt model.pth --cpu --cpu-dtype int4  |  bolt3 cpubench

Inspect All 32 Layers of bolt3.1-qwen3.5-4b.pth

Click any layer tile from the verified CPU parameter scan. Green tiles are native preserved GatedDeltaNet layers (24/32), Flame tiles are compressed pure O(1) Bolt3Attn layers (5/32), and Gold tiles are sparse Option-B Cold-Armed Bolt3Attn layers ([11, 19, 27]).

Layer
L11 [Cold-Armed]
Gamma Delta Range
0.9697 – 0.9697
Kappa Median
1.0000
Beta Gate |W|
0.0000
Eta Gate |W|
0.0000

Verified Against Qwen/Qwen3.5-4B on RTX PRO 6000

Both models ran under identical prompts, paired seeds, eval_bs=64, top_k=0, repetition_penalty=1.0, and symmetric 128-token chunk speed/RAM timing.

7-Task Suite & Paired McNemar Parity

Mistral Flame = Bolt-3 Option-B  |  Blue = Qwen/Qwen3.5-4B Donor

Context Scaling Explorer (2k → 64k)

Includes live Cold KV + Unified CUDA-Graph work buffers + 128-token consolidation

Context: 65,536 tok
Bolt-3 State / Donor KV
873.38 vs 2,097.12 MB (-58.4%)
Bolt-3 vs Donor Speed
49.3 vs 38.9 tok/s (1.27x)
Multi-Needle NIAH, Tier-2 .vsa Overflow, GSM8K @ 8192 & Equal-Byte Baseline (Qwen/Qwen3.5-4B Bolt-3.1): Uncapped GSM8K (max_new=8192) hits 83.50% (167/200) with M_res and 86.00% (172/200, trunc=25) with OptB_NoMres_R6 vs Donor 80.50% (161/200) (p=0.090). Without Tier-2, neural GPU state stays strictly O(1) past 32k (873.38 MB, 49.3 tok/s @ 64k), hitting 18/24 (75.0% [55.1–88.0%]) @ 64k and 15/24 (62.5%) @ 128k. With optional --tier2 (bounded GPU + linear 379–1,148 MB host/disk payload, 19–23 tok/s), both OptB_Full and OptB_NoMres_R6 hit 100% (24/24 [86.2–100%]) @ 64k & 128k vs plain-HF Donor_SWA_W896+Cold+T2 33.3% (8/24, p=3e-5) and 37.5% (9/24, p=6e-5) (on 16k_wt_4k cold=4k, n=24 ties at 10–11/24 vs n=12 9/12 vs 4/12). OptB_NoMres_R6 beats plain-HF Donor_SWA_W896+Cold across 16-doc 16k KL (0.0622 vs 0.0705, diff -0.0083 [-0.0100, -0.0066]) and 64k KL (0.1006 vs 0.1136); TruthfulQA ties Donor (71.73% mc1 / 34.15% mc2) and Bolt3MemoryBank scores 100% (4/4) Disk .vsa Recall with 0.0 erase residual.

All Bounded-State Bolt-3 Checkpoints

Only the released Bolt-3 models are listed below (no quadratic donor baselines). Click a model card to inspect its layers, benchmarks, and scaling profile above.

FLAGSHIP HYBRID • 4.206B PARAMS • ZERO PURE SOFTMAX

Bolt-3.1 (Qwen3.5-4B Option-B)

auto3

24 preserved GatedDeltaNet + 5 pure O(1) Bolt3Attn + 3 sparse Cold-Armed Bolt3Attn ([11, 19, 27]) • 4C=512 + L_mem

IFEval / GSM8K
88.0% / 83.5%
4-Needle NIAH
75% / 100% (Tier-2)
State @ 64k
873.38 MB
Decode @ 64k
49.3 tok/s
HuggingFace Repo ↗
FULL RETROFIT • 36 / 36 BOLT3ATTN • ZERO PURE SOFTMAX

Bolt-3 (Qwen3-4B Option-B)

auto4

32 pure O(1) Bolt3Attn + 4 sparse Cold-Armed Bolt3Attn ([14, 19, 24, 29])

GSM8K / IFEval
90.0% / 87.5%
1-Needle NIAH
100% @ 16k
State @ 64k
1,186.11 MB
Decode @ 64k
44.0 tok/s
HuggingFace Repo ↗
BOLT-3.3 • NON-QWEN LLAMA-3

Bolt-3.3 (Llama-3.2-3B Option-B)

24 Pure O(1) + 4 Cold (auto4)

Non-Qwen donor retrofit of meta-llama/Llama-3.2-3B-Instruct (28-layer Llama-3 GQA, 128k RoPE scaling) showcasing Bolt-3.3 4×32-tok sub-block Tier-2 digests and native AVX-512F/AVX2+FMA CPU inference.

CPU Q4_0 Decode
18.96 tok/s
CPU Q4_0 Prefill
60.25 tok/s
7-Task Mean
61.07% vs 61.16%
64k State RAM
-83.2% (1.40×)
HuggingFace Repo ↗

Drop-In PyTorch Package

01 / Install & Verify Parity Tests
git clone -b bolt3 https://github.com/Rikka3/bolt_attention.git
cd bolt_attention
python -m bolt3 test
02 / Benchmark & Serve Checkpoint
python -m bolt3 scan --ckpt bolt3.1-qwen3.5-4b.pth
python -m bolt3 benchmark --ckpt bolt3.1-qwen3.5-4b.pth --donor Qwen/Qwen3.5-4B
python -m bolt3 serve --ckpt bolt3.1-qwen3.5-4b.pth --donor Qwen/Qwen3.5-4B --port 8000 --tier2
python -m bolt3 serve --ckpt bolt33_llama32_3b_latest.pth --donor meta-llama/Llama-3.2-3B-Instruct --cpu --cpu-dtype int4
python -m bolt3 cpubench --ckpt bolt33_llama32_3b_latest.pth --dtypes int4,int8,bf16