| --- |
| title: tabBench |
| emoji: 🧮 |
| colorFrom: blue |
| colorTo: yellow |
| sdk: gradio |
| sdk_version: 5.35.0 |
| app_file: app.py |
| pinned: false |
| license: other |
| python_version: 3.11 |
| models: |
| - google/tabfm-1.0.0-pytorch |
| tags: |
| - tabular-classification |
| - tabular-regression |
| - benchmark |
| - leaderboard |
| - tabfm |
| --- |
| |
| # tabBench |
|
|
| A Hugging Face Space for benchmarking Google's TabFM against practical tabular classification and regression baselines. |
|
|
| This Space is linked to [`google/tabfm-1.0.0-pytorch`](https://huggingface.co/google/tabfm-1.0.0-pytorch), so it should appear in the model page's **Spaces using this model** section after the Space is pushed and indexed by Hugging Face. |
|
|
| The app includes: |
|
|
| - A benchmark catalog with 10+ common tabular tasks, including Titanic-style survival, housing prices, fraud detection, recipe ratings, Halloween candy ranking, and classic sklearn datasets. |
| - A leaderboard with model metrics, timing, and task-aware ranking. |
| - Charts for accuracy/F1/AUC or RMSE/MAE/R2. |
| - Controls for sample size, train/test split, random seed, model selection, chart metrics, and TabFM inclusion. |
| - A CSV upload flow so visitors can run the same arena on their own dataset. |
|
|
| The built-in catalog uses real open datasets where possible: |
|
|
| - OpenML: Titanic, Ames Housing, Adult Income |
| - KaggleHub: Credit Card Fraud, Epicurious Recipes, CalCOFI, Szeged Weather, WWII Weather, Montreal Bike Lanes, NYC Bike Crossings, UK Road Safety, KCBS BBQ |
| - FiveThirtyEight GitHub data: Halloween Candy |
| - sklearn: California Housing, Iris, Wine, Breast Cancer, Digits, Diabetes |
|
|
| TabFM is loaded through the public Google Research package when available. The app keeps graceful fallbacks so the Space still works on CPU-only or dependency-constrained runtimes. Live TabFM runs are opt-in because the model weights are large and CPU-only inference can be slow. |
|
|
| Model choices include Logistic, Linear Regression, Ridge, Bayesian Ridge, Naive Bayes, RandomForest, ExtraTrees, GradientBoosting, HistGradientBoosting, AdaBoost, KNN, SVC/SVR, XGBoost, LightGBM, Dummy, and optional live TabFM. |
|
|
| TabFM is always represented in the leaderboard: it appears as skipped until **Run TabFM live** is enabled, then reports live metrics when the run completes. |
|
|
| ## Operational notes |
|
|
| - The Space is pinned to Python 3.11 because TabFM's upstream package requires Python >= 3.11 and downloads weights from Hugging Face Hub. |
| - TabFM is loaded with the correct checkpoint for the selected task: `model_type="classification"` for classification and `model_type="regression"` for regression. |
| - If the upstream package looks for legacy `pytorch_model.bin` weights, the app falls back to the current `model.safetensors` files in the TabFM model repo. |
| - Uploaded CSV runs coerce numeric regression targets, drop invalid target rows, and sanitize TabFM feature inputs before fitting. |
| - The first live TabFM run can take a couple of minutes on CPU Basic while the model dependency and weights are loaded; later runs are faster while the Space remains warm. |
|
|
| Note: TabFM's weights use their own non-commercial license. Review the upstream model license before using this Space commercially. |
|
|
| Links: |
|
|
| - GitHub: https://github.com/google-research/tabfm |
| - Hugging Face weights: https://huggingface.co/google/tabfm-1.0.0-pytorch |
|
|
| ## Deploy |
|
|
| ```bash |
| hf auth login |
| hf repo create YOUR_USERNAME/tabBench --type space --space-sdk gradio --exist-ok |
| hf upload YOUR_USERNAME/tabBench . . --repo-type space \ |
| --include app.py \ |
| --include README.md \ |
| --include requirements.txt \ |
| --commit-message "Launch tabBench" |
| ``` |
|
|