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

# Accessing Model Weights

> Set up local model downloads, notebook authentication, and offline access with the tabpfn package.

The local `tabpfn` package downloads model weights to your machine. TabPFN-3.5, including Fast, requires acceptance of the [model license](/models#tabpfn-model-license), as do TabPFN-3, 2.6, and 2.5.

## Local package

Start with the latest package:

```bash theme={null}
pip install --upgrade tabpfn
```

### Sign in and accept the license

Run the local example in the [quickstart](/quickstart). When weights need downloading, `tabpfn` checks your token and license acceptance. In an interactive terminal with a browser, it opens the Prior Labs login page so you can sign in and accept the license for your chosen model.

If the browser cannot return the token, paste your API key at the terminal prompt. Over SSH without a local browser, the package prints a login URL and waits for you to paste the key.

Successful authentication is cached locally for future downloads. When switching model families, accept the corresponding license if prompted.

### Notebooks, servers, and CI

Set up authentication before running the model:

1. Sign in to [Prior Labs](https://platform.priorlabs.ai/account/licenses) and accept your model's license under **Licenses**.
2. Create or copy an [API key](https://platform.priorlabs.ai/account/api-keys) from the same account.
3. Set `TABPFN_TOKEN` in the environment where Python runs:

<CodeGroup>
  ```bash Shell theme={null}
  export TABPFN_TOKEN="<your-api-key>"
  export TABPFN_NO_BROWSER=1
  ```

  ```python Notebook theme={null}
  import os
  from getpass import getpass

  os.environ["TABPFN_TOKEN"] = getpass("Prior Labs API key: ")
  os.environ["TABPFN_NO_BROWSER"] = "1"
  ```
</CodeGroup>

`TABPFN_NO_BROWSER=1` disables interactive login. Your account still needs to have accepted the license before weights can be downloaded.

### Google Colab

Complete the license and API-key steps above. In Colab, add a secret named `TABPFN_TOKEN` and enable **Notebook access**. Then load it before running the model:

```python theme={null}
import os
from google.colab import userdata

os.environ["TABPFN_TOKEN"] = userdata.get("TABPFN_TOKEN")
os.environ["TABPFN_NO_BROWSER"] = "1"
```

### Offline use

On a machine with internet access, complete the setup above and run each model you plan to use. The `tabpfn` package downloads and caches the required weights automatically.

Locate the model cache directory:

```python theme={null}
from tabpfn.model_loading import get_cache_dir

print(get_cache_dir())
```

Copy that directory to the offline machine and install the same `tabpfn` version and dependencies. Set the cache location before importing `tabpfn`:

```bash theme={null}
export TABPFN_MODEL_CACHE_DIR="/path/to/tabpfn-weights"
```

The directory must contain the required weights under their original filenames. A cache path alone does not prevent downloads: the package attempts to download missing weights.

Continue with the [quickstart](/quickstart) to run predictions, or [select a model version](/models/selecting-model-version).
