boostr
Library Listed
ML framework on numr for training and inference on CPU, CUDA and WebGPU: attention, quantization, inference scheduling and distributed execution. Models include LLaMA, Mamba2, Qwen3.5, Whisper, Kokoro, VITS, VoxCPM2, Silero VAD, CLAP and super-resolution. Loads SafeTensors and GGUF.
- Downloads
- 1,265
- Dependents
- 7
- Stars
- 20
- Forks
- 2
- Contributors
- 2
- Commits
- 1,056
- Latest release
- 0.11.2 ·
About
ML framework in Rust. Write once. Run on any backend.
Attention, quantization, model architectures, training, and inference built on numr, for CPU, CUDA, and WebGPU.
Docs · Crate · What works · Example · Feature Flags · Testing · Contributing
boostr is an ML framework for Rust. Use it to build LLM apps, run inference, and train models, with the role PyTorch and Hugging Face Transformers have in Python. It runs on CPU, CUDA, and WebGPU. The code is Rust. No Python is needed.
boostr extends numr with ML operations and adds no tensor type or runtime wrapper.
Its Tensor, Runtime, and client types come from numr.
ML operations attach to numr's clients as extension traits.
Read the full README
What works
| Backend | Feature | Needs | Limits |
|---|---|---|---|
| CPU | cpu, on by default | Nothing | None |
| NVIDIA through CUDA | cuda | CUDA toolkit 12.8 or newer, nvcc on PATH, compute capability 7.5 (Turing) or newer | Flash attention v3 needs compute capability 9.0 (Hopper) |
| WebGPU | wgpu | Vulkan, Metal, or DX12 driver | Computes in F32 only |
| Area | Contents | Feature |
|---|---|---|
| Text models | LLaMA, Mamba2, hybrid transformer and SSM, Qwen3.5, Qwen3-VL vision encoder, text encoders | None |
| Audio models | Whisper, Kokoro, VITS, VoxCPM2, NeuCodec, Silero VAD, CLAP | One per model, listed in Feature Flags |
| Text tagging | spaCy en_core_web_sm part-of-speech tagger | spacy-tagger |
| Image models | SrVggCompact, RrdbNet | super-resolution |
| Quantization | Simple blocks, K-quants, IQ, ternary, and low-bit formats | None |
| LLM apps | Build an app on your own models with no separate server: model loading, sampling, KV and prefix caches, speculative decoding, a sequence scheduler with batching, and GBNF or JSON schema output | None |
| Training | Optimizers, gradient scaling, and exact resume | None |
| Distributed training | ZeRO stages 1, 2 and 3, tensor parallelism, and pipeline parallelism with GPipe, 1F1B and ZeroBubble schedules. Trainers wire these in themselves | nccl for GPUs |
| Distributed inference | Disaggregated prefill and decode, pipeline stages, and KV transfer over nexar | distributed |
CI has no GPU. Some ops run on some backends only. docs/capabilities.md lists every capability, and docs/architecture.md holds the layout and design rules.
Quick Start
Install
Needs Rust 1.95 or newer.
[dependencies]
boostr = "0.11" # CPU
# boostr = { version = "0.11", features = ["cuda"] }
# boostr = { version = "0.11", features = ["wgpu"] }
Basic Usage
Run flash attention on the CPU backend:
use boostr::ops::traits::attention::{AttnOutLayout, FlashAttentionOps};
use boostr::{CpuClient, CpuDevice, DType};
use boostr::RandomOps;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = CpuClient::new(CpuDevice::new());
// Random tensors via numr's RandomOps: [batch, heads, seq, dim]
let q = client.randn(&[1, 8, 32, 64], DType::F32)?;
let k = client.randn(&[1, 8, 32, 64], DType::F32)?;
let v = client.randn(&[1, 8, 32, 64], DType::F32)?;
let (output, _lse) = client.flash_attention_fwd(
&q,
&k,
&v,
8, // num_heads
8, // num_kv_heads
64, // head_dim
true, // causal
0, // window_size (0 = no sliding window)
None, // kv_seq_len
None, // kv_start
AttnOutLayout::HeadMajor, // output layout: [B, H, S_q, D]
)?;
Ok(())
}
Load a GGUF Model
use boostr::format::Gguf;
use boostr::{CpuDevice, CpuRuntime};
// Open a GGUF file with buffered reads
let mut gguf = Gguf::open("model.gguf")?;
let device = CpuDevice::new();
// Load quantized tensors as QuantTensor and the others as f32
for name in gguf.tensor_names().map(|s| s.to_string()).collect::<Vec<_>>() {
let info = gguf.tensor_info(&name)?;
if info.ggml_type.is_quantized() {
let qt = gguf.load_tensor_quantized::<CpuRuntime>(&name, &device)?;
} else {
let t = gguf.load_tensor_f32::<CpuRuntime>(&name, &device)?;
}
}
Use Gguf::open_with_mmap(path, true) to memory-map the file. Each loader call releases mapped pages after it copies a tensor.
Paged KV Cache
use boostr::inference::PagedKvCache;
use boostr::{CpuClient, CpuDevice, CpuRuntime, DType, Tensor};
use boostr::RandomOps;
let device = CpuDevice::new();
let client = CpuClient::new(device.clone());
let (num_blocks, block_size, num_heads, head_dim) = (16, 16, 8, 64);
let cache = PagedKvCache::<CpuRuntime>::new(
num_blocks, block_size, num_heads, head_dim, DType::F32, &device,
)?;
// key and value: [num_tokens, num_heads, head_dim]
let k = client.randn(&[4, num_heads, head_dim], DType::F32)?;
let v = client.randn(&[4, num_heads, head_dim], DType::F32)?;
// slot_mapping: [num_tokens], I64. Slot s maps to block s / block_size, offset s % block_size.
let slots = Tensor::<CpuRuntime>::from_slice(&[0i64, 1, 2, 3], &[4], &device)?;
cache.update(&k, &v, &slots, &client)?;
Build from Source
Copy .cargo/config.toml.example to .cargo/config.toml first. See CONTRIBUTING.md.
cargo build --release # CPU
cargo build --release --features cuda # CUDA
cargo build --release --features wgpu # WebGPU
- CUDA binaries:
build.rscompiles kernels for the GPUs on the build host. SetNUMR_CUDA_ARCH=allfor a binary that runs on another machine. - boostr kernels only:
BOOSTR_CUDA_ARCHoverridesNUMR_CUDA_ARCH.
NUMR_CUDA_ARCH=all cargo build --release --features cuda
Feature Flags
Backends:
| Feature | Adds |
|---|---|
cpu | CPU backend (default) |
cuda | CUDA GPU backend |
wgpu | WebGPU cross-platform GPU backend |
nccl | Multi-GPU through NCCL |
distributed | Distributed inference over nexar. Implies f16 |
Precision:
| Feature | Adds |
|---|---|
f16 | Half-precision floats |
fp8 | FP8 precision |
Models and signal ops. No model feature implies another:
| Feature | Adds |
|---|---|
audio | Tensor-level signal ops (STFT, iSTFT, mel) |
whisper | Whisper speech recognition. Implies audio |
kokoro | Kokoro speech synthesis. Implies audio |
vits | VITS / MMS-TTS speech synthesis. Implies audio |
neucodec | NeuCodec audio codec. Implies audio |
voxcpm | VoxCPM2 speech synthesis. Implies audio and f16 |
silero-vad | Silero voice activity detection. Implies audio |
clap | CLAP audio and text towers. Implies audio |
spacy-tagger | spaCy CNN part-of-speech tagger |
super-resolution | SrVggCompact for realesr-general-x4v3, and RrdbNet ×2 for RealESRGAN_x2plus and 2x_PureVision. Half precision also needs f16 |
Tokenizer vocabularies:
| Feature | Adds |
|---|---|
vocab-* | One bundled splintr vocabulary each. See docs/capabilities.md |
vocabs | Every bundled splintr vocabulary |
Testing
# CPU tests, no model gates
cargo test
# Every model gate on the CPU backend
cargo test --features whisper,kokoro,neucodec,voxcpm,silero-vad,vits,clap,spacy-tagger,super-resolution,f16
# CUDA tests
cargo test --features cuda,f16
# Show test output
cargo test -- --nocapture
Run the format and lint checks in CONTRIBUTING.md before you open a pull request.
Ecosystem
boostr is part of the ml-rust organization:
- numr: Foundational numerical computing (tensors, ops, linalg, FFT)
- boostr: ML framework (this project)
- oxidizr: Training framework for Mamba2, MLA, and MoE (uses boostr)
- blazr: Inference server with an OpenAI-compatible API (uses boostr)
- compressr: Model quantization and compression (uses boostr)
- voxr: Audio and speech on top of boostr's models
- splintr: BPE tokenizer
Contributing
Contributions are welcome. See CONTRIBUTING.md for conventions and checks.
Questions and design discussion happen on Discord.
License
Licensed under the Apache License, Version 2.0. See LICENSE.
Parts of boostr port code from other open-source projects. Their copyright lines and licenses are in THIRD_PARTY_NOTICES.md.
Compatibility
- Runs on
- CUDA, WebGPU
What shows it
- CUDA: boostr feature cuda (dependency cudarc)
- WebGPU: boostr feature wgpu (dependency wgpu)
- Native code
- Optional
- Binds native code: ring (feature distributed)
- Python bindings
- No Python binding crate found
- License
- Apache-2.0
Compare with similar projects
Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
ML framework on numr for training and inference on CPU, CUDA and WebGPU: attention, quantization, inference scheduling and distributed execution. Models include LLaMA, Mamba2, Qwen3.5, Whisper, Kokoro, VITS, VoxCPM2, Silero VAD, CLAP and super-resolution. Loads SafeTensors and GGUF. |
1,265 downloads over 30 days | 7 | 20 | 0.11.2 | CUDA, WebGPU | Binds native code: ring (feature distributed) | Apache-2.0 |
|
candle Featured
Minimalist ML framework. Python bindings Also in Run and serve models. |
1,766,495 downloads over 30 days | 692 | 21,287 | 0.11.1 | CUDA, Metal | Binds native code: accelerate-src (feature accelerate), intel-mkl-src (feature mkl), alsa-sys (feature encodec) | Apache-2.0 OR MIT |
|
burn Featured
Flexible and Comprehensive Deep Learning Framework in Rust Also in Run and serve models. |
521,465 downloads over 30 days | 391 | 16,257 | 0.22.1 | CUDA, WebGPU, Metal, ROCm, Vulkan | Binds native code: netlink-sys (feature iroh), nvml-wrapper-sys (feature sys-metrics), torch-sys (feature tch) | Apache-2.0 OR MIT |
|
Machine Learning Framework for Hackers Also in Train models. |
14 downloads over 30 days | 5 | 1,129 | 0.3.0 | CUDA | Binds native code: cublas, cudnn, rcublas-sys, rcudnn-sys. Build uses a native toolchain: pkg-config, bindgen (feature generate) | Apache-2.0 OR MIT |
|
l2 is a fast, Pytorch-style Tensor+Autograd library written in Rust Also in Tensors and GPU compute. |
0 binary downloads per release | Not applicable | 197 | Not measured | Not measured | MIT | |
|
A learning-focused, high-performance tensor computation library built from scratch in Rust, featuring automatic differentiation and CPU/CUDA backends. Also in Train models. |
Not measured | Not applicable | 79 | Not measured | Not measured | Not measured | MIT |
All projects in Run and serve modelsAll projects in Build LLM apps and agentsAll projects in Train modelsAll projects in Tensors and GPU compute
Why ListedNo archive, New or Featured rule places it, so it is Listed.
What it lacks for Featured
- It has 0 active dependents and 0 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days. The repository route reads 20 stars, 2 forks and 2 contributors. It needs 4,539 stars, 434 forks and 79 contributors together.
What else the check found
- The last activity is on 6 Nov 2026, 3 days ago. The rules expect an update within 365 days. Dormancy rule
Check notes
- the latest release was packaged from a dirty working tree
Exact rules: Listed, Featured library. The check on applied thresholds version 9.
Every rule outcome, as the check records it
expected-interval: version 0.11.2 base 300, raised to the 365-day floor: E = 365 daysdormancy: last activity 2026-11-06, 3 days ago, E = 365: activefeatured: not featured: active_users 0 < 11 and new_adopters 0 < 9 and repository route stars 20 (needs 4539), forks 2 (needs 434), contributors 2 (needs 79)listed: listed: no archive, new or featured rule applies
Measurements and sources
Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.
Sources6 sources
- Description: written for the catalogue
- crates.io database dump, fetched
- RustSec advisory database, fetched
- GitHub repository, fetched
- crates.io package, fetched
- GitHub contributors, fetched
Adoption0 active dependents, 0 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 0 | crates.io database dump | Yes | |
| New dependents (365 days) | 0 | crates.io database dump | Yes | |
| Peak active dependents | 0 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 1 | crates.io database dump | Yes | |
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 3 days ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2026-11-06 | GitHub repository | Yes | |
| Latest release | 2026-11-06 | crates.io database dump | Yes | |
| First release | 2026-03-15 | crates.io database dump | Yes | |
| Latest version | 0.11.2 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 0 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 0 | GitHub repository | Yes | |
| Repository archived | false | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | true | crates.io package | Yes | |
| Published docs | true | crates.io database dump | Yes | |
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityUnpatched vulnerabilities: none
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | none | RustSec advisory database | Yes | |
| RustSec unmaintained advisory | none | RustSec advisory database | Yes | |
| Deprecation notice | none | crates.io database dump | Yes | |
| Deprecated requirement | none | crates.io database dump | Yes |
Distribution15 releases, 1,265 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 15 | crates.io database dump | Yes | |
| Downloads over 30 days | 1265 | crates.io database dump | Yes | |
| Binary downloads over the last 3 releases | Not measured | Yes | ||
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | false | crates.io database dump | Yes | |
| Every version 0.0.x | false | crates.io database dump | Yes | |
| Every version yanked | false | crates.io database dump | Yes | |
| Crate deleted from crates.io | false | crates.io database dump | Yes |
Repository20 stars, 2 forks, 2 contributors, 1,056 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 20 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 2 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 2 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 1056 | GitHub repository | No | |
| Repository's main crate left out of the entry | none | crates.io database dump | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | Apache-2.0 | crates.io database dump | No | |
| Runs on, from listed crates and their direct dependencies | CUDA, WebGPU | crates.io database dump | No | |
| What shows each backend | CUDA: boostr feature cuda (dependency cudarc); WebGPU: boostr feature wgpu (dependency wgpu) | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | Binds native code: ring (feature distributed) | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | No Python binding crate found | crates.io database dump | No | |
| Crates that depend on a listed crate directly | 7 | crates.io database dump | No |
Corrections and review history
No correction applies to this entry.
Judgments
A judgment enters only through an approved issue and a merged pull request.
No judgment applies to this entry.