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.

Checked · Sources

Downloads
18
Dependents
0
Stars
9
Forks
3
Contributors
2
Commits
224
Latest release
0.1.2 ·

About

From the project README ·

TreeBoost

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: polars for data, rayon for threads, rkyv for model files, and faer for linear algebra. The bin-bundling step follows the LightGBM exclusive feature bundling algorithm.
  • Input: CSV and Parquet files, or a polars DataFrame.
  • Output: rkyv and TRB model files.
Not supported yet
  • Export to ONNX or the XGBoost format.
  • AutoModel and UniversalModel in Python. The bindings cover GBDTModel, 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:

FileContents
model.rkyvModel for inference and deployment
config.jsonUniversalConfig of the run. See docs/config.md.
model.trbModel with an update history for incremental learning

Models

TreeBoost has three API levels. You can move between them without changing your dataset format.

ModelUse it for
AutoModelOne call trains a baseline and reports the chosen mode.
UniversalModelChoose a BoostingMode and tune UniversalConfig without low-level code.
GBDTModelFull control over GBDTConfig, backend selection, and benchmarks.

Use this workflow:

  1. Train with AutoModel for a baseline and a training report.
  2. Read the report and config.json to see the chosen mode.
  3. Refine with UniversalModel or GBDTModel for 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 dataMode
General tabular data with categoricalsBoostingMode::PureTree
Time series, trends, and extrapolationBoostingMode::LinearThenTree
Noisy data with a variance-reduction goalBoostingMode::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:

PriorityBackendRequirement
1CUDAcuda feature
2WGPUgpu feature
3AVX-512x86-64 CPU with AVX-512
4SVE2ARM CPU with SVE2
5ScalarNone. 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.

CommandRequired 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: AutoModel runs probes and reports the mode it chose.
  • Hybrid linear and tree mode: LinearThenTree fits 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
FeatureEnables
gpuWGPU backend for Vulkan, Metal, and DX12 GPUs
cudaCUDA backend. Implies gpu.
mmapMemory-mapped TRB reading with MmapTrbReader
pythonPyO3 Python bindings

Documentation

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.

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.

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

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
gbdt-rs Listed Dormant

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

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 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 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
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 release2025-12-28crates.io database dumpYes
Latest version0.1.2crates.io database dumpYes
Days the oldest outside issue waits for a reply0GitHub repositoryYes
Maintainer replies over 365 days5GitHub 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
Distribution3 releases, 18 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases3crates.io database dumpYes
Downloads over 30 days18crates.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
Repository9 stars, 3 forks, 2 contributors, 224 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars9GitHub repositoryYes — one part of the repository route
GitHub forks3GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account2GitHub contributorsYes — one part of the repository route
Commits on the default branch224GitHub 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: treeboost feature cuda (dependency cudarc); WebGPU: treeboost feature gpu (dependency wgpu)crates.io database dumpNo
Native code, from listed crates and their dependenciesNo native code foundcrates.io database dumpNo
Python bindings, from direct dependencies of listed cratesHas Python bindings: treeboost needs Python only with feature pythoncrates.io database dumpNo
Crates that depend on a listed crate directly0crates.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.