> ## 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.

# Inference tuning

> Configuration for tuning the model during fit/predict calls.

## `TuningConfig`

[ View source ](https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/inference_tuning.py#L38)

Configuration for tuning the model during fit/predict calls.

```python theme={null}
TuningConfig(
    calibrate_temperature: bool = False,
    tuning_holdout_frac: Literal["auto"] | float = "auto",
    tuning_n_folds: Literal["auto"] | int = "auto",
)
```

**Fields**

| Name | Type | Default | Description |
| - | - | - | - |
| `calibrate_temperature` | `bool` | `False` | Whether to calibrate the softmax temperature. Set to `True` to enable. |
| `tuning_holdout_frac` | `Literal["auto"] \| float` | `"auto"` | The percentage of the data to hold out for tuning per split. If "auto", a value is automatically chosen based on the dataset size, trading off between computational cost and accuracy. |
| `tuning_n_folds` | `Literal["auto"] \| int` | `"auto"` | The number of cross-validation folds to use for tuning. If "auto", a value is automatically chosen based on the dataset size, trading off between computational cost and accuracy. |

***

## `TuningConfig.resolve`

[ View source ](https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/inference_tuning.py#L55)

Resolves 'auto' values based on the number of samples.

```python theme={null}
TuningConfig.resolve(
    num_samples: int,
) -> Self
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `num_samples` | `int` | Required | The number of samples in the training data. |

**Returns**

| Type | Description |
| - | - |
| `Self` | A new [`TuningConfig`](https://docs.priorlabs.ai/api-reference/python/tabpfn/inference-tuning#tuningconfig) instance with resolved values. |

***

## `ClassifierTuningConfig`

[ View source ](https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/inference_tuning.py#L81)

Configuration for tuning the model during fit/predict calls
for classification tasks.

```python theme={null}
ClassifierTuningConfig(
    calibrate_temperature: bool = False,
    tuning_holdout_frac: Literal["auto"] | float = "auto",
    tuning_n_folds: Literal["auto"] | int = "auto",
    tune_decision_thresholds: bool = False,
)
```

**Fields**

| Name | Type | Default | Description |
| - | - | - | - |
| `calibrate_temperature` | `bool` | `False` | Whether to calibrate the softmax temperature. Set to `True` to enable. |
| `tuning_holdout_frac` | `Literal["auto"] \| float` | `"auto"` | The percentage of the data to hold out for tuning per split. If "auto", a value is automatically chosen based on the dataset size, trading off between computational cost and accuracy. |
| `tuning_n_folds` | `Literal["auto"] \| int` | `"auto"` | The number of cross-validation folds to use for tuning. If "auto", a value is automatically chosen based on the dataset size, trading off between computational cost and accuracy. |
| `tune_decision_thresholds` | `bool` | `False` | Whether to tune decision thresholds for the specified `eval_metric`. Set to `True` to enable. |

***

## `ClassifierTuningConfig.resolve`

[ View source ](https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/inference_tuning.py#L55)

Resolves 'auto' values based on the number of samples.

```python theme={null}
ClassifierTuningConfig.resolve(
    num_samples: int,
) -> Self
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `num_samples` | `int` | Required | The number of samples in the training data. |

**Returns**

| Type | Description |
| - | - |
| `Self` | A new [`TuningConfig`](https://docs.priorlabs.ai/api-reference/python/tabpfn/inference-tuning#tuningconfig) instance with resolved values. |

***

## `RegressorTuningConfig`

[ View source ](https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/inference_tuning.py#L92)

Configuration for tuning the model during fit/predict calls
for regression tasks.

This currently adds no fields beyond the ones inherited from
\[[`TuningConfig`](https://docs.priorlabs.ai/api-reference/python/tabpfn/inference-tuning#tuningconfig)]\[[`tabpfn.inference_tuning.TuningConfig`](https://docs.priorlabs.ai/api-reference/python/tabpfn/inference-tuning#tuningconfig)]. It exists so that the
task type can be recovered from the configuration alone, and so that
regression-only tuning options have a place to live as they are added.

```python theme={null}
RegressorTuningConfig(
    calibrate_temperature: bool = False,
    tuning_holdout_frac: Literal["auto"] | float = "auto",
    tuning_n_folds: Literal["auto"] | int = "auto",
)
```

**Fields**

| Name | Type | Default | Description |
| - | - | - | - |
| `calibrate_temperature` | `bool` | `False` | Whether to calibrate the softmax temperature. Set to `True` to enable. |
| `tuning_holdout_frac` | `Literal["auto"] \| float` | `"auto"` | The percentage of the data to hold out for tuning per split. If "auto", a value is automatically chosen based on the dataset size, trading off between computational cost and accuracy. |
| `tuning_n_folds` | `Literal["auto"] \| int` | `"auto"` | The number of cross-validation folds to use for tuning. If "auto", a value is automatically chosen based on the dataset size, trading off between computational cost and accuracy. |

***

## `RegressorTuningConfig.resolve`

[ View source ](https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/inference_tuning.py#L55)

Resolves 'auto' values based on the number of samples.

```python theme={null}
RegressorTuningConfig.resolve(
    num_samples: int,
) -> Self
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `num_samples` | `int` | Required | The number of samples in the training data. |

**Returns**

| Type | Description |
| - | - |
| `Self` | A new [`TuningConfig`](https://docs.priorlabs.ai/api-reference/python/tabpfn/inference-tuning#tuningconfig) instance with resolved values. |

***

## `ClassifierEvalMetrics`

[ View source ](https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/inference_tuning.py#L104)

Metric by which predictions will be ultimately evaluated on test data.

**Fields**

| Name | Type | Default | Description |
| - | - | - | - |
| `F1` | — | `"f1"` | — |
| `ACCURACY` | — | `"accuracy"` | — |
| `BALANCED_ACCURACY` | — | `"balanced_accuracy"` | — |
| `ROC_AUC` | — | `"roc_auc"` | — |
| `LOG_LOSS` | — | `"log_loss"` | — |

***

## `RegressorEvalMetrics`

[ View source ](https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/inference_tuning.py#L114)

Metric by which predictions will be ultimately evaluated on test data.

**Fields**

| Name | Type | Default | Description |
| - | - | - | - |
| `NLL` | — | `"nll"` | Negative log-likelihood of the targets under the predicted bar distribution, evaluated in the raw target space. |
| `CRPS` | — | `"crps"` | Continuous ranked probability score of the targets under the predicted bar distribution, evaluated in the raw target space. |


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