Directional spatial scan
Patch tokens follow configurable cross, horizontal, vertical, or raster scan order. Local spatial work stays on the canonical image grid; the mixer sees an ordered visual sequence.
DEFAULT VISUAL ENGINEVISUAL COMPUTING · BOLT MIXER
Bring Bolt’s compact sequence mixing into spatial pipelines without giving up the visual engine choices around it.
VisualBolt uses the same MLBricks visual runtime as VESA, but places Bolt at the center of each visual block. Directional engines use causal Bolt over scanned patches, while ViT-style classification uses the patch sequence without directional causality.
[ ONE VISUAL SURFACE ]
MLBricks separateshow spatial structure is presentedfromwhich sequence mixer processes it. That keeps the visual API consistent while the computational core stays BOLT-based.
Patch tokens follow configurable cross, horizontal, vertical, or raster scan order. Local spatial work stays on the canonical image grid; the mixer sees an ordered visual sequence.
DEFAULT VISUAL ENGINEUse a ViT-style image-token path. Withposition="auto", MLBricks resolves to 2-D sinusoidal position for this engine.
A depthwise local convolution handles nearby spatial structure before the BOLT mixer processes the ordered patch sequence.
LOCAL + GLOBALPatch-based image input and output with timestep conditioning. The engine exposesforward(images, timesteps)and a benchmark sampling loop.
Visual token IDs are processed causally and can be extended throughgenerate(), giving the same family an autoregressive visual-token mode.
[ VISUAL COMPUTE PATH ]
The classifier path makes the separation explicit: patch creation and spatial policy belong to the visual engine; sequence interaction belongs to the mixer.
[B,C,H,W]
Conv2d → visual tokens
scan / position / local context
multi-head latent mixing
standard or MLBricks bricks
classify / denoise / generate
The engine controls scan order, positional representation and local spatial work independently from the sequence-mixing family.
VisualBolt uses Bolt as the visual token mixer.
Classification returns class logits, Diffusion returns images, and AR returns visual-token logits / generated IDs.
[ COMPOSABLE VISUAL BLOCKS ]
The visual configuration can replace the standard FFN or residual path with MLBricks components without changing the high-level image engine.
Use the conventional MLP path when you want the simplest visual block.
ffn="standard"Carry FFN state across physical visual blocks and condition updates on the current and previous mixer signal.
ffn="ffnbrick"Choose shared virtual refinement or compact micro-refinement paths when the model needs extra iterative computation.
virtual_ffnbrick · micro_ffnbrickReplace raw residual addition with RMS-aware control of update energy and candidate stream growth.
residual="rescontroller"[ RUNTIME ]
Both visual families use the MLBricks backend surface:auto,native, orpytorch. Auto can calibrate a representative inference workload and reuse the selected execution plan.
Use the MLBricks execution planner on representative inputs and keep the selected routes stable for inference.
Use supported native visual operations and mixer kernels when explicitly requested or selected.
Keep a readable PyTorch execution route for compatibility, training, debugging, and parity checks.
model.prepare_execution(images)→model.execution_plan()→model.predict(images)[ SAME VISUAL RUNTIME · DIFFERENT MIXER ]
Use the same visual engine surface with ESA as the state mixer.
[ INSTALLATION · MLBRICKS KIT 1.0.0B1 ]
mlbricks.This component ships inside the unifiedmlbricks-kitdistribution. Python imports continue to use themlbricksnamespace.
pip install mlbricks-kit==1.0.0b1[ QUICK START ]
The same constructor can target classification, diffusion, or autoregressive visual-token work.
import torch
from mlbricks import VisionBolt
model = VisionBolt(
image_size=32,
patch_size=4,
num_classes=10,
dim=192,
depth=6,
heads=6,
latent_dim=32,
engine="Serpentine",
position=None,
scan="cross",
backend="auto",
)
images = torch.randn(2, 3, 32, 32)
logits = model(images)[ API · MLBRICKS KIT 1.0.0B1 ]
UseVisionBoltfor the high-level visual family. Runtime planning methods are shared across classifier, diffusion, and autoregressive engines where applicable.
from mlbricks import VisionBolt, VisionBoltConfig
model = VisionBolt(
image_size=32,
patch_size=4,
num_classes=10,
dim=192,
depth=6,
engine="Serpentine",
backend="auto",
)set_backend(...)Switch the requested runtime policy.
backend_report()Inspect component backend routes.
execution_plan()Read the current hierarchical execution plan.
prepare_execution(...) / predict(...)Calibrate representative inference and run optimized prediction.
generate(...)Available whenengine="AR".
benchmark_sample_loop(...)Available whenengine="Diffusion".
[ POWERED BY BOLT ]
Use one visual API across spatial classification, local-plus-sequence models, image denoising, and autoregressive visual tokens.