Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ TabPFN uses Pydantic settings for configuration, supporting environment variable
- `TABPFN_ALLOW_CPU_LARGE_DATASET`: Allow running TabPFN on CPU above the per-model sample limit (5000 for the default TabPFN-3, 1000 for older versions). Set to `true` to override the CPU limitation. Note: large datasets can still be slow on CPU!
- `TABPFN_MPS_MEMORY_FRACTION`: Fraction of recommended max MPS memory to allow on Apple Silicon (default: `0.7`). Used to prevent macOS system crashes; set before importing TabPFN. Values above `1.0` are not recommended.
- `TABPFN_MAX_BATCHED_TEST_ROWS`: Maximum number of test rows fed through the model in a single forward pass during cached (`fit_mode="fit_with_cache"`) inference (default: `32768`). Larger test sets are split into independent chunks of at most this size and concatenated, bounding peak memory. Test rows are conditionally independent given the KV cache, so chunking is mathematically equivalent — results may still differ slightly due to floating-point non-associativity (see [#800](https://github.com/PriorLabs/TabPFN/issues/800#issuecomment-4903444425)). Performance should be close to optimal at the default of `32768`: the hardware is already saturated at that chunk size and, since the computations are independent, larger chunks bring no speedup. Set to `0` to disable chunking.
- `TABPFN_MODEL_CACHE_SIZE`: Size of an opt-in in-memory LRU cache of *built* models — the architecture plus loaded weights, keyed by checkpoint (default: `0`, disabled). Set to a positive integer to reuse the constructed model across repeated loads of the same checkpoint instead of rebuilding it every time — useful for repeated sequential fit/predict such as cross-validation, per-group models, or servers. Only the non-mutating build is cached.
- `TABPFN_EXCLUDE_DEVICES`: Comma-separated list of device types (e.g. `cuda`, `mps`) to skip during automatic device selection (`device="auto"`). Use it to fall back to CPU or avoid a specific accelerator without hard-coding a `device` argument.

**PyTorch Settings:**
- `PYTORCH_CUDA_ALLOC_CONF`: PyTorch CUDA memory allocation configuration to optimize GPU memory usage (default: `max_split_size_mb:512`). See [PyTorch CUDA documentation](https://docs.pytorch.org/docs/stable/notes/cuda.html#optimizing-memory-usage-with-pytorch-cuda-alloc-conf) for more information.
Expand Down
Loading