docs / xpu / ml

XPU index
  1. Overview
  1. One model, start to last token
  2. The scheduler: what runs when, beside what
  3. Optimization: what is decided when, and what is remembered
  4. Language models on the device: the cajeta-llm kernels
  5. Gradient boosting on the device: the cajeta-xgboost kernels
  6. Catalog: every cajeta-llm kernel
  7. Catalog: every cajeta-xgboost kernel

Math

  1. Overview

Nucleo

  1. Overview

ML

  1. Overview

LLM

  1. Overview
  2. Configuration
  3. Inside the engine
  4. Measuring, and where it stands
  5. Models and weight formats
  6. Quickstart
  7. Running and serving
  8. The engine API

ML: estimators, layers and boosted trees

Two libraries, both written in Cajeta over Nucleo and Math, published as dev.cajeta.ml and dev.cajeta.xgboost and documented in their own repositories.

dev.cajeta.ml

Two halves with one estimator protocol between them.

  • Classical, the scikit-learn and statsmodels role over Tensor<float64>: linear models with real inference (LinearRegression by QR least squares with a summary of standard errors, t and p values, R² and F; Ridge, Lasso, ElasticNet, LogisticRegression), the discriminants, kernel regression, k-nearest neighbours, k-means and the other clusterers, embeddings and decomposition, preprocessing, model selection (Split.crossValScore, the searches), metrics and curves.
  • Neural, the torch role over Tensor<float32>: define-by-run autodiff (ml.grad), modules and layers through transformers (ml.nn), optimizers and two trainers (ml.train, ml.optim), checkpoints and LoRA (ml.io), torch-checkpoint interop and transformer completion.

The estimator protocol: Estimator (fit(x, y) stores state on the instance; hyperparameters are constructor arguments, never mutated), Predictor (predict, score), Transformer (transform, fitTransform). Model-selection code sees only Predictor and never names a concrete type; sibling model libraries conform to it through an adapter. Dataframe columns cross into estimators through nucleo’s zero-copy seam.

Device status: as of 0.10.6 the neural half runs on the host; the device variants in the benchmarks skip with that reason until the library’s ops gain kernels.

The documentation lives with the code: the index, the guide (the protocol, every model and utility, API shapes), the runnable tour, and the two honest difference lists against scikit-learn and PyTorch.

dev.cajeta.xgboost

Gradient-boosted decision trees whose contract is bit-exactness to XGBoost’s NVIDIA GPU hist algorithm, on every backend Cajeta runs on: given the same inputs and hyperparameters, the identical trees and predictions, to the bit, on the CPU, on AMD and on NVIDIA, checked per round, per tree and per node against fixtures generated by the reference. Determinism is the default and any non-deterministic mode is opt-in and recorded in the model. Its 33 device kernels and the one adaptation they make are on Gradient boosting on the device, with the catalog.

Where they stand

The benchmarks measure the classical estimators against scikit-learn on the same data within recorded tolerances, the neural models against PyTorch, and the boosted trees against upstream XGBoost. On cajeta 0.46.3 several full-size rows are hours where the references are seconds (k-nearest neighbours, logistic regression on the digits set, an XGBoost CPU fit), and the pages will say so when the first run is published.

Source: docs/xpu/ml/README.md · 2 min read · 399 words