rngrye commited on
Commit
9da8710
·
verified ·
1 Parent(s): 63d2739

Model save

Browse files
README.md CHANGED
@@ -1,220 +1,72 @@
1
  ---
2
  library_name: transformers
 
 
 
 
3
  metrics:
4
  - accuracy
5
  - f1
6
- base_model:
7
- - distilbert/distilbert-base-uncased
 
8
  ---
9
 
10
- # Model Card for Model ID
 
11
 
12
- <!-- Provide a quick summary of what the model is/does. -->
13
 
 
 
 
 
 
14
 
 
15
 
16
- ## Model Details
17
 
18
- ### Model Description
19
 
20
- Based model is distilbert/distilbert-base-uncased, fine tuned on the dataset linked above, or find it at Kaggle on: kaggle.com/datasets/sunilthite/text-document-classification-dataset/data
21
 
22
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
23
 
24
- - **Developed by:** [More Information Needed]
25
- - **Funded by [optional]:** [More Information Needed]
26
- - **Shared by [optional]:** [More Information Needed]
27
- - **Model type : Text Classification**
28
- - **Language(s) (NLP):** [More Information Needed]
29
- - **License:** [More Information Needed]
30
- - **Finetuned from model : Base model is distilbert-base-cased**
31
 
32
- ### Model Sources [optional]
33
 
34
- <!-- Provide the basic links for the model. -->
35
 
36
- - **Repository:** [More Information Needed]
37
- - **Paper [optional]:** [More Information Needed]
38
- - **Demo [optional]:** [More Information Needed]
 
 
 
 
 
39
 
40
- ## Uses
41
 
42
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
 
 
 
 
 
 
 
 
 
 
 
43
 
44
- ### Direct Use
45
 
46
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
47
 
48
- [More Information Needed]
49
-
50
- ### Downstream Use [optional]
51
-
52
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
53
-
54
- [More Information Needed]
55
-
56
- ### Out-of-Scope Use
57
-
58
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
59
-
60
- [More Information Needed]
61
-
62
- ## Bias, Risks, and Limitations
63
-
64
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
65
-
66
- [More Information Needed]
67
-
68
- ### Recommendations
69
-
70
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
71
-
72
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
73
-
74
- ## How to Get Started with the Model
75
-
76
- Use the code below to get started with the model.
77
-
78
- [More Information Needed]
79
-
80
- ## Training Details
81
-
82
- ### Training Data
83
-
84
- <!-- 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. -->
85
-
86
- [More Information Needed]
87
-
88
- ### Training Procedure
89
-
90
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
91
-
92
- #### Preprocessing [optional]
93
-
94
- [More Information Needed]
95
-
96
-
97
- #### Training Hyperparameters
98
-
99
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
100
-
101
- #### Speeds, Sizes, Times [optional]
102
-
103
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
104
-
105
- [More Information Needed]
106
-
107
- ## Evaluation
108
-
109
- <!-- This section describes the evaluation protocols and provides the results. -->
110
-
111
- ### Testing Data, Factors & Metrics
112
-
113
- #### Testing Data
114
-
115
- <!-- This should link to a Dataset Card if possible. -->
116
-
117
- [More Information Needed]
118
-
119
- #### Factors
120
-
121
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
122
-
123
- [More Information Needed]
124
-
125
- #### Metrics
126
-
127
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
128
-
129
- [More Information Needed]
130
-
131
- ### Results
132
-
133
-
134
- Epoch Training Loss Validation Loss Accuracy F1
135
- 1 0.073100 0.090870 0.982063 0.981749
136
- 2 0.034800 0.070832 0.986547 0.986532
137
- 3 0.010100 0.066102 0.991031 0.991009
138
- 4 0.002600 0.082557 0.986547 0.986532
139
- 5 0.001200 0.078924 0.986547 0.986532
140
-
141
- TrainOutput(global_step=560, training_loss=0.02437255925365857, metrics={'train_runtime': 496.0245, 'train_samples_per_second': 17.943, 'train_steps_per_second': 1.129, 'total_flos': 1179022923264000.0, 'train_loss': 0.02437255925365857, 'epoch': 5.0})
142
-
143
- Test set evaluation results:
144
- eval_loss: 0.0272
145
- eval_accuracy: 0.9910
146
- eval_f1: 0.9910
147
- eval_runtime: 3.8344
148
- eval_samples_per_second: 57.8970
149
- eval_steps_per_second: 3.6510
150
- epoch: 5.0000
151
-
152
- #### Summary
153
-
154
-
155
-
156
- ## Model Examination [optional]
157
-
158
- <!-- Relevant interpretability work for the model goes here -->
159
-
160
- [More Information Needed]
161
-
162
- ## Environmental Impact
163
-
164
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
165
-
166
- 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).
167
-
168
- - **Hardware Type:** [More Information Needed]
169
- - **Hours used:** [More Information Needed]
170
- - **Cloud Provider:** [More Information Needed]
171
- - **Compute Region:** [More Information Needed]
172
- - **Carbon Emitted:** [More Information Needed]
173
-
174
- ## Technical Specifications [optional]
175
-
176
- ### Model Architecture and Objective
177
-
178
- [More Information Needed]
179
-
180
- ### Compute Infrastructure
181
-
182
- [More Information Needed]
183
-
184
- #### Hardware
185
-
186
- [More Information Needed]
187
-
188
- #### Software
189
-
190
- [More Information Needed]
191
-
192
- ## Citation [optional]
193
-
194
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
195
-
196
- **BibTeX:**
197
-
198
- [More Information Needed]
199
-
200
- **APA:**
201
-
202
- [More Information Needed]
203
-
204
- ## Glossary [optional]
205
-
206
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
207
-
208
- [More Information Needed]
209
-
210
- ## More Information [optional]
211
-
212
- [More Information Needed]
213
-
214
- ## Model Card Authors [optional]
215
-
216
- [More Information Needed]
217
-
218
- ## Model Card Contact
219
-
220
- [More Information Needed]
 
1
  ---
2
  library_name: transformers
3
+ license: apache-2.0
4
+ base_model: distilbert-base-cased
5
+ tags:
6
+ - generated_from_trainer
7
  metrics:
8
  - accuracy
9
  - f1
10
+ model-index:
11
+ - name: my-document-classifier
12
+ results: []
13
  ---
14
 
15
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
16
+ should probably proofread and complete it, then remove this comment. -->
17
 
18
+ # my-document-classifier
19
 
20
+ This model is a fine-tuned version of [distilbert-base-cased](https://huggingface.co/distilbert-base-cased) on an unknown dataset.
21
+ It achieves the following results on the evaluation set:
22
+ - Loss: 0.0344
23
+ - Accuracy: 0.9910
24
+ - F1: 0.9910
25
 
26
+ ## Model description
27
 
28
+ More information needed
29
 
30
+ ## Intended uses & limitations
31
 
32
+ More information needed
33
 
34
+ ## Training and evaluation data
35
 
36
+ More information needed
 
 
 
 
 
 
37
 
38
+ ## Training procedure
39
 
40
+ ### Training hyperparameters
41
 
42
+ The following hyperparameters were used during training:
43
+ - learning_rate: 2e-05
44
+ - train_batch_size: 16
45
+ - eval_batch_size: 16
46
+ - seed: 22002423
47
+ - optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
48
+ - lr_scheduler_type: linear
49
+ - num_epochs: 10
50
 
51
+ ### Training results
52
 
53
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
54
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|
55
+ | 0.5314 | 1.0 | 112 | 0.0871 | 0.9731 | 0.9730 |
56
+ | 0.0765 | 2.0 | 224 | 0.0767 | 0.9865 | 0.9865 |
57
+ | 0.0482 | 3.0 | 336 | 0.0823 | 0.9865 | 0.9864 |
58
+ | 0.0188 | 4.0 | 448 | 0.1178 | 0.9821 | 0.9821 |
59
+ | 0.0097 | 5.0 | 560 | 0.1118 | 0.9821 | 0.9821 |
60
+ | 0.0061 | 6.0 | 672 | 0.1039 | 0.9821 | 0.9821 |
61
+ | 0.0023 | 7.0 | 784 | 0.1038 | 0.9865 | 0.9865 |
62
+ | 0.0024 | 8.0 | 896 | 0.1058 | 0.9865 | 0.9865 |
63
+ | 0.0011 | 9.0 | 1008 | 0.1011 | 0.9865 | 0.9865 |
64
+ | 0.001 | 10.0 | 1120 | 0.1017 | 0.9865 | 0.9865 |
65
 
 
66
 
67
+ ### Framework versions
68
 
69
+ - Transformers 4.52.4
70
+ - Pytorch 2.6.0+cu124
71
+ - Datasets 3.6.0
72
+ - Tokenizers 0.21.1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
best_model/config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "activation": "gelu",
3
+ "architectures": [
4
+ "DistilBertForSequenceClassification"
5
+ ],
6
+ "attention_dropout": 0.1,
7
+ "dim": 768,
8
+ "dropout": 0.1,
9
+ "hidden_dim": 3072,
10
+ "id2label": {
11
+ "0": "Politics",
12
+ "1": "Sport",
13
+ "2": "Technology",
14
+ "3": "Entertainment",
15
+ "4": "Business"
16
+ },
17
+ "initializer_range": 0.02,
18
+ "label2id": {
19
+ "Business": 4,
20
+ "Entertainment": 3,
21
+ "Politics": 0,
22
+ "Sport": 1,
23
+ "Technology": 2
24
+ },
25
+ "max_position_embeddings": 512,
26
+ "model_type": "distilbert",
27
+ "n_heads": 12,
28
+ "n_layers": 6,
29
+ "output_past": true,
30
+ "pad_token_id": 0,
31
+ "problem_type": "single_label_classification",
32
+ "qa_dropout": 0.1,
33
+ "seq_classif_dropout": 0.2,
34
+ "sinusoidal_pos_embds": false,
35
+ "tie_weights_": true,
36
+ "torch_dtype": "float32",
37
+ "transformers_version": "4.52.4",
38
+ "vocab_size": 28996
39
+ }
best_model/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:680ff31dc6973a793608912a723663cdf728be5c3d8056b114f842e56516d5cb
3
+ size 263153916
best_model/special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
best_model/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
best_model/tokenizer_config.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": false,
45
+ "cls_token": "[CLS]",
46
+ "do_lower_case": false,
47
+ "extra_special_tokens": {},
48
+ "mask_token": "[MASK]",
49
+ "model_max_length": 512,
50
+ "pad_token": "[PAD]",
51
+ "sep_token": "[SEP]",
52
+ "strip_accents": null,
53
+ "tokenize_chinese_chars": true,
54
+ "tokenizer_class": "DistilBertTokenizer",
55
+ "unk_token": "[UNK]"
56
+ }
best_model/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b175d9562b9866d0d0105bd7d60bc4fc7ded7b982825b9867a879fdc2478aca9
3
+ size 5368
best_model/vocab.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a6d99325ebe6a7a860e02472ddbcc297f2588c032da2dbe1c84742173ca402ae
3
  size 263153916
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:680ff31dc6973a793608912a723663cdf728be5c3d8056b114f842e56516d5cb
3
  size 263153916