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
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 theTABPFN_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 firstn 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 onefit 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 sameTabPFNClassifier 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.