Commit
·
6550fee
1
Parent(s):
84109e1
Update README.md
Browse files
README.md
CHANGED
|
@@ -283,6 +283,7 @@ For highest performance (but less speed), I recommend using https://huggingface.
|
|
| 283 |
### How to use the model
|
| 284 |
#### Simple zero-shot classification pipeline
|
| 285 |
```python
|
|
|
|
| 286 |
from transformers import pipeline
|
| 287 |
classifier = pipeline("zero-shot-classification", model="MoritzLaurer/DeBERTa-v3-base-mnli-fever-anli")
|
| 288 |
sequence_to_classify = "Angela Merkel is a politician in Germany and leader of the CDU"
|
|
@@ -344,6 +345,8 @@ If you have questions or ideas for cooperation, contact me at m{dot}laurer{at}vu
|
|
| 344 |
|
| 345 |
### Debugging and issues
|
| 346 |
Note that DeBERTa-v3 was released on 06.12.21 and older versions of HF Transformers seem to have issues running the model (e.g. resulting in an issue with the tokenizer). Using Transformers>=4.13 might solve some issues.
|
|
|
|
|
|
|
| 347 |
|
| 348 |
## Model Recycling
|
| 349 |
|
|
|
|
| 283 |
### How to use the model
|
| 284 |
#### Simple zero-shot classification pipeline
|
| 285 |
```python
|
| 286 |
+
#!pip install transformers[sentencepiece]
|
| 287 |
from transformers import pipeline
|
| 288 |
classifier = pipeline("zero-shot-classification", model="MoritzLaurer/DeBERTa-v3-base-mnli-fever-anli")
|
| 289 |
sequence_to_classify = "Angela Merkel is a politician in Germany and leader of the CDU"
|
|
|
|
| 345 |
|
| 346 |
### Debugging and issues
|
| 347 |
Note that DeBERTa-v3 was released on 06.12.21 and older versions of HF Transformers seem to have issues running the model (e.g. resulting in an issue with the tokenizer). Using Transformers>=4.13 might solve some issues.
|
| 348 |
+
Also make sure to install sentencepiece to avoid tokenizer errors. Run: `pip install transformers[sentencepiece]` or `pip install sentencepiece`
|
| 349 |
+
|
| 350 |
|
| 351 |
## Model Recycling
|
| 352 |
|