Projects/Bolt/Documentation

[ BOLT / MLBRICKS KIT 1.0.0B1 ]

Bolt Architecture

A moderate view of Bolt full-sequence execution, recurrent cache use and model composition.

DISTRIBUTIONmlbricks-kitDOCS VERSION1.0.0b1

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

StageRole
Input projectionTransforms hidden states for Bolt sequence processing.
Sequence processingRuns the selected PyTorch/native route under the shared backend policy.
Output projectionReturns hidden states at the model dimension.
Generation cacheprefillbuilds 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.