syedkhalid076 commited on
Commit
a90aec1
1 Parent(s): 2e5fcef

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +119 -3
README.md CHANGED
@@ -1,3 +1,119 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: mit
5
+ tags:
6
+ - text-classification
7
+ - zero-shot-classification
8
+ datasets:
9
+ - facebook/anli
10
+ - fever/fever
11
+ - nyu-mll/multi_nli
12
+ pipeline_tag: zero-shot-classification
13
+ library_name: transformers
14
+ ---
15
+
16
+ # DeBERTa-v3-base Zero-Shot Classification Model
17
+
18
+ This repository hosts a fine-tuned version of the `DeBERTa-v3-base` model for **Zero-Shot Text Classification**. With this model, you can classify text into predefined categories without needing to retrain the model for specific tasks. It is ideal for tasks where labeled data is scarce or for rapid prototyping of text classification solutions.
19
+
20
+ ---
21
+
22
+ ## Model Overview
23
+
24
+ - **Base Model**: `DeBERTa-v3-base`
25
+ - **Architecture**: `DebertaV2ForSequenceClassification`
26
+ - **Language**: English (`en`)
27
+ - **Data Type**: `float16` (SafeTensor format for efficiency)
28
+
29
+ This model leverages the capabilities of `DeBERTa-v3-base`, fine-tuned on datasets like `multi_nli`, `facebook/anli`, and `fever` to enhance its zero-shot classification performance.
30
+
31
+ ---
32
+
33
+ ## Features
34
+
35
+ - **Zero-Shot Classification**: Directly classify text into any set of user-defined labels without additional training.
36
+ - **Multi-Label Support**: Handle tasks with overlapping categories or multiple applicable labels (set `multi_label=True`).
37
+ - **Pretrained Efficiency**: Optimized for inference using mixed-precision (`float16`) with SafeTensors.
38
+
39
+ ---
40
+
41
+ ## Example Usage
42
+
43
+ This model is designed to integrate seamlessly with Hugging Face's `transformers` library. Here's a simple example:
44
+
45
+ ```python
46
+ from transformers import pipeline
47
+
48
+ # Load the Zero-Shot Classification pipeline
49
+ classifier = pipeline("zero-shot-classification", model="syedkhalid076/DeBERTa-Zero-Shot-Classification")
50
+
51
+ # Input sequence and candidate labels
52
+ sequence_to_classify = "Last week I upgraded my iOS version and ever since then your app is crashing."
53
+ candidate_labels = ["mobile", "website", "billing", "account access", "app crash"]
54
+
55
+ # Perform classification
56
+ output = classifier(sequence_to_classify, candidate_labels, multi_label=False)
57
+ print(output)
58
+ ```
59
+
60
+ ---
61
+
62
+ ## Applications
63
+ I trained this model for UX research purposes, but it can be used for any of the following tasks:
64
+ - **Customer Feedback Analysis**: Categorize user reviews or feedback.
65
+ - **Intent Detection**: Identify user intents in conversational AI systems.
66
+ - **Content Classification**: Classify articles, social media posts, or documents.
67
+ - **Error Detection**: Detect error reports in logs or feedback.
68
+
69
+ ---
70
+
71
+ ## Training Data
72
+
73
+ The model was fine-tuned on the following datasets:
74
+ - **[MultiNLI](https://huggingface.co/datasets/nyu-mll/multi_nli)**: Multi-genre natural language inference corpus.
75
+ - **[ANLI](https://huggingface.co/datasets/facebook/anli)**: Adversarial NLI dataset for robust entailment modeling.
76
+ - **[FEVER](https://huggingface.co/datasets/fever/fever)**: Fact Extraction and Verification dataset.
77
+
78
+ These datasets help the model generalize across a wide range of zero-shot classification tasks.
79
+
80
+ ---
81
+
82
+ ## Performance
83
+
84
+ This model demonstrates strong performance across various zero-shot classification benchmarks, effectively distinguishing between user-defined categories in diverse text inputs.
85
+
86
+ ---
87
+
88
+ ## Limitations
89
+
90
+ - **Language Support**: Currently supports English (`en`) only.
91
+ - **Context Length**: Performance may degrade with extremely long text inputs. Consider truncating inputs to the model's max token length.
92
+
93
+ ---
94
+
95
+ ## License
96
+
97
+ This model is licensed under the **MIT License**. You are free to use, modify, and distribute it with appropriate attribution.
98
+
99
+ ---
100
+
101
+ ## Citation
102
+
103
+ If you use this model in your work, please cite this repository:
104
+ ```bibtex
105
+ @misc{syedkhalid076_deberta_zeroshoot,
106
+ author = {Syed Khalid Hussain},
107
+ title = {DeBERTa Zero-Shot Classification},
108
+ year = {2024},
109
+ url = {https://huggingface.co/syedkhalid076/DeBERTa-Zero-Shot-Classification}
110
+ }
111
+ ```
112
+
113
+ ---
114
+
115
+ ## Acknowledgements
116
+
117
+ This model was fine-tuned using [Hugging Face Transformers](https://huggingface.co/transformers/) and hosted on the Hugging Face Model Hub. Special thanks to the creators of `DeBERTa-v3` and the contributing datasets.
118
+
119
+ ---