Update README.md
Browse files
README.md
CHANGED
@@ -1,9 +1,26 @@
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
---
|
5 |
|
6 |
-
#
|
7 |
|
8 |
<!-- Provide a quick summary of what the model is/does. -->
|
9 |
|
@@ -17,73 +34,39 @@ tags: []
|
|
17 |
|
18 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
19 |
|
20 |
-
- **Developed by:** [
|
21 |
-
- **
|
22 |
-
- **
|
23 |
-
- **
|
24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
25 |
-
- **License:** [More Information Needed]
|
26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
|
28 |
-
### Model Sources
|
29 |
|
30 |
<!-- Provide the basic links for the model. -->
|
31 |
|
32 |
-
- **Repository:** [
|
33 |
-
- **Paper [optional]:** [More Information Needed]
|
34 |
-
- **Demo [optional]:** [More Information Needed]
|
35 |
|
36 |
-
## Uses
|
37 |
|
38 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
39 |
-
|
40 |
-
### Direct Use
|
41 |
-
|
42 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
43 |
-
|
44 |
-
[More Information Needed]
|
45 |
-
|
46 |
-
### Downstream Use [optional]
|
47 |
-
|
48 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
49 |
-
|
50 |
-
[More Information Needed]
|
51 |
-
|
52 |
-
### Out-of-Scope Use
|
53 |
-
|
54 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
55 |
-
|
56 |
-
[More Information Needed]
|
57 |
-
|
58 |
-
## Bias, Risks, and Limitations
|
59 |
-
|
60 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
61 |
-
|
62 |
-
[More Information Needed]
|
63 |
-
|
64 |
-
### Recommendations
|
65 |
-
|
66 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
67 |
-
|
68 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
69 |
|
70 |
## How to Get Started with the Model
|
71 |
|
72 |
Use the code below to get started with the model.
|
|
|
|
|
73 |
|
74 |
-
|
75 |
-
|
|
|
76 |
## Training Details
|
77 |
|
78 |
### Training Data
|
79 |
|
80 |
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
81 |
|
82 |
-
[
|
83 |
|
84 |
### Training Procedure
|
85 |
|
86 |
-
|
87 |
|
88 |
#### Preprocessing [optional]
|
89 |
|
@@ -92,7 +75,7 @@ Use the code below to get started with the model.
|
|
92 |
|
93 |
#### Training Hyperparameters
|
94 |
|
95 |
-
- **Training regime:**
|
96 |
|
97 |
#### Speeds, Sizes, Times [optional]
|
98 |
|
@@ -108,35 +91,25 @@ Use the code below to get started with the model.
|
|
108 |
|
109 |
#### Testing Data
|
110 |
|
111 |
-
|
112 |
-
|
113 |
-
[More Information Needed]
|
114 |
-
|
115 |
-
#### Factors
|
116 |
-
|
117 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
118 |
-
|
119 |
-
[More Information Needed]
|
120 |
|
121 |
#### Metrics
|
122 |
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
|
134 |
|
135 |
-
|
136 |
|
137 |
-
|
138 |
-
|
139 |
-
[More Information Needed]
|
140 |
|
141 |
## Environmental Impact
|
142 |
|
@@ -144,56 +117,7 @@ Use the code below to get started with the model.
|
|
144 |
|
145 |
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
146 |
|
147 |
-
- **Hardware Type:** [
|
148 |
-
- **Hours used:** [
|
149 |
-
- **Cloud Provider:** [
|
150 |
-
- **
|
151 |
-
- **Carbon Emitted:** [More Information Needed]
|
152 |
-
|
153 |
-
## Technical Specifications [optional]
|
154 |
-
|
155 |
-
### Model Architecture and Objective
|
156 |
-
|
157 |
-
[More Information Needed]
|
158 |
-
|
159 |
-
### Compute Infrastructure
|
160 |
-
|
161 |
-
[More Information Needed]
|
162 |
-
|
163 |
-
#### Hardware
|
164 |
-
|
165 |
-
[More Information Needed]
|
166 |
-
|
167 |
-
#### Software
|
168 |
-
|
169 |
-
[More Information Needed]
|
170 |
-
|
171 |
-
## Citation [optional]
|
172 |
-
|
173 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
174 |
-
|
175 |
-
**BibTeX:**
|
176 |
-
|
177 |
-
[More Information Needed]
|
178 |
-
|
179 |
-
**APA:**
|
180 |
-
|
181 |
-
[More Information Needed]
|
182 |
-
|
183 |
-
## Glossary [optional]
|
184 |
-
|
185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
186 |
-
|
187 |
-
[More Information Needed]
|
188 |
-
|
189 |
-
## More Information [optional]
|
190 |
-
|
191 |
-
[More Information Needed]
|
192 |
-
|
193 |
-
## Model Card Authors [optional]
|
194 |
-
|
195 |
-
[More Information Needed]
|
196 |
-
|
197 |
-
## Model Card Contact
|
198 |
-
|
199 |
-
[More Information Needed]
|
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
+
datasets:
|
4 |
+
- fancyzhx/ag_news
|
5 |
+
metrics:
|
6 |
+
- accuracy
|
7 |
+
model-index:
|
8 |
+
- name: distillbert-uncased-ag-news
|
9 |
+
results:
|
10 |
+
- task:
|
11 |
+
name: Text Classification
|
12 |
+
type: text-classification
|
13 |
+
dataset:
|
14 |
+
name: ag_news
|
15 |
+
type: ag_news
|
16 |
+
args: default
|
17 |
+
metrics:
|
18 |
+
- name: Accuracy
|
19 |
+
type: accuracy
|
20 |
+
value: 0.9265
|
21 |
---
|
22 |
|
23 |
+
# Akirami/distillbert-uncased-ag-news
|
24 |
|
25 |
<!-- Provide a quick summary of what the model is/does. -->
|
26 |
|
|
|
34 |
|
35 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
36 |
|
37 |
+
- **Developed by:** [Akirami](https://huggingface.co/Akirami)
|
38 |
+
- **Model type:** DistillBert
|
39 |
+
- **License:** MIT
|
40 |
+
- **Finetuned from model [optional]:** [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased)
|
|
|
|
|
|
|
41 |
|
42 |
+
### Model Sources
|
43 |
|
44 |
<!-- Provide the basic links for the model. -->
|
45 |
|
46 |
+
- **Repository:** [Akirami/distillbert-uncased-ag-news](https://huggingface.co/Akirami/distillbert-uncased-ag-news)
|
|
|
|
|
47 |
|
|
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
## How to Get Started with the Model
|
51 |
|
52 |
Use the code below to get started with the model.
|
53 |
+
```python
|
54 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
55 |
|
56 |
+
tokenizer = AutoTokenizer.from_pretrained("Akirami/distillbert-uncased-ag-news")
|
57 |
+
model = AutoModelForSequenceClassification.from_pretrained("Akirami/distillbert-uncased-ag-news")
|
58 |
+
```
|
59 |
## Training Details
|
60 |
|
61 |
### Training Data
|
62 |
|
63 |
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
64 |
|
65 |
+
[AG News Dataset](https://huggingface.co/datasets/fancyzhx/ag_news)
|
66 |
|
67 |
### Training Procedure
|
68 |
|
69 |
+
The model has been trained through Knowledge Distillation, where the teacher model is [nateraw/bert-base-uncased-ag-news](https://huggingface.co/nateraw/bert-base-uncased-ag-news) and the student model is [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased)
|
70 |
|
71 |
#### Preprocessing [optional]
|
72 |
|
|
|
75 |
|
76 |
#### Training Hyperparameters
|
77 |
|
78 |
+
- **Training regime:** Trained in fp16 format
|
79 |
|
80 |
#### Speeds, Sizes, Times [optional]
|
81 |
|
|
|
91 |
|
92 |
#### Testing Data
|
93 |
|
94 |
+
The test portion of AG News data is used for testing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
#### Metrics
|
97 |
|
98 |
+
Classification Report:
|
99 |
+
| Class | Precision | Recall | F1-Score | Support |
|
100 |
+
|-------|-----------|--------|----------|---------|
|
101 |
+
| 0 | 0.95 | 0.92 | 0.94 | 1900 |
|
102 |
+
| 1 | 0.98 | 0.98 | 0.98 | 1900 |
|
103 |
+
| 2 | 0.90 | 0.88 | 0.89 | 1900 |
|
104 |
+
| 3 | 0.88 | 0.92 | 0.90 | 1900 |
|
105 |
+
| **Accuracy** | | | **0.93** | **7600** |
|
106 |
+
| **Macro Avg** | **0.93** | **0.93** | **0.93** | **7600** |
|
107 |
+
| **Weighted Avg** | **0.93** | **0.93** | **0.93** | **7600** |
|
108 |
|
109 |
|
110 |
+
Balanced Accuracy Score: 0.926578947368421
|
111 |
|
112 |
+
Accuracy Score: 0.9265789473684211
|
|
|
|
|
113 |
|
114 |
## Environmental Impact
|
115 |
|
|
|
117 |
|
118 |
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
119 |
|
120 |
+
- **Hardware Type:** [T4 GPU]
|
121 |
+
- **Hours used:** [25 Minutes]
|
122 |
+
- **Cloud Provider:** [Google Colab]
|
123 |
+
- **Carbon Emitted:** [0.01]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|