Skip to main content
TabPFN-3.5-Thinking supports up to 1 million training rows. Use it when better predictions justify more time spent fitting, particularly on data with groups or a time order. It handles numerical, categorical and text features, and you can reuse a fitted model for repeated predictions. See the Thinking benchmark results.
Thinking mode is available exclusively through the hosted API. Use tabpfn-client 0.7.1 or later.

When to use it

Thinking mode is especially strong on datasets with more than 100,000 rows. Use it for batch predictions where fit time is less important than prediction quality: demand across stores, prices over time, or churn across customer groups. Compare it with your current model on a held-out set that reflects how you will use the predictions. For regression, Thinking supports only point predictions (output_type="mean"). Quantile support is coming soon. Fit without Thinking when you need quantiles or a full predictive distribution. Classification supports labels and class probabilities.

Quickstart

Thinking mode uses TabPFN-3.5-Thinking by default. fit() waits for the result while the client polls a background job. To return immediately and resume later, see Run asynchronous fits.

Fit once, predict in separate jobs

Run fitting as a separate job, such as a weekly refresh, then reuse the fitted model for predictions throughout the week. First, fit to completion and save the model reference:
In a prediction job, load that reference with the same account and predict without fitting again:
The JSON file references the model stored on the server and contains no training data. Make it available to the prediction job, including when that job runs on another machine. For long predictions, use submit_predict(X_test) and retrieve the result with wait_for_predict(). You can save and load a model with a pending prediction too.

Prediction errors

Prediction calls can fail if the stored fit is unavailable or can no longer be used:
  • RefitRequiredError can be raised by predict(), submit_predict() or wait_for_predict() when the stored fit can no longer predict. Run the fitting job again and save the replacement model reference before retrying the prediction.
  • FittedModelNotFoundError means the server cannot find the model ID for your account. Check that the prediction job loaded the correct reference and is signed in to the account that fitted it. If the model was deleted, fit again.

Choosing the model

To select a model family explicitly, use ModelVersion.V3_5 for TabPFN-3.5-Thinking or ModelVersion.V3 for TabPFN-3-Thinking:
See Selecting Model Version for more details.

Choosing effort and metric

Effort sets the maximum time available for fitting. The metric defines what to optimize.

thinking_effort

The model may finish before reaching its fit budget. If it finishes successfully before reaching that limit, increasing the effort is unlikely to improve the result: the existing time budget was already sufficient. These budgets apply at every dataset size. Uploading, waiting for capacity and returning the fitted model add time, so total wall-clock time can exceed the fit budget. Higher effort does not guarantee a better result on every dataset. An explicit thinking_timeout_s can shorten the selected effort’s budget. Its maximum accepted value is 2,400 seconds; leave it unset to use an effort budget longer than 40 minutes. It does not set the client’s polling timeout. The default effort is "medium" when you set only thinking_mode=True.

thinking_metric

Choose a metric that matches how you evaluate predictions. Common choices:

Grouped and time-ordered rows

Requires tabpfn-client 0.6.0 or later.
Specifying group and time columns can improve predictions on data with related rows or a time sequence, such as repeat patient visits, customer transactions, or sensor readings over time. Use the parameters below to identify these relationships.

Code sample

Rules, checked by the client before any data is uploaded. A violation raises ValueError:
  • The columns work only with thinking mode.
  • X passed to fit and to predict must be a pandas DataFrame that holds every named column. Pass column names, not indices.
  • group_col and time_col cannot be combined.
  • group_time_col requires group_col.

Run asynchronous fits

Start a fit without keeping the Python process open:
submit_fit() returns once the server accepts the job. Call wait_for_fit() before predicting; a pending model raises NotFittedError. If fit() stops waiting because of a timeout or interruption, call wait_for_fit() to resume waiting for that fit. To save a long fit before it completes and wait for it in a later run, see Async jobs.

REST API

Submit a background fit with POST /tabpfn/submit_fit_job. Set thinking_config.effort to "micro", "mini", "low", "medium", "high", "xhigh" or "max". These use the same fit time budgets as the Python client; omitting the effort uses "medium". Use the structured request fields:
The response contains fitted_train_set_id. Pass that ID to POST /tabpfn/get_fit_status in a JSON body and poll until status is "completed" or "failed", waiting retry_in_secs between polls. Wait for completion before submitting a prediction. The synchronous POST /tabpfn/fit endpoint accepts the same structured fields, but can return a pending status for long fits. Use the background submission flow above to manage long fits explicitly. See the REST quickstart for authentication and uploads, and the API reference for request schemas.

Parameters

In structured REST requests, use thinking_config.effort, thinking_config.timeout_secs and thinking_config.metric. The flat thinking_effort_metric field belongs to the legacy request format.

Limits

TabPFN-3.5-Thinking supports up to 1 million training rows on the hosted API. Row, column and total-cell limits apply together; the largest row and column counts cannot necessarily be used together. See the model limits. Classification requires at least two target classes. Thinking fits and predictions use the same daily and monthly token budgets. Before fitting, the API reserves the maximum charge for the selected effort and any shorter explicit fit budget. The final fit charge reflects measured fit time, with a minimum charge and the reservation as an upper bound. Unused tokens are returned. Check estimate_cost() before a long fit; its Thinking fit estimate is an upper bound, not a prediction of the final charge. Reuse a fitted model to avoid using tokens for another fit. See API metering for token charges and budgets, and API rate limits for request limits.

TabPFN-3.5 changelog

Release notes and upgrade guidance for TabPFN-3.5.

API metering

Token charges, budgets, and usage tracking.

Classification

Binary and multi-class classification guide.

Regression

Point predictions and guidance on other regression outputs.