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

From the project README ·

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.

  • Used to build: oxidizr (training), blazr (inference server), compressr (quantization), and voxr (audio and speech).
  • Not supported yet: WebGPU computes in F32 only. Flash attention v3 needs a Hopper GPU. ROCm is not implemented.
Read the full README

What works

BackendFeatureNeedsLimits
CPUcpu, on by defaultNothingNone
NVIDIA through CUDAcudaCUDA toolkit 12.8 or newer, nvcc on PATH, compute capability 7.5 (Turing) or newerFlash attention v3 needs compute capability 9.0 (Hopper)
WebGPUwgpuVulkan, Metal, or DX12 driverComputes in F32 only
AreaContentsFeature
Text modelsLLaMA, Mamba2, hybrid transformer and SSM, Qwen3.5, Qwen3-VL vision encoder, text encodersNone
Audio modelsWhisper, Kokoro, VITS, VoxCPM2, NeuCodec, Silero VAD, CLAPOne per model, listed in Feature Flags
Text taggingspaCy en_core_web_sm part-of-speech taggerspacy-tagger
Image modelsSrVggCompact, RrdbNetsuper-resolution
QuantizationSimple blocks, K-quants, IQ, ternary, and low-bit formatsNone
LLM appsBuild 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 outputNone
TrainingOptimizers, gradient scaling, and exact resumeNone
Distributed trainingZeRO stages 1, 2 and 3, tensor parallelism, and pipeline parallelism with GPipe, 1F1B and ZeroBubble schedules. Trainers wire these in themselvesnccl for GPUs
Distributed inferenceDisaggregated prefill and decode, pipeline stages, and KV transfer over nexardistributed

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.rs compiles kernels for the GPUs on the build host. Set NUMR_CUDA_ARCH=all for a binary that runs on another machine.
  • boostr kernels only: BOOSTR_CUDA_ARCH overrides NUMR_CUDA_ARCH.
NUMR_CUDA_ARCH=all cargo build --release --features cuda

Feature Flags

Backends:

FeatureAdds
cpuCPU backend (default)
cudaCUDA GPU backend
wgpuWebGPU cross-platform GPU backend
ncclMulti-GPU through NCCL
distributedDistributed inference over nexar. Implies f16

Precision:

FeatureAdds
f16Half-precision floats
fp8FP8 precision

Models and signal ops. No model feature implies another:

FeatureAdds
audioTensor-level signal ops (STFT, iSTFT, mel)
whisperWhisper speech recognition. Implies audio
kokoroKokoro speech synthesis. Implies audio
vitsVITS / MMS-TTS speech synthesis. Implies audio
neucodecNeuCodec audio codec. Implies audio
voxcpmVoxCPM2 speech synthesis. Implies audio and f16
silero-vadSilero voice activity detection. Implies audio
clapCLAP audio and text towers. Implies audio
spacy-taggerspaCy CNN part-of-speech tagger
super-resolutionSrVggCompact for realesr-general-x4v3, and RrdbNet ×2 for RealESRGAN_x2plus and 2x_PureVision. Half precision also needs f16

Tokenizer vocabularies:

FeatureAdds
vocab-*One bundled splintr vocabulary each. See docs/capabilities.md
vocabsEvery 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.

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.

boostr beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
boostr This page 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.

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
juice Listed Dormant

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 App Listed Dormant

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
RustTensor App Listed Dormant

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
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 days
  • dormancy: last activity 2026-11-06, 3 days ago, E = 365: active
  • featured: 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
Adoption0 active dependents, 0 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents0crates.io database dumpYes
New dependents (365 days)0crates.io database dumpYes
Peak active dependents0crates.io database dumpYes
Active dependents as a share of the peak1crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 3 days ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2026-11-06GitHub repositoryYes
Latest release2026-11-06crates.io database dumpYes
First release2026-03-15crates.io database dumpYes
Latest version0.11.2crates.io database dumpYes
Days the oldest outside issue waits for a reply0GitHub repositoryYes
Maintainer replies over 365 days0GitHub repositoryYes
Repository archivedfalseGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repotruecrates.io packageYes
Published docstruecrates.io database dumpYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityUnpatched vulnerabilities: none
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windownoneRustSec advisory databaseYes
RustSec unmaintained advisorynoneRustSec advisory databaseYes
Deprecation noticenonecrates.io database dumpYes
Deprecated requirementnonecrates.io database dumpYes
Distribution15 releases, 1,265 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases15crates.io database dumpYes
Downloads over 30 days1265crates.io database dumpYes
Binary downloads over the last 3 releasesNot measuredYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleasefalsecrates.io database dumpYes
Every version 0.0.xfalsecrates.io database dumpYes
Every version yankedfalsecrates.io database dumpYes
Crate deleted from crates.iofalsecrates.io database dumpYes
Repository20 stars, 2 forks, 2 contributors, 1,056 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars20GitHub repositoryYes — one part of the repository route
GitHub forks2GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account2GitHub contributorsYes — one part of the repository route
Commits on the default branch1056GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseApache-2.0crates.io database dumpNo
Runs on, from listed crates and their direct dependenciesCUDA, WebGPUcrates.io database dumpNo
What shows each backendCUDA: boostr feature cuda (dependency cudarc); WebGPU: boostr feature wgpu (dependency wgpu)crates.io database dumpNo
Native code, from listed crates and their dependenciesBinds native code: ring (feature distributed)crates.io database dumpNo
Python bindings, from direct dependencies of listed cratesNo Python binding crate foundcrates.io database dumpNo
Crates that depend on a listed crate directly7crates.io database dumpNo

Corrections and review history

Report a correction

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.