Update README.md
Browse files
README.md
CHANGED
@@ -319,7 +319,8 @@ pipeline_tag: zero-shot-classification
|
|
319 |
This is [DeBERTa-v3-base](https://hf.co/microsoft/deberta-v3-base) fine-tuned with multi-task learning on 600 tasks of the [tasksource collection](https://github.com/sileod/tasksource/).
|
320 |
This checkpoint has strong zero-shot validation performance on many tasks (e.g. 70% on WNLI), and can be used for:
|
321 |
- Zero-shot entailment-based classification pipeline (similar to bart-mnli), see [ZS].
|
322 |
-
- Natural language inference
|
|
|
323 |
- Further fine-tuning with a new task or tasksource task (classification, token classification or multiple-choice) [FT].
|
324 |
|
325 |
# [ZS] Zero-shot classification pipeline
|
@@ -333,6 +334,15 @@ classifier(text, candidate_labels)
|
|
333 |
```
|
334 |
NLI training data of this model includes [label-nli](https://huggingface.co/datasets/tasksource/zero-shot-label-nli), a NLI dataset specially constructed to improve this kind of zero-shot classification.
|
335 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
# [TA] Tasksource-adapters: 1 line access to hundreds of tasks
|
337 |
|
338 |
```python
|
|
|
319 |
This is [DeBERTa-v3-base](https://hf.co/microsoft/deberta-v3-base) fine-tuned with multi-task learning on 600 tasks of the [tasksource collection](https://github.com/sileod/tasksource/).
|
320 |
This checkpoint has strong zero-shot validation performance on many tasks (e.g. 70% on WNLI), and can be used for:
|
321 |
- Zero-shot entailment-based classification pipeline (similar to bart-mnli), see [ZS].
|
322 |
+
- Natural language inference [NLI]
|
323 |
+
- Hundreds of other tasks with tasksource-adapters, see [TA].
|
324 |
- Further fine-tuning with a new task or tasksource task (classification, token classification or multiple-choice) [FT].
|
325 |
|
326 |
# [ZS] Zero-shot classification pipeline
|
|
|
334 |
```
|
335 |
NLI training data of this model includes [label-nli](https://huggingface.co/datasets/tasksource/zero-shot-label-nli), a NLI dataset specially constructed to improve this kind of zero-shot classification.
|
336 |
|
337 |
+
# [NLI] Natural language inference pipeline
|
338 |
+
|
339 |
+
```python
|
340 |
+
from transformers import pipeline
|
341 |
+
nli_pipe = pipeline("text-classification",model="sileod/deberta-v3-base-tasksource-nli")
|
342 |
+
nli_pipe([dict(text="there is a cat",text_pair="there is a black cat")])
|
343 |
+
# [{'label': 'neutral', 'score': 0.9952911138534546}]
|
344 |
+
```
|
345 |
+
|
346 |
# [TA] Tasksource-adapters: 1 line access to hundreds of tasks
|
347 |
|
348 |
```python
|