Upload TFDistilBertForSequenceClassification
Browse files- README.md +55 -0
- config.json +67 -0
- tf_model.h5 +3 -0
README.md
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
tags:
|
4 |
+
- generated_from_keras_callback
|
5 |
+
model-index:
|
6 |
+
- name: bert-20news-classification
|
7 |
+
results: []
|
8 |
+
---
|
9 |
+
|
10 |
+
<!-- This model card has been generated automatically according to the information Keras had access to. You should
|
11 |
+
probably proofread and complete it, then remove this comment. -->
|
12 |
+
|
13 |
+
# bert-20news-classification
|
14 |
+
|
15 |
+
This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on an unknown dataset.
|
16 |
+
It achieves the following results on the evaluation set:
|
17 |
+
- Train Loss: 0.5063
|
18 |
+
- Train Accuracy: 0.8805
|
19 |
+
- Validation Loss: 0.5579
|
20 |
+
- Validation Accuracy: 0.8622
|
21 |
+
- Epoch: 0
|
22 |
+
|
23 |
+
## Model description
|
24 |
+
|
25 |
+
More information needed
|
26 |
+
|
27 |
+
## Intended uses & limitations
|
28 |
+
|
29 |
+
More information needed
|
30 |
+
|
31 |
+
## Training and evaluation data
|
32 |
+
|
33 |
+
More information needed
|
34 |
+
|
35 |
+
## Training procedure
|
36 |
+
|
37 |
+
### Training hyperparameters
|
38 |
+
|
39 |
+
The following hyperparameters were used during training:
|
40 |
+
- optimizer: {'name': 'Adam', 'weight_decay': None, 'clipnorm': None, 'global_clipnorm': None, 'clipvalue': None, 'use_ema': False, 'ema_momentum': 0.99, 'ema_overwrite_frequency': None, 'jit_compile': True, 'is_legacy_optimizer': False, 'learning_rate': {'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 2e-05, 'decay_steps': 636, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}}, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-08, 'amsgrad': False}
|
41 |
+
- training_precision: float32
|
42 |
+
|
43 |
+
### Training results
|
44 |
+
|
45 |
+
| Train Loss | Train Accuracy | Validation Loss | Validation Accuracy | Epoch |
|
46 |
+
|:----------:|:--------------:|:---------------:|:-------------------:|:-----:|
|
47 |
+
| 0.5063 | 0.8805 | 0.5579 | 0.8622 | 0 |
|
48 |
+
|
49 |
+
|
50 |
+
### Framework versions
|
51 |
+
|
52 |
+
- Transformers 4.28.0
|
53 |
+
- TensorFlow 2.12.0
|
54 |
+
- Datasets 2.12.0
|
55 |
+
- Tokenizers 0.13.3
|
config.json
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "distilbert-base-uncased",
|
3 |
+
"activation": "gelu",
|
4 |
+
"architectures": [
|
5 |
+
"DistilBertForSequenceClassification"
|
6 |
+
],
|
7 |
+
"attention_dropout": 0.1,
|
8 |
+
"dim": 768,
|
9 |
+
"dropout": 0.1,
|
10 |
+
"hidden_dim": 3072,
|
11 |
+
"id2label": {
|
12 |
+
"0": "alt.atheism",
|
13 |
+
"1": "comp.graphics",
|
14 |
+
"2": "comp.os.ms-windows.misc",
|
15 |
+
"3": "comp.sys.ibm.pc.hardware",
|
16 |
+
"4": "comp.sys.mac.hardware",
|
17 |
+
"5": "comp.windows.x",
|
18 |
+
"6": "misc.forsale",
|
19 |
+
"7": "rec.autos",
|
20 |
+
"8": "rec.motorcycles",
|
21 |
+
"9": "rec.sport.baseball",
|
22 |
+
"10": "rec.sport.hockey",
|
23 |
+
"11": "sci.crypt",
|
24 |
+
"12": "sci.electronics",
|
25 |
+
"13": "sci.med",
|
26 |
+
"14": "sci.space",
|
27 |
+
"15": "soc.religion.christian",
|
28 |
+
"16": "talk.politics.guns",
|
29 |
+
"17": "talk.politics.mideast",
|
30 |
+
"18": "talk.politics.misc",
|
31 |
+
"19": "talk.religion.misc"
|
32 |
+
},
|
33 |
+
"initializer_range": 0.02,
|
34 |
+
"label2id": {
|
35 |
+
"alt.atheism": 0,
|
36 |
+
"comp.graphics": 1,
|
37 |
+
"comp.os.ms-windows.misc": 2,
|
38 |
+
"comp.sys.ibm.pc.hardware": 3,
|
39 |
+
"comp.sys.mac.hardware": 4,
|
40 |
+
"comp.windows.x": 5,
|
41 |
+
"misc.forsale": 6,
|
42 |
+
"rec.autos": 7,
|
43 |
+
"rec.motorcycles": 8,
|
44 |
+
"rec.sport.baseball": 9,
|
45 |
+
"rec.sport.hockey": 10,
|
46 |
+
"sci.crypt": 11,
|
47 |
+
"sci.electronics": 12,
|
48 |
+
"sci.med": 13,
|
49 |
+
"sci.space": 14,
|
50 |
+
"soc.religion.christian": 15,
|
51 |
+
"talk.politics.guns": 16,
|
52 |
+
"talk.politics.mideast": 17,
|
53 |
+
"talk.politics.misc": 18,
|
54 |
+
"talk.religion.misc": 19
|
55 |
+
},
|
56 |
+
"max_position_embeddings": 512,
|
57 |
+
"model_type": "distilbert",
|
58 |
+
"n_heads": 12,
|
59 |
+
"n_layers": 6,
|
60 |
+
"pad_token_id": 0,
|
61 |
+
"qa_dropout": 0.1,
|
62 |
+
"seq_classif_dropout": 0.2,
|
63 |
+
"sinusoidal_pos_embds": false,
|
64 |
+
"tie_weights_": true,
|
65 |
+
"transformers_version": "4.28.0",
|
66 |
+
"vocab_size": 30522
|
67 |
+
}
|
tf_model.h5
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8048fcc98121be82c51d648df51c6a92b08694d92cde78dae6ae84bf87c77c6c
|
3 |
+
size 268007104
|