danielsz96 commited on
Commit
81db60a
1 Parent(s): be7ab91

Upload TFBertForTokenClassification

Browse files
Files changed (3) hide show
  1. README.md +60 -0
  2. config.json +51 -0
  3. tf_model.h5 +3 -0
README.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: bert-base-uncased
4
+ tags:
5
+ - generated_from_keras_callback
6
+ model-index:
7
+ - name: drugobert_spec
8
+ results: []
9
+ ---
10
+
11
+ <!-- This model card has been generated automatically according to the information Keras had access to. You should
12
+ probably proofread and complete it, then remove this comment. -->
13
+
14
+ # drugobert_spec
15
+
16
+ This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on an unknown dataset.
17
+ It achieves the following results on the evaluation set:
18
+ - Train Loss: 0.2531
19
+ - Train Precision: 0.4705
20
+ - Train Recall: 0.2187
21
+ - Train F1: 0.2986
22
+ - Train Accuracy: 0.9374
23
+ - Epoch: 3
24
+
25
+ ## Model description
26
+
27
+ More information needed
28
+
29
+ ## Intended uses & limitations
30
+
31
+ More information needed
32
+
33
+ ## Training and evaluation data
34
+
35
+ More information needed
36
+
37
+ ## Training procedure
38
+
39
+ ### Training hyperparameters
40
+
41
+ The following hyperparameters were used during training:
42
+ - optimizer: {'name': 'AdamWeightDecay', 'learning_rate': {'module': 'keras.optimizers.schedules', 'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 2e-05, 'decay_steps': 177, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}, 'registered_name': None}, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-08, 'amsgrad': False, 'weight_decay_rate': 0.01}
43
+ - training_precision: float32
44
+
45
+ ### Training results
46
+
47
+ | Train Loss | Train Precision | Train Recall | Train F1 | Train Accuracy | Epoch |
48
+ |:----------:|:---------------:|:------------:|:--------:|:--------------:|:-----:|
49
+ | 0.5777 | 0.0 | 0.0 | 0.0 | 0.9210 | 0 |
50
+ | 0.3068 | 0.5824 | 0.1243 | 0.2049 | 0.9306 | 1 |
51
+ | 0.2659 | 0.4706 | 0.2191 | 0.2990 | 0.9374 | 2 |
52
+ | 0.2531 | 0.4705 | 0.2187 | 0.2986 | 0.9374 | 3 |
53
+
54
+
55
+ ### Framework versions
56
+
57
+ - Transformers 4.35.2
58
+ - TensorFlow 2.14.0
59
+ - Datasets 2.16.1
60
+ - Tokenizers 0.15.1
config.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "bert-base-uncased",
3
+ "architectures": [
4
+ "BertForTokenClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "O",
14
+ "1": "B-fentanyl",
15
+ "2": "B-mushrooms",
16
+ "3": "B-marijuana",
17
+ "4": "B-lsd",
18
+ "5": "B-heroin",
19
+ "6": "B-cocaine",
20
+ "7": "B-amphetamine",
21
+ "8": "B-ketamine",
22
+ "9": "B-mdma",
23
+ "10": "B-methamphetamine"
24
+ },
25
+ "initializer_range": 0.02,
26
+ "intermediate_size": 3072,
27
+ "label2id": {
28
+ "B-amphetamine": 7,
29
+ "B-cocaine": 6,
30
+ "B-fentanyl": 1,
31
+ "B-heroin": 5,
32
+ "B-ketamine": 8,
33
+ "B-lsd": 4,
34
+ "B-marijuana": 3,
35
+ "B-mdma": 9,
36
+ "B-methamphetamine": 10,
37
+ "B-mushrooms": 2,
38
+ "O": 0
39
+ },
40
+ "layer_norm_eps": 1e-12,
41
+ "max_position_embeddings": 512,
42
+ "model_type": "bert",
43
+ "num_attention_heads": 12,
44
+ "num_hidden_layers": 12,
45
+ "pad_token_id": 0,
46
+ "position_embedding_type": "absolute",
47
+ "transformers_version": "4.35.2",
48
+ "type_vocab_size": 2,
49
+ "use_cache": true,
50
+ "vocab_size": 30522
51
+ }
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8158afb2a21b93fcb080247dfe0413bb80cd9b90b6c2c7f0c526d850eb58271
3
+ size 435886068