oliverguhr commited on
Commit
b825691
·
1 Parent(s): c85dc7e

initial commit

Browse files
README.md CHANGED
@@ -1,3 +1,88 @@
1
  ---
2
- license: mit
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: apache-2.0
3
+ tags:
4
+ - generated_from_trainer
5
+ model-index:
6
+ - name: bart-base-spelling-de
7
+ results: []
8
  ---
9
+
10
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
11
+ should probably proofread and complete it, then remove this comment. -->
12
+
13
+ # bart-base-spelling-de
14
+
15
+ This model is a fine-tuned version of [facebook/bart-base](https://huggingface.co/facebook/bart-base) on an unknown dataset.
16
+ It achieves the following results on the evaluation set:
17
+ - Loss: 0.1065
18
+ - Cer: 0.2022
19
+
20
+ ## Model description
21
+
22
+ This is a proof of concept spelling correction model for german.
23
+
24
+ ## Intended uses & limitations
25
+
26
+ This is work in progress, be aware that the model can produce artifacts.
27
+ You can test the model using the pipeline interface:
28
+
29
+ ```python
30
+ from transformers import pipeline
31
+
32
+ fix_spelling = pipeline("text2text-generation",model="oliverguhr/spelling-correction-german-base")
33
+
34
+ print(fix_spelling("das idst ein neuZr test",max_length=2048))
35
+ ```
36
+
37
+
38
+
39
+ ## Training and evaluation data
40
+
41
+ More information needed
42
+
43
+ ## Training procedure
44
+
45
+ ### Training hyperparameters
46
+
47
+ The following hyperparameters were used during training:
48
+ - learning_rate: 0.0003
49
+ - train_batch_size: 2
50
+ - eval_batch_size: 4
51
+ - seed: 42
52
+ - gradient_accumulation_steps: 16
53
+ - total_train_batch_size: 32
54
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
55
+ - lr_scheduler_type: linear
56
+ - num_epochs: 2.0
57
+ - mixed_precision_training: Native AMP
58
+
59
+ ### Training results
60
+
61
+ | Training Loss | Epoch | Step | Validation Loss | Cer |
62
+ |:-------------:|:-----:|:-----:|:---------------:|:------:|
63
+ | 0.2803 | 0.11 | 1000 | 0.1978 | 0.9429 |
64
+ | 0.1688 | 0.21 | 2000 | 0.1472 | 0.9426 |
65
+ | 0.121 | 0.32 | 3000 | 0.1381 | 0.9424 |
66
+ | 0.1722 | 0.43 | 4000 | 0.1340 | 0.9425 |
67
+ | 0.1502 | 0.54 | 5000 | 0.1292 | 0.9423 |
68
+ | 0.1556 | 0.64 | 6000 | 0.1260 | 0.9424 |
69
+ | 0.1624 | 0.75 | 7000 | 0.1246 | 0.9425 |
70
+ | 0.1337 | 0.86 | 8000 | 0.1213 | 0.9424 |
71
+ | 0.131 | 0.96 | 9000 | 0.1195 | 0.9423 |
72
+ | 0.1137 | 1.07 | 10000 | 0.1178 | 0.9424 |
73
+ | 0.0958 | 1.18 | 11000 | 0.1166 | 0.9422 |
74
+ | 0.1067 | 1.28 | 12000 | 0.1147 | 0.9422 |
75
+ | 0.1201 | 1.39 | 13000 | 0.1135 | 0.9423 |
76
+ | 0.1115 | 1.5 | 14000 | 0.1111 | 0.9423 |
77
+ | 0.1284 | 1.61 | 15000 | 0.1101 | 0.9422 |
78
+ | 0.0947 | 1.71 | 16000 | 0.1085 | 0.9422 |
79
+ | 0.1081 | 1.82 | 17000 | 0.1073 | 0.9422 |
80
+ | 0.099 | 1.93 | 18000 | 0.1065 | 0.9422 |
81
+
82
+
83
+ ### Framework versions
84
+
85
+ - Transformers 4.19.0.dev0
86
+ - Pytorch 1.11.0+cu102
87
+ - Datasets 2.1.0
88
+ - Tokenizers 0.12.1
all_results.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 2.0,
3
+ "eval_cer": 0.20216230110383845,
4
+ "eval_loss": 0.10652155429124832,
5
+ "eval_runtime": 981.2095,
6
+ "eval_samples": 1000,
7
+ "eval_samples_per_second": 1.019,
8
+ "eval_steps_per_second": 0.255,
9
+ "train_loss": 0.16492035415392825,
10
+ "train_runtime": 21638.3485,
11
+ "train_samples": 298969,
12
+ "train_samples_per_second": 27.633,
13
+ "train_steps_per_second": 0.863
14
+ }
config.json ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "facebook/bart-base",
3
+ "activation_dropout": 0.1,
4
+ "activation_function": "gelu",
5
+ "add_bias_logits": false,
6
+ "add_final_layer_norm": false,
7
+ "architectures": [
8
+ "BartForConditionalGeneration"
9
+ ],
10
+ "attention_dropout": 0.1,
11
+ "bos_token_id": 0,
12
+ "classif_dropout": 0.1,
13
+ "classifier_dropout": 0.0,
14
+ "d_model": 768,
15
+ "decoder_attention_heads": 12,
16
+ "decoder_ffn_dim": 3072,
17
+ "decoder_layerdrop": 0.0,
18
+ "decoder_layers": 6,
19
+ "decoder_start_token_id": 2,
20
+ "dropout": 0.1,
21
+ "early_stopping": true,
22
+ "encoder_attention_heads": 12,
23
+ "encoder_ffn_dim": 3072,
24
+ "encoder_layerdrop": 0.0,
25
+ "encoder_layers": 6,
26
+ "eos_token_id": 2,
27
+ "forced_bos_token_id": 0,
28
+ "forced_eos_token_id": 2,
29
+ "gradient_checkpointing": false,
30
+ "id2label": {
31
+ "0": "LABEL_0",
32
+ "1": "LABEL_1",
33
+ "2": "LABEL_2"
34
+ },
35
+ "init_std": 0.02,
36
+ "is_encoder_decoder": true,
37
+ "label2id": {
38
+ "LABEL_0": 0,
39
+ "LABEL_1": 1,
40
+ "LABEL_2": 2
41
+ },
42
+ "max_position_embeddings": 1024,
43
+ "model_type": "bart",
44
+ "no_repeat_ngram_size": 3,
45
+ "normalize_before": false,
46
+ "normalize_embedding": true,
47
+ "num_beams": 4,
48
+ "num_hidden_layers": 6,
49
+ "pad_token_id": 1,
50
+ "scale_embedding": false,
51
+ "task_specific_params": {
52
+ "summarization": {
53
+ "length_penalty": 1.0,
54
+ "max_length": 128,
55
+ "min_length": 12,
56
+ "num_beams": 4
57
+ },
58
+ "summarization_cnn": {
59
+ "length_penalty": 2.0,
60
+ "max_length": 142,
61
+ "min_length": 56,
62
+ "num_beams": 4
63
+ },
64
+ "summarization_xsum": {
65
+ "length_penalty": 1.0,
66
+ "max_length": 62,
67
+ "min_length": 11,
68
+ "num_beams": 6
69
+ }
70
+ },
71
+ "torch_dtype": "float32",
72
+ "transformers_version": "4.19.0.dev0",
73
+ "use_cache": true,
74
+ "vocab_size": 50265
75
+ }
eval_results.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 2.0,
3
+ "eval_cer": 0.20216230110383845,
4
+ "eval_loss": 0.10652155429124832,
5
+ "eval_runtime": 981.2095,
6
+ "eval_samples": 1000,
7
+ "eval_samples_per_second": 1.019,
8
+ "eval_steps_per_second": 0.255
9
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8fafd7324572f453b2f6bbb76fae25b68a38925abefc7c36e7d107d1729d7bbf
3
+ size 557969145
runs/May23_22-15-11_redrod/1653336920.7642183/events.out.tfevents.1653336920.redrod.73588.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd5745bc0a83afd042d29ac6b6e31ec45457d8165cfa35f612448575c097f986
3
+ size 5381
runs/May23_22-15-11_redrod/events.out.tfevents.1653336920.redrod.73588.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a78553872f86b85f91efa5cd7976d85682af10bd1ad771e15c85936022208d44
3
+ size 304749
runs/May23_22-15-11_redrod/events.out.tfevents.1653359540.redrod.73588.2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d7c4603dab81d2ad2a758a6dbc983c52c3433fec1f722d29331e12b29a112a0f
3
+ size 364
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "pad_token": "<pad>", "cls_token": "<s>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": false}}
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"errors": "replace", "bos_token": "<s>", "eos_token": "</s>", "sep_token": "</s>", "cls_token": "<s>", "unk_token": "<unk>", "pad_token": "<pad>", "mask_token": "<mask>", "add_prefix_space": false, "trim_offsets": true, "model_max_length": 1024, "special_tokens_map_file": null, "name_or_path": "facebook/bart-base", "tokenizer_class": "BartTokenizer"}
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 2.0,
3
+ "train_loss": 0.16492035415392825,
4
+ "train_runtime": 21638.3485,
5
+ "train_samples": 298969,
6
+ "train_samples_per_second": 27.633,
7
+ "train_steps_per_second": 0.863
8
+ }
trainer_state.json ADDED
The diff for this file is too large to render. See raw diff
 
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:86db7474590e0d9fb8ea0e8be89b19710348e2b8b5efbd7f2dad410f64876127
3
+ size 3311
vocab.json ADDED
The diff for this file is too large to render. See raw diff