Instructions to use reddgr/zero-shot-prompt-classifier-bart-ft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use reddgr/zero-shot-prompt-classifier-bart-ft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="reddgr/zero-shot-prompt-classifier-bart-ft")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("reddgr/zero-shot-prompt-classifier-bart-ft") model = AutoModelForSequenceClassification.from_pretrained("reddgr/zero-shot-prompt-classifier-bart-ft", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -20,9 +20,9 @@ coding assistance, language assistance, role play, creative writing, general kno
|
|
| 20 |
|
| 21 |
The model is fine-tuned and tested on the natural language inference (NLI) dataset [reddgr/nli-chatbot-prompt-categorization](https://huggingface.co/datasets/reddgr/nli-chatbot-prompt-categorization)
|
| 22 |
|
| 23 |
-
Below is a confusion matrix calculated on zero-shot inferences for the 10 most popular categories in the Test split of [reddgr/nli-chatbot-prompt-categorization](https://huggingface.co/datasets/reddgr/nli-chatbot-prompt-categorization) at the time of the first model upload:
|
| 24 |
|
| 25 |
-
 by 17 percentage points (51% accuracy vs 34% accuracy) in this test set with 10 candidate zero-shot classes (the most frequent categories in the test split of [reddgr/nli-chatbot-prompt-categorization](https://huggingface.co/datasets/reddgr/nli-chatbot-prompt-categorization) at the time of the first model upload).
|
| 28 |
|
|
|
|
| 20 |
|
| 21 |
The model is fine-tuned and tested on the natural language inference (NLI) dataset [reddgr/nli-chatbot-prompt-categorization](https://huggingface.co/datasets/reddgr/nli-chatbot-prompt-categorization)
|
| 22 |
|
| 23 |
+
Below is a confusion matrix calculated on zero-shot inferences for the 10 most popular categories in the Test split of [reddgr/nli-chatbot-prompt-categorization](https://huggingface.co/datasets/reddgr/nli-chatbot-prompt-categorization) at the time of the first model upload. The classification with the base model on the same small test dataset is shown for comparison:
|
| 24 |
|
| 25 |
+

|
| 26 |
|
| 27 |
As of the first version of the model uploaded to hub, the fine-tuned version outperforms the base model [facebook/bart-large-mnli](https://huggingface.co/facebook/bart-large-mnli) by 17 percentage points (51% accuracy vs 34% accuracy) in this test set with 10 candidate zero-shot classes (the most frequent categories in the test split of [reddgr/nli-chatbot-prompt-categorization](https://huggingface.co/datasets/reddgr/nli-chatbot-prompt-categorization) at the time of the first model upload).
|
| 28 |
|