Skip to content

About

A Playground for Tabular Foundation Models

Resources

Stars

107 stars

Watchers

5 watching

Forks

Latest commit

 

History

73 Commits

Folders and files

Repository files navigation

TFM-Playground

TFM-Playground

Tabular Foundation Models and Priors. One Interface. Training and Inference.

python license

A fully open source playground for tabular foundation models: many architectures behind one interface, with many priors, a pretraining loop and an evaluation pipeline. It is a starting point for anyone who wants to develop or research tabular foundation models. If you are a new to tabular foundation models we recommend checking out nanoTabPFN first as an introduction.

Quickstart

pip install uv
git clone https://github.com/automl/TFM-Playground.git
cd TFM-Playground
uv sync
uv run python examples/pretraining_quickstart.py

That last command runs examples/pretraining_quickstart.py. It trains a toy classifier on toy tables in about 5 minutes on a laptop, from swappable configurations like these:

model_config = ...
prior_config = ...
eval_config = ...
train_config = ...
experiment_config = ...

model = pretrainTFM(
    problem="classification",
    model=...Model(config=model_config),
    prior=...Prior(config=prior_config),
    eval=eval_config,
    training=train_config,
    experiment=experiment_config,
)

Fully configurable examples are in examples:

uv run python examples/pretraining_classification.py
uv run python examples/pretraining_regression.py

Models

Each one is an adapter over upstream code, with a classifier and a regressor config.

Priors

Priors generate the synthetic tables for pretraining.

On the fly

Each batch is sampled when the training loop asks for it.

Dumping

Priors can also be written to a dump that you can use later:

uv run python -m tfmplayground.priors --lib tabicl --prior_type mix_scm --num_batches 1000 --batch_size 4 --max_classes 3 --max_seq_len 50 --min_features 3 --max_features 3 --save_path dump-d1000b4r50c3-3-tabicl.h5

These priors can be dumped:

Load a dump with:

Citation

If you use the TFM-Playground please cite:

@misc{pfefferle2026tfmplayground,
  title={TFM-Playground: A Playground for Tabular Foundation Models},
  author={Pfefferle, Alexander and Hog, Johannes and Öztürk, Salih Bora and Kaya, Kürşat and Türkmen, Zeynep and Hutter, Frank},
  year={2026},
  url={https://github.com/automl/TFM-Playground/}
}

and if you are using the nanoTabPFN-Model specifically please also cite:

@article{pfefferle2025nanotabpfn,
  title={nanoTabPFN: A Lightweight and Educational Reimplementation of TabPFN},
  author={Pfefferle, Alexander and Hog, Johannes and Purucker, Lennart and Hutter, Frank},
  journal={arXiv preprint arXiv:2511.03634},
  year={2025}
}

About

A Playground for Tabular Foundation Models

Resources

Stars

107 stars

Watchers

5 watching

Forks

Releases

Packages

Contributors

Languages