Update README.md
Browse filesadd example to load the model
README.md
CHANGED
@@ -15,6 +15,18 @@ This is a fact-checking model from our work:
|
|
15 |
Multi-Hop Data**](https://arxiv.org/pdf/2501.17144) (NAACL2025, [GitHub Repo](https://github.com/derenlei/FactCG))
|
16 |
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
If you find the repository or FactCG helpful, please cite the following paper
|
19 |
```bibtex
|
20 |
@inproceedings{lei2025factcg,
|
|
|
15 |
Multi-Hop Data**](https://arxiv.org/pdf/2501.17144) (NAACL2025, [GitHub Repo](https://github.com/derenlei/FactCG))
|
16 |
|
17 |
|
18 |
+
You can load our model with the following example code:
|
19 |
+
|
20 |
+
```python
|
21 |
+
from transformers import AutoTokenizer, AutoConfig, AutoModelForSequenceClassification
|
22 |
+
config = AutoConfig.from_pretrained("yaxili96/FactCG-DeBERTa-v3-Large", num_labels=2, finetuning_task="text-classification", revision='main', token=None, cache_dir="./cache")
|
23 |
+
config.problem_type = "single_label_classification"
|
24 |
+
tokenizer = AutoTokenizer.from_pretrained("yaxili96/FactCG-DeBERTa-v3-Large", use_fast=True, revision='main', token=None, cache_dir="./cache")
|
25 |
+
model = AutoModelForSequenceClassification.from_pretrained(
|
26 |
+
"yaxili96/FactCG-DeBERTa-v3-Large", config=config, revision='main', token=None, ignore_mismatched_sizes=False, cache_dir="./cache")
|
27 |
+
```
|
28 |
+
|
29 |
+
|
30 |
If you find the repository or FactCG helpful, please cite the following paper
|
31 |
```bibtex
|
32 |
@inproceedings{lei2025factcg,
|