Skip to content

Commit fefbfec

Browse files
committed
Document how to use TabPFN v2.5 weights with PGD
1 parent 1b5026b commit fefbfec

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,26 @@ print(pgd.compute(generated)) # {'pgd': ..., 'pgd_descriptor': ..., 'subscores':
142142

143143
`pgd_descriptor` provides the best descriptor used to report the final score.
144144

145+
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:
146+
147+
```bash
148+
pip install huggingface_hub
149+
huggingface-cli login
150+
```
151+
152+
Then:
153+
154+
```python
155+
from tabpfn import TabPFNClassifier
156+
from polygraph.metrics import StandardPGD
157+
158+
classifier = TabPFNClassifier.create_default_for_version(
159+
"v2.5", device="auto", n_estimators=4
160+
)
161+
pgd = StandardPGD(reference, classifier=classifier)
162+
print(pgd.compute(generated))
163+
```
164+
145165
#### Validity, uniqueness and novelty
146166
VUN values follow a similar interface:
147167
```python

0 commit comments

Comments
 (0)