philschmid HF staff commited on
Commit
79540ca
1 Parent(s): 4c152c9

commit files to HF hub

Browse files
README.md ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ language: en
4
+ tags:
5
+ - sagemaker
6
+ - bart
7
+ - summarization
8
+ license: apache-2.0
9
+ datasets:
10
+ - samsum
11
+ widget:
12
+ - text: |
13
+ Jeff: Can I train a 🤗 Transformers model on Amazon SageMaker?
14
+ Philipp: Sure you can use the new Hugging Face Deep Learning Container.
15
+ Jeff: ok.
16
+ Jeff: and how can I get started?
17
+ Jeff: where can I find documentation?
18
+ Philipp: ok, ok you can find everything here. https://huggingface.co/blog/the-partnership-amazon-sagemaker-and-hugging-face
19
+ model-index:
20
+ - name: bart-large-cnn-samsum
21
+ results:
22
+ - task:
23
+ name: Abstractive Text Summarization
24
+ type: abstractive-text-summarization
25
+ dataset:
26
+ name: SAMSum Corpus: A Human-annotated Dialogue Dataset for Abstractive Summarization
27
+ type: samsum
28
+ metrics:
29
+ - name: Validation ROGUE-1
30
+ type: rogue-1
31
+ value: 42.621
32
+ - name: Validation ROGUE-2
33
+ type: rogue-2
34
+ value: 21.9825
35
+ - name: Validation ROGUE-L
36
+ type: rogue-l
37
+ value: 33.034
38
+ - name: Test ROGUE-1
39
+ type: rogue-1
40
+ value: 41.3174
41
+ - name: Test ROGUE-2
42
+ type: rogue-2
43
+ value: 20.8716
44
+ - name: Test ROGUE-L
45
+ type: rogue-l
46
+ value: 32.1337
47
+ ---
48
+
49
+ ## `bart-large-cnn-samsum`
50
+
51
+ This model was trained using Amazon SageMaker and the new Hugging Face Deep Learning container.
52
+
53
+ For more information look at:
54
+ - [🤗 Transformers Documentation: Amazon SageMaker](https://huggingface.co/transformers/sagemaker.html)
55
+ - [Example Notebooks](https://github.com/huggingface/notebooks/tree/master/sagemaker)
56
+ - [Amazon SageMaker documentation for Hugging Face](https://docs.aws.amazon.com/sagemaker/latest/dg/hugging-face.html)
57
+ - [Python SDK SageMaker documentation for Hugging Face](https://sagemaker.readthedocs.io/en/stable/frameworks/huggingface/index.html)
58
+ - [Deep Learning Container](https://github.com/aws/deep-learning-containers/blob/master/available_images.md#huggingface-training-containers)
59
+
60
+ ## Hyperparameters
61
+ ```json
62
+ {
63
+ "dataset_name": "samsum",
64
+ "do_eval": true,
65
+ "do_predict": true,
66
+ "do_train": true,
67
+ "fp16": true,
68
+ "learning_rate": 5e-05,
69
+ "model_name_or_path": "facebook/bart-large-cnn",
70
+ "num_train_epochs": 3,
71
+ "output_dir": "/opt/ml/model",
72
+ "per_device_eval_batch_size": 4,
73
+ "per_device_train_batch_size": 4,
74
+ "predict_with_generate": true,
75
+ "seed": 7
76
+ }
77
+ ```
78
+
79
+ ## Usage
80
+ ```python
81
+ from transformers import pipeline
82
+ summarizer = pipeline("summarization", model="philschmid/bart-large-cnn-samsum")
83
+
84
+ conversation = '''Jeff: Can I train a 🤗 Transformers model on Amazon SageMaker?
85
+ Philipp: Sure you can use the new Hugging Face Deep Learning Container.
86
+ Jeff: ok.
87
+ Jeff: and how can I get started?
88
+ Jeff: where can I find documentation?
89
+ Philipp: ok, ok you can find everything here. https://huggingface.co/blog/the-partnership-amazon-sagemaker-and-hugging-face
90
+ '''
91
+ nlp(conversation)
92
+ ```
93
+
94
+ ## Results
95
+
96
+ | key | value |
97
+ | --- | ----- |
98
+ | eval_rouge1 | 42.621 |
99
+ | eval_rouge2 | 21.9825 |
100
+ | eval_rougeL | 33.034 |
101
+ | eval_rougeLsum | 39.6783 |
102
+ | test_rouge1 | 41.3174 |
103
+ | test_rouge2 | 20.8716 |
104
+ | test_rougeL | 32.1337 |
105
+ | test_rougeLsum | 38.4149 |
106
+
all_results.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "eval_gen_len": 59.9829,
4
+ "eval_loss": 1.3891159296035767,
5
+ "eval_mem_cpu_alloc_delta": 78528783,
6
+ "eval_mem_cpu_peaked_delta": 2605953,
7
+ "eval_mem_gpu_alloc_delta": 0,
8
+ "eval_mem_gpu_peaked_delta": 980464128,
9
+ "eval_rouge1": 42.621,
10
+ "eval_rouge2": 21.9825,
11
+ "eval_rougeL": 33.034,
12
+ "eval_rougeLsum": 39.6783,
13
+ "eval_runtime": 29.301,
14
+ "eval_samples": 818,
15
+ "eval_samples_per_second": 27.917,
16
+ "init_mem_cpu_alloc_delta": 180674,
17
+ "init_mem_cpu_peaked_delta": 18282,
18
+ "init_mem_gpu_alloc_delta": 1625362944,
19
+ "init_mem_gpu_peaked_delta": 0,
20
+ "test_gen_len": 60.0757,
21
+ "test_loss": 1.4224162101745605,
22
+ "test_mem_cpu_alloc_delta": 82666029,
23
+ "test_mem_cpu_peaked_delta": 2572070,
24
+ "test_mem_gpu_alloc_delta": 0,
25
+ "test_mem_gpu_peaked_delta": 1441433088,
26
+ "test_rouge1": 41.3174,
27
+ "test_rouge2": 20.8716,
28
+ "test_rougeL": 32.1337,
29
+ "test_rougeLsum": 38.4149,
30
+ "test_runtime": 34.32,
31
+ "test_samples": 819,
32
+ "test_samples_per_second": 23.864,
33
+ "train_mem_cpu_alloc_delta": 7544164,
34
+ "train_mem_cpu_peaked_delta": 413671172,
35
+ "train_mem_gpu_alloc_delta": 6524230144,
36
+ "train_mem_gpu_peaked_delta": 12734977024,
37
+ "train_runtime": 363.7124,
38
+ "train_samples": 14732,
39
+ "train_samples_per_second": 1.905
40
+ }
checkpoint-500/config.json ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "facebook/bart-large-cnn",
3
+ "_num_labels": 3,
4
+ "activation_dropout": 0.0,
5
+ "activation_function": "gelu",
6
+ "add_final_layer_norm": false,
7
+ "architectures": [
8
+ "BartForConditionalGeneration"
9
+ ],
10
+ "attention_dropout": 0.0,
11
+ "bos_token_id": 0,
12
+ "classif_dropout": 0.0,
13
+ "classifier_dropout": 0.0,
14
+ "d_model": 1024,
15
+ "decoder_attention_heads": 16,
16
+ "decoder_ffn_dim": 4096,
17
+ "decoder_layerdrop": 0.0,
18
+ "decoder_layers": 12,
19
+ "decoder_start_token_id": 2,
20
+ "dropout": 0.1,
21
+ "early_stopping": true,
22
+ "encoder_attention_heads": 16,
23
+ "encoder_ffn_dim": 4096,
24
+ "encoder_layerdrop": 0.0,
25
+ "encoder_layers": 12,
26
+ "eos_token_id": 2,
27
+ "force_bos_token_to_be_generated": true,
28
+ "forced_bos_token_id": 0,
29
+ "forced_eos_token_id": 2,
30
+ "gradient_checkpointing": false,
31
+ "id2label": {
32
+ "0": "LABEL_0",
33
+ "1": "LABEL_1",
34
+ "2": "LABEL_2"
35
+ },
36
+ "init_std": 0.02,
37
+ "is_encoder_decoder": true,
38
+ "label2id": {
39
+ "LABEL_0": 0,
40
+ "LABEL_1": 1,
41
+ "LABEL_2": 2
42
+ },
43
+ "length_penalty": 2.0,
44
+ "max_length": 142,
45
+ "max_position_embeddings": 1024,
46
+ "min_length": 56,
47
+ "model_type": "bart",
48
+ "no_repeat_ngram_size": 3,
49
+ "normalize_before": false,
50
+ "num_beams": 4,
51
+ "num_hidden_layers": 12,
52
+ "output_past": true,
53
+ "pad_token_id": 1,
54
+ "prefix": " ",
55
+ "scale_embedding": false,
56
+ "task_specific_params": {
57
+ "summarization": {
58
+ "early_stopping": true,
59
+ "length_penalty": 2.0,
60
+ "max_length": 142,
61
+ "min_length": 56,
62
+ "no_repeat_ngram_size": 3,
63
+ "num_beams": 4
64
+ }
65
+ },
66
+ "transformers_version": "4.4.2",
67
+ "use_cache": true,
68
+ "vocab_size": 50264
69
+ }
checkpoint-500/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
checkpoint-500/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d163c581e7f6486c0ba6aca9ef9be464b53530dd99425929b2368b22c110bcb3
3
+ size 3250644573
checkpoint-500/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ccab95146195bc461505b4a62c73d7ed4d36a0d126fe880eb16d6c25b27754f0
3
+ size 1625565295
checkpoint-500/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf91f1d266327835696d5fd0a7d3f49511ad7f615da29d5bfd68bb8ddf608a84
3
+ size 559
checkpoint-500/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}}
checkpoint-500/tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"unk_token": "<unk>", "bos_token": "<s>", "eos_token": "</s>", "add_prefix_space": false, "errors": "replace", "sep_token": "</s>", "cls_token": "<s>", "pad_token": "<pad>", "mask_token": "<mask>", "model_max_length": 1024, "special_tokens_map_file": null, "name_or_path": "facebook/bart-large-cnn"}
checkpoint-500/trainer_state.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 2.1645021645021645,
5
+ "global_step": 500,
6
+ "is_hyper_param_search": false,
7
+ "is_local_process_zero": true,
8
+ "is_world_process_zero": true,
9
+ "log_history": [
10
+ {
11
+ "epoch": 2.16,
12
+ "learning_rate": 1.3924963924963927e-05,
13
+ "loss": 1.2342,
14
+ "step": 500
15
+ }
16
+ ],
17
+ "max_steps": 693,
18
+ "num_train_epochs": 3,
19
+ "total_flos": 2.565976886136013e+16,
20
+ "trial_name": null,
21
+ "trial_params": null
22
+ }
checkpoint-500/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:089267ebad1d0e44144bf11503446d8f02d6ac1efd1d78d1084e457061548a66
3
+ size 2351
checkpoint-500/vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
config.json ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "facebook/bart-large-cnn",
3
+ "_num_labels": 3,
4
+ "activation_dropout": 0.0,
5
+ "activation_function": "gelu",
6
+ "add_final_layer_norm": false,
7
+ "architectures": [
8
+ "BartForConditionalGeneration"
9
+ ],
10
+ "attention_dropout": 0.0,
11
+ "bos_token_id": 0,
12
+ "classif_dropout": 0.0,
13
+ "classifier_dropout": 0.0,
14
+ "d_model": 1024,
15
+ "decoder_attention_heads": 16,
16
+ "decoder_ffn_dim": 4096,
17
+ "decoder_layerdrop": 0.0,
18
+ "decoder_layers": 12,
19
+ "decoder_start_token_id": 2,
20
+ "dropout": 0.1,
21
+ "early_stopping": true,
22
+ "encoder_attention_heads": 16,
23
+ "encoder_ffn_dim": 4096,
24
+ "encoder_layerdrop": 0.0,
25
+ "encoder_layers": 12,
26
+ "eos_token_id": 2,
27
+ "force_bos_token_to_be_generated": true,
28
+ "forced_bos_token_id": 0,
29
+ "forced_eos_token_id": 2,
30
+ "gradient_checkpointing": false,
31
+ "id2label": {
32
+ "0": "LABEL_0",
33
+ "1": "LABEL_1",
34
+ "2": "LABEL_2"
35
+ },
36
+ "init_std": 0.02,
37
+ "is_encoder_decoder": true,
38
+ "label2id": {
39
+ "LABEL_0": 0,
40
+ "LABEL_1": 1,
41
+ "LABEL_2": 2
42
+ },
43
+ "length_penalty": 2.0,
44
+ "max_length": 142,
45
+ "max_position_embeddings": 1024,
46
+ "min_length": 56,
47
+ "model_type": "bart",
48
+ "no_repeat_ngram_size": 3,
49
+ "normalize_before": false,
50
+ "num_beams": 4,
51
+ "num_hidden_layers": 12,
52
+ "output_past": true,
53
+ "pad_token_id": 1,
54
+ "prefix": " ",
55
+ "scale_embedding": false,
56
+ "task_specific_params": {
57
+ "summarization": {
58
+ "early_stopping": true,
59
+ "length_penalty": 2.0,
60
+ "max_length": 142,
61
+ "min_length": 56,
62
+ "no_repeat_ngram_size": 3,
63
+ "num_beams": 4
64
+ }
65
+ },
66
+ "transformers_version": "4.4.2",
67
+ "use_cache": true,
68
+ "vocab_size": 50264
69
+ }
eval_results.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "eval_gen_len": 59.9829,
4
+ "eval_loss": 1.3891159296035767,
5
+ "eval_mem_cpu_alloc_delta": 78528783,
6
+ "eval_mem_cpu_peaked_delta": 2605953,
7
+ "eval_mem_gpu_alloc_delta": 0,
8
+ "eval_mem_gpu_peaked_delta": 980464128,
9
+ "eval_rouge1": 42.621,
10
+ "eval_rouge2": 21.9825,
11
+ "eval_rougeL": 33.034,
12
+ "eval_rougeLsum": 39.6783,
13
+ "eval_runtime": 29.301,
14
+ "eval_samples": 818,
15
+ "eval_samples_per_second": 27.917
16
+ }
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:9f453aa6edef4dba1893723b7313b57b06b60214442d308a8acc3baa9583dd7b
3
+ size 1625565295
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}}
test_generations.txt ADDED
The diff for this file is too large to render. See raw diff
 
test_results.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "test_gen_len": 60.0757,
3
+ "test_loss": 1.4224162101745605,
4
+ "test_mem_cpu_alloc_delta": 82666029,
5
+ "test_mem_cpu_peaked_delta": 2572070,
6
+ "test_mem_gpu_alloc_delta": 0,
7
+ "test_mem_gpu_peaked_delta": 1441433088,
8
+ "test_rouge1": 41.3174,
9
+ "test_rouge2": 20.8716,
10
+ "test_rougeL": 32.1337,
11
+ "test_rougeLsum": 38.4149,
12
+ "test_runtime": 34.32,
13
+ "test_samples": 819,
14
+ "test_samples_per_second": 23.864
15
+ }
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"unk_token": "<unk>", "bos_token": "<s>", "eos_token": "</s>", "add_prefix_space": false, "errors": "replace", "sep_token": "</s>", "cls_token": "<s>", "pad_token": "<pad>", "mask_token": "<mask>", "model_max_length": 1024, "special_tokens_map_file": null, "name_or_path": "facebook/bart-large-cnn"}
train_results.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "init_mem_cpu_alloc_delta": 180674,
4
+ "init_mem_cpu_peaked_delta": 18282,
5
+ "init_mem_gpu_alloc_delta": 1625362944,
6
+ "init_mem_gpu_peaked_delta": 0,
7
+ "train_mem_cpu_alloc_delta": 7544164,
8
+ "train_mem_cpu_peaked_delta": 413671172,
9
+ "train_mem_gpu_alloc_delta": 6524230144,
10
+ "train_mem_gpu_peaked_delta": 12734977024,
11
+ "train_runtime": 363.7124,
12
+ "train_samples": 14732,
13
+ "train_samples_per_second": 1.905
14
+ }
trainer_state.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 3.0,
5
+ "global_step": 693,
6
+ "is_hyper_param_search": false,
7
+ "is_local_process_zero": true,
8
+ "is_world_process_zero": true,
9
+ "log_history": [
10
+ {
11
+ "epoch": 2.16,
12
+ "learning_rate": 1.3924963924963927e-05,
13
+ "loss": 1.2342,
14
+ "step": 500
15
+ },
16
+ {
17
+ "epoch": 3.0,
18
+ "step": 693,
19
+ "total_flos": 3.5424926764630016e+16,
20
+ "train_runtime": 363.7124,
21
+ "train_samples_per_second": 1.905
22
+ }
23
+ ],
24
+ "max_steps": 693,
25
+ "num_train_epochs": 3,
26
+ "total_flos": 3.5424926764630016e+16,
27
+ "trial_name": null,
28
+ "trial_params": null
29
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:089267ebad1d0e44144bf11503446d8f02d6ac1efd1d78d1084e457061548a66
3
+ size 2351
vocab.json ADDED
The diff for this file is too large to render. See raw diff