The TabFM model

This document describes BigQuery's built-in TabFM tabular regression and classification model.

The built-in TabFM model is an implementation of Google Research's open source TabFM model. The Google Research TabFM model is a foundation model for tabular data that enables zero-shot regression and classification on structured data through in-context learning. Because the TabFM model is pre-trained on hundreds of millions of synthetic datasets generated using structural causal models, it captures complex feature interactions and generalizes well to unseen real-world tables across many domains.

Functions supported by the TabFM model

You can use the TabFM model with the AI.PREDICT function to perform regression and classification on structured data in a single forward pass without having to train a model, optimize hyperparameters, or engineer features. The prediction results are comparable to conventional supervised tree-based algorithms such as XGBoost and random forests. If you want more model tuning options than the TabFM model offers, you can train a supervised model such as a boosted tree or random forest model and use it with the ML.PREDICT function instead.

To generate predictions with the TabFM model on tabular data, use the AI.PREDICT function.

To evaluate predicted values from the TabFM model against the actual values, use the AI.EVALUATE function.

TabFM 1.1 capabilities

The following table lists the supported versions and capabilities of the TabFM 1.1 model. TabFM 1.1 is the default model used by the AI.PREDICT and AI.EVALUATE functions:

Capability TabFM 1.1 with Uniserve TPU
Supported Tasks Regression & Classification (up to 10 classes)
Max Feature Columns 128
Max Sampled Training Rows Up to 80,000 rows (capped by the project training cell budget and 90 MiB training context)
Configurable Ensembling Supported (default value is 4; valid range is 1 to 32)

Additional resources

To learn more about the Google Research TabFM model, use the following resources:

Terms of service

When you use TabFM through BigQuery, your usage is governed by the Google Cloud Terms of Service and allows for commercial uses. The non-commercial license associated with the publicly downloadable TabFM weights on GitHub and Hugging Face applies only to self-hosted downloads and does not restrict usage within BigQuery.

Pricing

During Preview, usage of TabFM in BigQuery is billed in the following ways:

  • If you use Enterprise or Enterprise Plus edition, then your usage is billed in slots.
  • If you use on-demand pricing, then your usage is billed based on the number of bytes processed.

BigQuery TabFM uses token-based pricing. You are charged for TabFM tokens consumed by the model in your query, and BigQuery slots used or bytes processed for the rest of the query.