treeboost
Library Listed
Gradient-boosted decision trees for tabular data: trains a baseline model in one call, with full control over boosting modes and configs, and Scalar, AVX-512, SVE2, WGPU and CUDA backends.
- Downloads
- 18
- Dependents
- 0
- Stars
- 9
- Forks
- 3
- Contributors
- 2
- Commits
- 224
- Latest release
- 0.1.2 ·
About

Gradient-boosted decision trees for tabular data, in Rust.
Trains a baseline model in one call and exposes full control over boosting modes, configs, and backends. Backends: Scalar, AVX-512, SVE2, WGPU, and CUDA.
Docs · Crate · Models · Backends · Example · Contributing
TreeBoost is a gradient boosting library for tabular data, in Rust. It trains gradient-boosted decision trees, linear-then-tree hybrids, and random forests. It handles time series, missing values, mixed feature types, and multi-label targets. It provides a Rust API, a CLI, and Python bindings. See docs/API.md for the full API reference.
- Language: training and inference run in Rust. Python is optional and only wraps the Rust code.
- Built on:
polarsfor data,rayonfor threads,rkyvfor model files, andfaerfor linear algebra. The bin-bundling step follows the LightGBM exclusive feature bundling algorithm. - Input: CSV and Parquet files, or a
polarsDataFrame. - Output: rkyv and TRB model files.
Not supported yet
- Export to ONNX or the XGBoost format.
AutoModelandUniversalModelin Python. The bindings coverGBDTModel,GBDTConfig,AutoTuner, and the dataset pipeline types.
Read the full README
Quick Start
Add the library to a Rust project:
cargo add treeboost
Train a baseline from a CSV file and save it:
use treeboost::auto_train_csv;
fn main() -> treeboost::Result<()> {
let model = auto_train_csv("data.csv", "target")?;
println!("{}", model.summary());
model.save("model.rkyv")?;
model.save_config("config.json")?;
model.save_trb("model.trb", "initial training")?;
Ok(())
}
Training writes three files:
| File | Contents |
|---|---|
model.rkyv | Model for inference and deployment |
config.json | UniversalConfig of the run. See docs/config.md. |
model.trb | Model with an update history for incremental learning |
Models
TreeBoost has three API levels. You can move between them without changing your dataset format.
| Model | Use it for |
|---|---|
AutoModel | One call trains a baseline and reports the chosen mode. |
UniversalModel | Choose a BoostingMode and tune UniversalConfig without low-level code. |
GBDTModel | Full control over GBDTConfig, backend selection, and benchmarks. |
Use this workflow:
- Train with
AutoModelfor a baseline and a training report. - Read the report and
config.jsonto see the chosen mode. - Refine with
UniversalModelorGBDTModelfor accuracy, constraints, or incremental updates.
Inference
Load a saved model and predict on a DataFrame with the training feature columns:
use treeboost::UniversalModel;
let model = UniversalModel::load("model.rkyv")?;
let predictions = model.predict_df(&df)?;
Load a TRB file with UniversalModel::load_trb("model.trb")? instead.
A model saves to rkyv or TRB and predicts through TreeBoost. There is no ONNX or XGBoost export.
UniversalModel
UniversalModel::train takes a BinnedDataset. DatasetLoader creates it from Parquet or CSV.
use treeboost::dataset::DatasetLoader;
use treeboost::loss::MseLoss;
use treeboost::{BoostingMode, UniversalConfig, UniversalModel};
let loader = DatasetLoader::new(255);
let dataset = loader.load_parquet("data.parquet", "target", None)?;
let config = UniversalConfig::new()
.with_mode(BoostingMode::LinearThenTree)
.with_num_rounds(100)
.with_linear_rounds(10)
.with_learning_rate(0.1)?;
let model = UniversalModel::train(&dataset, config, &MseLoss)?;
let predictions = model.predict(&dataset);
Choose the mode from the shape of your data:
| Your data | Mode |
|---|---|
| General tabular data with categoricals | BoostingMode::PureTree |
| Time series, trends, and extrapolation | BoostingMode::LinearThenTree |
| Noisy data with a variance-reduction goal | BoostingMode::RandomForest |
GBDTModel
GBDTModel::train takes a flat f32 slice. Each row holds num_features values.
use treeboost::{GBDTConfig, GBDTModel};
let config = GBDTConfig::new()
.with_num_rounds(200)
.with_max_depth(6)
.with_learning_rate(0.05);
let model = GBDTModel::train(&features, num_features, &targets, config, None)?;
Multi-label classification
For samples with several independent labels, use AutoModel::train_multilabel. See docs/features.md for the example.
Backends
TreeBoost selects a backend automatically. Set BackendType to override the choice.
use treeboost::backend::BackendType;
use treeboost::{GBDTConfig, GBDTModel};
let config = GBDTConfig::new().with_backend(BackendType::Scalar);
let model = GBDTModel::train(&features, num_features, &targets, config, None)?;
BackendType::Auto is the default. It selects the first available backend in this order:
| Priority | Backend | Requirement |
|---|---|---|
| 1 | CUDA | cuda feature |
| 2 | WGPU | gpu feature |
| 3 | AVX-512 | x86-64 CPU with AVX-512 |
| 4 | SVE2 | ARM CPU with SVE2 |
| 5 | Scalar | None. Used when no other backend is available. |
CLI
Install the treeboost binary:
cargo install treeboost
Train, predict, and inspect a model:
treeboost train --data data.csv --target price --output model.rkyv
treeboost predict --model model.rkyv --data test.csv --output predictions.json
treeboost info --model model.rkyv --importances
The train and predict commands accept Parquet or CSV input. The train command writes .trb output when --output ends in .trb.
| Command | Required flags |
|---|---|
train | -d, --data <path>, -t, --target <column>, -o, --output <path> |
predict | -m, --model <path>, -d, --data <path>, -o, --output <path> |
info | -m, --model <path> (--importances shows feature importance) |
Run treeboost <command> --help for all flags.
Python
TreeBoost ships Python bindings for GBDTConfig, GBDTModel, AutoTuner, and the dataset pipeline types. Build them from source with the python feature. See docs/python.md for the build steps and an example.
Features
- AutoML mode selection:
AutoModelruns probes and reports the mode it chose. - Hybrid linear and tree mode:
LinearThenTreefits trends and trees together. - Preprocessing with the model: encoders, scalers, and imputers save with the model.
- Conformal prediction: prediction intervals from split conformal calibration.
- Incremental learning: TRB files store updates, and drift checks run before each update.
Installation and Feature Flags
cargo add treeboost --features gpu
| Feature | Enables |
|---|---|
gpu | WGPU backend for Vulkan, Metal, and DX12 GPUs |
cuda | CUDA backend. Implies gpu. |
mmap | Memory-mapped TRB reading with MmapTrbReader |
python | PyO3 Python bindings |
Documentation
- API Reference: types, methods, and examples
- Advanced Features: feature matrix and incremental learning
- Saved Config: fields of the saved
config.json - Python Bindings: build steps and example
- Preset Guide: choosing a preset
Contributing
Contributions are welcome. See CONTRIBUTING.md for conventions and checks.
Questions and design discussion happen on Discord.
License
Licensed under Apache-2.0. See LICENSE.
Compatibility
- Runs on
- CUDA, WebGPU
What shows it
- CUDA: treeboost feature cuda (dependency cudarc)
- WebGPU: treeboost feature gpu (dependency wgpu)
- Native code
- None found
- No native code found
- Python bindings
- Has Python bindings
- treeboost needs Python only with feature python
- 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 |
|---|---|---|---|---|---|---|---|
|
Gradient-boosted decision trees for tabular data: trains a baseline model in one call, with full control over boosting modes and configs, and Scalar, AVX-512, SVE2, WGPU and CUDA backends. Python bindings |
18 downloads over 30 days | 0 | 9 | 0.1.2 | CUDA, WebGPU | No native code found | Apache-2.0 |
|
augurs Listed
A time-series toolkit for forecasting, outlier detection, clustering and more. |
7,507 downloads over 30 days | 8 | 580 | 0.10.3 | GPU support unknown | No native code found | Apache-2.0 OR MIT |
|
A implementation of Gradient Boosting Regression Tree in Rust programming language |
6,452 downloads over 30 days | 5 | 225 | 0.1.3 | GPU support unknown | No native code found | Apache-2.0 |
|
perpetual Listed
A self-generalizing gradient boosting machine that doesn't need hyperparameter optimization |
2,472 downloads over 30 days | 1 | 717 | 2.3.0 | GPU support unknown | No native code found | Apache-2.0 |
|
radiate Listed
A Rust library for genetic algorithms and artificial evolution. Python bindings |
971 downloads over 30 days | 0 | 257 | 1.3.2 | GPU support unknown | No native code found | MIT |
|
rust-automl Listed
Automated machine learning for classification and regression |
170 downloads over 30 days | 1 | 39 | 0.3.1 | GPU support unknown | No native code found | Apache-2.0 OR 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 9 stars, 3 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
Exact rules: Listed, Featured library. The check on applied thresholds version 9.
Every rule outcome, as the check records it
expected-interval: version 0.1.2 base 300, capped at 3 releases = 150, 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 9 (needs 4539), forks 3 (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 | 2025-12-28 | crates.io database dump | Yes | |
| Latest version | 0.1.2 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 0 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 5 | 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 |
Distribution3 releases, 18 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 3 | crates.io database dump | Yes | |
| Downloads over 30 days | 18 | 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 |
Repository9 stars, 3 forks, 2 contributors, 224 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 9 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 3 | 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 | 224 | 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: treeboost feature cuda (dependency cudarc); WebGPU: treeboost feature gpu (dependency wgpu) | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | No native code found | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | Has Python bindings: treeboost needs Python only with feature python | crates.io database dump | No | |
| Crates that depend on a listed crate directly | 0 | 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.