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

## `save_fitted_tabpfn_model`

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

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

| Parameter | Type | Default | Description |
| - | - | - | - |
| `estimator` | `BaseEstimator` | Required | — |
| `path` | `Path \| str` | Required | — |

**Returns**

| Type | Description |
| - | - |
| `None` | — |

***

## `load_fitted_tabpfn_model`

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

Load a fitted TabPFN estimator saved with [`save_fitted_tabpfn_model`](https://docs.priorlabs.ai/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] Type aliases
>
> ```python theme={null}
> DevicesSpecification = torch.device | str | Sequence[torch.device | str] | Literal["auto"]
> ```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `path` | `Path \| str` | Required | The `.tabpfn_fit` archive to load. |
| `device` | `DevicesSpecification` | `"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. |

**Returns**

| Type | Description |
| - | - |
| `BaseEstimator` | — |

***

## `ModelSpecs`

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

An in-memory model and the metadata needed by either TabPFN estimator.

Pass this object (or a list of objects) as `model_path`. The estimator
selects the task, so the same specs can back both tasks of a multitask model.
The model is used by reference, not copied; create an isolated evaluation
model before wrapping live training weights.

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

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `model` | `Architecture` | Required | The neural network used for inference. |
| `architecture_config` | `ArchitectureConfig` | Required | The configuration associated with the model. |
| `inference_config` | `InferenceConfig` | Required | Preprocessing and ensembling settings. |
| `norm_criterion` | `FullSupportBarDistribution \| None` | `None` | Optional regression distribution in normalized target space. When omitted, regression initialization constructs it from `model.regression_borders` (available from v3 onward). Required for older models without those borders, including v2/v2.5 finetuning; preserve the estimator's `znorm_space_bardist_` in that case. An explicit distribution takes precedence over embedded borders. Classification ignores this field. This is not the training objective or the fitted distribution in raw target units. |


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