Expand description
§Fuel
Fuel is a DAG-first, lazy-only ML framework for Rust. This crate is the
public facade for the framework: it re-exports the public surface that
fuel-core used to carry, from the crates that own those items now
(fuel-tensor, fuel-ir, fuel-hardware, fuel-dispatch,
fuel-backend-contract, fuel-cpu-backend, fuel-loaders, fuel-kv-pool,
fuel-transformers), so use fuel::... resolves exactly as it did when
fuel re-exported fuel-core (GAP-348, the fuel-core dissolution; fuel-core
itself no longer exists). Feature flags are forwarded to the owning crates
(see this crate’s manifest).
See docs/restructure-migration-design.md §Stage 1.
Re-exports§
pub use fuel_kv_pool as kv_block_pool;
Modules§
- cuda_
backend - Thin re-export layer for CUDA backend types, plus the bridge that turns
a [
fuel_cuda_backend::CudaDevice] into acrate::Device. - decode_
shape - The identity a held decode plan is baked against.
- error
- Error types, re-exported from
fuel-ir. - factories
- Backend factory registry — Step 12 of the backend-agnostic refactor.
- hf_
config - Shared resolution rules for HuggingFace
config.jsonparsing. - inference_
context - Persistent inference state for the pipelined executor (Phase 7.6 step 9c, sub-phase E.3.0).
- judge
- The Judge — Phase 6b’s empirical profiler.
- kv_
block_ pool_ device - Device-backed KV block pool — the thin integration layer that binds the pure
KvBlockPoolhost-side allocator to real deviceStorage(multi-session serving, Increment 2, Part 2). - lazy
- Phase 6a bridge: a lazy-computation-graph tensor that wraps
fuel_graph::NodeHandleand presents it through an API compatible with fuel-core’s eagerTensor. - lazy_
based - Based (Stanford Hazy Research) decoder ported to the lazy-graph API.
- lazy_
beit - BEiT (BERT pre-training of Image Transformers) ported to the lazy-graph API.
- lazy_
bert - BERT encoder ported to the lazy-graph API.
- lazy_
bigcode - BigCode (StarCoder-1) decoder ported to the lazy-graph API.
- lazy_
blip - BLIP image-captioning composition — lazy port.
- lazy_
blip_ text - BLIP text decoder — lazy port.
- lazy_
blip_ vision - BLIP vision encoder — lazy port.
- lazy_
chatglm - ChatGLM2 / ChatGLM3 (THUDM) decoder ported to the lazy-graph API.
- lazy_
chinese_ clip - Chinese-CLIP — lazy port.
- lazy_
clip - CLIP (Contrastive Language-Image Pre-Training) ported to the lazy-graph API.
- lazy_
colpali - ColPali — lazy port.
- lazy_
conv3d - Conv3D for Qwen3-VL temporal patch embedding, decomposed into two parallel Conv2Ds.
- lazy_
convmixer - ConvMixer (Trockman & Kolter 2022 “Patches Are All You Need?”) ported to the lazy-graph API.
- lazy_
convnext - ConvNeXt image classifier ported to the lazy-graph API.
- lazy_
csm - CSM (Conversational Speech Model) — lazy port.
- lazy_
dac - Descript Audio Codec (DAC) — lazy port.
- lazy_
debertav2 - DeBERTa-v2 / v3 — lazy port.
- lazy_
deepseek2 - DeepSeek-V2 (Multi-head Latent Attention + MoE) ported to the lazy-graph API.
- lazy_
depth_ anything_ v2 - Depth Anything V2 — lazy port.
- lazy_
dinov2 - DINOv2 vision transformer (Meta AI) ported to the lazy-graph API.
- lazy_
dinov2reg4 - DINOv2-reg4 (Darcet et al. 2023, “Vision Transformers Need Registers”) ported to the lazy-graph API.
- lazy_
distilbert - DistilBERT (distilled BERT) ported to the lazy-graph API.
- lazy_
efficientnet - EfficientNet (Tan & Le 2019, “EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks”) ported to the lazy-graph API. All eight depth variants B0–B7 are reachable through width/depth multipliers on the seven-stage MBConv schedule.
- lazy_
efficientvit - EfficientViT-MSRA — lazy port.
- lazy_
encodec - EnCodec — lazy port (decoder + RVQ).
- lazy_
eva2 - EVA-02 — lazy port.
- lazy_
falcon - Falcon (7B and similar) decoder ported to the lazy-graph API.
- lazy_
fastvit - FastViT — lazy port.
- lazy_
flux - Flux (Black Forest Labs) — rectified-flow MMDiT image diffusion, ported to the lazy-graph API.
- lazy_
gemma - Gemma (v1) decoder ported to the lazy-graph API.
- lazy_
gemma2 - Gemma 2 (Google DeepMind 2024) ported to the lazy-graph API.
- lazy_
gemma3 - Gemma 3 decoder ported to the lazy-graph API.
- lazy_
gemma4_ audio - Gemma 4 audio encoder (Conformer) ported to the lazy-graph API.
- lazy_
gemma4_ mm_ embed - Gemma4 multimodal embedder — lazy port.
- lazy_
gemma4_ text - Gemma 4 text decoder ported to the lazy-graph API.
- lazy_
gemma4_ vision - Gemma 4 vision tower (ViT-style image encoder) ported to the lazy-graph API.
- lazy_
glm4 - GLM-4 (new architecture) decoder ported to the lazy-graph API.
- lazy_
glm4_ new - GLM-4 (new architecture, ChatGLM-4-style) ported to the lazy-graph API.
- lazy_
granite - Granite decoder ported to the lazy-graph API.
- lazy_
granitemoehybrid - Granite-MoE Hybrid (IBM Granite long-context) ported to the lazy-graph API.
- lazy_
helium - Helium decoder ported to the lazy-graph API.
- lazy_
hiera - Hiera — lazy port (hierarchical ViT without bells-and-whistles).
- lazy_
jina_ bert - Jina-BERT (jinaai/jina-embeddings-v2-base-en) ported to the lazy-graph API.
- lazy_
kv_ cache LazyKvCache— functional KV cache backed byTensor.- lazy_
latent_ cache LatentCache— a general N-slot decode cache backed byTensor, the structural generalization of [fuel_transformers::models::lazy_kv_cache:: LazyKvCache] that unblocks latent / pruned KV compression.- lazy_
lfm2 - LFM2 (Liquid Foundation Model 2) decoder ported to the lazy-graph API.
- lazy_
llama2c - Llama2-C decoder ported to the lazy-graph API.
- lazy_
llama_ full - LLaMA-3 long-context RoPE scaling on top of the lazy
LlamaModel. - lazy_
llava - LLaVA (Large Language and Vision Assistant) ported to the lazy-graph API.
- lazy_
lstm - Lazy LSTM — PyTorch-shape multi-layer LSTM unrolled at graph-build time.
- lazy_
mamba - Mamba (v1) decoder ported to the lazy-graph API.
- lazy_
mamba2 - Mamba-2 decoder ported to the lazy-graph API.
- lazy_
marian - Marian NMT (Helsinki-NLP / Opus MT) ported to the lazy-graph API.
- lazy_
metavoice - MetaVoice main TTS LM — lazy port.
- lazy_
metavoice_ speaker_ encoder - MetaVoice speaker encoder — lazy port.
- lazy_
mimi - Mimi — top-level Encodec model.
- lazy_
mimi_ conv - Mimi streaming-capable 1-D convolution primitive (sub-port 1 of port-mimi-conv.md).
- lazy_
mimi_ conv_ transpose - Mimi streaming-capable 1-D transposed convolution primitive (sub-port 2 of port-mimi-conv.md).
- lazy_
mimi_ conv_ wrappers - Mimi learnable down-/up-sampling wrappers (sub-port 3 of port-mimi-conv.md).
- lazy_
mimi_ encodec - Mimi Encodec — top-level neural audio codec.
- lazy_
mimi_ quantization - Mimi residual vector quantizer — lazy port.
- lazy_
mimi_ resampler - Mimi resampler — lazy port.
- lazy_
mimi_ seanet - Mimi SeaNet — lazy port.
- lazy_
mimi_ transformer - Mimi ProjectedTransformer — lazy port.
- lazy_
mistral - Mistral decoder ported to the lazy-graph API.
- lazy_
mixformer - MixFormer (Phi-1 / Phi-1.5 / Phi-2-preview) decoder ported to the lazy-graph API.
- lazy_
mixtral - Mixtral (sparse Mixture-of-Experts) decoder ported to the lazy-graph API.
- lazy_
mmdit - MMDiT (Multimodal Diffusion Transformer) ported to the lazy-graph API.
- lazy_
mobileclip - MobileCLIP — lazy port.
- lazy_
mobilenetv4 - MobileNetV4 — lazy port.
- lazy_
mobileone - MobileOne (Vasu et al. 2022, “MobileOne: An Improved One Millisecond Mobile Backbone”) ported to the lazy-graph API.
- lazy_
modernbert - ModernBERT (Warner et al. 2024 “Smarter, Better, Faster, Longer”) ported to the lazy-graph API.
- lazy_
moondream - Moondream vision-language model ported to the lazy-graph API.
- lazy_
mpt - MPT (Mosaic Pretrained Transformer) decoder ported to the lazy-graph API.
- lazy_
musicgen - MusicGen (Facebook / Meta AI) — lazy port.
- lazy_
nomic_ bert - NomicBert (nomic-embed-text-v1.x) ported to the lazy-graph API.
- lazy_
nvembed_ v2 - NV-Embed v2 (NVIDIA 2024) ported to the lazy-graph API.
- lazy_
olmo - OLMo decoder ported to the lazy-graph API.
- lazy_
olmo2 - OLMo2 decoder ported to the lazy-graph API.
- lazy_
openclip_ text - OpenCLIP text transformer — lazy port.
- lazy_
paddleocr_ vl - PaddleOCR-VL top-level composition: text + vision + tile glue.
- lazy_
paddleocr_ vl_ text - PaddleOCR-VL text language model ported to the lazy-graph API.
- lazy_
paddleocr_ vl_ vision - PaddleOCR-VL vision tower ported to the lazy-graph API.
- lazy_
paligemma - PaliGemma multimodal model ported to the lazy-graph API.
- lazy_
parler_ tts - Parler-TTS audio token decoder — lazy port.
- lazy_
persimmon - Persimmon decoder ported to the lazy-graph API.
- lazy_
phi - Phi (Phi-1.5 / Phi-2) decoder ported to the lazy-graph API.
- lazy_
phi3 - Phi-3 decoder ported to the lazy-graph API.
- lazy_
pixtral - Pixtral (Mistral AI vision-language model) ported to the lazy-graph API.
- lazy_
quantized_ gemma3 - GGUF-quantized Gemma 3 ported to the lazy-graph API.
- lazy_
quantized_ glm4 - GGUF-quantized GLM-4 ported to the lazy-graph API.
- lazy_
quantized_ lfm2 - GGUF-quantized LFM2 (Liquid Foundation Model 2) ported to the lazy-graph API.
- lazy_
quantized_ llama - GGUF-quantized LLaMA (LLaMA-2 / LLaMA-3 / LLaMA-3.1) ported to the lazy-graph API.
- lazy_
quantized_ phi3 - GGUF-quantized Phi-3 ported to the lazy-graph API.
- lazy_
quantized_ qwen2 - GGUF-quantized Qwen2 ported to the lazy-graph API.
- lazy_
quantized_ qwen3 - GGUF-quantized Qwen3 ported to the lazy-graph API.
- lazy_
quantized_ qwen3_ moe - GGUF-quantized Qwen3-MoE ported to the lazy-graph API.
- lazy_
quantized_ smollm3 - GGUF-quantized SmolLM3 ported to the lazy-graph API.
- lazy_
quantized_ t5 - GGUF-quantized T5 ported to the lazy-graph API.
- lazy_
quantized_ whisper - GGUF-quantized Whisper speech-recognition model.
- lazy_
qwen2 - Qwen2 (non-MoE) decoder ported to the lazy-graph API.
- lazy_
qwen3 - Qwen3 decoder ported to the lazy-graph API.
- lazy_
qwen2_ moe - Qwen2-MoE decoder ported to the lazy-graph API.
- lazy_
qwen3_ 5 - Qwen3.5 (the Gated DeltaNet / full-attention hybrid; HF
model_typeqwen3_5) config and weight loader. ROADMAP row 40, stage 1. - lazy_
qwen3_ 5_ attn - The gated full-attention token mixer of Qwen3.5, composed from base lazy ops. ROADMAP row 115
(
docs/design-notes/2026-10-30-qwen35-composed-forward-row-115.md, section 3). - lazy_
qwen3_ 5_ decode - Cached decode for Qwen3.5: ROADMAP row 115, step 5. The keys and values of each full-attention
layer and the
(S, conv window)of each Gated DeltaNet layer are carried between calls as host data, so a call overTnew tokens costsTtokens of compute, not the whole prefix. - lazy_
qwen3_ 5_ forward - The Qwen3.5 decoder stack from the composed mixers: ROADMAP row 115, step 4
(
docs/design-notes/2026-10-30-qwen35-composed-forward-row-115.md). - lazy_
qwen3_ 5_ gdn - The Gated DeltaNet recurrence of Qwen3.5, composed from base lazy ops. ROADMAP row 115,
step 1 (
docs/design-notes/2026-10-30-qwen35-composed-forward-row-115.md). - lazy_
qwen3_ 5_ gguf - GGUF
qwen35loader:Qwen3_5Configfrom theqwen35.*metadata andQwen3_5Weightsfrom the tensors, K-quant weights kept quantized (ROADMAP row 118, milestone M1 ofdocs/design-notes/2026-11-14-qwen35-27b-plan.md). - lazy_
qwen3_ moe - Qwen3-MoE decoder ported to the lazy-graph API.
- lazy_
qwen3_ vl - Qwen3-VL multimodal composition (vision + text + DeepStack).
- lazy_
qwen3_ vl_ text - Qwen3-VL text language model ported to the lazy-graph API.
- lazy_
qwen3_ vl_ vision - Qwen3-VL vision tower (lazy-graph port).
- lazy_
recurrent_ gemma - Recurrent Gemma decoder ported to the lazy-graph API.
- lazy_
repvgg - RepVGG (Ding et al. 2021, “RepVGG: Making VGG-style ConvNets Great Again”) ported to the lazy-graph API.
- lazy_
resnet - ResNet (He et al. 2015 “Deep Residual Learning for Image Recognition”) ported to the lazy-graph API.
- lazy_
rwkv5 - RWKV v5 (“Eagle”) decoder ported to the lazy-graph API.
- lazy_
rwkv6 - RWKV v6 (“Finch”) decoder ported to the lazy-graph API.
- lazy_
rwkv7 - RWKV v7 “Goose” decoder ported to the lazy-graph API.
- lazy_
rwkv_ tokenizer - Byte-pair tokenizer for RWKV models.
- lazy_
sam - Segment Anything Model (SAM) — ViT-B image encoder, lazy port.
- lazy_
sd3_ text_ encoder - Stable Diffusion 3 / 3.5 triple-CLIP text-encoder composer ported to the lazy-graph API.
- lazy_
sd3_ vae - Stable Diffusion 3 VAE decoder ported to the lazy-graph API.
- lazy_
sd_ samplers - Stable-Diffusion noise schedulers ported to the lazy-graph API.
- lazy_
sd_ samplers_ euler - Euler-ancestral discrete Stable-Diffusion scheduler — lazy-graph port.
- lazy_
sd_ samplers_ sd3 - Stable Diffusion 3 / 3.5 flow-match Euler sampler with Skip Layer Guidance — lazy-graph port.
- lazy_
sd_ samplers_ unipc - UniPC scheduler ported to the lazy-graph API.
- lazy_
sd_ text_ encoder - Stable Diffusion 1.5 CLIP text encoder ported to the lazy-graph API.
- lazy_
sd_ unet - Stable Diffusion 1.5 UNet (denoising network) ported to the lazy-graph API.
- lazy_
sd_ vae - Stable Diffusion 1.5 VAE decoder ported to the lazy-graph API.
- lazy_
segformer - SegFormer — lazy port.
- lazy_
siglip - SigLIP (Sigmoid Loss for Language-Image Pre-Training) ported to the lazy-graph API.
- lazy_
smollm3 - SmolLM3 decoder ported to the lazy-graph API.
- lazy_
snac - SNAC — lazy port (decoder + per-stride RVQ).
- lazy_
stablelm - StableLM decoder ported to the lazy-graph API.
- lazy_
starcoder2 - StarCoder2 decoder ported to the lazy-graph API.
- lazy_
stella_ v5 - Stella-en-v5 (Dunzhang 2024) ported to the lazy-graph API.
- lazy_t5
- T5 (Text-To-Text Transfer Transformer) ported to the lazy-graph API.
- lazy_
tiny_ vit - TinyViT (MobileSAM image encoder) ported to the lazy-graph API.
- lazy_
training_ augmentations - Training augmentations: LR schedulers and gradient clipping.
- lazy_
training_ augmentations_ extras - Training augmentations: gradient accumulation, mixed-precision casts, and in-place parameter updates.
- lazy_
trocr - TrOCR — lazy port.
- lazy_
vgg - VGG-13 / VGG-16 / VGG-19 (Simonyan & Zisserman 2014, “Very Deep Convolutional Networks for Large-Scale Image Recognition”) ported to the lazy-graph API.
- lazy_
vit - Vision Transformer (ViT) ported to the lazy-graph API.
- lazy_
voxtral - Voxtral (Mistral AI) speech-language model ported to the lazy-graph API.
- lazy_
whisper - Whisper speech recognition model ported to the lazy-graph API.
- lazy_
whisper_ audio - Whisper audio preprocessing — pure host-side STFT + log-mel.
- lazy_
wuerstchen - Wuerstchen v2 cascaded latent diffusion model — lazy port.
- lazy_
xlm_ roberta - XLM-RoBERTa (multilingual BERT variant) ported to the lazy-graph API.
- lazy_yi
- Yi decoder ported to the lazy-graph API.
- lazy_
yolov3 - YOLOv3 object detector ported to the lazy-graph API.
- lazy_
yolov8 - YOLOv8 object detector ported to the lazy-graph API.
- lazy_
z_ image - Z-Image text-to-image diffusion model ported to the lazy-graph API.
- metal_
backend - Thin re-export layer for Metal backend types, plus the bridge that turns
a [
fuel_metal_backend::MetalDevice] into acrate::Device. - nf4
- bitsandbytes NF4 weight materialization helpers.
- persistent_
decode - The shared persistent-decode rebind driver (GAP-029 increment 2b).
- pipelined_
bridge - Bridge from fuel-core’s user-facing
Tensor::realize_*API to fuel-storage’sPipelinedExecutor(Phase 7.6 step 9c, sub-phases E.1 + E.2). - planner
- Load-time planning driver.
- probe
- Top-level multi-backend probe collector for Phase 6b.
- quantized
- Quantized (ggml/gguf block-format) support for fuel-core.
- safetensors
- Safetensors file reading — the mmap/view surface.
- sampling
- Sampling controls for decode loops (ROADMAP row 133, slice 1: the pure host sampler).
- scheduling
- Orchestrator for the Phase 6b probe → judge → dispatch pipeline.
- test_
utils - Test helpers. The eager-
Tensorhelpers (test_device!,assert_tensor_eq,to_vec{0,1,2,3}_round) were removed in B6; what remains is host-slice and lazy infrastructure that the lazy_* port tests use. - topology
- SystemTopology — single source of truth for what backends exist, what devices they target, which backends share Storage substrate, and what transfer paths connect devices.
- transfer_
cost - Transfer-cost model for the multi-backend DAG planner.
- utils
- Hardware / build-feature probes.
Macros§
- bail
- Returns early from a function with a formatted error message.
Structs§
- Device
- A device on which tensors can be created and computations performed.
- Layout
- Describes the memory layout of a tensor: shape, strides, and start offset.
- Shape
- A shape represents the dimensions of a tensor.
- Storage
- Owns a typed contiguous buffer on one device. The boxed
DynBackendStorageis the actual byte holder;Storageis a thin wrapper that gives the eager-dispatch op methods (matmul, conv, unary, binary, …) somewhere to live. - Strided
Index - An iterator over offset position for items of an N-dimensional arrays stored in a flat buffer using some potential strides.
Enums§
- D
- Dimension indexing from the right (end) of a shape.
- DType
- The different types of elements allowed in tensors.
- DType
Parse Error - Error returned when a string cannot be parsed as a
DType. - Device
Location - Identifies a physical device location (CPU or a specific GPU).
- Error
- The main error type for the fuel library.
- Host
Buffer - Host-addressable tensor storage holding a typed vector of elements.
- Host
Buffer Ref - A borrowed reference to host tensor storage.
- Strided
Blocks
Traits§
- Context
- Attach more context to an error.
- FloatD
Type - IntD
Type - NdArray
- Trait for host array-like values that describe their shape and yield CPU storage.
- WithD
Type - Local marker subtrait — inherits every method from
fuel_ir::dtype::WithDTypebut is defined in this crate so that the orphan/coherence rules treat it as a local trait.
Type Aliases§
- CpuStorage
- Backwards-compatibility alias. New code should use
HostBuffer. - CpuStorage
Ref - Backwards-compatibility alias. New code should use
HostBufferRef. - Result
- A specialized
Resulttype for fuel operations.