Expand description
§boostr
ML framework built on numr — attention, quantization, model architectures.
boostr extends numr’s foundational numerical computing with ML-specific operations, quantized tensor support, and model building blocks. It uses numr’s runtime, tensors, and ops directly — no reimplementation, no wrappers.
§Relationship to numr
┌─────────────────────────────────────────────────────────┐
│ boostr ◄── YOU ARE HERE │
│ (attention, RoPE, MoE, quantization, model loaders) │
└──────────────────────────┬──────────────────────────────┘
│ numr │
│ (tensors, ops, runtime, autograd, linalg, FFT) │
└─────────────────────────────────────────────────────────┘§Design
- Extension traits: ML ops (AttentionOps, RoPEOps) implemented on numr’s clients
- QuantTensor: Separate type for block-quantized data (GGUF formats)
- impl_generic: Composite ops composed from numr primitives, same on all backends
- Custom kernels: Dequant, quantized matmul, fused attention (SIMD/PTX/WGSL)
Re-exports§
pub use nn::Init;pub use nn::VarBuilder;pub use nn::VarMap;pub use nn::Weight;pub use nn::router_z_loss;pub use ops::AttentionOps;pub use ops::AttnOutLayout;pub use ops::DeviceGrammarDfa;pub use ops::FlashAttentionOps;pub use ops::FusedFp8TrainingOps;pub use ops::FusedOptimizerOps;pub use ops::FusedQkvOps;pub use ops::GatedDeltaNetOps;pub use ops::GrammarDfaOps;pub use ops::KvCacheOps;pub use ops::KvSeqLen;pub use ops::MlaOps;pub use ops::PagedAttentionOps;pub use ops::RoPEOps;pub use ops::RoPEPackedOps;pub use ops::SamplingOps;pub use ops::SamplingScratch;pub use ops::var_flash_attention;pub use quant::DecomposedQuantLinear;pub use quant::DecomposedQuantMethod;pub use quant::DecomposedQuantTensor;pub use quant::DequantOps;pub use quant::FusedQuantOps;pub use quant::QuantFormat;pub use quant::QuantMatmulOps;pub use quant::QuantTensor;pub use quant::QuantizeOps;pub use quant::ScheduleTuning;pub use readback::scalar_f32;pub use model::ExpertWeights;pub use model::encoder::EmbeddingPipeline;pub use model::encoder::Encoder;pub use model::encoder::EncoderClient;pub use model::encoder::EncoderConfig;pub use model::encoder::Pooling;
Modules§
- autograd
- Automatic differentiation (autograd)
- data
- distributed
- error
- boostr error types
- format
- inference
- model
- nn
- ops
- optimizer
- quant
- readback
- runtime
- Runtime backends for tensor computation
- tcf
- TCF: GGUF’s block-quantized payloads in a strict, self-describing
container. See
FORMAT.mdbeside this module for the binary layout. - tensor
- Tensor types and operations
- trainer
Macros§
- define_
enum_ u16 - Generates a fallible u16-backed enum: exhaustive, a
to_u16encoder, and aTryFrom<u16>decoder that rejects every value not listed (E_UNKNOWN_ENUM_VALUE, naming$field— the wire field name, not the Rust type name). No catch-all variant: an unrecognized value is always a decode error, never a value the type can represent. - define_
enum_ u32 - Generates a fallible u32-backed enum. See
define_enum_u16!. - define_
record - Generate a TCF v1 record from its spec offset table. See the module docs.
Structs§
- CpuClient
- CPU client for operation dispatch
- CpuDevice
- CPU device (there’s only one: the host CPU)
- CpuRuntime
- CPU compute runtime
- Tensor
- N-dimensional array stored on a compute device
Enums§
- DType
- Data types supported by numr tensors
- Numr
Error - Errors that can occur in numr operations
- Padding
Mode - Padding mode for convolution operations.
Traits§
- Activation
Ops - Activation operations
- Binary
Ops - Element-wise binary operations on tensors.
- Compare
Ops - Comparison operations trait.
- Conditional
Ops - Conditional operations
- ConvOps
- Convolution operations.
- Host
Copy Ops - Writing host data straight into a tensor the caller already owns.
- Indexing
Ops - Indexing operations
- Linalg
Ops - Linear algebra operations trait
- Matmul
Ops - Matrix multiplication operations
- Normalization
Ops - Normalization operations
- Random
Ops - Random number generation operations
- Reduce
Ops - Reduction operations
- Runtime
- Core trait for compute backends
- Runtime
Client - Trait for runtime clients that handle operation dispatch
- Scalar
Ops - Scalar operations trait for tensor-scalar operations
- Shape
Ops - Shape manipulation operations
- Sorting
Ops - Sorting and search operations trait
- Tensor
Ops - Core tensor operations trait
- Type
Conversion Ops - Type conversion operations
- Unary
Ops - Unary operations
Type Aliases§
- Numr
Result - Result type alias using numr’s Error