Skip to main content

ZeroGrad: one Python interface to tabular foundation models

PyPI CI License: Apache 2.0 Open in Colab

Tabular foundation models

The usual way to predict something from a table (churn, fraud, default, demand) is to train a model for that problem: pick an algorithm, tune it, validate it, retrain it when the data changes.

Tabular foundation models work differently. They are pretrained once, on millions of synthetic datasets, to learn in context: you give them your labeled rows as context and they predict new rows in a single forward pass, with no training and no hyperparameters. On small and medium tables they are competitive with tuned gradient boosting.

Several research groups have released them: TabPFN (Prior Labs), TabICL (Inria), Mitra (Amazon), TabDPT (Layer 6) and others. Each comes with its own package, checkpoints, preprocessing and license.

What ZeroGrad does

ZeroGrad puts them behind one interface. The same two calls, create and predict, work with every model, on your machine or on the ZeroGrad platform. On top of that:

  • A championship instead of a guess. Which model is best depends on the data. ZeroGrad scores every model on the same holdout of your rows and keeps the best one as the champion, with the comparison in a table.
  • Licenses you can see. Some models allow commercial use and some do not. zerograd.list_models() shows each license and where the weights come from; non-commercial models stay off unless you enable them by name.
  • Local or cloud, same code. Locally, nothing leaves your machine. With remote=True the same capability runs on the platform, with versions, scheduled championships, monitoring and batch pipelines.

Quickstart

pip install zerograd
from zerograd import ZeroGrad

zg = ZeroGrad()                                        # local: runs on your machine
cap = zg.create("churn", examples=history, target="churned")
cap.evaluation                                         # every model on the same holdout; the champion is marked
cap.predict(new_customers)                             # prediction, score and probability per class

A ZeroGrad championship in the terminal

Open source under Apache 2.0. Try it without installing anything, in Colab:

Notebook What it shows
Quickstart Model catalog, a championship on breast cancer data, predictions, saving, and a context curve on Adult Open in Colab
Titanic A championship you check against your own holdout, one-row predictions, how much history you need, multiclass Open in Colab
Evaluate and decide Cross-validation at random, by customer and by date, a threshold by the cost of each mistake, column importance, scikit-learn Open in Colab
Without a target Anomalies with the columns why, imputation, synthetic rows scored by detection AUC, clustering with profiles Open in Colab

Install

pip install zerograd                  # local engine with TabPFN v2 and TabICLv2
pip install "zerograd[all]"           # adds Mitra-v2 and TabDPT

Python 3.10+. A GPU helps but is not required: on CPU, histories up to a few thousand rows take seconds to minutes. Weights download from each model's official Hugging Face repository the first time you use it and are cached there (HF_HOME); ZeroGrad hosts none.

What models are there?

import zerograd

zerograd.list_models()                                  # every model: tasks, license, commercial use, installed
zerograd.list_models(task="classification", commercial=True)
zerograd.list_tasks()                                   # every task and which models do it
zerograd.list_models().to_frame()                       # as a DataFrame

In a notebook these render as tables with a badge for commercial and non-commercial use. In this version:

Model Name License Commercial use Default
TabPFN v2 tabpfn-v2 Prior Labs License (Apache 2.0 + attribution) yes yes
TabICLv2 tabicl-v2 BSD-3-Clause yes yes
Mitra-v2 mitra-v2 Apache 2.0 yes yes, with pip install "zerograd[mitra]"
TabDPT tabdpt Apache 2.0 yes yes, with pip install "zerograd[tabdpt]"
Mitra mitra Apache 2.0 yes by name
FoMo-0D fomo-0d MIT yes anomaly detection
ZEUS zeus Apache 2.0 yes clustering

The full list, with sources and the models that are off by default, is in MODELS.md. This version runs classification (binary and multiclass, up to 10 classes) and regression (locally, with TabPFN v2, TabICLv2 and TabDPT), plus four tasks with no target: anomaly detection, imputation, synthetic data and clustering. zerograd.list_tasks() shows which models run each task.

Benchmark

We ran 12 OpenML classification datasets and 6 regression datasets, 3 seeds each. The champion is picked on the training rows only, and every number below comes from a 20% test split that nothing saw during selection. The baseline is scikit-learn's HistGradientBoosting with default settings, and regression also gets Ridge as a linear baseline.

champion against HistGradientBoosting (wins / ties / losses)
ROC AUC 11 / 0 / 1 (mean 0.894 against 0.866)
Log loss 12 / 0 / 0 (0.323 against 0.454)
Brier score 12 / 0 / 0
Accuracy 10 / 1 / 1
Regression RMSE 6 / 0 / 0 (and 6 / 0 / 0 against Ridge)

The one loss is churn, by 0.004 of ROC AUC: TabPFN v2 alone would have won it, but the championship picked another model on the training rows. Per-dataset tables for every model are in benchmarks/RESULTS.md, and python benchmarks/run.py reproduces them.

What the SDK can do

Everything below is explained, with code, in the docs.

  • Championship: every model scored on the same holdout of your rows, with the champion and baselines in one table.
  • Predictions: a DataFrame or a single row in, the prediction, score and probabilities out.
  • Classification and regression: binary and multiclass (up to 10 classes), or numeric targets, picked automatically.
  • Context size: find how many rows of history you need, trading a little quality for much faster predictions.
  • Evaluation: cross-validation at random, by group or by time, thresholds chosen by the cost of each mistake, and column importance.
  • scikit-learn: ZeroGradClassifier and ZeroGradRegressor work in pipelines, grid search and cross_val_score.
  • No target: anomaly detection with the columns why, imputation, synthetic data and clustering.
  • Privacy: find and drop sensitive columns, or pseudonymize them with a local vault, before anything leaves your machine.
  • Save and open: cap.save() writes one file and zerograd.load() opens it again.
  • Bring your own model: plug any model into the championship with zerograd.register_model.
  • The ZeroGrad platform: with remote=True the same code runs on the platform, with versions, scheduled championships, monitoring and batch pipelines.

Licenses and attribution

The SDK is Apache 2.0. Each model has its own license, shown by zerograd.list_models(), and you are responsible for complying with it (TERMS.md). If you build a product with TabPFN v2, its license asks you to show "Built with PriorLabs-TabPFN"; cap.attribution tells you when the champion needs it.

Some newer models are released under non-commercial licenses. They are off by default, can be enabled one by one by name for research and evaluation, and never run on the ZeroGrad platform. See MODELS.md and TERMS.md.

Development

pip install -e ".[dev]"
pytest                                        # fast tests, no models, no network
ZEROGRAD_REAL_MODELS=1 pytest tests/test_real_models.py   # the real models (downloads weights)

Security

See SECURITY.md. Releases are published from GitHub Actions with PyPI trusted publishing.

License

Apache License 2.0. See LICENSE and NOTICE. The models have their own licenses: MODELS.md.

Metadata

Release files for zerograd 0.2.1

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

Source distribution (sdist)

Source distribution for zerograd 0.2.1
File Size Uploaded Provenance Actions
zerograd-0.2.1.tar.gz 128.4 kB With provenance Details for zerograd-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zerograd 0.2.1
File Interpreter ABI Platform Actions
zerograd-0.2.1-py3-none-any.whl Python 3 none any Details for zerograd-0.2.1-py3-none-any.whl

Total release size: 257.1 kB

Release files / zerograd-0.2.1.tar.gz

Download URL zerograd-0.2.1.tar.gz
Size 128.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cbf95581309552c88b7bfe9016e838b14513faef730bbba56770452f20bd85a1
BLAKE2b-256 checksum
How to use checksums
0330713e21abf75ecc3d678b104910d765cc39039f8e862c31f054ae20801b01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Release files / zerograd-0.2.1-py3-none-any.whl

Download URL zerograd-0.2.1-py3-none-any.whl
Size 128.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b8ae34987ec8ab59c7a3c789d3f7c08dd88a405bbc36080f9696b8f106274a1
BLAKE2b-256 checksum
How to use checksums
c305f6916f77daa0b461723bb44a9e17d342bb4d3c5a3aaf327912ab584325f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Security for zerograd 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for zerograd-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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