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.- Classification
- Regression
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: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:RefitRequiredErrorcan be raised bypredict(),submit_predict()orwait_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.FittedModelNotFoundErrormeans 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, useModelVersion.V3_5 for TabPFN-3.5-Thinking or ModelVersion.V3 for TabPFN-3-Thinking:
- TabPFN-3.5-Thinking (default)
- 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.Code sample
ValueError:
- The columns work only with thinking mode.
Xpassed tofitand topredictmust be a pandas DataFrame that holds every named column. Pass column names, not indices.group_colandtime_colcannot be combined.group_time_colrequiresgroup_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 withPOST /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:
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. Checkestimate_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.