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

# Persistence and devices

> Save a fitted classifier, light wrapper around save_fitted_tabpfn_model.

<Info>
  Looking for usage documentation? Check out [Classification](/capabilities/classification).
</Info>

<div className="python-reference-heading">
  <h2 id="save-fit-state">
    `TabPFNClassifier.save_fit_state`
  </h2>

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

Save a fitted classifier, light wrapper around [`save_fitted_tabpfn_model`](/api-reference/python/tabpfn/model-persistence#save-fitted-tabpfn-model).

```python theme={null}
TabPFNClassifier.save_fit_state(
    path: Path | str,
) -> None
```

**Parameters**

<div className="python-reference-table">
  | Parameter | Type | Default | Description |
  | - | - | - | - |
  | <span id="save-fit-state--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-from-fit-state">
    `TabPFNClassifier.load_from_fit_state`
  </h2>

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

Restore a fitted clf, light wrapper around [`load_fitted_tabpfn_model`](/api-reference/python/tabpfn/model-persistence#load-fitted-tabpfn-model).

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

<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-from-fit-state--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 | — |
  | <span id="load-from-fit-state--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"` | — |
</div>

**Returns**

<div className="python-reference-table python-reference-returns">
  | Type | Description |
  | - | - |
  | <code className="python-reference-type"><a href="/api-reference/python/tabpfn/classifier/configuration#constructor">Tab<wbr />PFN<wbr />Classifier</a></code> | — |
</div>

***

<div className="python-reference-heading">
  <h2 id="to">
    `TabPFNClassifier.to`
  </h2>

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

Move the estimator to the given device(s).

If "auto": devices are selected based on availability in the
following order of priority: all available CUDA GPUs, "mps", "cpu".

To manually select a single device: specify a PyTorch device string e.g.
"cuda:1". See PyTorch's documentation for information about supported
devices.

To use several GPUs: specify a list of PyTorch GPU device strings, e.g.
\["cuda:0", "cuda:1"]. This can dramatically speed up inference for
larger datasets, by executing the estimators in parallel on the GPUs.
Multiple GPUs are only used when `fit_mode="fit_preprocessors"` or
`fit_mode="low_memory"`. In other cases, only the first GPU is used.

```python theme={null}
TabPFNClassifier.to(
    device: DevicesSpecification,
) -> None
```

<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="to--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> | Required | — |
</div>

**Note**

The specified device is only used once the model is initialized. This occurs
during the first .fit() call.

**Returns**

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


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