LightPFN
Compact ~4.7M-parameter tabular foundation models for classification and regression.
Pretrained only on synthetic data. scikit-learn estimators that run on CPU, CUDA, ROCm and Vulkan GPUs.
User guide Results Vulkan backend Training Changelog
English Italiano
LightPFN is a family of prior-data fitted networks: transformers pretrained once on millions of synthetic tables.
fit encodes your training set as context and predict_proba, predict or predict_quantiles answer in one
forward pass. Nothing is trained on your data and there are no hyperparameters to tune.
- Small: 4.61M parameters for the classifier (2 to 10 classes), 4.77M for the regressor (mean and 999 quantiles), about 19 MB of weights each. Designed to run on a laptop CPU as well as on a GPU.
- Accurate without tuning: on the official TabArena leaderboard, LightPFN 1.1 ranks above every tree-based method in classification, tuned ones included.
- Fast: fp16 inference on CUDA/ROCm, and a Vulkan backend for AMD, Intel and NVIDIA GPUs without CUDA or ROCm.
- Open: code, weights and the training pipeline under Apache 2.0. Trained from scratch on synthetic data only, with no distillation and no weights or outputs of other tabular foundation models.
Install
pip install LightPFN # CPU, CUDA or ROCm, through your PyTorch install
pip install "LightPFN[vulkan]" # adds the Vulkan GPU backend
Python 3.10 or newer. The first fit downloads the needed checkpoint (about 19 MB) from
Hugging Face at the commit pinned in the package. On a CPU-only machine,
install PyTorch from its CPU index first: pip install torch --index-url https://download.pytorch.org/whl/cpu.
Quick start
from sklearn.datasets import load_breast_cancer, load_diabetes
from sklearn.model_selection import train_test_split
from lightpfn import LightPFNClassifier, LightPFNRegressor
X, y = load_breast_cancer(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, stratify=y, random_state=0)
clf = LightPFNClassifier().fit(X_train, y_train)
proba = clf.predict_proba(X_test)
X, y = load_diabetes(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0)
reg = LightPFNRegressor().fit(X_train, y_train)
pred = reg.predict(X_test)
interval = reg.predict_quantiles(X_test, quantiles=[0.1, 0.9])
pandas DataFrames go in as they are: category, string, object and bool columns, and missing values, are handled
natively. With the default cat="auto", integer columns with 2 to 20 distinct values are also treated as
categorical. The estimators work with Pipeline, GridSearchCV, clone and cross_val_score. More in
examples/ and in the
user guide.
Devices and precision
device="auto" (default) uses a CUDA or ROCm GPU through PyTorch, else a Vulkan GPU, else the CPU; "cpu",
"cuda[:i]" and "vulkan[:i]" select one explicitly, and the environment variable LIGHTPFN_DEVICE replaces
"auto". On CUDA/ROCm, precision="auto" runs fp16 from 2,048 context cells per member and silently retries
any non-finite block in fp32; precision="fp32" forces float32. CPU and Vulkan run fp32. Details in
Devices and in the
Vulkan backend.
Results
| Benchmark | LightPFN |
|---|---|
| TabArena official leaderboard, 38 classification datasets (1.1, 11 October 2026) | 21st of 92, Elo 1441 (+69 / -79), above every tree-based method |
| TabArena maintainer run of 1.5.0, all 816 splits (PR #719) | 36th of 117 overall (Elo 1426), 29th in multiclass, 53rd of 112 in regression; on the Pareto fronts of Elo against train and inference time |
| 55 OpenML-CC18 classification datasets outside TabArena (1.5, one member) | mean AUC 0.910 (default CatBoost 0.902) |
| 23 OpenML regression datasets outside TabArena (1.5) | lower RMSE than default CatBoost on 22 of 23 |
| GPU speed, TabArena protocol (8-fold bagging and refit), 31 classification tasks (1.5.1 vs 1.1.0, same RTX 5090) | 1.65x faster training, 1.64x faster prediction (geometric means) |
Larger foundation models (TabICLv2, Kumo-Tabular, Seldon) remain ahead, clearly so in regression. Above
max_context rows (20,000 per classification member, 50,000 in regression) the context is subsampled. Tables,
protocols and confidence intervals: docs/en/RESULTS.md.
How it works
Each cell is embedded from its value, its rank in the column and a missing-value flag; a categorical adapter adds level-aware embeddings and ordered target statistics. Two column stages with induced attention read each column, a row stage compresses each row into one vector, and seven in-context blocks let test rows attend to the training rows. A retrieval decoder turns that attention into class probabilities, or into target moments read by a quantile head. Pretraining uses only synthetic tasks from structural causal graph and rule priors, with a final stage on tables of up to 60,000 rows; the classifier is then fine-tuned on tables of 64 to 500 features. See the 1.5 technical report and the training guide.
The 1.1 weights stay available: pip install lightpfn==1.1.0, or
LightPFNClassifier(revision="bd389ab59a89dd0e05c9ecb7c642c08ee52e9637", precision="fp32").
Citation
@techreport{ottoboni2026lightpfn15,
title = {{LightPFN} 1.5: Native categoricals, quantile regression, and fast portable inference under 5 million parameters},
author = {Ottoboni, Giorgio},
year = {2026},
url = {https://github.com/GioOtto/LightPFN/blob/main/paper/LightPFN15_report.pdf}
}
The report of 1.1 is cited in CITATION.cff. Bug reports and focused pull requests are welcome: see CONTRIBUTING.
License
Code and weights: Apache License 2.0, with the attribution notice in NOTICE. Dependencies keep their own licenses (THIRD_PARTY_LICENSES).
Metadata
Release files for LightPFN 1.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lightpfn-1.5.1.tar.gz | 78.5 kB | Without provenance | Details for lightpfn-1.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lightpfn-1.5.1-py3-none-any.whl | Python 3 | none | any | Details for lightpfn-1.5.1-py3-none-any.whl |
Total release size: 155.4 kB
Release files / lightpfn-1.5.1.tar.gz
| Download URL | lightpfn-1.5.1.tar.gz |
|---|---|
| Size | 78.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7be62d2403d77b0b744971d0d1fb8b2158441891cb55907cfff0642b3c782c12
|
|
BLAKE2b-256 checksum How to use checksums |
455eef43b921c9d8659a312c6836b8d89df1c9960287e37f24ce29bc288ef7e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / lightpfn-1.5.1-py3-none-any.whl
| Download URL | lightpfn-1.5.1-py3-none-any.whl |
|---|---|
| Size | 76.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7924c535ec39a57f2a17ee608364c58c67f844cd633ca04a2c737da90e542f99
|
|
BLAKE2b-256 checksum How to use checksums |
a9ecfd66c71ee0fdc72d48d90e7e4607e443796bfb2cdae8ff02cddcbc8d97d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Security for LightPFN 1.5.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.