Skip to main content

nvForest - Highly Optimized Decision Tree Inference

nvForest is a highly-optimized and lightweight RAPIDS library that enables fast inference for decision tree models on NVIDIA GPUs and CPUs. It does not train models; it runs inference on models trained elsewhere (e.g., XGBoost, LightGBM, scikit-learn, or cuML).

nvForest uses Treelite as the common format for importing tree models. You can load a model from a file or from an in-memory scikit-learn or Treelite object, then run predictions with a scikit-learn-like API. Setting device="auto" lets you deploy the same script on machines with or without GPUs.

As an example, the following Python snippet loads an XGBoost model and runs inference on GPU:

import nvforest

# Load XGBoost model for GPU inference
fm = nvforest.load_model("/path/to/xgboost_model.ubj", device="gpu",
                         model_type="xgboost_ubj")

# Run inference (X can be a NumPy array or CuPy array)
pred = fm.predict(X)

Load a scikit-learn random forest model and get class probabilities:

import nvforest
from sklearn.ensemble import RandomForestClassifier

# Train with scikit-learn (or load a saved model)
skl_model = RandomForestClassifier(...)
skl_model.fit(X_train, y_train)

# Load into nvForest for fast GPU inference
fm = nvforest.load_from_sklearn(skl_model, device="gpu")
class_probs = fm.predict_proba(X)

For more examples and the full API, see the Getting started guide and the Python API documentation.

Supported Models

Source Formats
XGBoost UBJSON, JSON, legacy binary
LightGBM Text (.txt)
scikit-learn In-memory (RandomForest, ExtraTrees, GradientBoosting)
cuML Via Treelite export
Treelite Checkpoint / in-memory treelite.Model

Inference Modes

Method Description
predict(X) Standard predictions (class labels or regression values)
predict_proba(X) Class probabilities (classification only)
apply(X) Leaf indices per tree
predict_per_tree(X) Prediction from each tree in the ensemble

You can tune performance with layout (e.g., depth_first, breadth_first) and chunk_size; use fm.optimize() to auto-tune.


Installation

See the RAPIDS Release Selector for the command line to install either nightly or official release nvForest packages via conda, pip, or Docker.

Build/Install from Source

See the build guide.

Contributing

We welcome contributions. For guidelines and how to get started, see the RAPIDS contributing guide.

Contact

Find out more on the RAPIDS site.

Open GPU Data Science

The RAPIDS suite of open source software libraries aims to enable execution of end-to-end data science and analytics pipelines entirely on GPUs. It relies on NVIDIA® CUDA® primitives for low-level compute optimization, exposing GPU parallelism and high-bandwidth memory through user-friendly Python interfaces.

Metadata

Release files for libnvforest-cu12 26.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for libnvforest-cu12 26.10.0
File Interpreter ABI Platform
libnvforest_cu12-26.10.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
libnvforest_cu12-26.10.0-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64, Linux glibc 2.27+ ARM64 Details

Total release size: 163.1 MB

Release files / libnvforest_cu12-26.10.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL libnvforest_cu12-26.10.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 81.6 MB
Tags Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
0d0afc086511694fee3152fcd55d08bebe152c48b88e0f23e66951b8c97dd6f6
BLAKE2b-256 checksum
How to use checksums
5d87564c36526dfdabae21dbe897ba053d5d3c76109798b9ca788f5bdc3ab2e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / libnvforest_cu12-26.10.0-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

Download URL libnvforest_cu12-26.10.0-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Size 81.5 MB
Tags Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
91ba2ddbf63b8f70b04d28f5842f20de81ad86568ed910a1281050245e21ea0c
BLAKE2b-256 checksum
How to use checksums
003bc7bebf89478bbdddd67788f5c30eca99c7bc52f6ab80716bc4c0c9722ae0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release history Release notifications | RSS feed

This release

26.10.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page