From afab583e884d8e07df686400123a74c3b430532f Mon Sep 17 00:00:00 2001 From: Philip Hartout Date: Wed, 25 Mar 2026 12:23:40 +0100 Subject: [PATCH] Document how to use TabPFN v2.5 weights with PGD --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index c808815..9bd5ffc 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,26 @@ print(pgd.compute(generated)) # {'pgd': ..., 'pgd_descriptor': ..., 'subscores': `pgd_descriptor` provides the best descriptor used to report the final score. +By default, PGD uses TabPFN v2 weights. To use TabPFN v2.5 weights instead, pass a custom classifier. The v2.5 weights are hosted on a gated Hugging Face repository ([Prior-Labs/tabpfn_2_5](https://huggingface.co/Prior-Labs/tabpfn_2_5)) and require authentication: + +```bash +pip install huggingface_hub +huggingface-cli login +``` + +Then: + +```python +from tabpfn import TabPFNClassifier +from polygraph.metrics import StandardPGD + +classifier = TabPFNClassifier.create_default_for_version( + "v2.5", device="auto", n_estimators=4 +) +pgd = StandardPGD(reference, classifier=classifier) +print(pgd.compute(generated)) +``` + #### Validity, uniqueness and novelty VUN values follow a similar interface: ```python