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

<div className="python-reference-heading">
  <h2 id="tuningconfig">
    `TuningConfig`
  </h2>

  <a className="python-reference-source" href="https://github.com/PriorLabs/TabPFN/blob/c70b6ef0488858d32244c52222abfc0c5be207d6/src/tabpfn/inference_tuning.py#L40" aria-label="View source for TuningConfig"><span aria-hidden="true">\</></span> View source <span aria-hidden="true">↗</span></a>
</div>

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**

<div className="python-reference-table">
  | Name | Type | Default | Description |
  | - | - | - | - |
  | <span id="tuningconfig--calibrate-temperature" /><code className="python-reference-parameter">calibrate\_<wbr />temperature</code> | <code className="python-reference-type">bool</code> | `False` | Whether to calibrate the softmax temperature. Set to `True` to enable. |
  | <span id="tuningconfig--tuning-holdout-frac" /><code className="python-reference-parameter">tuning\_<wbr />holdout\_<wbr />frac</code> | <code className="python-reference-type">Literal\["auto"] \| float</code> | `"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. |
  | <span id="tuningconfig--tuning-n-folds" /><code className="python-reference-parameter">tuning\_<wbr />n\_<wbr />folds</code> | <code className="python-reference-type">Literal\["auto"] \| int</code> | `"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. |
</div>

***

<div className="python-reference-heading">
  <h2 id="tuningconfig-resolve">
    `TuningConfig.resolve`
  </h2>

  <a className="python-reference-source" href="https://github.com/PriorLabs/TabPFN/blob/c70b6ef0488858d32244c52222abfc0c5be207d6/src/tabpfn/inference_tuning.py#L57" aria-label="View source for TuningConfig.resolve"><span aria-hidden="true">\</></span> View source <span aria-hidden="true">↗</span></a>
</div>

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

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

**Parameters**

<div className="python-reference-table">
  | Parameter | Type | Default | Description |
  | - | - | - | - |
  | <span id="tuningconfig-resolve--num-samples" /><code className="python-reference-parameter">num\_<wbr />samples</code> | <code className="python-reference-type">int</code> | Required | The number of samples in the training data. |
</div>

**Returns**

<div className="python-reference-table python-reference-returns">
  | Type | Description |
  | - | - |
  | <code className="python-reference-type"><a href="/api-reference/python/tabpfn/inference-tuning#tuningconfig">Self</a></code> | A new [`TuningConfig`](/api-reference/python/tabpfn/inference-tuning#tuningconfig) instance with resolved values. |
</div>

***

<div className="python-reference-heading">
  <h2 id="classifiertuningconfig">
    `ClassifierTuningConfig`
  </h2>

  <a className="python-reference-source" href="https://github.com/PriorLabs/TabPFN/blob/c70b6ef0488858d32244c52222abfc0c5be207d6/src/tabpfn/inference_tuning.py#L83" aria-label="View source for ClassifierTuningConfig"><span aria-hidden="true">\</></span> View source <span aria-hidden="true">↗</span></a>
</div>

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**

<div className="python-reference-table">
  | Name | Type | Default | Description |
  | - | - | - | - |
  | <span id="classifiertuningconfig--calibrate-temperature" /><code className="python-reference-parameter">calibrate\_<wbr />temperature</code> | <code className="python-reference-type">bool</code> | `False` | Whether to calibrate the softmax temperature. Set to `True` to enable. |
  | <span id="classifiertuningconfig--tuning-holdout-frac" /><code className="python-reference-parameter">tuning\_<wbr />holdout\_<wbr />frac</code> | <code className="python-reference-type">Literal\["auto"] \| float</code> | `"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. |
  | <span id="classifiertuningconfig--tuning-n-folds" /><code className="python-reference-parameter">tuning\_<wbr />n\_<wbr />folds</code> | <code className="python-reference-type">Literal\["auto"] \| int</code> | `"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. |
  | <span id="classifiertuningconfig--tune-decision-thresholds" /><code className="python-reference-parameter">tune\_<wbr />decision\_<wbr />thresholds</code> | <code className="python-reference-type">bool</code> | `False` | Whether to tune decision thresholds for the specified `eval_metric`. Set to `True` to enable. |
</div>

***

<div className="python-reference-heading">
  <h2 id="classifiertuningconfig-resolve">
    `ClassifierTuningConfig.resolve`
  </h2>

  <a className="python-reference-source" href="https://github.com/PriorLabs/TabPFN/blob/c70b6ef0488858d32244c52222abfc0c5be207d6/src/tabpfn/inference_tuning.py#L57" aria-label="View source for ClassifierTuningConfig.resolve"><span aria-hidden="true">\</></span> View source <span aria-hidden="true">↗</span></a>
</div>

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

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

**Parameters**

<div className="python-reference-table">
  | Parameter | Type | Default | Description |
  | - | - | - | - |
  | <span id="classifiertuningconfig-resolve--num-samples" /><code className="python-reference-parameter">num\_<wbr />samples</code> | <code className="python-reference-type">int</code> | Required | The number of samples in the training data. |
</div>

**Returns**

<div className="python-reference-table python-reference-returns">
  | Type | Description |
  | - | - |
  | <code className="python-reference-type"><a href="/api-reference/python/tabpfn/inference-tuning#classifiertuningconfig">Self</a></code> | A new [`TuningConfig`](/api-reference/python/tabpfn/inference-tuning#tuningconfig) instance with resolved values. |
</div>

***

<div className="python-reference-heading">
  <h2 id="regressortuningconfig">
    `RegressorTuningConfig`
  </h2>

  <a className="python-reference-source" href="https://github.com/PriorLabs/TabPFN/blob/c70b6ef0488858d32244c52222abfc0c5be207d6/src/tabpfn/inference_tuning.py#L94" aria-label="View source for RegressorTuningConfig"><span aria-hidden="true">\</></span> View source <span aria-hidden="true">↗</span></a>
</div>

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

This currently adds no fields beyond the ones inherited from
\[[`TuningConfig`](/api-reference/python/tabpfn/inference-tuning#tuningconfig)]\[[`tabpfn.inference_tuning.TuningConfig`](/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**

<div className="python-reference-table">
  | Name | Type | Default | Description |
  | - | - | - | - |
  | <span id="regressortuningconfig--calibrate-temperature" /><code className="python-reference-parameter">calibrate\_<wbr />temperature</code> | <code className="python-reference-type">bool</code> | `False` | Whether to calibrate the softmax temperature. Set to `True` to enable. |
  | <span id="regressortuningconfig--tuning-holdout-frac" /><code className="python-reference-parameter">tuning\_<wbr />holdout\_<wbr />frac</code> | <code className="python-reference-type">Literal\["auto"] \| float</code> | `"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. |
  | <span id="regressortuningconfig--tuning-n-folds" /><code className="python-reference-parameter">tuning\_<wbr />n\_<wbr />folds</code> | <code className="python-reference-type">Literal\["auto"] \| int</code> | `"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. |
</div>

***

<div className="python-reference-heading">
  <h2 id="regressortuningconfig-resolve">
    `RegressorTuningConfig.resolve`
  </h2>

  <a className="python-reference-source" href="https://github.com/PriorLabs/TabPFN/blob/c70b6ef0488858d32244c52222abfc0c5be207d6/src/tabpfn/inference_tuning.py#L57" aria-label="View source for RegressorTuningConfig.resolve"><span aria-hidden="true">\</></span> View source <span aria-hidden="true">↗</span></a>
</div>

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

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

**Parameters**

<div className="python-reference-table">
  | Parameter | Type | Default | Description |
  | - | - | - | - |
  | <span id="regressortuningconfig-resolve--num-samples" /><code className="python-reference-parameter">num\_<wbr />samples</code> | <code className="python-reference-type">int</code> | Required | The number of samples in the training data. |
</div>

**Returns**

<div className="python-reference-table python-reference-returns">
  | Type | Description |
  | - | - |
  | <code className="python-reference-type"><a href="/api-reference/python/tabpfn/inference-tuning#regressortuningconfig">Self</a></code> | A new [`TuningConfig`](/api-reference/python/tabpfn/inference-tuning#tuningconfig) instance with resolved values. |
</div>

***

<div className="python-reference-heading">
  <h2 id="classifierevalmetrics">
    `ClassifierEvalMetrics`
  </h2>

  <a className="python-reference-source" href="https://github.com/PriorLabs/TabPFN/blob/c70b6ef0488858d32244c52222abfc0c5be207d6/src/tabpfn/inference_tuning.py#L106" aria-label="View source for ClassifierEvalMetrics"><span aria-hidden="true">\</></span> View source <span aria-hidden="true">↗</span></a>
</div>

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

**Fields**

<div className="python-reference-table">
  | Name | Type | Default | Description |
  | - | - | - | - |
  | <span id="classifierevalmetrics--f1" /><code className="python-reference-parameter">F1</code> | — | `"f1"` | — |
  | <span id="classifierevalmetrics--accuracy" /><code className="python-reference-parameter">ACCURACY</code> | — | `"accuracy"` | — |
  | <span id="classifierevalmetrics--balanced-accuracy" /><code className="python-reference-parameter">BALANCED\_<wbr />ACCURACY</code> | — | `"balanced_accuracy"` | — |
  | <span id="classifierevalmetrics--roc-auc" /><code className="python-reference-parameter">ROC\_<wbr />AUC</code> | — | `"roc_auc"` | — |
  | <span id="classifierevalmetrics--log-loss" /><code className="python-reference-parameter">LOG\_<wbr />LOSS</code> | — | `"log_loss"` | — |
</div>

***

<div className="python-reference-heading">
  <h2 id="regressorevalmetrics">
    `RegressorEvalMetrics`
  </h2>

  <a className="python-reference-source" href="https://github.com/PriorLabs/TabPFN/blob/c70b6ef0488858d32244c52222abfc0c5be207d6/src/tabpfn/inference_tuning.py#L116" aria-label="View source for RegressorEvalMetrics"><span aria-hidden="true">\</></span> View source <span aria-hidden="true">↗</span></a>
</div>

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

**Fields**

<div className="python-reference-table">
  | Name | Type | Default | Description |
  | - | - | - | - |
  | <span id="regressorevalmetrics--nll" /><code className="python-reference-parameter">NLL</code> | — | `"nll"` | Negative log-likelihood of the targets under the predicted bar distribution, evaluated in the raw target space. |
  | <span id="regressorevalmetrics--crps" /><code className="python-reference-parameter">CRPS</code> | — | `"crps"` | Continuous ranked probability score of the targets under the predicted bar distribution, evaluated in the raw target space. |
</div>


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