Get started

Choose your platform and compute device to get the install command for mojolearn 0.8.41, the current release. The same release gives the same bits on every supported vendor.

Platform
Compute
Package
Language
Run this command

Then check your machine

  1. mojolearn doctor

    Reports what the installed wheel supports on this machine.

  2. python -m mojolearn verify --quick

    Runs representative checks against recorded reference bits (install the verify extra: pip install "mojolearn[verify]").

Your first model

import numpy as np
import mojolearn

rng = np.random.default_rng(0)
X = rng.random((100_000, 20), dtype=np.float32)
y = (X[:, 0] + X[:, 1] > 1.0).astype(np.float32)

model = mojolearn.GradientBoosting(loss="Logloss", n_estimators=200, max_depth=6)
model.fit(X, y)
print(model.predict_proba(X[:5]))
print(model.numeric_mode_used(), mojolearn.vendor())

Run the same script on a supported Apple, NVIDIA or AMD GPU with the same release, and the model and its predictions are the same bits.

Next

The documentation covers numeric modes, verification, saving and loading models, cross-vendor training and the full API. The support matrix lists every platform, device and estimator. Building from source for another GPU architecture is described in the install guide.