Skip to main content
ByPrior Labs
TabPFN-4 is our latest tabular foundation model (as of writing: December 2026). It can use up to 10 million rows as context in a single forward pass, and its inference time grows subquadratically with the number of training rows. TabPFN-4 is available through the API with tabpfn-client; see the technical report for the full benchmark results. The TabPFN 3.5 getting-started cookbook compared models on one small dataset. TabPFN-4’s main change is scale, so here we ask a different question: what happens as the training set grows? We fit every model on increasingly large slices of the same training data and score them on the same held-out rows:
  • TabPFN-4 and TabPFN 3.5, both through the API with default settings
  • XGBoost with library defaults at every size
  • XGBoost tuned for 10 minutes on the largest training set
We use the Covertype dataset: 581,012 forest cells, 54 cartographic features, and seven tree-cover classes. It is a classic large-tabular benchmark where gradient-boosted trees keep improving with more data, which makes it a fair test for scaling.
Runtime: the full run fits each TabPFN version on up to 400,000 rows and tunes XGBoost for 10 minutes, so expect it to take a while. TabPFN runs through the API and does not use your local GPU; XGBoost runs on your CPU. Lower TRAIN_SIZES for a quicker pass.

Client setup

Create an API key on the TabPFN platform and set the TABPFN_TOKEN environment variable before starting Jupyter. On Colab, store it as a secret named TABPFN_TOKEN using the key icon in the sidebar. TabPFN-4 needs tabpfn-client 0.11.2.

Imports and configuration

create_default_for_version pins each TabPFN version, so the comparison stays the same after future releases. TabPFNClassifier() without a version always uses the current default model. TRAIN_SIZES sets the training slices. Each slice contains the previous one, so a larger slice only adds rows.

Load the data and fix the splits

We hold out 20,000 rows as the test set and 10,000 as a validation set for tuning XGBoost. Both are stratified by class and stay fixed for every model and every training size. The remaining rows are shuffled once, and each training slice takes the first n of them. The seven class labels are shifted to start at 0, which XGBoost expects.

Measuring quality and speed

We score predicted probabilities with accuracy (share of test rows whose most likely class is right; higher is better) and log loss (how much probability lands on the right class; lower is better). For speed we time one fit plus predict_proba call per model and size. For TabPFN this is wall time through the API, so it includes uploading the training rows and the network round trip. XGBoost runs on your CPU, so its times depend on your machine. The two are not directly comparable as compute, but they are what you wait for in practice.

TabPFN-4 and TabPFN 3.5

Both versions use the same TabPFNClassifier with default settings. fit uploads the training rows as context, and predict_proba predicts every test row in one call. No hyperparameters, no preprocessing: the features go in as they are.

XGBoost, out of the box

The same training slices with XGBoost’s default hyperparameters, histogram trees, and all available CPU threads. All Covertype features are numeric, so XGBoost needs no preprocessing here either.

XGBoost, tuned for 10 minutes

To give XGBoost a fair shot on the largest slice, we run a random search over its main hyperparameters for 10 minutes. Each candidate trains on the largest slice with early stopping on the fixed validation set; the first candidate is a sensible hand-picked configuration. The best configuration by validation log loss is then refit, with its number of boosting rounds, and timed like the other models. The search itself is outside the timer. This cell takes about 10 minutes, plus the final fit.

Results on the largest training set

All four models on the same 400,000 training rows and the same 20,000 test rows.

How quality and time scale with training rows

The left panel shows test accuracy for each training size, the right panel the time for one fit plus predict. The tuned XGBoost point sits at the largest size only.
How quality and time scale with training rows

Reading the results

On the largest slice, TabPFN-4 has the best accuracy (0.982) and log loss (0.043), with default settings and no tuning. TabPFN 3.5 is close on quality (0.981, 0.045), and both are well ahead of XGBoost, which reaches 0.970 after 10 minutes of tuning and 0.868 with its defaults. The difference between the two TabPFN versions is time. On the smallest slice they take about the same, 6 to 7 seconds. As the training set grows, TabPFN 3.5 slows down steeply: 41 seconds at 100,000 rows and almost 5 minutes at 400,000. TabPFN-4 stays at 12 seconds at 100,000 rows and 28 seconds at 400,000, about 10 times faster than TabPFN 3.5 on the largest slice for the same quality. Default XGBoost is the fastest at every size, but far behind on quality. These results describe one dataset and one held-out split. TabPFN timings are API wall times and include uploading the training rows; XGBoost timings depend on your CPU and exclude the 10-minute search. To go further, try TabPFN-4 on a dataset of your own, or join the Advent of TabPFN-4.