ARCHITECTURE
Bolt separates full-sequence work from recurrent cache use.
The public component accepts hidden states like an attention layer. Full-sequence calls are used for training and ordinary inference, while prefill/decode expose the state needed by autoregressive generation.
LAYER FLOW
| Stage | Role |
|---|---|
| Input projection | Transforms hidden states for Bolt sequence processing. |
| Sequence processing | Runs the selected PyTorch/native route under the shared backend policy. |
| Output projection | Returns hidden states at the model dimension. |
| Generation cache | prefillbuilds cache state;decode_stepreuses it for subsequent tokens. |
TRAINING & INFERENCE
Training remains compatible with PyTorch autograd. The integrated CUDA FP16 path can use Bolt's native execution when available; explicitpytorchremains the reference route.use_sdpacontrols the supported PyTorch attention path.
MODEL COMPOSITION
BoltModelcombines token embeddings, positional handling, Bolt layers, normalization, FFN/residual choices and the language-model head. Bolt can also be placed insideBrick/Bricksalongside ESA or standard attention.
