> ## Documentation Index
> Fetch the complete documentation index at: https://docs.priorlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> TabPFN-3 and later versions support up to 1,000,000 rows, subject to feature count and checkpoint/API limits.
> For large datasets, use per-estimator subsampling, e.g. inference_config={"SUBSAMPLE_SAMPLES": 100_000}, in TabPFNClassifier or TabPFNRegressor from tabpfn or tabpfn_client.
> Pass raw pandas DataFrames to fit and predict. Categorical strings/categories, raw text, and missing feature values are handled automatically; no manual integer/one-hot encoding, imputation, scaling, or outlier removal is needed.

# Improving Performance

> Practical strategies to improve TabPFN performance beyond the default configuration.

TabPFN works well out of the box and handles many tasks natively that traditional ML pipelines require. Feed in data as raw as possible: TabPFN handles numerical, categorical, text, and datetime columns, missing values, and mixed scales without a preprocessing pipeline, and additional processing often hurts.

Avoid scaling with `StandardScaler` or `MinMaxScaler`, imputing missing values, one-hot encoding categoricals, vectorizing text by hand, or extracting calendar features from datetime columns yourself.

## Escalation path

When the default TabPFN does not meet your needs, try these approaches in roughly this order:

**1. Check column types**

Declare categorical columns, especially integer-coded ones, through `categorical_features_indices` or pandas `category` dtype. Keep datetime columns as datetime dtype and free text as pandas `string` dtype. For grouped data, include the group identifier as a categorical column. Column typing is the cheapest change and often the largest gain. See [Preprocessing](https://docs.priorlabs.ai/improving-performance/preprocessing.md#categorical-features).

**2. Feature engineering**

Add domain features TabPFN cannot derive from raw columns: ratios, interactions, group aggregations, and external signals. See [Feature Engineering](https://docs.priorlabs.ai/improving-performance/feature-engineering.md).

**3. Row subsampling**

On tables above the row limit, or with one dominant class or target value, control which rows each estimator sees with `SUBSAMPLE_SAMPLES` and `SAMPLE_SUBSAMPLING_METHOD`. See [Row subsampling](https://docs.priorlabs.ai/improving-performance/preprocessing.md#row-subsampling).

**4. Metric tuning**

Use `eval_metric` and `tuning_config` to optimize for your specific evaluation metric, and check calibration on skewed targets. See [Model Parameters](https://docs.priorlabs.ai/improving-performance/model-parameters.md).

**5. Feature selection**

Beyond several thousand columns, or with many noisy features, try filtering to the most informative ones. See [Feature Selection](https://docs.priorlabs.ai/improving-performance/feature-selection.md).

**6. Preprocessing transforms**

Experiment with different `PREPROCESS_TRANSFORMS` and target transforms. The [preprocessing guide](https://docs.priorlabs.ai/improving-performance/preprocessing.md) explains what each estimator does and provides a [practical tuning order](https://docs.priorlabs.ai/improving-performance/preprocessing.md#a-practical-tuning-order).

**7. Thinking mode and fine-tuning**

On the API, [Thinking mode](https://docs.priorlabs.ai/capabilities/thinking-mode.md) spends more compute at fit time and is the strongest option for grouped and time-ordered data. Locally, [fine-tune](https://docs.priorlabs.ai/capabilities/fine-tuning.md) the pretrained model when you have a specialized domain or distribution shift.

## Guides

> [card] [Feature Engineering](https://docs.priorlabs.ai/improving-performance/feature-engineering.md)
>
> Encode domain knowledge into features that TabPFN cannot learn from raw columns alone.

> [card] [Feature Selection](https://docs.priorlabs.ai/improving-performance/feature-selection.md)
>
> When to reduce feature count on very wide tables, and how TabPFN covers features itself.

> [card] [Preprocessing](https://docs.priorlabs.ai/improving-performance/preprocessing.md)
>
> Configure column typing, text and date handling, row subsampling, and per-estimator transforms.

> [card] [Model Parameters](https://docs.priorlabs.ai/improving-performance/model-parameters.md)
>
> Tune softmax temperature, metric optimization, estimator count, and class imbalance handling.

## Related

> [card] [Thinking mode](https://docs.priorlabs.ai/capabilities/thinking-mode.md)
>
> Inference-time compute scaling on the API.

> [card] [Fine-tuning](https://docs.priorlabs.ai/capabilities/fine-tuning.md)
>
> Adapt TabPFN's pretrained weights to your domain.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.