tabfm / README.md
yyy
Upload README.md with huggingface_hub
4f7f41e verified
|
Raw
History Blame Contribute Delete
4.8 kB
---
title: TabFM
emoji: ๐Ÿงฎ
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.49.1
app_file: app.py
pinned: false
license: other
license_name: tabfm-non-commercial-license-v1.0
license_link: https://huggingface.co/google/tabfm-1.0.0-pytorch/blob/main/LICENSE
short_description: Tabular foundation model (TabFM) demo, TabPFN alt.
models:
- google/tabfm-1.0.0-pytorch
datasets:
- ewinregirgojr/minicpm5-stock-v2-forward-return
tags:
- tabfm
- tabular-foundation-model
- tabular
- tabular-classification
- tabular-regression
- foundation-model
- zero-shot-classification
- zero-shot-learning
- in-context-learning
- google
- tabpfn
- tabpfn-alternative
- automl
- machine-learning
- gradio
- stock-prediction
- finance
- yfinance
preload_from_hub:
- google/tabfm-1.0.0-pytorch
suggested_hardware: t4-small
---
# TabFM Playground โ€” try Google's tabular foundation model live
**TabFM is Google Research's zero-shot tabular foundation model**: give it a training
table and a test table and it predicts your target column via in-context learning โ€”
no training loop, no hyperparameter search, one forward pass per prediction. This Space
lets you run it in your browser with no code, on your own data or on a live stock-prediction
example. Updated 2026-07.
## Try it: 4 ways to use this Space
| Tab | What it does |
|---|---|
| **Quick demo** | Instant classification/regression on built-in sklearn datasets (Breast Cancer, Wine, Diabetes) |
| **Bring your own CSV** | Upload any train/test table and get zero-shot predictions back |
| **Stock prediction backtest** | Runs TabFM on [minicpm5-stock-v2-forward-return](https://huggingface.co/datasets/ewinregirgojr/minicpm5-stock-v2-forward-return) โ€” a real BUY/SELL dataset โ€” against tickers fully quarantined from training |
| **Live stock prediction** | Pulls real-time data via `yfinance` for any ticker and gets a live TabFM call |
## TabFM vs. TabPFN vs. classical ML โ€” is TabFM a TabPFN alternative?
Yes: TabFM (Google Research) and [TabPFN](https://huggingface.co/Prior-Labs) (Prior Labs)
are both **tabular foundation models** that use in-context learning instead of training a
new model per dataset. Community-reported differences as of this writing:
| | TabFM | TabPFN |
|---|---|---|
| Trained on | Synthetic data from structural causal models | Synthetic + prior-fitted networks |
| Max features | ~500 (some users report needing PCA beyond this) | Reported to handle more features without PCA |
| License | Non-commercial only | Check current TabPFN license |
| Best dataset size | Small-to-medium (<10,000 rows recommended) | Similar โ€” both require passing the full training set as context |
Neither has been shown to categorically beat well-tuned XGBoost/LightGBM/CatBoost across
the board โ€” see [TabArena](https://huggingface.co/spaces) benchmarks for current standings.
## FAQ
**Is TabFM better than XGBoost?**
It depends on the dataset. On the features tried in this Space's stock-prediction demo,
TabFM's zero-shot in-context predictions beat GradientBoosting/RandomForest/LogisticRegression
run on the identical numeric features (~64% vs. ~51-53% held-out accuracy on quarantined
tickers) โ€” but this is one dataset, not a universal claim.
**Can I use TabFM commercially?**
No, not with these weights. The model ships under the **TabFM Non-Commercial License v1.0** โ€”
testing, evaluation, and research only. A commercial license would need to come from Google
directly.
**Does this Space train a new model?**
No. TabFM never trains โ€” it reads your training rows as context and predicts test rows in a
single forward pass, the same in-context mechanism popularized by TabPFN.
**Why is it slow the first time I click a button?**
The first call in a session loads an ~11GB checkpoint into memory. This Space's config
preloads the weights during build to reduce that cold start, but predictions still take
longer on free CPU hardware than a typical lightweight demo โ€” expect 10s to a couple of
minutes depending on data size and ensemble size.
## Real use case: stock direction prediction
The stock tabs run TabFM against [minicpm5-stock-v2-forward-return](https://huggingface.co/datasets/ewinregirgojr/minicpm5-stock-v2-forward-return):
BUY/SELL labels from actual forward 5-day returns, built from strictly causal features
(RSI, momentum, 20-day volatility, relative strength vs. SPY, last-20-day returns).
Four tickers (TSLA, NFLX, AMD, WMT) were held out at the ticker level โ€” never seen in
training at all โ€” for an honest accuracy check, not a data-leakage-prone time split.
---
Model, code, and license belong to Google Research / the `tabfm` package authors; this
Space is an independent, non-commercial demo and is not affiliated with Google.