{"id":24089952,"url":"https://github.com/priorlabs/tabpfn","last_synced_at":"2026-10-17T04:03:37.533Z","repository":{"id":41398136,"uuid":"509436902","full_name":"PriorLabs/TabPFN","owner":"PriorLabs","description":"⚡ TabPFN: Foundation Model for Tabular Data ⚡","archived":false,"fork":false,"pushed_at":"2026-10-13T10:31:42.000Z","size":287326,"stargazers_count":8168,"open_issues_count":49,"forks_count":803,"subscribers_count":46,"default_branch":"main","last_synced_at":"2026-10-13T11:51:50.502Z","etag":null,"topics":["data-science","foundation-models","machine-learning","tabpfn","tabular-data"],"latest_commit_sha":null,"homepage":"http://priorlabs.ai","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PriorLabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"claude":null,"gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null}},"created_at":"2022-07-01T11:54:47.000Z","updated_at":"2026-10-13T11:45:59.000Z","dependencies_parsed_at":"2026-10-05T14:59:36.128Z","dependency_job_id":"e71c1fb4-d4b9-48c5-9668-d64fa6e7eff8","html_url":"https://github.com/PriorLabs/TabPFN","commit_stats":null,"previous_names":["priorlabs/tabpfn","automl/tabpfn"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/PriorLabs/TabPFN","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PriorLabs%2FTabPFN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PriorLabs%2FTabPFN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PriorLabs%2FTabPFN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PriorLabs%2FTabPFN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PriorLabs","download_url":"https://codeload.github.com/PriorLabs/TabPFN/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PriorLabs%2FTabPFN/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344794859,"owners_count":38315653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-14T02:00:06.392Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","foundation-models","machine-learning","tabpfn","tabular-data"],"created_at":"2025-01-10T05:05:46.851Z","updated_at":"2026-10-17T04:03:37.516Z","avatar_url":"https://github.com/PriorLabs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TabPFN\n\n[![PyPI version](https://badge.fury.io/py/tabpfn.svg)](https://badge.fury.io/py/tabpfn)\n[![Downloads](https://pepy.tech/badge/tabpfn)](https://pepy.tech/project/tabpfn)\n[![Discord](https://img.shields.io/discord/1285598202732482621?color=7289da\u0026label=Discord\u0026logo=discord\u0026logoColor=ffffff)](https://discord.gg/BHnX2Ptf4j)\n[![Documentation](https://img.shields.io/badge/docs-priorlabs.ai-blue)](https://priorlabs.ai/docs)\n[![colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/PriorLabs/TabPFN/blob/main/examples/notebooks/TabPFN_Demo_Local.ipynb)\n[![Python Versions](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)](https://pypi.org/project/tabpfn/)\n\n\u003cimg src=\"docs/assets/tabpfn_architecture.svg\" width=\"100%\" alt=\"TabPFN trains on synthetic datasets and predicts on unseen real-world datasets in a single forward pass\"\u003e\n\n\u003cimg src=\"docs/assets/tabpfn_attention.svg\" width=\"100%\" alt=\"TabPFN-3.5 architecture: a distribution embedder, then row-wise and cross-row attention, read out as per-row tokens\"\u003e\n\n## Quick Start\n\n### Interactive Notebook Tutorial\n\u003e [!TIP]\n\u003e\n\u003e Dive right in with our interactive Colab notebook! It's the best way to get a hands-on feel for TabPFN, walking you through installation, classification, and regression examples.\n\u003e\n\u003e [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/PriorLabs/TabPFN/blob/main/examples/notebooks/TabPFN_Demo_Local.ipynb)\n\n### Installation\n```bash\npip install tabpfn\n```\nTabPFN supports Python 3.10+.\n\n\u003e ⚡ **GPU Recommended**:\n\u003e For optimal performance, use a GPU (even older ones with ~8GB VRAM work well; 16GB needed for some large datasets).\n\u003e On CPU, only moderate datasets are feasible (TabPFN-3, TabPFN-3.5 and TabPFN-3.5-Fast allow up to 5000 samples; older versions up to 1000).\n\u003e No GPU? Use our free hosted inference via [TabPFN Client](https://github.com/PriorLabs/tabpfn-client).\n\n**On macOS:** GPU support is automatically included for Apple Silicon Macs. For best performance, ensure you are using PyTorch 2.13 or newer (see [#949](https://github.com/PriorLabs/TabPFN/pull/949)).\n\n**On Linux:** Nvidia GPU support is automatically included. For AMD GPUs, first [install PyTorch with ROCm](https://pytorch.org/get-started/locally/), then install TabPFN. For example,\n```bash\npip install torch --index-url https://download.pytorch.org/whl/rocm7.2\npip install tabpfn\n```\nFor a CPU-only install, first [install CPU-only PyTorch](https://pytorch.org/get-started/locally/), then install TabPFN. This saves disk space if you do not have a GPU.\n\n**On Windows:** For Nvidia GPUs, [install PyTorch with CUDA](https://pytorch.org/get-started/locally/), then install TabPFN. For AMD GPUs, [install PyTorch with ROCm](https://rocm.docs.amd.com/projects/radeon-ryzen/en/latest/docs/install/installrad/windows/install-pytorch.html), then install TabPFN.\n\n\n### Basic Usage\nTo use our default TabPFN-3.5 model:\n\n```python\nfrom tabpfn import TabPFNClassifier, TabPFNRegressor\n\nclf = TabPFNClassifier()\nclf.fit(X_train, y_train)  # downloads checkpoint on first use\npredictions = clf.predict(X_test)\n\nreg = TabPFNRegressor()\nreg.fit(X_train, y_train)  # downloads checkpoint on first use\npredictions = reg.predict(X_test)\n```\n\n\nTo use the smaller, faster TabPFN-3.5-Fast you can use `ModelVersion.V3_5_FAST` or \"v3.5-fast\".\n\n```python\nfrom tabpfn.constants import ModelVersion\n\nclassifier = TabPFNClassifier.create_default_for_version(ModelVersion.V3_5_FAST)\nregressor = TabPFNRegressor.create_default_for_version(ModelVersion.V3_5_FAST)\n```\n\nTo use other model versions (e.g. the previous default, TabPFN-3):\n\n```python\nclassifier = TabPFNClassifier.create_default_for_version(ModelVersion.V3)\nregressor = TabPFNRegressor.create_default_for_version(ModelVersion.V3)\n```\n\n\nFor complete examples, see the [tabpfn_for_binary_classification.py](https://github.com/PriorLabs/TabPFN/tree/main/examples/tabpfn_for_binary_classification.py), [tabpfn_for_multiclass_classification.py](https://github.com/PriorLabs/TabPFN/tree/main/examples/tabpfn_for_multiclass_classification.py), and [tabpfn_for_regression.py](https://github.com/PriorLabs/TabPFN/tree/main/examples/tabpfn_for_regression.py) files.\n\n## TabPFN Ecosystem\n\nChoose the right TabPFN implementation for your needs:\n\n- **[TabPFN Client](https://github.com/priorlabs/tabpfn-client)**\n  Simple API client for using TabPFN via cloud-based inference.\n\n- **[TabPFN Extensions](https://github.com/priorlabs/tabpfn-extensions)**\n  Community extensions and integrations, including:\n\n  -  **`interpretability`**: Gain insights with SHAP-based explanations, feature importance, and selection tools.\n  -  **`unsupervised`**: Tools for outlier detection and synthetic tabular data generation.\n  -  **`embeddings`**: Extract and use TabPFN's internal learned embeddings for downstream tasks or analysis.\n  -  **`many_class`**: Handle multi-class classification problems that exceed TabPFN's built-in class limit.\n\n  To install:\n  ```bash\n  pip install tabpfn-extensions\n  ```\n\n- **[TabPFN (this repo)](https://github.com/priorlabs/tabpfn)**\n  Core implementation for fast and local inference with PyTorch and CUDA support.\n\n- **[TabPFN UX](https://ux.priorlabs.ai)**\n  No-code graphical interface to explore TabPFN capabilities—ideal for business users and prototyping.\n\n## License\n\nThe code in this repository is licensed under the [Apache License 2.0](LICENSE). Third-party code is subject to its own licenses and attribution requirements; see [Third-Party Notices](THIRD-PARTY-NOTICES.md).\n\nModel weights are licensed separately.\n\nThe TabPFN-2.5, TabPFN-2.6, TabPFN-3 and TabPFN-3.5 model weights are released under non-commercial licenses (TabPFN-3.5 [license](https://huggingface.co/Prior-Labs/tabpfn_3_5/blob/main/LICENSE), TabPFN-3 [license](https://huggingface.co/Prior-Labs/tabpfn_3/blob/main/LICENSE); see the [Models page](https://docs.priorlabs.ai/models#tabpfn-model-license) for prior releases). TabPFN-3.5 is used by default.\n\nThe TabPFN-2 model weights are licensed under the Prior Labs License (Apache 2.0 with an additional attribution requirement): [classifier license](https://huggingface.co/Prior-Labs/TabPFN-v2-clf/blob/main/LICENSE.txt), [regressor license](https://huggingface.co/Prior-Labs/TabPFN-v2-reg/blob/main/LICENSE.txt). To use the v2 model weights, instantiate your model as follows:\n\n```python\nfrom tabpfn import TabPFNRegressor\nfrom tabpfn.constants import ModelVersion\n\ntabpfn_v2 = TabPFNRegressor.create_default_for_version(ModelVersion.V2)\n```\n\n## Enterprise \u0026 Production\n\nFor high-throughput or massive-scale production environments, we offer an **Enterprise Edition** with the following capabilities:\n-   **Fast Inference Mode**: A proprietary distillation engine that converts TabPFN into a compact MLP or tree ensemble, delivering orders-of-magnitude lower latency for real-time applications.\n-   **Commercial Support**: Includes a Commercial Enterprise License for production use-cases, dedicated integration support, and access to private high-speed inference engines.\n\n**To learn more or request a commercial license, please contact us at [sales@priorlabs.ai](mailto:sales@priorlabs.ai).**\n\n\n## Join Our Community\n\nWe're building the future of tabular machine learning and would love your involvement:\n\n1. **Connect \u0026 Learn**:\n   - Join our [Discord Community](https://discord.gg/VJRuU3bSxt)\n   - Read our [Documentation](https://priorlabs.ai/docs)\n   - Check out [GitHub Issues](https://github.com/priorlabs/tabpfn/issues)\n\n2. **Contribute**:\n   - Report bugs or request features\n   - Share your research and use cases\n   - Submit pull requests (see [CONTRIBUTING.md](CONTRIBUTING.md))\n\n3. **Stay Updated**: Star the repo and join Discord for the latest updates\n\n\u003e [!IMPORTANT]\n\u003e **Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a PR**, including our policy on AI-assisted contributions.\n\u003e\n\u003e Small, focused fixes can go straight to a PR. For larger features or API changes, please [open a GitHub issue](https://github.com/priorlabs/tabpfn/issues) with a high-level sketch of your plan first. There are many reasons a PR may not be mergeable (design fit, scope, compatibility, planned refactors), and these are often hard to spot from the outside.\n\n## Citation\n\nYou can read our paper explaining TabPFNv2 [here](https://doi.org/10.1038/s41586-024-08328-6), and model reports for [TabPFN-2.5](https://arxiv.org/abs/2511.08667), [TabPFN-3](https://arxiv.org/abs/2605.13986) and [TabPFN-3.5](https://arxiv.org/abs/2609.17895).\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eBibTeX\u003c/b\u003e\u003c/summary\u003e\n\n```bibtex\n@misc{jaeger2026tabpfn35technicalreport,\n      title={TabPFN-3.5: Technical Report},\n      author={Benjamin Jäger and Nick Erickson and Léo Grinsztajn and Felix Birkel and Klemens Flöge and Oscar Key and Kürşat Kaya and Jonas Kübler and Adèle Frankel and Tobias Schröder and Anurag Garg and Jan Hendrik Metzen and David Salinas and Simon Bing and Kristina Collins and Tuana Çelik and Vahid Balazadeh and Lydia Sidhoum and Tomás Pereda and Brendan Roof and Andrej Tschalzev and Siyuan Guo and Philipp Singer and Lennart Purucker and Jake Robertson and Marie Salmon and Philipp Jund and Jerry Chen and Diana Kriuchkova and Arthur Cahu and Eliott Kalfon and Adrian Hayler and Georg Grab and Vitor Monteiro and Lilly Wehrhahn and Dominik Safaric and Clara Cornu and Alan Arazi and Rylee Grace and Simone Alessi and Mihir Manium and Bernhard Schölkopf and Yann LeCun and Madelon Hulsebos and Sauraj Gambhir and Noah Hollmann and Frank Hutter},\n      year={2026},\n      eprint={2609.17895},\n      archivePrefix={arXiv},\n      primaryClass={cs.LG},\n      url={https://arxiv.org/abs/2609.17895},\n}\n\n@misc{grinsztajn2026tabpfn3technicalreport,\n      title={TabPFN-3: Technical Report}, \n      author={Léo Grinsztajn and Klemens Flöge and Oscar Key and Felix Birkel and Philipp Jund and Brendan Roof and Mihir Manium and Shi Bin Hoo and Magnus Bühler and Anurag Garg and Dominik Safaric and Jake Robertson and Benjamin Jäger and Simone Alessi and Adrian Hayler and Vladyslav Moroshan and Lennart Purucker and Philipp Singer and Alan Arazi and Julien Siems and Jan Hendrik Metzen and Georg Grab and Nick Erickson and Siyuan Guo and Eliott Kalfon and Simon Bing and David Salinas and Clara Cornu and Lilly Charlotte Wehrhahn and Diana Kriuchkova and Kursat Kaya and Lydia Sidhoum and Marie Salmon and Jerry Chen and Madelon Hulsebos and Yann LeCun and Samuel Müller and Bernhard Schölkopf and Sauraj Gambhir and Noah Hollmann and Frank Hutter},\n      year={2026},\n      eprint={2605.13986},\n      archivePrefix={arXiv},\n      primaryClass={cs.LG},\n      url={https://arxiv.org/abs/2605.13986}, \n}\n\n@misc{grinsztajn2025tabpfn,\n  title={TabPFN-2.5: Advancing the State of the Art in Tabular Foundation Models},\n  author={Léo Grinsztajn and Klemens Flöge and Oscar Key and Felix Birkel and Philipp Jund and Brendan Roof and\n          Benjamin Jäger and Dominik Safaric and Simone Alessi and Adrian Hayler and Mihir Manium and Rosen Yu and\n          Felix Jablonski and Shi Bin Hoo and Anurag Garg and Jake Robertson and Magnus Bühler and Vladyslav Moroshan and\n          Lennart Purucker and Clara Cornu and Lilly Charlotte Wehrhahn and Alessandro Bonetto and\n          Bernhard Schölkopf and Sauraj Gambhir and Noah Hollmann and Frank Hutter},\n  year={2025},\n  eprint={2511.08667},\n  archivePrefix={arXiv},\n  url={https://arxiv.org/abs/2511.08667},\n}\n\n@article{hollmann2025tabpfn,\n title={Accurate predictions on small data with a tabular foundation model},\n author={Hollmann, Noah and M{\\\"u}ller, Samuel and Purucker, Lennart and\n         Krishnakumar, Arjun and K{\\\"o}rfer, Max and Hoo, Shi Bin and\n         Schirrmeister, Robin Tibor and Hutter, Frank},\n journal={Nature},\n year={2025},\n month={01},\n day={09},\n doi={10.1038/s41586-024-08328-6},\n publisher={Springer Nature},\n url={https://www.nature.com/articles/s41586-024-08328-6},\n}\n\n@inproceedings{hollmann2023tabpfn,\n  title={TabPFN: A transformer that solves small tabular classification problems in a second},\n  author={Hollmann, Noah and M{\\\"u}ller, Samuel and Eggensperger, Katharina and Hutter, Frank},\n  booktitle={International Conference on Learning Representations 2023},\n  year={2023}\n}\n```\n\n\u003c/details\u003e\n\n\n\n## Usage Tips\n\n- **Use batch prediction mode**: Each `predict` call recomputes the training set. Calling `predict` on 100 samples separately is almost 100 times slower and more expensive than a single call. If the test set is very large, split it into chunks of 1000 samples each.\n- **Avoid data preprocessing**: Do not apply data scaling or one-hot encoding when feeding data to the model.\n- **Use a GPU**: TabPFN is slow to execute on a CPU. Ensure a GPU is available for better performance.\n- **Mind the dataset size**: TabPFN works best on datasets within its recommended size limits. **TabPFN-3.5** and **TabPFN-3.5-Fast** accept up to **1,000,000 rows** and **20,000 features**. See the [Models page](https://docs.priorlabs.ai/models) for the limits of other checkpoints.\n\n## ❓ FAQ\n\n### **Usage \u0026 Compatibility**\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eQ: What dataset sizes work best with TabPFN?\u003c/b\u003e\u003c/summary\u003e\n\nRecommended row and feature limits vary by checkpoint — see the [Models page](https://docs.priorlabs.ai/models) for the per-release limits. As a quick reference, the current default (**TabPFN-3.5**, and **TabPFN-3.5-Fast**) accepts up to **1,000,000 rows** and **20,000 features**. If your dataset exceeds the recommended limits for your checkpoint, you can subsample, set `ignore_pretraining_limits=True` to push past the size guardrail, or upgrade to a release with a higher limit.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eQ: Why can't I use TabPFN with Python 3.9?\u003c/b\u003e\u003c/summary\u003e\n\nTabPFN requires **Python 3.10+** due to newer language features. Compatible versions: **3.10, 3.11, 3.12, 3.13, 3.14**.\n\n\u003c/details\u003e\n\n### **Installation \u0026 Setup**\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eQ: How do I get access to TabPFN-2.5 / TabPFN-2.6 / TabPFN-3 / TabPFN-3.5?\u003c/b\u003e\u003c/summary\u003e\n\nOn first use, TabPFN will automatically open a browser window where you can log in via [PriorLabs](https://ux.priorlabs.ai) and accept the license terms. Your authentication token is cached locally so you only need to do this once.\n\n**For headless / CI environments** where a browser is not available, visit [https://ux.priorlabs.ai](https://ux.priorlabs.ai), go to the **License** tab to accept the license, and then set the `TABPFN_TOKEN` environment variable with a token obtained from your account.\n\nIf access via the browser-based flow is not an option for you, please contact us at [`sales@priorlabs.ai`](mailto:sales@priorlabs.ai).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eQ: How do I use TabPFN without an internet connection?\u003c/b\u003e\u003c/summary\u003e\n\nTabPFN automatically downloads model weights when first used. For offline usage:\n\n**Using the Provided Download Script**\n\nIf you have the TabPFN repository, you can use the included script to download all models (including ensemble variants):\n\n```bash\n# After installing TabPFN\npython scripts/download_all_models.py\n```\n\nThis script will download the main classifier and regressor models, as well as all ensemble variant models to your system's default cache directory.\n\n**Manual Download**\n\n1. Download the model files manually from HuggingFace:\n   - TabPFN-3.5 (one file serves both classifier and regressor): [tabpfn-v3.5-20260909.safetensors](https://huggingface.co/Prior-Labs/tabpfn_3_5/blob/main/tabpfn-v3.5-20260909.safetensors)\n   - TabPFN-3.5-Fast: [tabpfn-v3.5-fast-20260909.safetensors](https://huggingface.co/Prior-Labs/tabpfn_3_5/blob/main/tabpfn-v3.5-fast-20260909.safetensors)\n\n2. Place the file in one of these locations:\n   - Specify directly: `TabPFNClassifier(model_path=\"/path/to/model.ckpt\")`\n   - Set environment variable: `export TABPFN_MODEL_CACHE_DIR=\"/path/to/dir\"` (see environment variables FAQ below)\n   - Default OS cache directory:\n     - Windows: `%APPDATA%\\tabpfn\\`\n     - macOS: `~/Library/Caches/tabpfn/`\n     - Linux: `~/.cache/tabpfn/`\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eQ: I'm getting a \u003ccode\u003epickle\u003c/code\u003e error when loading the model. What should I do?\u003c/b\u003e\u003c/summary\u003e\n\nTry the following:\n- Download the newest version of tabpfn `pip install tabpfn --upgrade`\n- Ensure model files downloaded correctly (re-download if needed)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eQ: What environment variables can I use to configure TabPFN?\u003c/b\u003e\u003c/summary\u003e\n\nTabPFN uses Pydantic settings for configuration, supporting environment variables and `.env` files:\n\n**Authentication:**\n- `TABPFN_TOKEN`: Provide a PriorLabs authentication token directly (useful for headless/CI environments). Obtain one from [https://ux.priorlabs.ai](https://ux.priorlabs.ai).\n- `TABPFN_NO_BROWSER`: Set to disable automatic browser-based login (e.g. in environments where opening a browser is undesirable).\n\n**Model Configuration:**\n- `TABPFN_MODEL_CACHE_DIR`: Custom directory for caching downloaded TabPFN models (default: platform-specific user cache directory)\n- `TABPFN_ALLOW_CPU_LARGE_DATASET`: Allow running TabPFN on CPU above the per-model sample limit (5000 for TabPFN-3, TabPFN-3.5 and TabPFN-3.5-Fast, 1000 for older versions). Set to `true` to override the CPU limitation. Note: large datasets can still be slow on CPU!\n- `TABPFN_MPS_MEMORY_FRACTION`: Fraction of recommended max MPS memory to allow on Apple Silicon (default: `0.7`). Used to prevent macOS system crashes; set before importing TabPFN. Values above `1.0` are not recommended.\n- `TABPFN_MAX_BATCHED_TEST_ROWS`: Maximum number of test rows fed through the model in a single forward pass during cached (`fit_mode=\"fit_with_cache\"`) inference (default: `32768`). Larger test sets are split into independent chunks of at most this size and concatenated, bounding peak memory. Test rows are conditionally independent given the KV cache, so chunking is mathematically equivalent — results may still differ slightly due to floating-point non-associativity (see [#800](https://github.com/PriorLabs/TabPFN/issues/800#issuecomment-4903444425)). Performance should be close to optimal at the default of `32768`: the hardware is already saturated at that chunk size and, since the computations are independent, larger chunks bring no speedup. Set to `0` to disable chunking.\n\n**PyTorch Settings:**\n- `PYTORCH_CUDA_ALLOC_CONF`: PyTorch CUDA memory allocation configuration to optimize GPU memory usage (default: `max_split_size_mb:512`). See [PyTorch CUDA documentation](https://docs.pytorch.org/docs/stable/notes/cuda.html#optimizing-memory-usage-with-pytorch-cuda-alloc-conf) for more information.\n- If you experience crashes on Windows with the error message containing `Windows fatal exception: code 0xc000001d`, try to set `ONEDNN_MAX_CPU_ISA=AVX512_CORE_FP16`. This is likely an upstream pytorch/oneDNN bug.\n\nExample:\n```bash\nexport TABPFN_MODEL_CACHE_DIR=\"/path/to/models\"\nexport TABPFN_ALLOW_CPU_LARGE_DATASET=true\nexport PYTORCH_CUDA_ALLOC_CONF=\"max_split_size_mb:512\"\n```\n\nOr simply set them in your `.env`\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eQ: How do I save and load a trained TabPFN model?\u003c/b\u003e\u003c/summary\u003e\n\nUse `save_fitted_tabpfn_model` to persist a fitted estimator and reload\nit later with `load_fitted_tabpfn_model` (or the corresponding\n`load_from_fit_state` class methods).\n\n```python\nfrom tabpfn import TabPFNRegressor\nfrom tabpfn.model_loading import (\n    load_fitted_tabpfn_model,\n    save_fitted_tabpfn_model,\n)\n\n# Train the regressor on GPU\nreg = TabPFNRegressor(device=\"cuda\")\nreg.fit(X_train, y_train)\nsave_fitted_tabpfn_model(reg, \"my_reg.tabpfn_fit\")\n\n# Later, or in another process. Defaults to device=\"auto\", as the\n# constructors do; pass device= to pin it (e.g. device=\"cpu\").\nreg_loaded = load_fitted_tabpfn_model(\"my_reg.tabpfn_fit\")\n```\n\nTo store just the foundation model weights (without a fitted estimator) use\n``save_tabpfn_model(reg, \"my_tabpfn.ckpt\")`` (imported from ``tabpfn.model_loading``). This merely saves a\ncheckpoint of the pre-trained weights so you can later create and fit a fresh\nestimator. Reload the checkpoint with ``load_model_criterion_config``.\n\n\u003c/details\u003e\n\n### **Performance \u0026 Limitations**\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eQ: Can TabPFN handle missing values?\u003c/b\u003e\u003c/summary\u003e\n\n**Yes!**\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eQ: How can I improve TabPFN's performance?\u003c/b\u003e\u003c/summary\u003e\n\nBest practices:\n- Feature engineering: Add domain-specific features to improve model performance\n- See the [Improving Performance guide](https://docs.priorlabs.ai/improving-performance) for the full escalation path\n\nNot effective:\n- Adapt feature scaling\n- Convert categorical features to numerical values (e.g., one-hot encoding)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eQ: What are the different checkpoints on \u003ca href=\"https://huggingface.co/Prior-Labs\"\u003eHugging Face\u003c/a\u003e?\u003c/b\u003e\u003c/summary\u003e\n\nEach TabPFN release publishes a default checkpoint: one classification and one regression checkpoint up to TabPFN-3, and from TabPFN-3.5 on a single multitask checkpoint that serves both. Some releases also publish a handful of experimental variants — these aren't guaranteed to exist for every release. We recommend starting with the defaults; the variants are experimental and worse on average. When present, they can be used as part of an ensembling or hyperparameter optimization system, or tried out manually. Their name suffixes refer to what we expect them to be good at.\n\n\u003c/details\u003e\n\n---\n\nBuilt with ❤️ by [Prior Labs](https://priorlabs.ai) - Copyright (c) 2026 Prior Labs GmbH\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpriorlabs%2Ftabpfn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpriorlabs%2Ftabpfn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpriorlabs%2Ftabpfn/lists"}