When callingDocumentation Index
Fetch the complete documentation index at: https://docs.priorlabs.ai/llms.txt
Use this file to discover all available pages before exploring further.
.predict() (or .predict_proba() for classifiers) on a TabPFNClassifier or TabPFNRegressor, you may see:
Large training set
UseSUBSAMPLE_SAMPLES to draw a balanced subset of training rows for each estimator. As a starting point, set SUBSAMPLE_SAMPLES=50_000 and increase n_estimators so that n_estimators × SUBSAMPLE_SAMPLES covers your full training set; samples beyond this product may not be seen by any estimator. Lower SUBSAMPLE_SAMPLES if you still encounter OOM errors.
Large test set
Batch your test set to avoid loading too many test rows into memory at once. Start withCHUNK_SIZE = 1000 and increase if memory allows.
By default, the transformer re-encodes the training context on every
.predict() call. Batching reduces peak memory usage but increases total prediction time. Setting fit_mode="fit_with_cache" additionally caches the transformer KV-cache after .fit(), skipping this re-encoding on subsequent .predict() calls.Large training set and test set
Combine both approaches: subsample the training context and batch the test set.Reduce memory footprint
If the above doesn’t resolve the error, try enablingmemory_saving_mode. This trades compute for lower peak memory usage:
Hardware and Memory requirements
The table below shows rough VRAM estimates for TabPFN v3 default settings (1 estimator, 200 features, 1000 test rows, no subsampling; these are not default settings) on a basic T4 GPU. Actual usage scales with the number of features, training rows, and test rows.| Training rows | Test rows | Approximate VRAM |
|---|---|---|
| 1,000 | 1,000 | ~2 GB |
| 5,000 | 1,000 | ~2 GB |
| 10,000 | 1,000 | ~2 GB |
| 50,000 | 1,000 | ~2.5 GB |
| 100,000 | 1,000 | ~3 GB |
| 200,000 | 1,000 | ~4 GB |
| 500,000 | 1,000 | ~10 GB |
Best Practices
Hardware recommendations, batch inference patterns, and fit/predict trade-off tuning.
Fast Inference
Distill TabPFN into a compact MLP or tree ensemble for low-memory production deployments.
FAQ
Common questions about GPU requirements, speed, and API rate limits.