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

# Model persistence

> Persist a fitted TabPFN estimator to ``path``.

<div className="python-reference-heading">
  <h2 id="save-fitted-tabpfn-model">
    `save_fitted_tabpfn_model`
  </h2>

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

Persist a fitted TabPFN estimator to `path`.

This stores the initialization parameters and the fitted state, but crucially
omits the large foundation model weights for efficiency.

```python theme={null}
save_fitted_tabpfn_model(
    estimator: BaseEstimator,
    path: Path | str,
) -> None
```

**Parameters**

<div className="python-reference-table">
  | Parameter | Type | Default | Description |
  | - | - | - | - |
  | <span id="save-fitted-tabpfn-model--estimator" /><code className="python-reference-parameter">estimator</code> | <code className="python-reference-type">Base<wbr />Estimator</code> | Required | — |
  | <span id="save-fitted-tabpfn-model--path" /><code className="python-reference-parameter">path</code> | <code className="python-reference-type"><a href="https://docs.python.org/3/library/pathlib.html#pathlib.Path">Path</a> \| str</code> | Required | — |
</div>

**Returns**

<div className="python-reference-table python-reference-returns">
  | Type | Description |
  | - | - |
  | <code className="python-reference-type">None</code> | — |
</div>

***

<div className="python-reference-heading">
  <h2 id="load-fitted-tabpfn-model">
    `load_fitted_tabpfn_model`
  </h2>

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

Load a fitted TabPFN estimator saved with [`save_fitted_tabpfn_model`](/api-reference/python/tabpfn/model-persistence#save-fitted-tabpfn-model).

```python theme={null}
load_fitted_tabpfn_model(
    path: Path | str,
    *,
    device: DevicesSpecification = "auto",
) -> BaseEstimator
```

<Accordion title="Type aliases">
  ```python theme={null}
  DevicesSpecification = torch.device | str | Sequence[torch.device | str] | Literal["auto"]
  ```
</Accordion>

**Parameters**

<div className="python-reference-table">
  | Parameter | Type | Default | Description |
  | - | - | - | - |
  | <span id="load-fitted-tabpfn-model--path" /><code className="python-reference-parameter">path</code> | <code className="python-reference-type"><a href="https://docs.python.org/3/library/pathlib.html#pathlib.Path">Path</a> \| str</code> | Required | The `.tabpfn_fit` archive to load. |
  | <span id="load-fitted-tabpfn-model--device" /><code className="python-reference-parameter">device</code> | <code className="python-reference-type"><a href="https://github.com/PriorLabs/TabPFN/blob/c70b6ef0488858d32244c52222abfc0c5be207d6/src/tabpfn/utils.py#L101">Devices<wbr />Specification</a></code> | `"auto"` | The device(s) to load onto. The archive does not record where the model was fitted, so the default resolves by availability like the constructors' does; pass a device to pin it. |
</div>

**Returns**

<div className="python-reference-table python-reference-returns">
  | Type | Description |
  | - | - |
  | <code className="python-reference-type">Base<wbr />Estimator</code> | — |
</div>

***

<div className="python-reference-heading">
  <h2 id="classifiermodelspecs">
    `ClassifierModelSpecs`
  </h2>

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

Model specs for classifiers.

```python theme={null}
ClassifierModelSpecs(
    model: Architecture,
    architecture_config: ArchitectureConfig,
    inference_config: InferenceConfig,
)
```

**Fields**

<div className="python-reference-table">
  | Name | Type | Default | Description |
  | - | - | - | - |
  | <span id="classifiermodelspecs--model" /><code className="python-reference-parameter">model</code> | — | [`model`](/api-reference/python/tabpfn/model-persistence#classifiermodelspecs--model) | — |
  | <span id="classifiermodelspecs--architecture-config" /><code className="python-reference-parameter">architecture\_<wbr />config</code> | — | [`architecture_config`](/api-reference/python/tabpfn/model-persistence#classifiermodelspecs--architecture-config) | — |
  | <span id="classifiermodelspecs--inference-config" /><code className="python-reference-parameter">inference\_<wbr />config</code> | — | [`inference_config`](/api-reference/python/tabpfn/model-persistence#classifiermodelspecs--inference-config) | — |
  | <span id="classifiermodelspecs--norm-criterion" /><code className="python-reference-parameter">norm\_<wbr />criterion</code> | — | `None` | — |
</div>

***

<div className="python-reference-heading">
  <h2 id="regressormodelspecs">
    `RegressorModelSpecs`
  </h2>

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

Model specs for regressors.

```python theme={null}
RegressorModelSpecs(
    model: Architecture,
    architecture_config: ArchitectureConfig,
    inference_config: InferenceConfig,
    norm_criterion: FullSupportBarDistribution,
)
```

**Fields**

<div className="python-reference-table">
  | Name | Type | Default | Description |
  | - | - | - | - |
  | <span id="regressormodelspecs--model" /><code className="python-reference-parameter">model</code> | — | [`model`](/api-reference/python/tabpfn/model-persistence#regressormodelspecs--model) | — |
  | <span id="regressormodelspecs--architecture-config" /><code className="python-reference-parameter">architecture\_<wbr />config</code> | — | [`architecture_config`](/api-reference/python/tabpfn/model-persistence#regressormodelspecs--architecture-config) | — |
  | <span id="regressormodelspecs--inference-config" /><code className="python-reference-parameter">inference\_<wbr />config</code> | — | [`inference_config`](/api-reference/python/tabpfn/model-persistence#regressormodelspecs--inference-config) | — |
  | <span id="regressormodelspecs--norm-criterion" /><code className="python-reference-parameter">norm\_<wbr />criterion</code> | — | [`norm_criterion`](/api-reference/python/tabpfn/model-persistence#regressormodelspecs--norm-criterion) | — |
</div>


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