nntoan209 commited on
Commit
8418d0d
1 Parent(s): 6e16e33

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +4 -0
  2. checkpoint-1506/1_Pooling/config.json +10 -0
  3. checkpoint-1506/README.md +57 -0
  4. checkpoint-1506/colbert_linear.pt +3 -0
  5. checkpoint-1506/config.json +28 -0
  6. checkpoint-1506/config_sentence_transformers.json +9 -0
  7. checkpoint-1506/global_step1506/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt +3 -0
  8. checkpoint-1506/global_step1506/bf16_zero_pp_rank_1_mp_rank_00_optim_states.pt +3 -0
  9. checkpoint-1506/global_step1506/mp_rank_00_model_states.pt +3 -0
  10. checkpoint-1506/latest +1 -0
  11. checkpoint-1506/model.safetensors +3 -0
  12. checkpoint-1506/modules.json +20 -0
  13. checkpoint-1506/rng_state_0.pth +3 -0
  14. checkpoint-1506/rng_state_1.pth +3 -0
  15. checkpoint-1506/sentence_bert_config.json +4 -0
  16. checkpoint-1506/sentencepiece.bpe.model +3 -0
  17. checkpoint-1506/sparse_linear.pt +3 -0
  18. checkpoint-1506/special_tokens_map.json +51 -0
  19. checkpoint-1506/tokenizer.json +3 -0
  20. checkpoint-1506/tokenizer_config.json +55 -0
  21. checkpoint-1506/trainer_state.json +1071 -0
  22. checkpoint-1506/training_args.bin +3 -0
  23. checkpoint-1506/zero_to_fp32.py +587 -0
  24. checkpoint-3012/1_Pooling/config.json +10 -0
  25. checkpoint-3012/README.md +57 -0
  26. checkpoint-3012/colbert_linear.pt +3 -0
  27. checkpoint-3012/config.json +28 -0
  28. checkpoint-3012/config_sentence_transformers.json +9 -0
  29. checkpoint-3012/global_step3012/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt +3 -0
  30. checkpoint-3012/global_step3012/bf16_zero_pp_rank_1_mp_rank_00_optim_states.pt +3 -0
  31. checkpoint-3012/global_step3012/mp_rank_00_model_states.pt +3 -0
  32. checkpoint-3012/latest +1 -0
  33. checkpoint-3012/model.safetensors +3 -0
  34. checkpoint-3012/modules.json +20 -0
  35. checkpoint-3012/rng_state_0.pth +3 -0
  36. checkpoint-3012/rng_state_1.pth +3 -0
  37. checkpoint-3012/sentence_bert_config.json +4 -0
  38. checkpoint-3012/sentencepiece.bpe.model +3 -0
  39. checkpoint-3012/sparse_linear.pt +3 -0
  40. checkpoint-3012/special_tokens_map.json +51 -0
  41. checkpoint-3012/tokenizer.json +3 -0
  42. checkpoint-3012/tokenizer_config.json +55 -0
  43. checkpoint-3012/trainer_state.json +2128 -0
  44. checkpoint-3012/training_args.bin +3 -0
  45. checkpoint-3012/zero_to_fp32.py +587 -0
  46. checkpoint-4518/1_Pooling/config.json +10 -0
  47. checkpoint-4518/README.md +57 -0
  48. checkpoint-4518/colbert_linear.pt +3 -0
  49. checkpoint-4518/config.json +28 -0
  50. checkpoint-4518/config_sentence_transformers.json +9 -0
.gitattributes CHANGED
@@ -33,3 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ checkpoint-1506/tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
+ checkpoint-3012/tokenizer.json filter=lfs diff=lfs merge=lfs -text
38
+ checkpoint-4518/tokenizer.json filter=lfs diff=lfs merge=lfs -text
39
+ checkpoint-6024/tokenizer.json filter=lfs diff=lfs merge=lfs -text
checkpoint-1506/1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 1024,
3
+ "pooling_mode_cls_token": true,
4
+ "pooling_mode_mean_tokens": false,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
checkpoint-1506/README.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: sentence-transformers
3
+ pipeline_tag: sentence-similarity
4
+ tags:
5
+ - sentence-transformers
6
+ - feature-extraction
7
+ - sentence-similarity
8
+
9
+ ---
10
+
11
+ # {MODEL_NAME}
12
+
13
+ This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 1024 dimensional dense vector space and can be used for tasks like clustering or semantic search.
14
+
15
+ <!--- Describe your model here -->
16
+
17
+ ## Usage (Sentence-Transformers)
18
+
19
+ Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
20
+
21
+ ```
22
+ pip install -U sentence-transformers
23
+ ```
24
+
25
+ Then you can use the model like this:
26
+
27
+ ```python
28
+ from sentence_transformers import SentenceTransformer
29
+ sentences = ["This is an example sentence", "Each sentence is converted"]
30
+
31
+ model = SentenceTransformer('{MODEL_NAME}')
32
+ embeddings = model.encode(sentences)
33
+ print(embeddings)
34
+ ```
35
+
36
+
37
+
38
+ ## Evaluation Results
39
+
40
+ <!--- Describe how your model was evaluated -->
41
+
42
+ For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
43
+
44
+
45
+
46
+ ## Full Model Architecture
47
+ ```
48
+ SentenceTransformer(
49
+ (0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
50
+ (1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
51
+ (2): Normalize()
52
+ )
53
+ ```
54
+
55
+ ## Citing & Authors
56
+
57
+ <!--- Describe where people can find more information -->
checkpoint-1506/colbert_linear.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:19d2655409ead458a148bb728c124e4411e6b8e54701c3fcb44f3b1e3fc09703
3
+ size 2100227
checkpoint-1506/config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "saved_models/bgem3_unified_finetune_20240330/checkpoint-1506",
3
+ "architectures": [
4
+ "XLMRobertaModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 1024,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 4096,
15
+ "layer_norm_eps": 1e-05,
16
+ "max_position_embeddings": 8194,
17
+ "model_type": "xlm-roberta",
18
+ "num_attention_heads": 16,
19
+ "num_hidden_layers": 24,
20
+ "output_past": true,
21
+ "pad_token_id": 1,
22
+ "position_embedding_type": "absolute",
23
+ "torch_dtype": "float32",
24
+ "transformers_version": "4.39.1",
25
+ "type_vocab_size": 1,
26
+ "use_cache": true,
27
+ "vocab_size": 250002
28
+ }
checkpoint-1506/config_sentence_transformers.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "2.6.0",
4
+ "transformers": "4.39.1",
5
+ "pytorch": "2.0.1+cu117"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null
9
+ }
checkpoint-1506/global_step1506/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:64c1cc5993e46cc6f8f416f3bbee15229eb758d605d89c4705e9ffdb716dd51f
3
+ size 3412837975
checkpoint-1506/global_step1506/bf16_zero_pp_rank_1_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b8da5a1160c4762af2bf151a32acbe0c23503dc975f79b71281879829651ccaf
3
+ size 3412867031
checkpoint-1506/global_step1506/mp_rank_00_model_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:00d6dc99de1451e07b73edb6abc2505516017db237dba5408a64952f44fb1e3a
3
+ size 1137729563
checkpoint-1506/latest ADDED
@@ -0,0 +1 @@
 
 
1
+ global_step1506
checkpoint-1506/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:57c93df581f333085a70042b9fe06a278de8dfa1fd1577c743561365cd9af130
3
+ size 2271064456
checkpoint-1506/modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ },
14
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
checkpoint-1506/rng_state_0.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6fa54f27d4dcee0fd1801d909c8335e58360dc3e06b24da249b72492669278d9
3
+ size 15607
checkpoint-1506/rng_state_1.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a96d6edb046b989f646f8c2e335c4d6d773d850f827e65e27af34b97c6cb96ce
3
+ size 15607
checkpoint-1506/sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 8192,
3
+ "do_lower_case": false
4
+ }
checkpoint-1506/sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
3
+ size 5069051
checkpoint-1506/sparse_linear.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1162364150f8f40f9204f24d0a6bb3f5772a948cd37e14aa4d7c4aaad8175eaa
3
+ size 3071
checkpoint-1506/special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
checkpoint-1506/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:69564b696052886ed0ac63fa393e928384e0f8caada38c1f4864a9bfbf379c15
3
+ size 17098273
checkpoint-1506/tokenizer_config.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "250001": {
36
+ "content": "<mask>",
37
+ "lstrip": true,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "<s>",
45
+ "clean_up_tokenization_spaces": true,
46
+ "cls_token": "<s>",
47
+ "eos_token": "</s>",
48
+ "mask_token": "<mask>",
49
+ "model_max_length": 8192,
50
+ "pad_token": "<pad>",
51
+ "sep_token": "</s>",
52
+ "sp_model_kwargs": {},
53
+ "tokenizer_class": "XLMRobertaTokenizer",
54
+ "unk_token": "<unk>"
55
+ }
checkpoint-1506/trainer_state.json ADDED
@@ -0,0 +1,1071 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 1.0,
5
+ "eval_steps": 500,
6
+ "global_step": 1506,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 0.01,
13
+ "grad_norm": 41.35739895402257,
14
+ "learning_rate": 7.193423539345941e-06,
15
+ "loss": 0.5141,
16
+ "step": 10
17
+ },
18
+ {
19
+ "epoch": 0.01,
20
+ "grad_norm": 10.443694874625423,
21
+ "learning_rate": 9.358859796204429e-06,
22
+ "loss": 0.4195,
23
+ "step": 20
24
+ },
25
+ {
26
+ "epoch": 0.02,
27
+ "grad_norm": 5.720021591145773,
28
+ "learning_rate": 1.0625558804168632e-05,
29
+ "loss": 0.2851,
30
+ "step": 30
31
+ },
32
+ {
33
+ "epoch": 0.03,
34
+ "grad_norm": 7.59250257002781,
35
+ "learning_rate": 1.1524296053062918e-05,
36
+ "loss": 0.2174,
37
+ "step": 40
38
+ },
39
+ {
40
+ "epoch": 0.03,
41
+ "grad_norm": 11.521550428114184,
42
+ "learning_rate": 1.2221410821833392e-05,
43
+ "loss": 0.1817,
44
+ "step": 50
45
+ },
46
+ {
47
+ "epoch": 0.04,
48
+ "grad_norm": 6.027998448017936,
49
+ "learning_rate": 1.2790995061027121e-05,
50
+ "loss": 0.1886,
51
+ "step": 60
52
+ },
53
+ {
54
+ "epoch": 0.05,
55
+ "grad_norm": 4.929816146115093,
56
+ "learning_rate": 1.3272571673439616e-05,
57
+ "loss": 0.1553,
58
+ "step": 70
59
+ },
60
+ {
61
+ "epoch": 0.05,
62
+ "grad_norm": 2.3881515971871345,
63
+ "learning_rate": 1.3689732309921406e-05,
64
+ "loss": 0.129,
65
+ "step": 80
66
+ },
67
+ {
68
+ "epoch": 0.06,
69
+ "grad_norm": 5.441118636680569,
70
+ "learning_rate": 1.4057694068991321e-05,
71
+ "loss": 0.1433,
72
+ "step": 90
73
+ },
74
+ {
75
+ "epoch": 0.07,
76
+ "grad_norm": 6.085213496930297,
77
+ "learning_rate": 1.4386847078691883e-05,
78
+ "loss": 0.1092,
79
+ "step": 100
80
+ },
81
+ {
82
+ "epoch": 0.07,
83
+ "grad_norm": 4.713361075579101,
84
+ "learning_rate": 1.4684602194465794e-05,
85
+ "loss": 0.1231,
86
+ "step": 110
87
+ },
88
+ {
89
+ "epoch": 0.08,
90
+ "grad_norm": 3.8259500358417924,
91
+ "learning_rate": 1.495643131788561e-05,
92
+ "loss": 0.0697,
93
+ "step": 120
94
+ },
95
+ {
96
+ "epoch": 0.09,
97
+ "grad_norm": 2.67920682727699,
98
+ "learning_rate": 1.5206489871327869e-05,
99
+ "loss": 0.084,
100
+ "step": 130
101
+ },
102
+ {
103
+ "epoch": 0.09,
104
+ "grad_norm": 8.189491553913532,
105
+ "learning_rate": 1.54380079302981e-05,
106
+ "loss": 0.1023,
107
+ "step": 140
108
+ },
109
+ {
110
+ "epoch": 0.1,
111
+ "grad_norm": 12.000369384166694,
112
+ "learning_rate": 1.5653546086656083e-05,
113
+ "loss": 0.0972,
114
+ "step": 150
115
+ },
116
+ {
117
+ "epoch": 0.11,
118
+ "grad_norm": 2.3726942012239953,
119
+ "learning_rate": 1.5855168566779895e-05,
120
+ "loss": 0.1036,
121
+ "step": 160
122
+ },
123
+ {
124
+ "epoch": 0.11,
125
+ "grad_norm": 2.0242117206977044,
126
+ "learning_rate": 1.604456377435124e-05,
127
+ "loss": 0.1081,
128
+ "step": 170
129
+ },
130
+ {
131
+ "epoch": 0.12,
132
+ "grad_norm": 2.2261934744219967,
133
+ "learning_rate": 1.6223130325849813e-05,
134
+ "loss": 0.082,
135
+ "step": 180
136
+ },
137
+ {
138
+ "epoch": 0.13,
139
+ "grad_norm": 4.70421073268978,
140
+ "learning_rate": 1.6392039793463407e-05,
141
+ "loss": 0.0744,
142
+ "step": 190
143
+ },
144
+ {
145
+ "epoch": 0.13,
146
+ "grad_norm": 12.064244277626111,
147
+ "learning_rate": 1.6552283335550368e-05,
148
+ "loss": 0.0934,
149
+ "step": 200
150
+ },
151
+ {
152
+ "epoch": 0.14,
153
+ "grad_norm": 2.150990470911233,
154
+ "learning_rate": 1.67047069382623e-05,
155
+ "loss": 0.0737,
156
+ "step": 210
157
+ },
158
+ {
159
+ "epoch": 0.15,
160
+ "grad_norm": 4.074258308547766,
161
+ "learning_rate": 1.6850038451324284e-05,
162
+ "loss": 0.0841,
163
+ "step": 220
164
+ },
165
+ {
166
+ "epoch": 0.15,
167
+ "grad_norm": 2.6764310841274237,
168
+ "learning_rate": 1.6988908609137504e-05,
169
+ "loss": 0.0821,
170
+ "step": 230
171
+ },
172
+ {
173
+ "epoch": 0.16,
174
+ "grad_norm": 3.1391283710987063,
175
+ "learning_rate": 1.71218675747441e-05,
176
+ "loss": 0.0747,
177
+ "step": 240
178
+ },
179
+ {
180
+ "epoch": 0.17,
181
+ "grad_norm": 3.1103728720325754,
182
+ "learning_rate": 1.7249398104320845e-05,
183
+ "loss": 0.0907,
184
+ "step": 250
185
+ },
186
+ {
187
+ "epoch": 0.17,
188
+ "grad_norm": 5.354173276825422,
189
+ "learning_rate": 1.7371926128186358e-05,
190
+ "loss": 0.0765,
191
+ "step": 260
192
+ },
193
+ {
194
+ "epoch": 0.18,
195
+ "grad_norm": 2.8677808267225005,
196
+ "learning_rate": 1.7489829333814013e-05,
197
+ "loss": 0.0777,
198
+ "step": 270
199
+ },
200
+ {
201
+ "epoch": 0.19,
202
+ "grad_norm": 2.6124301773304874,
203
+ "learning_rate": 1.760344418715659e-05,
204
+ "loss": 0.0897,
205
+ "step": 280
206
+ },
207
+ {
208
+ "epoch": 0.19,
209
+ "grad_norm": 2.915238130503912,
210
+ "learning_rate": 1.7713071721324668e-05,
211
+ "loss": 0.0866,
212
+ "step": 290
213
+ },
214
+ {
215
+ "epoch": 0.2,
216
+ "grad_norm": 4.061775729833908,
217
+ "learning_rate": 1.781898234351457e-05,
218
+ "loss": 0.0804,
219
+ "step": 300
220
+ },
221
+ {
222
+ "epoch": 0.21,
223
+ "grad_norm": 1.5648704857906242,
224
+ "learning_rate": 1.7921419853452233e-05,
225
+ "loss": 0.0834,
226
+ "step": 310
227
+ },
228
+ {
229
+ "epoch": 0.21,
230
+ "grad_norm": 2.225837991191409,
231
+ "learning_rate": 1.8020604823638384e-05,
232
+ "loss": 0.0646,
233
+ "step": 320
234
+ },
235
+ {
236
+ "epoch": 0.22,
237
+ "grad_norm": 4.041622096074851,
238
+ "learning_rate": 1.811673745928848e-05,
239
+ "loss": 0.0636,
240
+ "step": 330
241
+ },
242
+ {
243
+ "epoch": 0.23,
244
+ "grad_norm": 0.21100008000919218,
245
+ "learning_rate": 1.821000003120973e-05,
246
+ "loss": 0.0656,
247
+ "step": 340
248
+ },
249
+ {
250
+ "epoch": 0.23,
251
+ "grad_norm": 2.2923304434569443,
252
+ "learning_rate": 1.8300558955927067e-05,
253
+ "loss": 0.0756,
254
+ "step": 350
255
+ },
256
+ {
257
+ "epoch": 0.24,
258
+ "grad_norm": 3.6524729986322013,
259
+ "learning_rate": 1.83885665827083e-05,
260
+ "loss": 0.0466,
261
+ "step": 360
262
+ },
263
+ {
264
+ "epoch": 0.25,
265
+ "grad_norm": 2.1793660025907284,
266
+ "learning_rate": 1.847416273569235e-05,
267
+ "loss": 0.0704,
268
+ "step": 370
269
+ },
270
+ {
271
+ "epoch": 0.25,
272
+ "grad_norm": 4.363503091034068,
273
+ "learning_rate": 1.8557476050321896e-05,
274
+ "loss": 0.0712,
275
+ "step": 380
276
+ },
277
+ {
278
+ "epoch": 0.26,
279
+ "grad_norm": 3.0942807753734476,
280
+ "learning_rate": 1.863862513615056e-05,
281
+ "loss": 0.0831,
282
+ "step": 390
283
+ },
284
+ {
285
+ "epoch": 0.27,
286
+ "grad_norm": 1.789230871814937,
287
+ "learning_rate": 1.8717719592408857e-05,
288
+ "loss": 0.078,
289
+ "step": 400
290
+ },
291
+ {
292
+ "epoch": 0.27,
293
+ "grad_norm": 3.4361028432853677,
294
+ "learning_rate": 1.879486089815082e-05,
295
+ "loss": 0.0663,
296
+ "step": 410
297
+ },
298
+ {
299
+ "epoch": 0.28,
300
+ "grad_norm": 3.690439378170989,
301
+ "learning_rate": 1.8870143195120794e-05,
302
+ "loss": 0.0738,
303
+ "step": 420
304
+ },
305
+ {
306
+ "epoch": 0.29,
307
+ "grad_norm": 2.159404934400987,
308
+ "learning_rate": 1.8943653978491198e-05,
309
+ "loss": 0.0768,
310
+ "step": 430
311
+ },
312
+ {
313
+ "epoch": 0.29,
314
+ "grad_norm": 0.8042070009727055,
315
+ "learning_rate": 1.901547470818277e-05,
316
+ "loss": 0.0777,
317
+ "step": 440
318
+ },
319
+ {
320
+ "epoch": 0.3,
321
+ "grad_norm": 1.70758347995601,
322
+ "learning_rate": 1.9085681351478775e-05,
323
+ "loss": 0.05,
324
+ "step": 450
325
+ },
326
+ {
327
+ "epoch": 0.31,
328
+ "grad_norm": 1.2113560599237037,
329
+ "learning_rate": 1.9154344865995993e-05,
330
+ "loss": 0.0715,
331
+ "step": 460
332
+ },
333
+ {
334
+ "epoch": 0.31,
335
+ "grad_norm": 2.5816071085486527,
336
+ "learning_rate": 1.9221531630710657e-05,
337
+ "loss": 0.0688,
338
+ "step": 470
339
+ },
340
+ {
341
+ "epoch": 0.32,
342
+ "grad_norm": 1.4447841193953872,
343
+ "learning_rate": 1.9287303831602588e-05,
344
+ "loss": 0.0659,
345
+ "step": 480
346
+ },
347
+ {
348
+ "epoch": 0.33,
349
+ "grad_norm": 1.2668557011358101,
350
+ "learning_rate": 1.9351719807533285e-05,
351
+ "loss": 0.0515,
352
+ "step": 490
353
+ },
354
+ {
355
+ "epoch": 0.33,
356
+ "grad_norm": 2.0353893651728865,
357
+ "learning_rate": 1.9414834361179333e-05,
358
+ "loss": 0.0687,
359
+ "step": 500
360
+ },
361
+ {
362
+ "epoch": 0.34,
363
+ "grad_norm": 2.005863891715338,
364
+ "learning_rate": 1.947669903917393e-05,
365
+ "loss": 0.0459,
366
+ "step": 510
367
+ },
368
+ {
369
+ "epoch": 0.35,
370
+ "grad_norm": 1.4330303529877615,
371
+ "learning_rate": 1.9537362385044847e-05,
372
+ "loss": 0.0557,
373
+ "step": 520
374
+ },
375
+ {
376
+ "epoch": 0.35,
377
+ "grad_norm": 1.8683959370360874,
378
+ "learning_rate": 1.959687016805845e-05,
379
+ "loss": 0.0656,
380
+ "step": 530
381
+ },
382
+ {
383
+ "epoch": 0.36,
384
+ "grad_norm": 1.5963373312962135,
385
+ "learning_rate": 1.9655265590672502e-05,
386
+ "loss": 0.0519,
387
+ "step": 540
388
+ },
389
+ {
390
+ "epoch": 0.37,
391
+ "grad_norm": 1.824110595633705,
392
+ "learning_rate": 1.9712589476953243e-05,
393
+ "loss": 0.0557,
394
+ "step": 550
395
+ },
396
+ {
397
+ "epoch": 0.37,
398
+ "grad_norm": 2.024299349665376,
399
+ "learning_rate": 1.976888044401508e-05,
400
+ "loss": 0.0617,
401
+ "step": 560
402
+ },
403
+ {
404
+ "epoch": 0.38,
405
+ "grad_norm": 1.0490238284158413,
406
+ "learning_rate": 1.98241750582861e-05,
407
+ "loss": 0.0529,
408
+ "step": 570
409
+ },
410
+ {
411
+ "epoch": 0.39,
412
+ "grad_norm": 1.2602675746455845,
413
+ "learning_rate": 1.9878507978183157e-05,
414
+ "loss": 0.0617,
415
+ "step": 580
416
+ },
417
+ {
418
+ "epoch": 0.39,
419
+ "grad_norm": 1.7353304044327778,
420
+ "learning_rate": 1.9931912084590654e-05,
421
+ "loss": 0.0464,
422
+ "step": 590
423
+ },
424
+ {
425
+ "epoch": 0.4,
426
+ "grad_norm": 2.043608410331547,
427
+ "learning_rate": 1.998441860037306e-05,
428
+ "loss": 0.0716,
429
+ "step": 600
430
+ },
431
+ {
432
+ "epoch": 0.41,
433
+ "grad_norm": 0.9522735357022469,
434
+ "learning_rate": 1.997786386275595e-05,
435
+ "loss": 0.0496,
436
+ "step": 610
437
+ },
438
+ {
439
+ "epoch": 0.41,
440
+ "grad_norm": 1.3740017908881452,
441
+ "learning_rate": 1.9940970300682533e-05,
442
+ "loss": 0.0686,
443
+ "step": 620
444
+ },
445
+ {
446
+ "epoch": 0.42,
447
+ "grad_norm": 1.1533525092583308,
448
+ "learning_rate": 1.9904076738609114e-05,
449
+ "loss": 0.0562,
450
+ "step": 630
451
+ },
452
+ {
453
+ "epoch": 0.42,
454
+ "grad_norm": 1.564671647601224,
455
+ "learning_rate": 1.9867183176535695e-05,
456
+ "loss": 0.0553,
457
+ "step": 640
458
+ },
459
+ {
460
+ "epoch": 0.43,
461
+ "grad_norm": 0.8996693997352794,
462
+ "learning_rate": 1.9830289614462276e-05,
463
+ "loss": 0.0524,
464
+ "step": 650
465
+ },
466
+ {
467
+ "epoch": 0.44,
468
+ "grad_norm": 1.9340857910489522,
469
+ "learning_rate": 1.979339605238886e-05,
470
+ "loss": 0.0534,
471
+ "step": 660
472
+ },
473
+ {
474
+ "epoch": 0.44,
475
+ "grad_norm": 1.892682744806536,
476
+ "learning_rate": 1.9756502490315442e-05,
477
+ "loss": 0.0625,
478
+ "step": 670
479
+ },
480
+ {
481
+ "epoch": 0.45,
482
+ "grad_norm": 1.2063853192894494,
483
+ "learning_rate": 1.9719608928242023e-05,
484
+ "loss": 0.0519,
485
+ "step": 680
486
+ },
487
+ {
488
+ "epoch": 0.46,
489
+ "grad_norm": 1.984312822464147,
490
+ "learning_rate": 1.9682715366168604e-05,
491
+ "loss": 0.0494,
492
+ "step": 690
493
+ },
494
+ {
495
+ "epoch": 0.46,
496
+ "grad_norm": 1.6705446030280595,
497
+ "learning_rate": 1.9645821804095185e-05,
498
+ "loss": 0.059,
499
+ "step": 700
500
+ },
501
+ {
502
+ "epoch": 0.47,
503
+ "grad_norm": 1.7422620817223426,
504
+ "learning_rate": 1.960892824202177e-05,
505
+ "loss": 0.0454,
506
+ "step": 710
507
+ },
508
+ {
509
+ "epoch": 0.48,
510
+ "grad_norm": 1.3182961229762868,
511
+ "learning_rate": 1.957203467994835e-05,
512
+ "loss": 0.0581,
513
+ "step": 720
514
+ },
515
+ {
516
+ "epoch": 0.48,
517
+ "grad_norm": 1.330360819481426,
518
+ "learning_rate": 1.9535141117874932e-05,
519
+ "loss": 0.0575,
520
+ "step": 730
521
+ },
522
+ {
523
+ "epoch": 0.49,
524
+ "grad_norm": 1.9840741868184866,
525
+ "learning_rate": 1.9498247555801517e-05,
526
+ "loss": 0.063,
527
+ "step": 740
528
+ },
529
+ {
530
+ "epoch": 0.5,
531
+ "grad_norm": 1.6018064731760029,
532
+ "learning_rate": 1.9461353993728094e-05,
533
+ "loss": 0.0519,
534
+ "step": 750
535
+ },
536
+ {
537
+ "epoch": 0.5,
538
+ "grad_norm": 1.391561342963203,
539
+ "learning_rate": 1.9424460431654675e-05,
540
+ "loss": 0.0572,
541
+ "step": 760
542
+ },
543
+ {
544
+ "epoch": 0.51,
545
+ "grad_norm": 1.0319629863193043,
546
+ "learning_rate": 1.938756686958126e-05,
547
+ "loss": 0.0619,
548
+ "step": 770
549
+ },
550
+ {
551
+ "epoch": 0.52,
552
+ "grad_norm": 1.7398111190442345,
553
+ "learning_rate": 1.935067330750784e-05,
554
+ "loss": 0.05,
555
+ "step": 780
556
+ },
557
+ {
558
+ "epoch": 0.52,
559
+ "grad_norm": 1.675180749962208,
560
+ "learning_rate": 1.9313779745434422e-05,
561
+ "loss": 0.0654,
562
+ "step": 790
563
+ },
564
+ {
565
+ "epoch": 0.53,
566
+ "grad_norm": 1.486943722740635,
567
+ "learning_rate": 1.9276886183361007e-05,
568
+ "loss": 0.0463,
569
+ "step": 800
570
+ },
571
+ {
572
+ "epoch": 0.54,
573
+ "grad_norm": 1.1444156835752686,
574
+ "learning_rate": 1.9239992621287588e-05,
575
+ "loss": 0.0598,
576
+ "step": 810
577
+ },
578
+ {
579
+ "epoch": 0.54,
580
+ "grad_norm": 1.1260777714975718,
581
+ "learning_rate": 1.920309905921417e-05,
582
+ "loss": 0.039,
583
+ "step": 820
584
+ },
585
+ {
586
+ "epoch": 0.55,
587
+ "grad_norm": 1.328313971146618,
588
+ "learning_rate": 1.916620549714075e-05,
589
+ "loss": 0.0591,
590
+ "step": 830
591
+ },
592
+ {
593
+ "epoch": 0.56,
594
+ "grad_norm": 0.8805517771854091,
595
+ "learning_rate": 1.912931193506733e-05,
596
+ "loss": 0.0392,
597
+ "step": 840
598
+ },
599
+ {
600
+ "epoch": 0.56,
601
+ "grad_norm": 0.9704226543415952,
602
+ "learning_rate": 1.9092418372993916e-05,
603
+ "loss": 0.056,
604
+ "step": 850
605
+ },
606
+ {
607
+ "epoch": 0.57,
608
+ "grad_norm": 1.4328262810995938,
609
+ "learning_rate": 1.9055524810920497e-05,
610
+ "loss": 0.0602,
611
+ "step": 860
612
+ },
613
+ {
614
+ "epoch": 0.58,
615
+ "grad_norm": 2.6133255890647167,
616
+ "learning_rate": 1.9018631248847078e-05,
617
+ "loss": 0.0507,
618
+ "step": 870
619
+ },
620
+ {
621
+ "epoch": 0.58,
622
+ "grad_norm": 1.4574352859865667,
623
+ "learning_rate": 1.898173768677366e-05,
624
+ "loss": 0.0667,
625
+ "step": 880
626
+ },
627
+ {
628
+ "epoch": 0.59,
629
+ "grad_norm": 1.9116869451062006,
630
+ "learning_rate": 1.894484412470024e-05,
631
+ "loss": 0.0533,
632
+ "step": 890
633
+ },
634
+ {
635
+ "epoch": 0.6,
636
+ "grad_norm": 0.8152499611885836,
637
+ "learning_rate": 1.890795056262682e-05,
638
+ "loss": 0.0534,
639
+ "step": 900
640
+ },
641
+ {
642
+ "epoch": 0.6,
643
+ "grad_norm": 2.9440345318883696,
644
+ "learning_rate": 1.8871057000553406e-05,
645
+ "loss": 0.0419,
646
+ "step": 910
647
+ },
648
+ {
649
+ "epoch": 0.61,
650
+ "grad_norm": 2.7588896552457074,
651
+ "learning_rate": 1.8834163438479987e-05,
652
+ "loss": 0.0418,
653
+ "step": 920
654
+ },
655
+ {
656
+ "epoch": 0.62,
657
+ "grad_norm": 1.8886319208504987,
658
+ "learning_rate": 1.8797269876406568e-05,
659
+ "loss": 0.0397,
660
+ "step": 930
661
+ },
662
+ {
663
+ "epoch": 0.62,
664
+ "grad_norm": 1.8820615671771377,
665
+ "learning_rate": 1.876037631433315e-05,
666
+ "loss": 0.0454,
667
+ "step": 940
668
+ },
669
+ {
670
+ "epoch": 0.63,
671
+ "grad_norm": 1.2868214865586614,
672
+ "learning_rate": 1.872348275225973e-05,
673
+ "loss": 0.0373,
674
+ "step": 950
675
+ },
676
+ {
677
+ "epoch": 0.64,
678
+ "grad_norm": 2.016876778284122,
679
+ "learning_rate": 1.8686589190186315e-05,
680
+ "loss": 0.0619,
681
+ "step": 960
682
+ },
683
+ {
684
+ "epoch": 0.64,
685
+ "grad_norm": 0.8992764743601639,
686
+ "learning_rate": 1.8649695628112896e-05,
687
+ "loss": 0.0403,
688
+ "step": 970
689
+ },
690
+ {
691
+ "epoch": 0.65,
692
+ "grad_norm": 0.42416507318131186,
693
+ "learning_rate": 1.8612802066039477e-05,
694
+ "loss": 0.067,
695
+ "step": 980
696
+ },
697
+ {
698
+ "epoch": 0.66,
699
+ "grad_norm": 1.8601423331120188,
700
+ "learning_rate": 1.8575908503966062e-05,
701
+ "loss": 0.066,
702
+ "step": 990
703
+ },
704
+ {
705
+ "epoch": 0.66,
706
+ "grad_norm": 1.3893250379275068,
707
+ "learning_rate": 1.8539014941892643e-05,
708
+ "loss": 0.0437,
709
+ "step": 1000
710
+ },
711
+ {
712
+ "epoch": 0.67,
713
+ "grad_norm": 2.3240219930504376,
714
+ "learning_rate": 1.850212137981922e-05,
715
+ "loss": 0.0488,
716
+ "step": 1010
717
+ },
718
+ {
719
+ "epoch": 0.68,
720
+ "grad_norm": 0.8849896953543195,
721
+ "learning_rate": 1.8465227817745805e-05,
722
+ "loss": 0.0472,
723
+ "step": 1020
724
+ },
725
+ {
726
+ "epoch": 0.68,
727
+ "grad_norm": 0.8655212477880712,
728
+ "learning_rate": 1.8428334255672386e-05,
729
+ "loss": 0.0546,
730
+ "step": 1030
731
+ },
732
+ {
733
+ "epoch": 0.69,
734
+ "grad_norm": 1.2016665548799828,
735
+ "learning_rate": 1.8391440693598967e-05,
736
+ "loss": 0.0956,
737
+ "step": 1040
738
+ },
739
+ {
740
+ "epoch": 0.7,
741
+ "grad_norm": 1.492659569010543,
742
+ "learning_rate": 1.8354547131525552e-05,
743
+ "loss": 0.0449,
744
+ "step": 1050
745
+ },
746
+ {
747
+ "epoch": 0.7,
748
+ "grad_norm": 0.4224837643985645,
749
+ "learning_rate": 1.8317653569452133e-05,
750
+ "loss": 0.0545,
751
+ "step": 1060
752
+ },
753
+ {
754
+ "epoch": 0.71,
755
+ "grad_norm": 1.8405573730480247,
756
+ "learning_rate": 1.8280760007378714e-05,
757
+ "loss": 0.0328,
758
+ "step": 1070
759
+ },
760
+ {
761
+ "epoch": 0.72,
762
+ "grad_norm": 0.3988661237020132,
763
+ "learning_rate": 1.8243866445305295e-05,
764
+ "loss": 0.0451,
765
+ "step": 1080
766
+ },
767
+ {
768
+ "epoch": 0.72,
769
+ "grad_norm": 0.5573396543240564,
770
+ "learning_rate": 1.8206972883231876e-05,
771
+ "loss": 0.0502,
772
+ "step": 1090
773
+ },
774
+ {
775
+ "epoch": 0.73,
776
+ "grad_norm": 0.7855566721285819,
777
+ "learning_rate": 1.817007932115846e-05,
778
+ "loss": 0.0341,
779
+ "step": 1100
780
+ },
781
+ {
782
+ "epoch": 0.74,
783
+ "grad_norm": 1.497005175064917,
784
+ "learning_rate": 1.8133185759085042e-05,
785
+ "loss": 0.0513,
786
+ "step": 1110
787
+ },
788
+ {
789
+ "epoch": 0.74,
790
+ "grad_norm": 1.650975953086994,
791
+ "learning_rate": 1.8096292197011623e-05,
792
+ "loss": 0.0473,
793
+ "step": 1120
794
+ },
795
+ {
796
+ "epoch": 0.75,
797
+ "grad_norm": 0.8418054071334755,
798
+ "learning_rate": 1.8059398634938204e-05,
799
+ "loss": 0.0444,
800
+ "step": 1130
801
+ },
802
+ {
803
+ "epoch": 0.76,
804
+ "grad_norm": 1.33651471077315,
805
+ "learning_rate": 1.8022505072864785e-05,
806
+ "loss": 0.0476,
807
+ "step": 1140
808
+ },
809
+ {
810
+ "epoch": 0.76,
811
+ "grad_norm": 1.1529220423121023,
812
+ "learning_rate": 1.7985611510791367e-05,
813
+ "loss": 0.0379,
814
+ "step": 1150
815
+ },
816
+ {
817
+ "epoch": 0.77,
818
+ "grad_norm": 0.6912013035706749,
819
+ "learning_rate": 1.794871794871795e-05,
820
+ "loss": 0.0526,
821
+ "step": 1160
822
+ },
823
+ {
824
+ "epoch": 0.78,
825
+ "grad_norm": 2.806793867054328,
826
+ "learning_rate": 1.7911824386644532e-05,
827
+ "loss": 0.047,
828
+ "step": 1170
829
+ },
830
+ {
831
+ "epoch": 0.78,
832
+ "grad_norm": 3.323409487413899,
833
+ "learning_rate": 1.7874930824571113e-05,
834
+ "loss": 0.0455,
835
+ "step": 1180
836
+ },
837
+ {
838
+ "epoch": 0.79,
839
+ "grad_norm": 1.0877783561592873,
840
+ "learning_rate": 1.7838037262497695e-05,
841
+ "loss": 0.0555,
842
+ "step": 1190
843
+ },
844
+ {
845
+ "epoch": 0.8,
846
+ "grad_norm": 1.9158165193439103,
847
+ "learning_rate": 1.7801143700424276e-05,
848
+ "loss": 0.0458,
849
+ "step": 1200
850
+ },
851
+ {
852
+ "epoch": 0.8,
853
+ "grad_norm": 1.0863638939536142,
854
+ "learning_rate": 1.776425013835086e-05,
855
+ "loss": 0.0462,
856
+ "step": 1210
857
+ },
858
+ {
859
+ "epoch": 0.81,
860
+ "grad_norm": 2.3398031954044978,
861
+ "learning_rate": 1.772735657627744e-05,
862
+ "loss": 0.032,
863
+ "step": 1220
864
+ },
865
+ {
866
+ "epoch": 0.82,
867
+ "grad_norm": 0.9272917966743286,
868
+ "learning_rate": 1.7690463014204022e-05,
869
+ "loss": 0.0464,
870
+ "step": 1230
871
+ },
872
+ {
873
+ "epoch": 0.82,
874
+ "grad_norm": 1.4608044079217914,
875
+ "learning_rate": 1.7653569452130607e-05,
876
+ "loss": 0.0544,
877
+ "step": 1240
878
+ },
879
+ {
880
+ "epoch": 0.83,
881
+ "grad_norm": 2.0799767984416713,
882
+ "learning_rate": 1.7616675890057188e-05,
883
+ "loss": 0.0629,
884
+ "step": 1250
885
+ },
886
+ {
887
+ "epoch": 0.84,
888
+ "grad_norm": 2.438242481318271,
889
+ "learning_rate": 1.757978232798377e-05,
890
+ "loss": 0.0586,
891
+ "step": 1260
892
+ },
893
+ {
894
+ "epoch": 0.84,
895
+ "grad_norm": 0.22666963149041416,
896
+ "learning_rate": 1.754288876591035e-05,
897
+ "loss": 0.0419,
898
+ "step": 1270
899
+ },
900
+ {
901
+ "epoch": 0.85,
902
+ "grad_norm": 1.6906855856145777,
903
+ "learning_rate": 1.750599520383693e-05,
904
+ "loss": 0.0417,
905
+ "step": 1280
906
+ },
907
+ {
908
+ "epoch": 0.86,
909
+ "grad_norm": 0.8417294291584847,
910
+ "learning_rate": 1.7469101641763513e-05,
911
+ "loss": 0.0496,
912
+ "step": 1290
913
+ },
914
+ {
915
+ "epoch": 0.86,
916
+ "grad_norm": 2.384648750559231,
917
+ "learning_rate": 1.7432208079690097e-05,
918
+ "loss": 0.037,
919
+ "step": 1300
920
+ },
921
+ {
922
+ "epoch": 0.87,
923
+ "grad_norm": 1.0969098360012755,
924
+ "learning_rate": 1.7395314517616678e-05,
925
+ "loss": 0.0392,
926
+ "step": 1310
927
+ },
928
+ {
929
+ "epoch": 0.88,
930
+ "grad_norm": 4.265947825753472,
931
+ "learning_rate": 1.735842095554326e-05,
932
+ "loss": 0.0434,
933
+ "step": 1320
934
+ },
935
+ {
936
+ "epoch": 0.88,
937
+ "grad_norm": 1.0043877066833349,
938
+ "learning_rate": 1.732152739346984e-05,
939
+ "loss": 0.0423,
940
+ "step": 1330
941
+ },
942
+ {
943
+ "epoch": 0.89,
944
+ "grad_norm": 0.3834891081373628,
945
+ "learning_rate": 1.728463383139642e-05,
946
+ "loss": 0.0423,
947
+ "step": 1340
948
+ },
949
+ {
950
+ "epoch": 0.9,
951
+ "grad_norm": 0.8917610552257311,
952
+ "learning_rate": 1.7247740269323006e-05,
953
+ "loss": 0.0491,
954
+ "step": 1350
955
+ },
956
+ {
957
+ "epoch": 0.9,
958
+ "grad_norm": 1.7777935423085822,
959
+ "learning_rate": 1.7210846707249587e-05,
960
+ "loss": 0.0465,
961
+ "step": 1360
962
+ },
963
+ {
964
+ "epoch": 0.91,
965
+ "grad_norm": 2.882686457165806,
966
+ "learning_rate": 1.717395314517617e-05,
967
+ "loss": 0.0366,
968
+ "step": 1370
969
+ },
970
+ {
971
+ "epoch": 0.92,
972
+ "grad_norm": 1.4070944899475468,
973
+ "learning_rate": 1.713705958310275e-05,
974
+ "loss": 0.0364,
975
+ "step": 1380
976
+ },
977
+ {
978
+ "epoch": 0.92,
979
+ "grad_norm": 1.368387839772382,
980
+ "learning_rate": 1.710016602102933e-05,
981
+ "loss": 0.0302,
982
+ "step": 1390
983
+ },
984
+ {
985
+ "epoch": 0.93,
986
+ "grad_norm": 1.2202288141019488,
987
+ "learning_rate": 1.7063272458955912e-05,
988
+ "loss": 0.0455,
989
+ "step": 1400
990
+ },
991
+ {
992
+ "epoch": 0.94,
993
+ "grad_norm": 1.7419694841079256,
994
+ "learning_rate": 1.7026378896882496e-05,
995
+ "loss": 0.0402,
996
+ "step": 1410
997
+ },
998
+ {
999
+ "epoch": 0.94,
1000
+ "grad_norm": 1.5792094366611027,
1001
+ "learning_rate": 1.6989485334809077e-05,
1002
+ "loss": 0.0364,
1003
+ "step": 1420
1004
+ },
1005
+ {
1006
+ "epoch": 0.95,
1007
+ "grad_norm": 1.0092569099059323,
1008
+ "learning_rate": 1.695259177273566e-05,
1009
+ "loss": 0.0335,
1010
+ "step": 1430
1011
+ },
1012
+ {
1013
+ "epoch": 0.96,
1014
+ "grad_norm": 1.5374731387141227,
1015
+ "learning_rate": 1.691569821066224e-05,
1016
+ "loss": 0.0428,
1017
+ "step": 1440
1018
+ },
1019
+ {
1020
+ "epoch": 0.96,
1021
+ "grad_norm": 1.6268956058587998,
1022
+ "learning_rate": 1.687880464858882e-05,
1023
+ "loss": 0.0483,
1024
+ "step": 1450
1025
+ },
1026
+ {
1027
+ "epoch": 0.97,
1028
+ "grad_norm": 1.6628348966888566,
1029
+ "learning_rate": 1.6841911086515402e-05,
1030
+ "loss": 0.0487,
1031
+ "step": 1460
1032
+ },
1033
+ {
1034
+ "epoch": 0.98,
1035
+ "grad_norm": 8.037103442054311,
1036
+ "learning_rate": 1.6805017524441987e-05,
1037
+ "loss": 0.0679,
1038
+ "step": 1470
1039
+ },
1040
+ {
1041
+ "epoch": 0.98,
1042
+ "grad_norm": 1.620270154467724,
1043
+ "learning_rate": 1.6768123962368568e-05,
1044
+ "loss": 0.0437,
1045
+ "step": 1480
1046
+ },
1047
+ {
1048
+ "epoch": 0.99,
1049
+ "grad_norm": 1.0436875513091504,
1050
+ "learning_rate": 1.6731230400295152e-05,
1051
+ "loss": 0.0346,
1052
+ "step": 1490
1053
+ },
1054
+ {
1055
+ "epoch": 1.0,
1056
+ "grad_norm": 0.8374706362800531,
1057
+ "learning_rate": 1.6694336838221733e-05,
1058
+ "loss": 0.0517,
1059
+ "step": 1500
1060
+ }
1061
+ ],
1062
+ "logging_steps": 10,
1063
+ "max_steps": 6024,
1064
+ "num_input_tokens_seen": 0,
1065
+ "num_train_epochs": 4,
1066
+ "save_steps": 500,
1067
+ "total_flos": 0.0,
1068
+ "train_batch_size": 1,
1069
+ "trial_name": null,
1070
+ "trial_params": null
1071
+ }
checkpoint-1506/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d0640503f1433ff703cc07d0997c18edbdba68efdd139a495f5d107bbd939a06
3
+ size 6395
checkpoint-1506/zero_to_fp32.py ADDED
@@ -0,0 +1,587 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+
3
+ # Copyright (c) Microsoft Corporation.
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ # DeepSpeed Team
7
+
8
+ # This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets
9
+ # copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
10
+ # the future. Once extracted, the weights don't require DeepSpeed and can be used in any
11
+ # application.
12
+ #
13
+ # example: python zero_to_fp32.py . pytorch_model.bin
14
+
15
+ import argparse
16
+ import torch
17
+ import glob
18
+ import math
19
+ import os
20
+ import re
21
+ from collections import OrderedDict
22
+ from dataclasses import dataclass
23
+
24
+ # while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
25
+ # DeepSpeed data structures it has to be available in the current python environment.
26
+ from deepspeed.utils import logger
27
+ from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
28
+ FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
29
+ FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
30
+
31
+
32
+ @dataclass
33
+ class zero_model_state:
34
+ buffers: dict()
35
+ param_shapes: dict()
36
+ shared_params: list
37
+ ds_version: int
38
+ frozen_param_shapes: dict()
39
+ frozen_param_fragments: dict()
40
+
41
+
42
+ debug = 0
43
+
44
+ # load to cpu
45
+ device = torch.device('cpu')
46
+
47
+
48
+ def atoi(text):
49
+ return int(text) if text.isdigit() else text
50
+
51
+
52
+ def natural_keys(text):
53
+ '''
54
+ alist.sort(key=natural_keys) sorts in human order
55
+ http://nedbatchelder.com/blog/200712/human_sorting.html
56
+ (See Toothy's implementation in the comments)
57
+ '''
58
+ return [atoi(c) for c in re.split(r'(\d+)', text)]
59
+
60
+
61
+ def get_model_state_file(checkpoint_dir, zero_stage):
62
+ if not os.path.isdir(checkpoint_dir):
63
+ raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
64
+
65
+ # there should be only one file
66
+ if zero_stage <= 2:
67
+ file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
68
+ elif zero_stage == 3:
69
+ file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
70
+
71
+ if not os.path.exists(file):
72
+ raise FileNotFoundError(f"can't find model states file at '{file}'")
73
+
74
+ return file
75
+
76
+
77
+ def get_checkpoint_files(checkpoint_dir, glob_pattern):
78
+ # XXX: need to test that this simple glob rule works for multi-node setup too
79
+ ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
80
+
81
+ if len(ckpt_files) == 0:
82
+ raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
83
+
84
+ return ckpt_files
85
+
86
+
87
+ def get_optim_files(checkpoint_dir):
88
+ return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
89
+
90
+
91
+ def get_model_state_files(checkpoint_dir):
92
+ return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
93
+
94
+
95
+ def parse_model_states(files):
96
+ zero_model_states = []
97
+ for file in files:
98
+ state_dict = torch.load(file, map_location=device)
99
+
100
+ if BUFFER_NAMES not in state_dict:
101
+ raise ValueError(f"{file} is not a model state checkpoint")
102
+ buffer_names = state_dict[BUFFER_NAMES]
103
+ if debug:
104
+ print("Found buffers:", buffer_names)
105
+
106
+ # recover just the buffers while restoring them to fp32 if they were saved in fp16
107
+ buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
108
+ param_shapes = state_dict[PARAM_SHAPES]
109
+
110
+ # collect parameters that are included in param_shapes
111
+ param_names = []
112
+ for s in param_shapes:
113
+ for name in s.keys():
114
+ param_names.append(name)
115
+
116
+ # update with frozen parameters
117
+ frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
118
+ if frozen_param_shapes is not None:
119
+ if debug:
120
+ print(f"Found frozen_param_shapes: {frozen_param_shapes}")
121
+ param_names += list(frozen_param_shapes.keys())
122
+
123
+ # handle shared params
124
+ shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
125
+
126
+ ds_version = state_dict.get(DS_VERSION, None)
127
+
128
+ frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
129
+
130
+ z_model_state = zero_model_state(buffers=buffers,
131
+ param_shapes=param_shapes,
132
+ shared_params=shared_params,
133
+ ds_version=ds_version,
134
+ frozen_param_shapes=frozen_param_shapes,
135
+ frozen_param_fragments=frozen_param_fragments)
136
+ zero_model_states.append(z_model_state)
137
+
138
+ return zero_model_states
139
+
140
+
141
+ def parse_optim_states(files, ds_checkpoint_dir):
142
+
143
+ total_files = len(files)
144
+ state_dicts = []
145
+ for f in files:
146
+ state_dict = torch.load(f, map_location=device)
147
+ # immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
148
+ # and also handle the case where it was already removed by another helper script
149
+ state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
150
+ state_dicts.append(state_dict)
151
+
152
+ if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:
153
+ raise ValueError(f"{files[0]} is not a zero checkpoint")
154
+ zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
155
+ world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
156
+
157
+ # For ZeRO-2 each param group can have different partition_count as data parallelism for expert
158
+ # parameters can be different from data parallelism for non-expert parameters. So we can just
159
+ # use the max of the partition_count to get the dp world_size.
160
+
161
+ if type(world_size) is list:
162
+ world_size = max(world_size)
163
+
164
+ if world_size != total_files:
165
+ raise ValueError(
166
+ f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
167
+ "Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
168
+ )
169
+
170
+ # the groups are named differently in each stage
171
+ if zero_stage <= 2:
172
+ fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
173
+ elif zero_stage == 3:
174
+ fp32_groups_key = FP32_FLAT_GROUPS
175
+ else:
176
+ raise ValueError(f"unknown zero stage {zero_stage}")
177
+
178
+ if zero_stage <= 2:
179
+ fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
180
+ elif zero_stage == 3:
181
+ # if there is more than one param group, there will be multiple flattened tensors - one
182
+ # flattened tensor per group - for simplicity merge them into a single tensor
183
+ #
184
+ # XXX: could make the script more memory efficient for when there are multiple groups - it
185
+ # will require matching the sub-lists of param_shapes for each param group flattened tensor
186
+
187
+ fp32_flat_groups = [
188
+ torch.cat(state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key], 0) for i in range(len(state_dicts))
189
+ ]
190
+
191
+ return zero_stage, world_size, fp32_flat_groups
192
+
193
+
194
+ def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir):
195
+ """
196
+ Returns fp32 state_dict reconstructed from ds checkpoint
197
+
198
+ Args:
199
+ - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
200
+
201
+ """
202
+ print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
203
+
204
+ optim_files = get_optim_files(ds_checkpoint_dir)
205
+ zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
206
+ print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
207
+
208
+ model_files = get_model_state_files(ds_checkpoint_dir)
209
+
210
+ zero_model_states = parse_model_states(model_files)
211
+ print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
212
+
213
+ if zero_stage <= 2:
214
+ return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states)
215
+ elif zero_stage == 3:
216
+ return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states)
217
+
218
+
219
+ def _zero2_merge_frozen_params(state_dict, zero_model_states):
220
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
221
+ return
222
+
223
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
224
+ frozen_param_fragments = zero_model_states[0].frozen_param_fragments
225
+
226
+ if debug:
227
+ num_elem = sum(s.numel() for s in frozen_param_shapes.values())
228
+ print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
229
+
230
+ wanted_params = len(frozen_param_shapes)
231
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
232
+ avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
233
+ print(f'Frozen params: Have {avail_numel} numels to process.')
234
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
235
+
236
+ total_params = 0
237
+ total_numel = 0
238
+ for name, shape in frozen_param_shapes.items():
239
+ total_params += 1
240
+ unpartitioned_numel = shape.numel()
241
+ total_numel += unpartitioned_numel
242
+
243
+ state_dict[name] = frozen_param_fragments[name]
244
+
245
+ if debug:
246
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
247
+
248
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
249
+
250
+
251
+ def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
252
+ param_shapes = zero_model_states[0].param_shapes
253
+
254
+ # Reconstruction protocol:
255
+ #
256
+ # XXX: document this
257
+
258
+ if debug:
259
+ for i in range(world_size):
260
+ for j in range(len(fp32_flat_groups[0])):
261
+ print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
262
+
263
+ # XXX: memory usage doubles here (zero2)
264
+ num_param_groups = len(fp32_flat_groups[0])
265
+ merged_single_partition_of_fp32_groups = []
266
+ for i in range(num_param_groups):
267
+ merged_partitions = [sd[i] for sd in fp32_flat_groups]
268
+ full_single_fp32_vector = torch.cat(merged_partitions, 0)
269
+ merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
270
+ avail_numel = sum(
271
+ [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
272
+
273
+ if debug:
274
+ wanted_params = sum([len(shapes) for shapes in param_shapes])
275
+ wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
276
+ # not asserting if there is a mismatch due to possible padding
277
+ print(f"Have {avail_numel} numels to process.")
278
+ print(f"Need {wanted_numel} numels in {wanted_params} params.")
279
+
280
+ # params
281
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
282
+ # out-of-core computing solution
283
+ total_numel = 0
284
+ total_params = 0
285
+ for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
286
+ offset = 0
287
+ avail_numel = full_single_fp32_vector.numel()
288
+ for name, shape in shapes.items():
289
+
290
+ unpartitioned_numel = shape.numel()
291
+ total_numel += unpartitioned_numel
292
+ total_params += 1
293
+
294
+ if debug:
295
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
296
+ state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
297
+ offset += unpartitioned_numel
298
+
299
+ # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
300
+ # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
301
+ # paddings performed in the code it's almost impossible to predict the exact numbers w/o the
302
+ # live optimizer object, so we are checking that the numbers are within the right range
303
+ align_to = 2 * world_size
304
+
305
+ def zero2_align(x):
306
+ return align_to * math.ceil(x / align_to)
307
+
308
+ if debug:
309
+ print(f"original offset={offset}, avail_numel={avail_numel}")
310
+
311
+ offset = zero2_align(offset)
312
+ avail_numel = zero2_align(avail_numel)
313
+
314
+ if debug:
315
+ print(f"aligned offset={offset}, avail_numel={avail_numel}")
316
+
317
+ # Sanity check
318
+ if offset != avail_numel:
319
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
320
+
321
+ print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
322
+
323
+
324
+ def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states):
325
+ state_dict = OrderedDict()
326
+
327
+ # buffers
328
+ buffers = zero_model_states[0].buffers
329
+ state_dict.update(buffers)
330
+ if debug:
331
+ print(f"added {len(buffers)} buffers")
332
+
333
+ _zero2_merge_frozen_params(state_dict, zero_model_states)
334
+
335
+ _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
336
+
337
+ # recover shared parameters
338
+ for pair in zero_model_states[0].shared_params:
339
+ if pair[1] in state_dict:
340
+ state_dict[pair[0]] = state_dict[pair[1]]
341
+
342
+ return state_dict
343
+
344
+
345
+ def zero3_partitioned_param_info(unpartitioned_numel, world_size):
346
+ remainder = unpartitioned_numel % world_size
347
+ padding_numel = (world_size - remainder) if remainder else 0
348
+ partitioned_numel = math.ceil(unpartitioned_numel / world_size)
349
+ return partitioned_numel, padding_numel
350
+
351
+
352
+ def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
353
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
354
+ return
355
+
356
+ if debug:
357
+ for i in range(world_size):
358
+ num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
359
+ print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
360
+
361
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
362
+ wanted_params = len(frozen_param_shapes)
363
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
364
+ avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
365
+ print(f'Frozen params: Have {avail_numel} numels to process.')
366
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
367
+
368
+ total_params = 0
369
+ total_numel = 0
370
+ for name, shape in zero_model_states[0].frozen_param_shapes.items():
371
+ total_params += 1
372
+ unpartitioned_numel = shape.numel()
373
+ total_numel += unpartitioned_numel
374
+
375
+ param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
376
+ state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
377
+
378
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
379
+
380
+ if debug:
381
+ print(
382
+ f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
383
+ )
384
+
385
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
386
+
387
+
388
+ def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
389
+ param_shapes = zero_model_states[0].param_shapes
390
+ avail_numel = fp32_flat_groups[0].numel() * world_size
391
+ # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
392
+ # param, re-consolidating each param, while dealing with padding if any
393
+
394
+ # merge list of dicts, preserving order
395
+ param_shapes = {k: v for d in param_shapes for k, v in d.items()}
396
+
397
+ if debug:
398
+ for i in range(world_size):
399
+ print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
400
+
401
+ wanted_params = len(param_shapes)
402
+ wanted_numel = sum(shape.numel() for shape in param_shapes.values())
403
+ # not asserting if there is a mismatch due to possible padding
404
+ avail_numel = fp32_flat_groups[0].numel() * world_size
405
+ print(f"Trainable params: Have {avail_numel} numels to process.")
406
+ print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
407
+
408
+ # params
409
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
410
+ # out-of-core computing solution
411
+ offset = 0
412
+ total_numel = 0
413
+ total_params = 0
414
+ for name, shape in param_shapes.items():
415
+
416
+ unpartitioned_numel = shape.numel()
417
+ total_numel += unpartitioned_numel
418
+ total_params += 1
419
+
420
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
421
+
422
+ if debug:
423
+ print(
424
+ f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
425
+ )
426
+
427
+ # XXX: memory usage doubles here
428
+ state_dict[name] = torch.cat(
429
+ tuple(fp32_flat_groups[i].narrow(0, offset, partitioned_numel) for i in range(world_size)),
430
+ 0).narrow(0, 0, unpartitioned_numel).view(shape)
431
+ offset += partitioned_numel
432
+
433
+ offset *= world_size
434
+
435
+ # Sanity check
436
+ if offset != avail_numel:
437
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
438
+
439
+ print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
440
+
441
+
442
+ def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states):
443
+ state_dict = OrderedDict()
444
+
445
+ # buffers
446
+ buffers = zero_model_states[0].buffers
447
+ state_dict.update(buffers)
448
+ if debug:
449
+ print(f"added {len(buffers)} buffers")
450
+
451
+ _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
452
+
453
+ _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
454
+
455
+ # recover shared parameters
456
+ for pair in zero_model_states[0].shared_params:
457
+ if pair[1] in state_dict:
458
+ state_dict[pair[0]] = state_dict[pair[1]]
459
+
460
+ return state_dict
461
+
462
+
463
+ def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag=None):
464
+ """
465
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
466
+ ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
467
+ via a model hub.
468
+
469
+ Args:
470
+ - ``checkpoint_dir``: path to the desired checkpoint folder
471
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``
472
+
473
+ Returns:
474
+ - pytorch ``state_dict``
475
+
476
+ Note: this approach may not work if your application doesn't have sufficient free CPU memory and
477
+ you may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
478
+ the checkpoint.
479
+
480
+ A typical usage might be ::
481
+
482
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
483
+ # do the training and checkpoint saving
484
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
485
+ model = model.cpu() # move to cpu
486
+ model.load_state_dict(state_dict)
487
+ # submit to model hub or save the model to share with others
488
+
489
+ In this example the ``model`` will no longer be usable in the deepspeed context of the same
490
+ application. i.e. you will need to re-initialize the deepspeed engine, since
491
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
492
+
493
+ If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
494
+
495
+ """
496
+ if tag is None:
497
+ latest_path = os.path.join(checkpoint_dir, 'latest')
498
+ if os.path.isfile(latest_path):
499
+ with open(latest_path, 'r') as fd:
500
+ tag = fd.read().strip()
501
+ else:
502
+ raise ValueError(f"Unable to find 'latest' file at {latest_path}")
503
+
504
+ ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
505
+
506
+ if not os.path.isdir(ds_checkpoint_dir):
507
+ raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
508
+
509
+ return _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir)
510
+
511
+
512
+ def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir, output_file, tag=None):
513
+ """
514
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
515
+ loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
516
+
517
+ Args:
518
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
519
+ - ``output_file``: path to the pytorch fp32 state_dict output file (e.g. path/pytorch_model.bin)
520
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
521
+ """
522
+
523
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
524
+ print(f"Saving fp32 state dict to {output_file}")
525
+ torch.save(state_dict, output_file)
526
+
527
+
528
+ def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
529
+ """
530
+ 1. Put the provided model to cpu
531
+ 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
532
+ 3. Load it into the provided model
533
+
534
+ Args:
535
+ - ``model``: the model object to update
536
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
537
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
538
+
539
+ Returns:
540
+ - ``model`: modified model
541
+
542
+ Make sure you have plenty of CPU memory available before you call this function. If you don't
543
+ have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
544
+ conveniently placed for you in the checkpoint folder.
545
+
546
+ A typical usage might be ::
547
+
548
+ from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
549
+ model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
550
+ # submit to model hub or save the model to share with others
551
+
552
+ Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
553
+ of the same application. i.e. you will need to re-initialize the deepspeed engine, since
554
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
555
+
556
+ """
557
+ logger.info(f"Extracting fp32 weights")
558
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
559
+
560
+ logger.info(f"Overwriting model with fp32 weights")
561
+ model = model.cpu()
562
+ model.load_state_dict(state_dict, strict=False)
563
+
564
+ return model
565
+
566
+
567
+ if __name__ == "__main__":
568
+
569
+ parser = argparse.ArgumentParser()
570
+ parser.add_argument("checkpoint_dir",
571
+ type=str,
572
+ help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
573
+ parser.add_argument(
574
+ "output_file",
575
+ type=str,
576
+ help="path to the pytorch fp32 state_dict output file (e.g. path/checkpoint-12/pytorch_model.bin)")
577
+ parser.add_argument("-t",
578
+ "--tag",
579
+ type=str,
580
+ default=None,
581
+ help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
582
+ parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
583
+ args = parser.parse_args()
584
+
585
+ debug = args.debug
586
+
587
+ convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir, args.output_file, tag=args.tag)
checkpoint-3012/1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 1024,
3
+ "pooling_mode_cls_token": true,
4
+ "pooling_mode_mean_tokens": false,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
checkpoint-3012/README.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: sentence-transformers
3
+ pipeline_tag: sentence-similarity
4
+ tags:
5
+ - sentence-transformers
6
+ - feature-extraction
7
+ - sentence-similarity
8
+
9
+ ---
10
+
11
+ # {MODEL_NAME}
12
+
13
+ This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 1024 dimensional dense vector space and can be used for tasks like clustering or semantic search.
14
+
15
+ <!--- Describe your model here -->
16
+
17
+ ## Usage (Sentence-Transformers)
18
+
19
+ Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
20
+
21
+ ```
22
+ pip install -U sentence-transformers
23
+ ```
24
+
25
+ Then you can use the model like this:
26
+
27
+ ```python
28
+ from sentence_transformers import SentenceTransformer
29
+ sentences = ["This is an example sentence", "Each sentence is converted"]
30
+
31
+ model = SentenceTransformer('{MODEL_NAME}')
32
+ embeddings = model.encode(sentences)
33
+ print(embeddings)
34
+ ```
35
+
36
+
37
+
38
+ ## Evaluation Results
39
+
40
+ <!--- Describe how your model was evaluated -->
41
+
42
+ For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
43
+
44
+
45
+
46
+ ## Full Model Architecture
47
+ ```
48
+ SentenceTransformer(
49
+ (0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
50
+ (1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
51
+ (2): Normalize()
52
+ )
53
+ ```
54
+
55
+ ## Citing & Authors
56
+
57
+ <!--- Describe where people can find more information -->
checkpoint-3012/colbert_linear.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0128bf0287a90a15b7eaec7c5f69e5f613ed96ea00aaaf9aac377e850e408150
3
+ size 2100227
checkpoint-3012/config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "saved_models/bgem3_unified_finetune_20240330/checkpoint-3012",
3
+ "architectures": [
4
+ "XLMRobertaModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 1024,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 4096,
15
+ "layer_norm_eps": 1e-05,
16
+ "max_position_embeddings": 8194,
17
+ "model_type": "xlm-roberta",
18
+ "num_attention_heads": 16,
19
+ "num_hidden_layers": 24,
20
+ "output_past": true,
21
+ "pad_token_id": 1,
22
+ "position_embedding_type": "absolute",
23
+ "torch_dtype": "float32",
24
+ "transformers_version": "4.39.1",
25
+ "type_vocab_size": 1,
26
+ "use_cache": true,
27
+ "vocab_size": 250002
28
+ }
checkpoint-3012/config_sentence_transformers.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "2.6.0",
4
+ "transformers": "4.39.1",
5
+ "pytorch": "2.0.1+cu117"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null
9
+ }
checkpoint-3012/global_step3012/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e307452471b3c898e9d737e82e226c9acaaebccae707863ebe0b17de0d49084
3
+ size 3412837975
checkpoint-3012/global_step3012/bf16_zero_pp_rank_1_mp_rank_00_optim_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03b03e3850eb0cff1c13b757f5235cb3a3d3223776a58f781cffe8ad17186242
3
+ size 3412867031
checkpoint-3012/global_step3012/mp_rank_00_model_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c11af2f4f6cc7501daf6f08f76c026344eb99602ad070d97afa940e3044afdf
3
+ size 1137729563
checkpoint-3012/latest ADDED
@@ -0,0 +1 @@
 
 
1
+ global_step3012
checkpoint-3012/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f6e88b6ba28dae9a4fe44d8cd57f2ec5c4e28410d20e6741e936a9a5ec015291
3
+ size 2271064456
checkpoint-3012/modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ },
14
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
checkpoint-3012/rng_state_0.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e75d231787a0d08e46d1f2c54ebb26d6c17903d0bd81a0b3c81c4e4da4d61e1b
3
+ size 15607
checkpoint-3012/rng_state_1.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:640768ea784ed4e73d22ca543abeda8a883aebcc8f2e2fedcec8e78da8876a12
3
+ size 15607
checkpoint-3012/sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 8192,
3
+ "do_lower_case": false
4
+ }
checkpoint-3012/sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
3
+ size 5069051
checkpoint-3012/sparse_linear.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e06286144912ddf5d97f4f6227e5f8ce29b1d8b02f4fb8605e02e63f85849fb
3
+ size 3071
checkpoint-3012/special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
checkpoint-3012/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:69564b696052886ed0ac63fa393e928384e0f8caada38c1f4864a9bfbf379c15
3
+ size 17098273
checkpoint-3012/tokenizer_config.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "250001": {
36
+ "content": "<mask>",
37
+ "lstrip": true,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "<s>",
45
+ "clean_up_tokenization_spaces": true,
46
+ "cls_token": "<s>",
47
+ "eos_token": "</s>",
48
+ "mask_token": "<mask>",
49
+ "model_max_length": 8192,
50
+ "pad_token": "<pad>",
51
+ "sep_token": "</s>",
52
+ "sp_model_kwargs": {},
53
+ "tokenizer_class": "XLMRobertaTokenizer",
54
+ "unk_token": "<unk>"
55
+ }
checkpoint-3012/trainer_state.json ADDED
@@ -0,0 +1,2128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 2.0,
5
+ "eval_steps": 500,
6
+ "global_step": 3012,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 0.01,
13
+ "grad_norm": 41.35739895402257,
14
+ "learning_rate": 7.193423539345941e-06,
15
+ "loss": 0.5141,
16
+ "step": 10
17
+ },
18
+ {
19
+ "epoch": 0.01,
20
+ "grad_norm": 10.443694874625423,
21
+ "learning_rate": 9.358859796204429e-06,
22
+ "loss": 0.4195,
23
+ "step": 20
24
+ },
25
+ {
26
+ "epoch": 0.02,
27
+ "grad_norm": 5.720021591145773,
28
+ "learning_rate": 1.0625558804168632e-05,
29
+ "loss": 0.2851,
30
+ "step": 30
31
+ },
32
+ {
33
+ "epoch": 0.03,
34
+ "grad_norm": 7.59250257002781,
35
+ "learning_rate": 1.1524296053062918e-05,
36
+ "loss": 0.2174,
37
+ "step": 40
38
+ },
39
+ {
40
+ "epoch": 0.03,
41
+ "grad_norm": 11.521550428114184,
42
+ "learning_rate": 1.2221410821833392e-05,
43
+ "loss": 0.1817,
44
+ "step": 50
45
+ },
46
+ {
47
+ "epoch": 0.04,
48
+ "grad_norm": 6.027998448017936,
49
+ "learning_rate": 1.2790995061027121e-05,
50
+ "loss": 0.1886,
51
+ "step": 60
52
+ },
53
+ {
54
+ "epoch": 0.05,
55
+ "grad_norm": 4.929816146115093,
56
+ "learning_rate": 1.3272571673439616e-05,
57
+ "loss": 0.1553,
58
+ "step": 70
59
+ },
60
+ {
61
+ "epoch": 0.05,
62
+ "grad_norm": 2.3881515971871345,
63
+ "learning_rate": 1.3689732309921406e-05,
64
+ "loss": 0.129,
65
+ "step": 80
66
+ },
67
+ {
68
+ "epoch": 0.06,
69
+ "grad_norm": 5.441118636680569,
70
+ "learning_rate": 1.4057694068991321e-05,
71
+ "loss": 0.1433,
72
+ "step": 90
73
+ },
74
+ {
75
+ "epoch": 0.07,
76
+ "grad_norm": 6.085213496930297,
77
+ "learning_rate": 1.4386847078691883e-05,
78
+ "loss": 0.1092,
79
+ "step": 100
80
+ },
81
+ {
82
+ "epoch": 0.07,
83
+ "grad_norm": 4.713361075579101,
84
+ "learning_rate": 1.4684602194465794e-05,
85
+ "loss": 0.1231,
86
+ "step": 110
87
+ },
88
+ {
89
+ "epoch": 0.08,
90
+ "grad_norm": 3.8259500358417924,
91
+ "learning_rate": 1.495643131788561e-05,
92
+ "loss": 0.0697,
93
+ "step": 120
94
+ },
95
+ {
96
+ "epoch": 0.09,
97
+ "grad_norm": 2.67920682727699,
98
+ "learning_rate": 1.5206489871327869e-05,
99
+ "loss": 0.084,
100
+ "step": 130
101
+ },
102
+ {
103
+ "epoch": 0.09,
104
+ "grad_norm": 8.189491553913532,
105
+ "learning_rate": 1.54380079302981e-05,
106
+ "loss": 0.1023,
107
+ "step": 140
108
+ },
109
+ {
110
+ "epoch": 0.1,
111
+ "grad_norm": 12.000369384166694,
112
+ "learning_rate": 1.5653546086656083e-05,
113
+ "loss": 0.0972,
114
+ "step": 150
115
+ },
116
+ {
117
+ "epoch": 0.11,
118
+ "grad_norm": 2.3726942012239953,
119
+ "learning_rate": 1.5855168566779895e-05,
120
+ "loss": 0.1036,
121
+ "step": 160
122
+ },
123
+ {
124
+ "epoch": 0.11,
125
+ "grad_norm": 2.0242117206977044,
126
+ "learning_rate": 1.604456377435124e-05,
127
+ "loss": 0.1081,
128
+ "step": 170
129
+ },
130
+ {
131
+ "epoch": 0.12,
132
+ "grad_norm": 2.2261934744219967,
133
+ "learning_rate": 1.6223130325849813e-05,
134
+ "loss": 0.082,
135
+ "step": 180
136
+ },
137
+ {
138
+ "epoch": 0.13,
139
+ "grad_norm": 4.70421073268978,
140
+ "learning_rate": 1.6392039793463407e-05,
141
+ "loss": 0.0744,
142
+ "step": 190
143
+ },
144
+ {
145
+ "epoch": 0.13,
146
+ "grad_norm": 12.064244277626111,
147
+ "learning_rate": 1.6552283335550368e-05,
148
+ "loss": 0.0934,
149
+ "step": 200
150
+ },
151
+ {
152
+ "epoch": 0.14,
153
+ "grad_norm": 2.150990470911233,
154
+ "learning_rate": 1.67047069382623e-05,
155
+ "loss": 0.0737,
156
+ "step": 210
157
+ },
158
+ {
159
+ "epoch": 0.15,
160
+ "grad_norm": 4.074258308547766,
161
+ "learning_rate": 1.6850038451324284e-05,
162
+ "loss": 0.0841,
163
+ "step": 220
164
+ },
165
+ {
166
+ "epoch": 0.15,
167
+ "grad_norm": 2.6764310841274237,
168
+ "learning_rate": 1.6988908609137504e-05,
169
+ "loss": 0.0821,
170
+ "step": 230
171
+ },
172
+ {
173
+ "epoch": 0.16,
174
+ "grad_norm": 3.1391283710987063,
175
+ "learning_rate": 1.71218675747441e-05,
176
+ "loss": 0.0747,
177
+ "step": 240
178
+ },
179
+ {
180
+ "epoch": 0.17,
181
+ "grad_norm": 3.1103728720325754,
182
+ "learning_rate": 1.7249398104320845e-05,
183
+ "loss": 0.0907,
184
+ "step": 250
185
+ },
186
+ {
187
+ "epoch": 0.17,
188
+ "grad_norm": 5.354173276825422,
189
+ "learning_rate": 1.7371926128186358e-05,
190
+ "loss": 0.0765,
191
+ "step": 260
192
+ },
193
+ {
194
+ "epoch": 0.18,
195
+ "grad_norm": 2.8677808267225005,
196
+ "learning_rate": 1.7489829333814013e-05,
197
+ "loss": 0.0777,
198
+ "step": 270
199
+ },
200
+ {
201
+ "epoch": 0.19,
202
+ "grad_norm": 2.6124301773304874,
203
+ "learning_rate": 1.760344418715659e-05,
204
+ "loss": 0.0897,
205
+ "step": 280
206
+ },
207
+ {
208
+ "epoch": 0.19,
209
+ "grad_norm": 2.915238130503912,
210
+ "learning_rate": 1.7713071721324668e-05,
211
+ "loss": 0.0866,
212
+ "step": 290
213
+ },
214
+ {
215
+ "epoch": 0.2,
216
+ "grad_norm": 4.061775729833908,
217
+ "learning_rate": 1.781898234351457e-05,
218
+ "loss": 0.0804,
219
+ "step": 300
220
+ },
221
+ {
222
+ "epoch": 0.21,
223
+ "grad_norm": 1.5648704857906242,
224
+ "learning_rate": 1.7921419853452233e-05,
225
+ "loss": 0.0834,
226
+ "step": 310
227
+ },
228
+ {
229
+ "epoch": 0.21,
230
+ "grad_norm": 2.225837991191409,
231
+ "learning_rate": 1.8020604823638384e-05,
232
+ "loss": 0.0646,
233
+ "step": 320
234
+ },
235
+ {
236
+ "epoch": 0.22,
237
+ "grad_norm": 4.041622096074851,
238
+ "learning_rate": 1.811673745928848e-05,
239
+ "loss": 0.0636,
240
+ "step": 330
241
+ },
242
+ {
243
+ "epoch": 0.23,
244
+ "grad_norm": 0.21100008000919218,
245
+ "learning_rate": 1.821000003120973e-05,
246
+ "loss": 0.0656,
247
+ "step": 340
248
+ },
249
+ {
250
+ "epoch": 0.23,
251
+ "grad_norm": 2.2923304434569443,
252
+ "learning_rate": 1.8300558955927067e-05,
253
+ "loss": 0.0756,
254
+ "step": 350
255
+ },
256
+ {
257
+ "epoch": 0.24,
258
+ "grad_norm": 3.6524729986322013,
259
+ "learning_rate": 1.83885665827083e-05,
260
+ "loss": 0.0466,
261
+ "step": 360
262
+ },
263
+ {
264
+ "epoch": 0.25,
265
+ "grad_norm": 2.1793660025907284,
266
+ "learning_rate": 1.847416273569235e-05,
267
+ "loss": 0.0704,
268
+ "step": 370
269
+ },
270
+ {
271
+ "epoch": 0.25,
272
+ "grad_norm": 4.363503091034068,
273
+ "learning_rate": 1.8557476050321896e-05,
274
+ "loss": 0.0712,
275
+ "step": 380
276
+ },
277
+ {
278
+ "epoch": 0.26,
279
+ "grad_norm": 3.0942807753734476,
280
+ "learning_rate": 1.863862513615056e-05,
281
+ "loss": 0.0831,
282
+ "step": 390
283
+ },
284
+ {
285
+ "epoch": 0.27,
286
+ "grad_norm": 1.789230871814937,
287
+ "learning_rate": 1.8717719592408857e-05,
288
+ "loss": 0.078,
289
+ "step": 400
290
+ },
291
+ {
292
+ "epoch": 0.27,
293
+ "grad_norm": 3.4361028432853677,
294
+ "learning_rate": 1.879486089815082e-05,
295
+ "loss": 0.0663,
296
+ "step": 410
297
+ },
298
+ {
299
+ "epoch": 0.28,
300
+ "grad_norm": 3.690439378170989,
301
+ "learning_rate": 1.8870143195120794e-05,
302
+ "loss": 0.0738,
303
+ "step": 420
304
+ },
305
+ {
306
+ "epoch": 0.29,
307
+ "grad_norm": 2.159404934400987,
308
+ "learning_rate": 1.8943653978491198e-05,
309
+ "loss": 0.0768,
310
+ "step": 430
311
+ },
312
+ {
313
+ "epoch": 0.29,
314
+ "grad_norm": 0.8042070009727055,
315
+ "learning_rate": 1.901547470818277e-05,
316
+ "loss": 0.0777,
317
+ "step": 440
318
+ },
319
+ {
320
+ "epoch": 0.3,
321
+ "grad_norm": 1.70758347995601,
322
+ "learning_rate": 1.9085681351478775e-05,
323
+ "loss": 0.05,
324
+ "step": 450
325
+ },
326
+ {
327
+ "epoch": 0.31,
328
+ "grad_norm": 1.2113560599237037,
329
+ "learning_rate": 1.9154344865995993e-05,
330
+ "loss": 0.0715,
331
+ "step": 460
332
+ },
333
+ {
334
+ "epoch": 0.31,
335
+ "grad_norm": 2.5816071085486527,
336
+ "learning_rate": 1.9221531630710657e-05,
337
+ "loss": 0.0688,
338
+ "step": 470
339
+ },
340
+ {
341
+ "epoch": 0.32,
342
+ "grad_norm": 1.4447841193953872,
343
+ "learning_rate": 1.9287303831602588e-05,
344
+ "loss": 0.0659,
345
+ "step": 480
346
+ },
347
+ {
348
+ "epoch": 0.33,
349
+ "grad_norm": 1.2668557011358101,
350
+ "learning_rate": 1.9351719807533285e-05,
351
+ "loss": 0.0515,
352
+ "step": 490
353
+ },
354
+ {
355
+ "epoch": 0.33,
356
+ "grad_norm": 2.0353893651728865,
357
+ "learning_rate": 1.9414834361179333e-05,
358
+ "loss": 0.0687,
359
+ "step": 500
360
+ },
361
+ {
362
+ "epoch": 0.34,
363
+ "grad_norm": 2.005863891715338,
364
+ "learning_rate": 1.947669903917393e-05,
365
+ "loss": 0.0459,
366
+ "step": 510
367
+ },
368
+ {
369
+ "epoch": 0.35,
370
+ "grad_norm": 1.4330303529877615,
371
+ "learning_rate": 1.9537362385044847e-05,
372
+ "loss": 0.0557,
373
+ "step": 520
374
+ },
375
+ {
376
+ "epoch": 0.35,
377
+ "grad_norm": 1.8683959370360874,
378
+ "learning_rate": 1.959687016805845e-05,
379
+ "loss": 0.0656,
380
+ "step": 530
381
+ },
382
+ {
383
+ "epoch": 0.36,
384
+ "grad_norm": 1.5963373312962135,
385
+ "learning_rate": 1.9655265590672502e-05,
386
+ "loss": 0.0519,
387
+ "step": 540
388
+ },
389
+ {
390
+ "epoch": 0.37,
391
+ "grad_norm": 1.824110595633705,
392
+ "learning_rate": 1.9712589476953243e-05,
393
+ "loss": 0.0557,
394
+ "step": 550
395
+ },
396
+ {
397
+ "epoch": 0.37,
398
+ "grad_norm": 2.024299349665376,
399
+ "learning_rate": 1.976888044401508e-05,
400
+ "loss": 0.0617,
401
+ "step": 560
402
+ },
403
+ {
404
+ "epoch": 0.38,
405
+ "grad_norm": 1.0490238284158413,
406
+ "learning_rate": 1.98241750582861e-05,
407
+ "loss": 0.0529,
408
+ "step": 570
409
+ },
410
+ {
411
+ "epoch": 0.39,
412
+ "grad_norm": 1.2602675746455845,
413
+ "learning_rate": 1.9878507978183157e-05,
414
+ "loss": 0.0617,
415
+ "step": 580
416
+ },
417
+ {
418
+ "epoch": 0.39,
419
+ "grad_norm": 1.7353304044327778,
420
+ "learning_rate": 1.9931912084590654e-05,
421
+ "loss": 0.0464,
422
+ "step": 590
423
+ },
424
+ {
425
+ "epoch": 0.4,
426
+ "grad_norm": 2.043608410331547,
427
+ "learning_rate": 1.998441860037306e-05,
428
+ "loss": 0.0716,
429
+ "step": 600
430
+ },
431
+ {
432
+ "epoch": 0.41,
433
+ "grad_norm": 0.9522735357022469,
434
+ "learning_rate": 1.997786386275595e-05,
435
+ "loss": 0.0496,
436
+ "step": 610
437
+ },
438
+ {
439
+ "epoch": 0.41,
440
+ "grad_norm": 1.3740017908881452,
441
+ "learning_rate": 1.9940970300682533e-05,
442
+ "loss": 0.0686,
443
+ "step": 620
444
+ },
445
+ {
446
+ "epoch": 0.42,
447
+ "grad_norm": 1.1533525092583308,
448
+ "learning_rate": 1.9904076738609114e-05,
449
+ "loss": 0.0562,
450
+ "step": 630
451
+ },
452
+ {
453
+ "epoch": 0.42,
454
+ "grad_norm": 1.564671647601224,
455
+ "learning_rate": 1.9867183176535695e-05,
456
+ "loss": 0.0553,
457
+ "step": 640
458
+ },
459
+ {
460
+ "epoch": 0.43,
461
+ "grad_norm": 0.8996693997352794,
462
+ "learning_rate": 1.9830289614462276e-05,
463
+ "loss": 0.0524,
464
+ "step": 650
465
+ },
466
+ {
467
+ "epoch": 0.44,
468
+ "grad_norm": 1.9340857910489522,
469
+ "learning_rate": 1.979339605238886e-05,
470
+ "loss": 0.0534,
471
+ "step": 660
472
+ },
473
+ {
474
+ "epoch": 0.44,
475
+ "grad_norm": 1.892682744806536,
476
+ "learning_rate": 1.9756502490315442e-05,
477
+ "loss": 0.0625,
478
+ "step": 670
479
+ },
480
+ {
481
+ "epoch": 0.45,
482
+ "grad_norm": 1.2063853192894494,
483
+ "learning_rate": 1.9719608928242023e-05,
484
+ "loss": 0.0519,
485
+ "step": 680
486
+ },
487
+ {
488
+ "epoch": 0.46,
489
+ "grad_norm": 1.984312822464147,
490
+ "learning_rate": 1.9682715366168604e-05,
491
+ "loss": 0.0494,
492
+ "step": 690
493
+ },
494
+ {
495
+ "epoch": 0.46,
496
+ "grad_norm": 1.6705446030280595,
497
+ "learning_rate": 1.9645821804095185e-05,
498
+ "loss": 0.059,
499
+ "step": 700
500
+ },
501
+ {
502
+ "epoch": 0.47,
503
+ "grad_norm": 1.7422620817223426,
504
+ "learning_rate": 1.960892824202177e-05,
505
+ "loss": 0.0454,
506
+ "step": 710
507
+ },
508
+ {
509
+ "epoch": 0.48,
510
+ "grad_norm": 1.3182961229762868,
511
+ "learning_rate": 1.957203467994835e-05,
512
+ "loss": 0.0581,
513
+ "step": 720
514
+ },
515
+ {
516
+ "epoch": 0.48,
517
+ "grad_norm": 1.330360819481426,
518
+ "learning_rate": 1.9535141117874932e-05,
519
+ "loss": 0.0575,
520
+ "step": 730
521
+ },
522
+ {
523
+ "epoch": 0.49,
524
+ "grad_norm": 1.9840741868184866,
525
+ "learning_rate": 1.9498247555801517e-05,
526
+ "loss": 0.063,
527
+ "step": 740
528
+ },
529
+ {
530
+ "epoch": 0.5,
531
+ "grad_norm": 1.6018064731760029,
532
+ "learning_rate": 1.9461353993728094e-05,
533
+ "loss": 0.0519,
534
+ "step": 750
535
+ },
536
+ {
537
+ "epoch": 0.5,
538
+ "grad_norm": 1.391561342963203,
539
+ "learning_rate": 1.9424460431654675e-05,
540
+ "loss": 0.0572,
541
+ "step": 760
542
+ },
543
+ {
544
+ "epoch": 0.51,
545
+ "grad_norm": 1.0319629863193043,
546
+ "learning_rate": 1.938756686958126e-05,
547
+ "loss": 0.0619,
548
+ "step": 770
549
+ },
550
+ {
551
+ "epoch": 0.52,
552
+ "grad_norm": 1.7398111190442345,
553
+ "learning_rate": 1.935067330750784e-05,
554
+ "loss": 0.05,
555
+ "step": 780
556
+ },
557
+ {
558
+ "epoch": 0.52,
559
+ "grad_norm": 1.675180749962208,
560
+ "learning_rate": 1.9313779745434422e-05,
561
+ "loss": 0.0654,
562
+ "step": 790
563
+ },
564
+ {
565
+ "epoch": 0.53,
566
+ "grad_norm": 1.486943722740635,
567
+ "learning_rate": 1.9276886183361007e-05,
568
+ "loss": 0.0463,
569
+ "step": 800
570
+ },
571
+ {
572
+ "epoch": 0.54,
573
+ "grad_norm": 1.1444156835752686,
574
+ "learning_rate": 1.9239992621287588e-05,
575
+ "loss": 0.0598,
576
+ "step": 810
577
+ },
578
+ {
579
+ "epoch": 0.54,
580
+ "grad_norm": 1.1260777714975718,
581
+ "learning_rate": 1.920309905921417e-05,
582
+ "loss": 0.039,
583
+ "step": 820
584
+ },
585
+ {
586
+ "epoch": 0.55,
587
+ "grad_norm": 1.328313971146618,
588
+ "learning_rate": 1.916620549714075e-05,
589
+ "loss": 0.0591,
590
+ "step": 830
591
+ },
592
+ {
593
+ "epoch": 0.56,
594
+ "grad_norm": 0.8805517771854091,
595
+ "learning_rate": 1.912931193506733e-05,
596
+ "loss": 0.0392,
597
+ "step": 840
598
+ },
599
+ {
600
+ "epoch": 0.56,
601
+ "grad_norm": 0.9704226543415952,
602
+ "learning_rate": 1.9092418372993916e-05,
603
+ "loss": 0.056,
604
+ "step": 850
605
+ },
606
+ {
607
+ "epoch": 0.57,
608
+ "grad_norm": 1.4328262810995938,
609
+ "learning_rate": 1.9055524810920497e-05,
610
+ "loss": 0.0602,
611
+ "step": 860
612
+ },
613
+ {
614
+ "epoch": 0.58,
615
+ "grad_norm": 2.6133255890647167,
616
+ "learning_rate": 1.9018631248847078e-05,
617
+ "loss": 0.0507,
618
+ "step": 870
619
+ },
620
+ {
621
+ "epoch": 0.58,
622
+ "grad_norm": 1.4574352859865667,
623
+ "learning_rate": 1.898173768677366e-05,
624
+ "loss": 0.0667,
625
+ "step": 880
626
+ },
627
+ {
628
+ "epoch": 0.59,
629
+ "grad_norm": 1.9116869451062006,
630
+ "learning_rate": 1.894484412470024e-05,
631
+ "loss": 0.0533,
632
+ "step": 890
633
+ },
634
+ {
635
+ "epoch": 0.6,
636
+ "grad_norm": 0.8152499611885836,
637
+ "learning_rate": 1.890795056262682e-05,
638
+ "loss": 0.0534,
639
+ "step": 900
640
+ },
641
+ {
642
+ "epoch": 0.6,
643
+ "grad_norm": 2.9440345318883696,
644
+ "learning_rate": 1.8871057000553406e-05,
645
+ "loss": 0.0419,
646
+ "step": 910
647
+ },
648
+ {
649
+ "epoch": 0.61,
650
+ "grad_norm": 2.7588896552457074,
651
+ "learning_rate": 1.8834163438479987e-05,
652
+ "loss": 0.0418,
653
+ "step": 920
654
+ },
655
+ {
656
+ "epoch": 0.62,
657
+ "grad_norm": 1.8886319208504987,
658
+ "learning_rate": 1.8797269876406568e-05,
659
+ "loss": 0.0397,
660
+ "step": 930
661
+ },
662
+ {
663
+ "epoch": 0.62,
664
+ "grad_norm": 1.8820615671771377,
665
+ "learning_rate": 1.876037631433315e-05,
666
+ "loss": 0.0454,
667
+ "step": 940
668
+ },
669
+ {
670
+ "epoch": 0.63,
671
+ "grad_norm": 1.2868214865586614,
672
+ "learning_rate": 1.872348275225973e-05,
673
+ "loss": 0.0373,
674
+ "step": 950
675
+ },
676
+ {
677
+ "epoch": 0.64,
678
+ "grad_norm": 2.016876778284122,
679
+ "learning_rate": 1.8686589190186315e-05,
680
+ "loss": 0.0619,
681
+ "step": 960
682
+ },
683
+ {
684
+ "epoch": 0.64,
685
+ "grad_norm": 0.8992764743601639,
686
+ "learning_rate": 1.8649695628112896e-05,
687
+ "loss": 0.0403,
688
+ "step": 970
689
+ },
690
+ {
691
+ "epoch": 0.65,
692
+ "grad_norm": 0.42416507318131186,
693
+ "learning_rate": 1.8612802066039477e-05,
694
+ "loss": 0.067,
695
+ "step": 980
696
+ },
697
+ {
698
+ "epoch": 0.66,
699
+ "grad_norm": 1.8601423331120188,
700
+ "learning_rate": 1.8575908503966062e-05,
701
+ "loss": 0.066,
702
+ "step": 990
703
+ },
704
+ {
705
+ "epoch": 0.66,
706
+ "grad_norm": 1.3893250379275068,
707
+ "learning_rate": 1.8539014941892643e-05,
708
+ "loss": 0.0437,
709
+ "step": 1000
710
+ },
711
+ {
712
+ "epoch": 0.67,
713
+ "grad_norm": 2.3240219930504376,
714
+ "learning_rate": 1.850212137981922e-05,
715
+ "loss": 0.0488,
716
+ "step": 1010
717
+ },
718
+ {
719
+ "epoch": 0.68,
720
+ "grad_norm": 0.8849896953543195,
721
+ "learning_rate": 1.8465227817745805e-05,
722
+ "loss": 0.0472,
723
+ "step": 1020
724
+ },
725
+ {
726
+ "epoch": 0.68,
727
+ "grad_norm": 0.8655212477880712,
728
+ "learning_rate": 1.8428334255672386e-05,
729
+ "loss": 0.0546,
730
+ "step": 1030
731
+ },
732
+ {
733
+ "epoch": 0.69,
734
+ "grad_norm": 1.2016665548799828,
735
+ "learning_rate": 1.8391440693598967e-05,
736
+ "loss": 0.0956,
737
+ "step": 1040
738
+ },
739
+ {
740
+ "epoch": 0.7,
741
+ "grad_norm": 1.492659569010543,
742
+ "learning_rate": 1.8354547131525552e-05,
743
+ "loss": 0.0449,
744
+ "step": 1050
745
+ },
746
+ {
747
+ "epoch": 0.7,
748
+ "grad_norm": 0.4224837643985645,
749
+ "learning_rate": 1.8317653569452133e-05,
750
+ "loss": 0.0545,
751
+ "step": 1060
752
+ },
753
+ {
754
+ "epoch": 0.71,
755
+ "grad_norm": 1.8405573730480247,
756
+ "learning_rate": 1.8280760007378714e-05,
757
+ "loss": 0.0328,
758
+ "step": 1070
759
+ },
760
+ {
761
+ "epoch": 0.72,
762
+ "grad_norm": 0.3988661237020132,
763
+ "learning_rate": 1.8243866445305295e-05,
764
+ "loss": 0.0451,
765
+ "step": 1080
766
+ },
767
+ {
768
+ "epoch": 0.72,
769
+ "grad_norm": 0.5573396543240564,
770
+ "learning_rate": 1.8206972883231876e-05,
771
+ "loss": 0.0502,
772
+ "step": 1090
773
+ },
774
+ {
775
+ "epoch": 0.73,
776
+ "grad_norm": 0.7855566721285819,
777
+ "learning_rate": 1.817007932115846e-05,
778
+ "loss": 0.0341,
779
+ "step": 1100
780
+ },
781
+ {
782
+ "epoch": 0.74,
783
+ "grad_norm": 1.497005175064917,
784
+ "learning_rate": 1.8133185759085042e-05,
785
+ "loss": 0.0513,
786
+ "step": 1110
787
+ },
788
+ {
789
+ "epoch": 0.74,
790
+ "grad_norm": 1.650975953086994,
791
+ "learning_rate": 1.8096292197011623e-05,
792
+ "loss": 0.0473,
793
+ "step": 1120
794
+ },
795
+ {
796
+ "epoch": 0.75,
797
+ "grad_norm": 0.8418054071334755,
798
+ "learning_rate": 1.8059398634938204e-05,
799
+ "loss": 0.0444,
800
+ "step": 1130
801
+ },
802
+ {
803
+ "epoch": 0.76,
804
+ "grad_norm": 1.33651471077315,
805
+ "learning_rate": 1.8022505072864785e-05,
806
+ "loss": 0.0476,
807
+ "step": 1140
808
+ },
809
+ {
810
+ "epoch": 0.76,
811
+ "grad_norm": 1.1529220423121023,
812
+ "learning_rate": 1.7985611510791367e-05,
813
+ "loss": 0.0379,
814
+ "step": 1150
815
+ },
816
+ {
817
+ "epoch": 0.77,
818
+ "grad_norm": 0.6912013035706749,
819
+ "learning_rate": 1.794871794871795e-05,
820
+ "loss": 0.0526,
821
+ "step": 1160
822
+ },
823
+ {
824
+ "epoch": 0.78,
825
+ "grad_norm": 2.806793867054328,
826
+ "learning_rate": 1.7911824386644532e-05,
827
+ "loss": 0.047,
828
+ "step": 1170
829
+ },
830
+ {
831
+ "epoch": 0.78,
832
+ "grad_norm": 3.323409487413899,
833
+ "learning_rate": 1.7874930824571113e-05,
834
+ "loss": 0.0455,
835
+ "step": 1180
836
+ },
837
+ {
838
+ "epoch": 0.79,
839
+ "grad_norm": 1.0877783561592873,
840
+ "learning_rate": 1.7838037262497695e-05,
841
+ "loss": 0.0555,
842
+ "step": 1190
843
+ },
844
+ {
845
+ "epoch": 0.8,
846
+ "grad_norm": 1.9158165193439103,
847
+ "learning_rate": 1.7801143700424276e-05,
848
+ "loss": 0.0458,
849
+ "step": 1200
850
+ },
851
+ {
852
+ "epoch": 0.8,
853
+ "grad_norm": 1.0863638939536142,
854
+ "learning_rate": 1.776425013835086e-05,
855
+ "loss": 0.0462,
856
+ "step": 1210
857
+ },
858
+ {
859
+ "epoch": 0.81,
860
+ "grad_norm": 2.3398031954044978,
861
+ "learning_rate": 1.772735657627744e-05,
862
+ "loss": 0.032,
863
+ "step": 1220
864
+ },
865
+ {
866
+ "epoch": 0.82,
867
+ "grad_norm": 0.9272917966743286,
868
+ "learning_rate": 1.7690463014204022e-05,
869
+ "loss": 0.0464,
870
+ "step": 1230
871
+ },
872
+ {
873
+ "epoch": 0.82,
874
+ "grad_norm": 1.4608044079217914,
875
+ "learning_rate": 1.7653569452130607e-05,
876
+ "loss": 0.0544,
877
+ "step": 1240
878
+ },
879
+ {
880
+ "epoch": 0.83,
881
+ "grad_norm": 2.0799767984416713,
882
+ "learning_rate": 1.7616675890057188e-05,
883
+ "loss": 0.0629,
884
+ "step": 1250
885
+ },
886
+ {
887
+ "epoch": 0.84,
888
+ "grad_norm": 2.438242481318271,
889
+ "learning_rate": 1.757978232798377e-05,
890
+ "loss": 0.0586,
891
+ "step": 1260
892
+ },
893
+ {
894
+ "epoch": 0.84,
895
+ "grad_norm": 0.22666963149041416,
896
+ "learning_rate": 1.754288876591035e-05,
897
+ "loss": 0.0419,
898
+ "step": 1270
899
+ },
900
+ {
901
+ "epoch": 0.85,
902
+ "grad_norm": 1.6906855856145777,
903
+ "learning_rate": 1.750599520383693e-05,
904
+ "loss": 0.0417,
905
+ "step": 1280
906
+ },
907
+ {
908
+ "epoch": 0.86,
909
+ "grad_norm": 0.8417294291584847,
910
+ "learning_rate": 1.7469101641763513e-05,
911
+ "loss": 0.0496,
912
+ "step": 1290
913
+ },
914
+ {
915
+ "epoch": 0.86,
916
+ "grad_norm": 2.384648750559231,
917
+ "learning_rate": 1.7432208079690097e-05,
918
+ "loss": 0.037,
919
+ "step": 1300
920
+ },
921
+ {
922
+ "epoch": 0.87,
923
+ "grad_norm": 1.0969098360012755,
924
+ "learning_rate": 1.7395314517616678e-05,
925
+ "loss": 0.0392,
926
+ "step": 1310
927
+ },
928
+ {
929
+ "epoch": 0.88,
930
+ "grad_norm": 4.265947825753472,
931
+ "learning_rate": 1.735842095554326e-05,
932
+ "loss": 0.0434,
933
+ "step": 1320
934
+ },
935
+ {
936
+ "epoch": 0.88,
937
+ "grad_norm": 1.0043877066833349,
938
+ "learning_rate": 1.732152739346984e-05,
939
+ "loss": 0.0423,
940
+ "step": 1330
941
+ },
942
+ {
943
+ "epoch": 0.89,
944
+ "grad_norm": 0.3834891081373628,
945
+ "learning_rate": 1.728463383139642e-05,
946
+ "loss": 0.0423,
947
+ "step": 1340
948
+ },
949
+ {
950
+ "epoch": 0.9,
951
+ "grad_norm": 0.8917610552257311,
952
+ "learning_rate": 1.7247740269323006e-05,
953
+ "loss": 0.0491,
954
+ "step": 1350
955
+ },
956
+ {
957
+ "epoch": 0.9,
958
+ "grad_norm": 1.7777935423085822,
959
+ "learning_rate": 1.7210846707249587e-05,
960
+ "loss": 0.0465,
961
+ "step": 1360
962
+ },
963
+ {
964
+ "epoch": 0.91,
965
+ "grad_norm": 2.882686457165806,
966
+ "learning_rate": 1.717395314517617e-05,
967
+ "loss": 0.0366,
968
+ "step": 1370
969
+ },
970
+ {
971
+ "epoch": 0.92,
972
+ "grad_norm": 1.4070944899475468,
973
+ "learning_rate": 1.713705958310275e-05,
974
+ "loss": 0.0364,
975
+ "step": 1380
976
+ },
977
+ {
978
+ "epoch": 0.92,
979
+ "grad_norm": 1.368387839772382,
980
+ "learning_rate": 1.710016602102933e-05,
981
+ "loss": 0.0302,
982
+ "step": 1390
983
+ },
984
+ {
985
+ "epoch": 0.93,
986
+ "grad_norm": 1.2202288141019488,
987
+ "learning_rate": 1.7063272458955912e-05,
988
+ "loss": 0.0455,
989
+ "step": 1400
990
+ },
991
+ {
992
+ "epoch": 0.94,
993
+ "grad_norm": 1.7419694841079256,
994
+ "learning_rate": 1.7026378896882496e-05,
995
+ "loss": 0.0402,
996
+ "step": 1410
997
+ },
998
+ {
999
+ "epoch": 0.94,
1000
+ "grad_norm": 1.5792094366611027,
1001
+ "learning_rate": 1.6989485334809077e-05,
1002
+ "loss": 0.0364,
1003
+ "step": 1420
1004
+ },
1005
+ {
1006
+ "epoch": 0.95,
1007
+ "grad_norm": 1.0092569099059323,
1008
+ "learning_rate": 1.695259177273566e-05,
1009
+ "loss": 0.0335,
1010
+ "step": 1430
1011
+ },
1012
+ {
1013
+ "epoch": 0.96,
1014
+ "grad_norm": 1.5374731387141227,
1015
+ "learning_rate": 1.691569821066224e-05,
1016
+ "loss": 0.0428,
1017
+ "step": 1440
1018
+ },
1019
+ {
1020
+ "epoch": 0.96,
1021
+ "grad_norm": 1.6268956058587998,
1022
+ "learning_rate": 1.687880464858882e-05,
1023
+ "loss": 0.0483,
1024
+ "step": 1450
1025
+ },
1026
+ {
1027
+ "epoch": 0.97,
1028
+ "grad_norm": 1.6628348966888566,
1029
+ "learning_rate": 1.6841911086515402e-05,
1030
+ "loss": 0.0487,
1031
+ "step": 1460
1032
+ },
1033
+ {
1034
+ "epoch": 0.98,
1035
+ "grad_norm": 8.037103442054311,
1036
+ "learning_rate": 1.6805017524441987e-05,
1037
+ "loss": 0.0679,
1038
+ "step": 1470
1039
+ },
1040
+ {
1041
+ "epoch": 0.98,
1042
+ "grad_norm": 1.620270154467724,
1043
+ "learning_rate": 1.6768123962368568e-05,
1044
+ "loss": 0.0437,
1045
+ "step": 1480
1046
+ },
1047
+ {
1048
+ "epoch": 0.99,
1049
+ "grad_norm": 1.0436875513091504,
1050
+ "learning_rate": 1.6731230400295152e-05,
1051
+ "loss": 0.0346,
1052
+ "step": 1490
1053
+ },
1054
+ {
1055
+ "epoch": 1.0,
1056
+ "grad_norm": 0.8374706362800531,
1057
+ "learning_rate": 1.6694336838221733e-05,
1058
+ "loss": 0.0517,
1059
+ "step": 1500
1060
+ },
1061
+ {
1062
+ "epoch": 1.0,
1063
+ "grad_norm": 1.1939983249441695,
1064
+ "learning_rate": 1.6657443276148314e-05,
1065
+ "loss": 0.0393,
1066
+ "step": 1510
1067
+ },
1068
+ {
1069
+ "epoch": 1.01,
1070
+ "grad_norm": 1.0650702970882078,
1071
+ "learning_rate": 1.6620549714074896e-05,
1072
+ "loss": 0.0433,
1073
+ "step": 1520
1074
+ },
1075
+ {
1076
+ "epoch": 1.02,
1077
+ "grad_norm": 0.9588706576483126,
1078
+ "learning_rate": 1.6583656152001477e-05,
1079
+ "loss": 0.0381,
1080
+ "step": 1530
1081
+ },
1082
+ {
1083
+ "epoch": 1.02,
1084
+ "grad_norm": 1.4412233810414918,
1085
+ "learning_rate": 1.6546762589928058e-05,
1086
+ "loss": 0.0346,
1087
+ "step": 1540
1088
+ },
1089
+ {
1090
+ "epoch": 1.03,
1091
+ "grad_norm": 0.9533871774762268,
1092
+ "learning_rate": 1.6509869027854642e-05,
1093
+ "loss": 0.0239,
1094
+ "step": 1550
1095
+ },
1096
+ {
1097
+ "epoch": 1.04,
1098
+ "grad_norm": 0.44748765523495393,
1099
+ "learning_rate": 1.6472975465781223e-05,
1100
+ "loss": 0.0424,
1101
+ "step": 1560
1102
+ },
1103
+ {
1104
+ "epoch": 1.04,
1105
+ "grad_norm": 0.6542278196418172,
1106
+ "learning_rate": 1.6436081903707805e-05,
1107
+ "loss": 0.0322,
1108
+ "step": 1570
1109
+ },
1110
+ {
1111
+ "epoch": 1.05,
1112
+ "grad_norm": 0.774821420829752,
1113
+ "learning_rate": 1.6399188341634386e-05,
1114
+ "loss": 0.0337,
1115
+ "step": 1580
1116
+ },
1117
+ {
1118
+ "epoch": 1.06,
1119
+ "grad_norm": 3.4366984039627053,
1120
+ "learning_rate": 1.6362294779560967e-05,
1121
+ "loss": 0.0402,
1122
+ "step": 1590
1123
+ },
1124
+ {
1125
+ "epoch": 1.06,
1126
+ "grad_norm": 0.9409785268524657,
1127
+ "learning_rate": 1.6325401217487548e-05,
1128
+ "loss": 0.0351,
1129
+ "step": 1600
1130
+ },
1131
+ {
1132
+ "epoch": 1.07,
1133
+ "grad_norm": 1.3755255908395096,
1134
+ "learning_rate": 1.6288507655414133e-05,
1135
+ "loss": 0.0287,
1136
+ "step": 1610
1137
+ },
1138
+ {
1139
+ "epoch": 1.08,
1140
+ "grad_norm": 0.9105883051718862,
1141
+ "learning_rate": 1.6251614093340714e-05,
1142
+ "loss": 0.0377,
1143
+ "step": 1620
1144
+ },
1145
+ {
1146
+ "epoch": 1.08,
1147
+ "grad_norm": 0.669451044858242,
1148
+ "learning_rate": 1.6214720531267295e-05,
1149
+ "loss": 0.0397,
1150
+ "step": 1630
1151
+ },
1152
+ {
1153
+ "epoch": 1.09,
1154
+ "grad_norm": 1.0173498911812129,
1155
+ "learning_rate": 1.6177826969193876e-05,
1156
+ "loss": 0.0362,
1157
+ "step": 1640
1158
+ },
1159
+ {
1160
+ "epoch": 1.1,
1161
+ "grad_norm": 1.443726695479527,
1162
+ "learning_rate": 1.6140933407120457e-05,
1163
+ "loss": 0.0388,
1164
+ "step": 1650
1165
+ },
1166
+ {
1167
+ "epoch": 1.1,
1168
+ "grad_norm": 0.48614710000952543,
1169
+ "learning_rate": 1.610403984504704e-05,
1170
+ "loss": 0.044,
1171
+ "step": 1660
1172
+ },
1173
+ {
1174
+ "epoch": 1.11,
1175
+ "grad_norm": 0.8955875806318787,
1176
+ "learning_rate": 1.6067146282973623e-05,
1177
+ "loss": 0.0361,
1178
+ "step": 1670
1179
+ },
1180
+ {
1181
+ "epoch": 1.12,
1182
+ "grad_norm": 0.7136011214906065,
1183
+ "learning_rate": 1.6030252720900204e-05,
1184
+ "loss": 0.0399,
1185
+ "step": 1680
1186
+ },
1187
+ {
1188
+ "epoch": 1.12,
1189
+ "grad_norm": 1.342383821315822,
1190
+ "learning_rate": 1.599335915882679e-05,
1191
+ "loss": 0.0398,
1192
+ "step": 1690
1193
+ },
1194
+ {
1195
+ "epoch": 1.13,
1196
+ "grad_norm": 1.9154366056765233,
1197
+ "learning_rate": 1.5956465596753366e-05,
1198
+ "loss": 0.0351,
1199
+ "step": 1700
1200
+ },
1201
+ {
1202
+ "epoch": 1.14,
1203
+ "grad_norm": 3.380571358597728,
1204
+ "learning_rate": 1.5919572034679947e-05,
1205
+ "loss": 0.0355,
1206
+ "step": 1710
1207
+ },
1208
+ {
1209
+ "epoch": 1.14,
1210
+ "grad_norm": 1.4160947580259224,
1211
+ "learning_rate": 1.5882678472606532e-05,
1212
+ "loss": 0.0333,
1213
+ "step": 1720
1214
+ },
1215
+ {
1216
+ "epoch": 1.15,
1217
+ "grad_norm": 0.6737638581076882,
1218
+ "learning_rate": 1.5845784910533113e-05,
1219
+ "loss": 0.0296,
1220
+ "step": 1730
1221
+ },
1222
+ {
1223
+ "epoch": 1.16,
1224
+ "grad_norm": 1.206337590570484,
1225
+ "learning_rate": 1.5808891348459694e-05,
1226
+ "loss": 0.0308,
1227
+ "step": 1740
1228
+ },
1229
+ {
1230
+ "epoch": 1.16,
1231
+ "grad_norm": 0.7350933133142535,
1232
+ "learning_rate": 1.577199778638628e-05,
1233
+ "loss": 0.0335,
1234
+ "step": 1750
1235
+ },
1236
+ {
1237
+ "epoch": 1.17,
1238
+ "grad_norm": 1.3603619905771789,
1239
+ "learning_rate": 1.573510422431286e-05,
1240
+ "loss": 0.0254,
1241
+ "step": 1760
1242
+ },
1243
+ {
1244
+ "epoch": 1.18,
1245
+ "grad_norm": 0.6337146921122443,
1246
+ "learning_rate": 1.569821066223944e-05,
1247
+ "loss": 0.0381,
1248
+ "step": 1770
1249
+ },
1250
+ {
1251
+ "epoch": 1.18,
1252
+ "grad_norm": 1.3833442570741445,
1253
+ "learning_rate": 1.5661317100166022e-05,
1254
+ "loss": 0.0295,
1255
+ "step": 1780
1256
+ },
1257
+ {
1258
+ "epoch": 1.19,
1259
+ "grad_norm": 1.1660396503165016,
1260
+ "learning_rate": 1.5624423538092603e-05,
1261
+ "loss": 0.0313,
1262
+ "step": 1790
1263
+ },
1264
+ {
1265
+ "epoch": 1.2,
1266
+ "grad_norm": 1.085393536126589,
1267
+ "learning_rate": 1.5587529976019188e-05,
1268
+ "loss": 0.0294,
1269
+ "step": 1800
1270
+ },
1271
+ {
1272
+ "epoch": 1.2,
1273
+ "grad_norm": 0.9428955580680065,
1274
+ "learning_rate": 1.555063641394577e-05,
1275
+ "loss": 0.0403,
1276
+ "step": 1810
1277
+ },
1278
+ {
1279
+ "epoch": 1.21,
1280
+ "grad_norm": 1.2824389825772662,
1281
+ "learning_rate": 1.551374285187235e-05,
1282
+ "loss": 0.0326,
1283
+ "step": 1820
1284
+ },
1285
+ {
1286
+ "epoch": 1.22,
1287
+ "grad_norm": 1.071530839035684,
1288
+ "learning_rate": 1.547684928979893e-05,
1289
+ "loss": 0.0224,
1290
+ "step": 1830
1291
+ },
1292
+ {
1293
+ "epoch": 1.22,
1294
+ "grad_norm": 0.7250437295813942,
1295
+ "learning_rate": 1.5439955727725512e-05,
1296
+ "loss": 0.0253,
1297
+ "step": 1840
1298
+ },
1299
+ {
1300
+ "epoch": 1.23,
1301
+ "grad_norm": 0.4676245052117833,
1302
+ "learning_rate": 1.5403062165652093e-05,
1303
+ "loss": 0.0245,
1304
+ "step": 1850
1305
+ },
1306
+ {
1307
+ "epoch": 1.24,
1308
+ "grad_norm": 1.3654237978697314,
1309
+ "learning_rate": 1.5366168603578678e-05,
1310
+ "loss": 0.0274,
1311
+ "step": 1860
1312
+ },
1313
+ {
1314
+ "epoch": 1.24,
1315
+ "grad_norm": 0.8371654653693097,
1316
+ "learning_rate": 1.532927504150526e-05,
1317
+ "loss": 0.0408,
1318
+ "step": 1870
1319
+ },
1320
+ {
1321
+ "epoch": 1.25,
1322
+ "grad_norm": 0.918371136718616,
1323
+ "learning_rate": 1.529238147943184e-05,
1324
+ "loss": 0.0252,
1325
+ "step": 1880
1326
+ },
1327
+ {
1328
+ "epoch": 1.25,
1329
+ "grad_norm": 1.0100840319244568,
1330
+ "learning_rate": 1.5255487917358423e-05,
1331
+ "loss": 0.0282,
1332
+ "step": 1890
1333
+ },
1334
+ {
1335
+ "epoch": 1.26,
1336
+ "grad_norm": 1.2752226504227586,
1337
+ "learning_rate": 1.5218594355285004e-05,
1338
+ "loss": 0.0481,
1339
+ "step": 1900
1340
+ },
1341
+ {
1342
+ "epoch": 1.27,
1343
+ "grad_norm": 1.016628356639124,
1344
+ "learning_rate": 1.5181700793211587e-05,
1345
+ "loss": 0.0534,
1346
+ "step": 1910
1347
+ },
1348
+ {
1349
+ "epoch": 1.27,
1350
+ "grad_norm": 1.2018849311057271,
1351
+ "learning_rate": 1.5144807231138168e-05,
1352
+ "loss": 0.0357,
1353
+ "step": 1920
1354
+ },
1355
+ {
1356
+ "epoch": 1.28,
1357
+ "grad_norm": 1.3543149671289594,
1358
+ "learning_rate": 1.5107913669064749e-05,
1359
+ "loss": 0.0354,
1360
+ "step": 1930
1361
+ },
1362
+ {
1363
+ "epoch": 1.29,
1364
+ "grad_norm": 1.0460241475499934,
1365
+ "learning_rate": 1.5071020106991332e-05,
1366
+ "loss": 0.0328,
1367
+ "step": 1940
1368
+ },
1369
+ {
1370
+ "epoch": 1.29,
1371
+ "grad_norm": 0.7712993931217346,
1372
+ "learning_rate": 1.5034126544917913e-05,
1373
+ "loss": 0.0352,
1374
+ "step": 1950
1375
+ },
1376
+ {
1377
+ "epoch": 1.3,
1378
+ "grad_norm": 0.6403552627247137,
1379
+ "learning_rate": 1.4997232982844494e-05,
1380
+ "loss": 0.0374,
1381
+ "step": 1960
1382
+ },
1383
+ {
1384
+ "epoch": 1.31,
1385
+ "grad_norm": 0.6985534187744373,
1386
+ "learning_rate": 1.4960339420771077e-05,
1387
+ "loss": 0.0236,
1388
+ "step": 1970
1389
+ },
1390
+ {
1391
+ "epoch": 1.31,
1392
+ "grad_norm": 2.7973859948867315,
1393
+ "learning_rate": 1.4923445858697658e-05,
1394
+ "loss": 0.0333,
1395
+ "step": 1980
1396
+ },
1397
+ {
1398
+ "epoch": 1.32,
1399
+ "grad_norm": 0.7856751051336177,
1400
+ "learning_rate": 1.488655229662424e-05,
1401
+ "loss": 0.0283,
1402
+ "step": 1990
1403
+ },
1404
+ {
1405
+ "epoch": 1.33,
1406
+ "grad_norm": 1.1090831103953211,
1407
+ "learning_rate": 1.4849658734550822e-05,
1408
+ "loss": 0.0424,
1409
+ "step": 2000
1410
+ },
1411
+ {
1412
+ "epoch": 1.33,
1413
+ "grad_norm": 0.37705371680669364,
1414
+ "learning_rate": 1.4812765172477403e-05,
1415
+ "loss": 0.0264,
1416
+ "step": 2010
1417
+ },
1418
+ {
1419
+ "epoch": 1.34,
1420
+ "grad_norm": 2.011193423521568,
1421
+ "learning_rate": 1.4775871610403986e-05,
1422
+ "loss": 0.0325,
1423
+ "step": 2020
1424
+ },
1425
+ {
1426
+ "epoch": 1.35,
1427
+ "grad_norm": 1.00662492673962,
1428
+ "learning_rate": 1.4738978048330567e-05,
1429
+ "loss": 0.0325,
1430
+ "step": 2030
1431
+ },
1432
+ {
1433
+ "epoch": 1.35,
1434
+ "grad_norm": 1.0249189181939053,
1435
+ "learning_rate": 1.4702084486257148e-05,
1436
+ "loss": 0.0296,
1437
+ "step": 2040
1438
+ },
1439
+ {
1440
+ "epoch": 1.36,
1441
+ "grad_norm": 1.294162625472094,
1442
+ "learning_rate": 1.4665190924183733e-05,
1443
+ "loss": 0.0362,
1444
+ "step": 2050
1445
+ },
1446
+ {
1447
+ "epoch": 1.37,
1448
+ "grad_norm": 0.8753798886295676,
1449
+ "learning_rate": 1.4628297362110312e-05,
1450
+ "loss": 0.0352,
1451
+ "step": 2060
1452
+ },
1453
+ {
1454
+ "epoch": 1.37,
1455
+ "grad_norm": 0.32404034083576144,
1456
+ "learning_rate": 1.4591403800036893e-05,
1457
+ "loss": 0.0319,
1458
+ "step": 2070
1459
+ },
1460
+ {
1461
+ "epoch": 1.38,
1462
+ "grad_norm": 1.3881694244187606,
1463
+ "learning_rate": 1.4554510237963478e-05,
1464
+ "loss": 0.0383,
1465
+ "step": 2080
1466
+ },
1467
+ {
1468
+ "epoch": 1.39,
1469
+ "grad_norm": 0.9106958124280001,
1470
+ "learning_rate": 1.4517616675890059e-05,
1471
+ "loss": 0.0366,
1472
+ "step": 2090
1473
+ },
1474
+ {
1475
+ "epoch": 1.39,
1476
+ "grad_norm": 1.3920757998129725,
1477
+ "learning_rate": 1.448072311381664e-05,
1478
+ "loss": 0.0359,
1479
+ "step": 2100
1480
+ },
1481
+ {
1482
+ "epoch": 1.4,
1483
+ "grad_norm": 2.5378193320802556,
1484
+ "learning_rate": 1.4443829551743223e-05,
1485
+ "loss": 0.0375,
1486
+ "step": 2110
1487
+ },
1488
+ {
1489
+ "epoch": 1.41,
1490
+ "grad_norm": 1.6327275888367767,
1491
+ "learning_rate": 1.4406935989669804e-05,
1492
+ "loss": 0.0491,
1493
+ "step": 2120
1494
+ },
1495
+ {
1496
+ "epoch": 1.41,
1497
+ "grad_norm": 1.457863332305797,
1498
+ "learning_rate": 1.4370042427596385e-05,
1499
+ "loss": 0.0379,
1500
+ "step": 2130
1501
+ },
1502
+ {
1503
+ "epoch": 1.42,
1504
+ "grad_norm": 0.19454376571103232,
1505
+ "learning_rate": 1.4333148865522968e-05,
1506
+ "loss": 0.0357,
1507
+ "step": 2140
1508
+ },
1509
+ {
1510
+ "epoch": 1.43,
1511
+ "grad_norm": 0.7421971370673671,
1512
+ "learning_rate": 1.429625530344955e-05,
1513
+ "loss": 0.0418,
1514
+ "step": 2150
1515
+ },
1516
+ {
1517
+ "epoch": 1.43,
1518
+ "grad_norm": 0.0937417741981473,
1519
+ "learning_rate": 1.4259361741376132e-05,
1520
+ "loss": 0.0248,
1521
+ "step": 2160
1522
+ },
1523
+ {
1524
+ "epoch": 1.44,
1525
+ "grad_norm": 0.7544900086855553,
1526
+ "learning_rate": 1.4222468179302713e-05,
1527
+ "loss": 0.0242,
1528
+ "step": 2170
1529
+ },
1530
+ {
1531
+ "epoch": 1.45,
1532
+ "grad_norm": 0.10357082442667653,
1533
+ "learning_rate": 1.4185574617229294e-05,
1534
+ "loss": 0.0277,
1535
+ "step": 2180
1536
+ },
1537
+ {
1538
+ "epoch": 1.45,
1539
+ "grad_norm": 0.429204704240934,
1540
+ "learning_rate": 1.4148681055155877e-05,
1541
+ "loss": 0.0253,
1542
+ "step": 2190
1543
+ },
1544
+ {
1545
+ "epoch": 1.46,
1546
+ "grad_norm": 1.7367754983146269,
1547
+ "learning_rate": 1.4111787493082458e-05,
1548
+ "loss": 0.0337,
1549
+ "step": 2200
1550
+ },
1551
+ {
1552
+ "epoch": 1.47,
1553
+ "grad_norm": 0.6428519364176438,
1554
+ "learning_rate": 1.407489393100904e-05,
1555
+ "loss": 0.0331,
1556
+ "step": 2210
1557
+ },
1558
+ {
1559
+ "epoch": 1.47,
1560
+ "grad_norm": 0.7848514705508334,
1561
+ "learning_rate": 1.4038000368935622e-05,
1562
+ "loss": 0.031,
1563
+ "step": 2220
1564
+ },
1565
+ {
1566
+ "epoch": 1.48,
1567
+ "grad_norm": 1.2604412780544694,
1568
+ "learning_rate": 1.4001106806862203e-05,
1569
+ "loss": 0.0381,
1570
+ "step": 2230
1571
+ },
1572
+ {
1573
+ "epoch": 1.49,
1574
+ "grad_norm": 1.0154534415085918,
1575
+ "learning_rate": 1.3964213244788784e-05,
1576
+ "loss": 0.0294,
1577
+ "step": 2240
1578
+ },
1579
+ {
1580
+ "epoch": 1.49,
1581
+ "grad_norm": 1.2166332545112624,
1582
+ "learning_rate": 1.3927319682715367e-05,
1583
+ "loss": 0.0275,
1584
+ "step": 2250
1585
+ },
1586
+ {
1587
+ "epoch": 1.5,
1588
+ "grad_norm": 0.8758369938501386,
1589
+ "learning_rate": 1.3890426120641948e-05,
1590
+ "loss": 0.0359,
1591
+ "step": 2260
1592
+ },
1593
+ {
1594
+ "epoch": 1.51,
1595
+ "grad_norm": 0.9645035178583596,
1596
+ "learning_rate": 1.385353255856853e-05,
1597
+ "loss": 0.0257,
1598
+ "step": 2270
1599
+ },
1600
+ {
1601
+ "epoch": 1.51,
1602
+ "grad_norm": 0.24217577106008117,
1603
+ "learning_rate": 1.3816638996495112e-05,
1604
+ "loss": 0.0188,
1605
+ "step": 2280
1606
+ },
1607
+ {
1608
+ "epoch": 1.52,
1609
+ "grad_norm": 0.8656287403232453,
1610
+ "learning_rate": 1.3779745434421693e-05,
1611
+ "loss": 0.035,
1612
+ "step": 2290
1613
+ },
1614
+ {
1615
+ "epoch": 1.53,
1616
+ "grad_norm": 1.5535880950760363,
1617
+ "learning_rate": 1.3742851872348278e-05,
1618
+ "loss": 0.0325,
1619
+ "step": 2300
1620
+ },
1621
+ {
1622
+ "epoch": 1.53,
1623
+ "grad_norm": 0.6356266461691455,
1624
+ "learning_rate": 1.3705958310274859e-05,
1625
+ "loss": 0.0292,
1626
+ "step": 2310
1627
+ },
1628
+ {
1629
+ "epoch": 1.54,
1630
+ "grad_norm": 1.3067413428110854,
1631
+ "learning_rate": 1.3669064748201439e-05,
1632
+ "loss": 0.0206,
1633
+ "step": 2320
1634
+ },
1635
+ {
1636
+ "epoch": 1.55,
1637
+ "grad_norm": 1.3327319855425117,
1638
+ "learning_rate": 1.3632171186128023e-05,
1639
+ "loss": 0.023,
1640
+ "step": 2330
1641
+ },
1642
+ {
1643
+ "epoch": 1.55,
1644
+ "grad_norm": 2.308037550483557,
1645
+ "learning_rate": 1.3595277624054604e-05,
1646
+ "loss": 0.0283,
1647
+ "step": 2340
1648
+ },
1649
+ {
1650
+ "epoch": 1.56,
1651
+ "grad_norm": 1.447528110026965,
1652
+ "learning_rate": 1.3558384061981185e-05,
1653
+ "loss": 0.0344,
1654
+ "step": 2350
1655
+ },
1656
+ {
1657
+ "epoch": 1.57,
1658
+ "grad_norm": 1.4781377553893515,
1659
+ "learning_rate": 1.3521490499907768e-05,
1660
+ "loss": 0.0338,
1661
+ "step": 2360
1662
+ },
1663
+ {
1664
+ "epoch": 1.57,
1665
+ "grad_norm": 1.2213361639825704,
1666
+ "learning_rate": 1.348459693783435e-05,
1667
+ "loss": 0.0213,
1668
+ "step": 2370
1669
+ },
1670
+ {
1671
+ "epoch": 1.58,
1672
+ "grad_norm": 0.806579624483452,
1673
+ "learning_rate": 1.344770337576093e-05,
1674
+ "loss": 0.0308,
1675
+ "step": 2380
1676
+ },
1677
+ {
1678
+ "epoch": 1.59,
1679
+ "grad_norm": 0.36305855519021074,
1680
+ "learning_rate": 1.3410809813687513e-05,
1681
+ "loss": 0.0307,
1682
+ "step": 2390
1683
+ },
1684
+ {
1685
+ "epoch": 1.59,
1686
+ "grad_norm": 1.7963102033556697,
1687
+ "learning_rate": 1.3373916251614094e-05,
1688
+ "loss": 0.0438,
1689
+ "step": 2400
1690
+ },
1691
+ {
1692
+ "epoch": 1.6,
1693
+ "grad_norm": 0.8741626138535608,
1694
+ "learning_rate": 1.3337022689540676e-05,
1695
+ "loss": 0.0282,
1696
+ "step": 2410
1697
+ },
1698
+ {
1699
+ "epoch": 1.61,
1700
+ "grad_norm": 0.8183941890622122,
1701
+ "learning_rate": 1.3300129127467258e-05,
1702
+ "loss": 0.03,
1703
+ "step": 2420
1704
+ },
1705
+ {
1706
+ "epoch": 1.61,
1707
+ "grad_norm": 1.315171338874376,
1708
+ "learning_rate": 1.326323556539384e-05,
1709
+ "loss": 0.0347,
1710
+ "step": 2430
1711
+ },
1712
+ {
1713
+ "epoch": 1.62,
1714
+ "grad_norm": 1.268446896432008,
1715
+ "learning_rate": 1.3226342003320422e-05,
1716
+ "loss": 0.0376,
1717
+ "step": 2440
1718
+ },
1719
+ {
1720
+ "epoch": 1.63,
1721
+ "grad_norm": 0.913219454382149,
1722
+ "learning_rate": 1.3189448441247003e-05,
1723
+ "loss": 0.0358,
1724
+ "step": 2450
1725
+ },
1726
+ {
1727
+ "epoch": 1.63,
1728
+ "grad_norm": 1.1043754536185766,
1729
+ "learning_rate": 1.3152554879173585e-05,
1730
+ "loss": 0.0284,
1731
+ "step": 2460
1732
+ },
1733
+ {
1734
+ "epoch": 1.64,
1735
+ "grad_norm": 1.203565789266508,
1736
+ "learning_rate": 1.3115661317100167e-05,
1737
+ "loss": 0.0292,
1738
+ "step": 2470
1739
+ },
1740
+ {
1741
+ "epoch": 1.65,
1742
+ "grad_norm": 1.9568074416295906,
1743
+ "learning_rate": 1.3078767755026749e-05,
1744
+ "loss": 0.0262,
1745
+ "step": 2480
1746
+ },
1747
+ {
1748
+ "epoch": 1.65,
1749
+ "grad_norm": 0.2859744392048369,
1750
+ "learning_rate": 1.304187419295333e-05,
1751
+ "loss": 0.0295,
1752
+ "step": 2490
1753
+ },
1754
+ {
1755
+ "epoch": 1.66,
1756
+ "grad_norm": 1.077880610534017,
1757
+ "learning_rate": 1.3004980630879912e-05,
1758
+ "loss": 0.0288,
1759
+ "step": 2500
1760
+ },
1761
+ {
1762
+ "epoch": 1.67,
1763
+ "grad_norm": 0.9333475338900054,
1764
+ "learning_rate": 1.2968087068806494e-05,
1765
+ "loss": 0.0355,
1766
+ "step": 2510
1767
+ },
1768
+ {
1769
+ "epoch": 1.67,
1770
+ "grad_norm": 1.904061045593678,
1771
+ "learning_rate": 1.2931193506733075e-05,
1772
+ "loss": 0.0251,
1773
+ "step": 2520
1774
+ },
1775
+ {
1776
+ "epoch": 1.68,
1777
+ "grad_norm": 0.58158119774247,
1778
+ "learning_rate": 1.2894299944659658e-05,
1779
+ "loss": 0.0233,
1780
+ "step": 2530
1781
+ },
1782
+ {
1783
+ "epoch": 1.69,
1784
+ "grad_norm": 0.7277481905024581,
1785
+ "learning_rate": 1.2857406382586239e-05,
1786
+ "loss": 0.0298,
1787
+ "step": 2540
1788
+ },
1789
+ {
1790
+ "epoch": 1.69,
1791
+ "grad_norm": 1.8262592151991606,
1792
+ "learning_rate": 1.2820512820512823e-05,
1793
+ "loss": 0.0276,
1794
+ "step": 2550
1795
+ },
1796
+ {
1797
+ "epoch": 1.7,
1798
+ "grad_norm": 0.6465268769367779,
1799
+ "learning_rate": 1.2783619258439404e-05,
1800
+ "loss": 0.027,
1801
+ "step": 2560
1802
+ },
1803
+ {
1804
+ "epoch": 1.71,
1805
+ "grad_norm": 0.6081326854882737,
1806
+ "learning_rate": 1.2746725696365985e-05,
1807
+ "loss": 0.0337,
1808
+ "step": 2570
1809
+ },
1810
+ {
1811
+ "epoch": 1.71,
1812
+ "grad_norm": 0.7068771700231296,
1813
+ "learning_rate": 1.2709832134292568e-05,
1814
+ "loss": 0.0236,
1815
+ "step": 2580
1816
+ },
1817
+ {
1818
+ "epoch": 1.72,
1819
+ "grad_norm": 1.8049539476685674,
1820
+ "learning_rate": 1.267293857221915e-05,
1821
+ "loss": 0.0282,
1822
+ "step": 2590
1823
+ },
1824
+ {
1825
+ "epoch": 1.73,
1826
+ "grad_norm": 0.553245442957324,
1827
+ "learning_rate": 1.263604501014573e-05,
1828
+ "loss": 0.0226,
1829
+ "step": 2600
1830
+ },
1831
+ {
1832
+ "epoch": 1.73,
1833
+ "grad_norm": 0.8295872212818136,
1834
+ "learning_rate": 1.2599151448072313e-05,
1835
+ "loss": 0.0232,
1836
+ "step": 2610
1837
+ },
1838
+ {
1839
+ "epoch": 1.74,
1840
+ "grad_norm": 0.9798348798123743,
1841
+ "learning_rate": 1.2562257885998895e-05,
1842
+ "loss": 0.0456,
1843
+ "step": 2620
1844
+ },
1845
+ {
1846
+ "epoch": 1.75,
1847
+ "grad_norm": 1.19245304335107,
1848
+ "learning_rate": 1.2525364323925476e-05,
1849
+ "loss": 0.0284,
1850
+ "step": 2630
1851
+ },
1852
+ {
1853
+ "epoch": 1.75,
1854
+ "grad_norm": 1.5998767447680797,
1855
+ "learning_rate": 1.2488470761852058e-05,
1856
+ "loss": 0.0307,
1857
+ "step": 2640
1858
+ },
1859
+ {
1860
+ "epoch": 1.76,
1861
+ "grad_norm": 1.7431018978542536,
1862
+ "learning_rate": 1.245157719977864e-05,
1863
+ "loss": 0.0216,
1864
+ "step": 2650
1865
+ },
1866
+ {
1867
+ "epoch": 1.77,
1868
+ "grad_norm": 1.0864224894613053,
1869
+ "learning_rate": 1.241468363770522e-05,
1870
+ "loss": 0.0388,
1871
+ "step": 2660
1872
+ },
1873
+ {
1874
+ "epoch": 1.77,
1875
+ "grad_norm": 2.164074288346446,
1876
+ "learning_rate": 1.2377790075631804e-05,
1877
+ "loss": 0.0302,
1878
+ "step": 2670
1879
+ },
1880
+ {
1881
+ "epoch": 1.78,
1882
+ "grad_norm": 0.6890867086297026,
1883
+ "learning_rate": 1.2340896513558385e-05,
1884
+ "loss": 0.0258,
1885
+ "step": 2680
1886
+ },
1887
+ {
1888
+ "epoch": 1.79,
1889
+ "grad_norm": 1.1150440915546074,
1890
+ "learning_rate": 1.2304002951484968e-05,
1891
+ "loss": 0.0279,
1892
+ "step": 2690
1893
+ },
1894
+ {
1895
+ "epoch": 1.79,
1896
+ "grad_norm": 0.7515709240098276,
1897
+ "learning_rate": 1.2267109389411549e-05,
1898
+ "loss": 0.0419,
1899
+ "step": 2700
1900
+ },
1901
+ {
1902
+ "epoch": 1.8,
1903
+ "grad_norm": 0.7795946895425347,
1904
+ "learning_rate": 1.223021582733813e-05,
1905
+ "loss": 0.0152,
1906
+ "step": 2710
1907
+ },
1908
+ {
1909
+ "epoch": 1.81,
1910
+ "grad_norm": 0.7206757082802774,
1911
+ "learning_rate": 1.2193322265264713e-05,
1912
+ "loss": 0.039,
1913
+ "step": 2720
1914
+ },
1915
+ {
1916
+ "epoch": 1.81,
1917
+ "grad_norm": 0.9261417250470075,
1918
+ "learning_rate": 1.2156428703191294e-05,
1919
+ "loss": 0.031,
1920
+ "step": 2730
1921
+ },
1922
+ {
1923
+ "epoch": 1.82,
1924
+ "grad_norm": 0.9738836548814439,
1925
+ "learning_rate": 1.2119535141117875e-05,
1926
+ "loss": 0.0318,
1927
+ "step": 2740
1928
+ },
1929
+ {
1930
+ "epoch": 1.83,
1931
+ "grad_norm": 1.6517158198941853,
1932
+ "learning_rate": 1.2082641579044458e-05,
1933
+ "loss": 0.0346,
1934
+ "step": 2750
1935
+ },
1936
+ {
1937
+ "epoch": 1.83,
1938
+ "grad_norm": 0.8931816948527265,
1939
+ "learning_rate": 1.2045748016971039e-05,
1940
+ "loss": 0.0278,
1941
+ "step": 2760
1942
+ },
1943
+ {
1944
+ "epoch": 1.84,
1945
+ "grad_norm": 1.5388621088460506,
1946
+ "learning_rate": 1.200885445489762e-05,
1947
+ "loss": 0.0296,
1948
+ "step": 2770
1949
+ },
1950
+ {
1951
+ "epoch": 1.85,
1952
+ "grad_norm": 0.6080136375748658,
1953
+ "learning_rate": 1.1971960892824204e-05,
1954
+ "loss": 0.0314,
1955
+ "step": 2780
1956
+ },
1957
+ {
1958
+ "epoch": 1.85,
1959
+ "grad_norm": 0.7855564824393652,
1960
+ "learning_rate": 1.1935067330750784e-05,
1961
+ "loss": 0.0371,
1962
+ "step": 2790
1963
+ },
1964
+ {
1965
+ "epoch": 1.86,
1966
+ "grad_norm": 1.391898825501054,
1967
+ "learning_rate": 1.1898173768677365e-05,
1968
+ "loss": 0.0215,
1969
+ "step": 2800
1970
+ },
1971
+ {
1972
+ "epoch": 1.87,
1973
+ "grad_norm": 0.023622261403316365,
1974
+ "learning_rate": 1.186128020660395e-05,
1975
+ "loss": 0.0289,
1976
+ "step": 2810
1977
+ },
1978
+ {
1979
+ "epoch": 1.87,
1980
+ "grad_norm": 1.2844725300311655,
1981
+ "learning_rate": 1.182438664453053e-05,
1982
+ "loss": 0.0272,
1983
+ "step": 2820
1984
+ },
1985
+ {
1986
+ "epoch": 1.88,
1987
+ "grad_norm": 0.008098058731733223,
1988
+ "learning_rate": 1.1787493082457114e-05,
1989
+ "loss": 0.021,
1990
+ "step": 2830
1991
+ },
1992
+ {
1993
+ "epoch": 1.89,
1994
+ "grad_norm": 2.4455783687272565,
1995
+ "learning_rate": 1.1750599520383695e-05,
1996
+ "loss": 0.0387,
1997
+ "step": 2840
1998
+ },
1999
+ {
2000
+ "epoch": 1.89,
2001
+ "grad_norm": 0.5832035368747368,
2002
+ "learning_rate": 1.1713705958310276e-05,
2003
+ "loss": 0.0392,
2004
+ "step": 2850
2005
+ },
2006
+ {
2007
+ "epoch": 1.9,
2008
+ "grad_norm": 0.4288935348488189,
2009
+ "learning_rate": 1.1676812396236859e-05,
2010
+ "loss": 0.0243,
2011
+ "step": 2860
2012
+ },
2013
+ {
2014
+ "epoch": 1.91,
2015
+ "grad_norm": 0.85140142754813,
2016
+ "learning_rate": 1.163991883416344e-05,
2017
+ "loss": 0.0288,
2018
+ "step": 2870
2019
+ },
2020
+ {
2021
+ "epoch": 1.91,
2022
+ "grad_norm": 0.6208450731238502,
2023
+ "learning_rate": 1.1603025272090021e-05,
2024
+ "loss": 0.0257,
2025
+ "step": 2880
2026
+ },
2027
+ {
2028
+ "epoch": 1.92,
2029
+ "grad_norm": 0.5506545117162834,
2030
+ "learning_rate": 1.1566131710016604e-05,
2031
+ "loss": 0.0257,
2032
+ "step": 2890
2033
+ },
2034
+ {
2035
+ "epoch": 1.93,
2036
+ "grad_norm": 0.6983830876671564,
2037
+ "learning_rate": 1.1529238147943185e-05,
2038
+ "loss": 0.0153,
2039
+ "step": 2900
2040
+ },
2041
+ {
2042
+ "epoch": 1.93,
2043
+ "grad_norm": 0.5365569446878222,
2044
+ "learning_rate": 1.1492344585869766e-05,
2045
+ "loss": 0.0287,
2046
+ "step": 2910
2047
+ },
2048
+ {
2049
+ "epoch": 1.94,
2050
+ "grad_norm": 0.48404097576321364,
2051
+ "learning_rate": 1.1455451023796349e-05,
2052
+ "loss": 0.0189,
2053
+ "step": 2920
2054
+ },
2055
+ {
2056
+ "epoch": 1.95,
2057
+ "grad_norm": 0.2656124897423078,
2058
+ "learning_rate": 1.141855746172293e-05,
2059
+ "loss": 0.0321,
2060
+ "step": 2930
2061
+ },
2062
+ {
2063
+ "epoch": 1.95,
2064
+ "grad_norm": 0.9816015622085352,
2065
+ "learning_rate": 1.1381663899649511e-05,
2066
+ "loss": 0.0392,
2067
+ "step": 2940
2068
+ },
2069
+ {
2070
+ "epoch": 1.96,
2071
+ "grad_norm": 1.6810737744401563,
2072
+ "learning_rate": 1.1344770337576094e-05,
2073
+ "loss": 0.022,
2074
+ "step": 2950
2075
+ },
2076
+ {
2077
+ "epoch": 1.97,
2078
+ "grad_norm": 1.4543583055955254,
2079
+ "learning_rate": 1.1307876775502675e-05,
2080
+ "loss": 0.0331,
2081
+ "step": 2960
2082
+ },
2083
+ {
2084
+ "epoch": 1.97,
2085
+ "grad_norm": 1.4710753680279536,
2086
+ "learning_rate": 1.1270983213429258e-05,
2087
+ "loss": 0.0383,
2088
+ "step": 2970
2089
+ },
2090
+ {
2091
+ "epoch": 1.98,
2092
+ "grad_norm": 1.2478883072438642,
2093
+ "learning_rate": 1.1234089651355839e-05,
2094
+ "loss": 0.0316,
2095
+ "step": 2980
2096
+ },
2097
+ {
2098
+ "epoch": 1.99,
2099
+ "grad_norm": 2.2702061081470153,
2100
+ "learning_rate": 1.119719608928242e-05,
2101
+ "loss": 0.0282,
2102
+ "step": 2990
2103
+ },
2104
+ {
2105
+ "epoch": 1.99,
2106
+ "grad_norm": 0.6940800534656072,
2107
+ "learning_rate": 1.1160302527209005e-05,
2108
+ "loss": 0.0243,
2109
+ "step": 3000
2110
+ },
2111
+ {
2112
+ "epoch": 2.0,
2113
+ "grad_norm": 0.576849535693127,
2114
+ "learning_rate": 1.1123408965135584e-05,
2115
+ "loss": 0.0209,
2116
+ "step": 3010
2117
+ }
2118
+ ],
2119
+ "logging_steps": 10,
2120
+ "max_steps": 6024,
2121
+ "num_input_tokens_seen": 0,
2122
+ "num_train_epochs": 4,
2123
+ "save_steps": 500,
2124
+ "total_flos": 0.0,
2125
+ "train_batch_size": 1,
2126
+ "trial_name": null,
2127
+ "trial_params": null
2128
+ }
checkpoint-3012/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d0640503f1433ff703cc07d0997c18edbdba68efdd139a495f5d107bbd939a06
3
+ size 6395
checkpoint-3012/zero_to_fp32.py ADDED
@@ -0,0 +1,587 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+
3
+ # Copyright (c) Microsoft Corporation.
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ # DeepSpeed Team
7
+
8
+ # This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets
9
+ # copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
10
+ # the future. Once extracted, the weights don't require DeepSpeed and can be used in any
11
+ # application.
12
+ #
13
+ # example: python zero_to_fp32.py . pytorch_model.bin
14
+
15
+ import argparse
16
+ import torch
17
+ import glob
18
+ import math
19
+ import os
20
+ import re
21
+ from collections import OrderedDict
22
+ from dataclasses import dataclass
23
+
24
+ # while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
25
+ # DeepSpeed data structures it has to be available in the current python environment.
26
+ from deepspeed.utils import logger
27
+ from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
28
+ FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
29
+ FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
30
+
31
+
32
+ @dataclass
33
+ class zero_model_state:
34
+ buffers: dict()
35
+ param_shapes: dict()
36
+ shared_params: list
37
+ ds_version: int
38
+ frozen_param_shapes: dict()
39
+ frozen_param_fragments: dict()
40
+
41
+
42
+ debug = 0
43
+
44
+ # load to cpu
45
+ device = torch.device('cpu')
46
+
47
+
48
+ def atoi(text):
49
+ return int(text) if text.isdigit() else text
50
+
51
+
52
+ def natural_keys(text):
53
+ '''
54
+ alist.sort(key=natural_keys) sorts in human order
55
+ http://nedbatchelder.com/blog/200712/human_sorting.html
56
+ (See Toothy's implementation in the comments)
57
+ '''
58
+ return [atoi(c) for c in re.split(r'(\d+)', text)]
59
+
60
+
61
+ def get_model_state_file(checkpoint_dir, zero_stage):
62
+ if not os.path.isdir(checkpoint_dir):
63
+ raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
64
+
65
+ # there should be only one file
66
+ if zero_stage <= 2:
67
+ file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
68
+ elif zero_stage == 3:
69
+ file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
70
+
71
+ if not os.path.exists(file):
72
+ raise FileNotFoundError(f"can't find model states file at '{file}'")
73
+
74
+ return file
75
+
76
+
77
+ def get_checkpoint_files(checkpoint_dir, glob_pattern):
78
+ # XXX: need to test that this simple glob rule works for multi-node setup too
79
+ ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
80
+
81
+ if len(ckpt_files) == 0:
82
+ raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
83
+
84
+ return ckpt_files
85
+
86
+
87
+ def get_optim_files(checkpoint_dir):
88
+ return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
89
+
90
+
91
+ def get_model_state_files(checkpoint_dir):
92
+ return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
93
+
94
+
95
+ def parse_model_states(files):
96
+ zero_model_states = []
97
+ for file in files:
98
+ state_dict = torch.load(file, map_location=device)
99
+
100
+ if BUFFER_NAMES not in state_dict:
101
+ raise ValueError(f"{file} is not a model state checkpoint")
102
+ buffer_names = state_dict[BUFFER_NAMES]
103
+ if debug:
104
+ print("Found buffers:", buffer_names)
105
+
106
+ # recover just the buffers while restoring them to fp32 if they were saved in fp16
107
+ buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
108
+ param_shapes = state_dict[PARAM_SHAPES]
109
+
110
+ # collect parameters that are included in param_shapes
111
+ param_names = []
112
+ for s in param_shapes:
113
+ for name in s.keys():
114
+ param_names.append(name)
115
+
116
+ # update with frozen parameters
117
+ frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
118
+ if frozen_param_shapes is not None:
119
+ if debug:
120
+ print(f"Found frozen_param_shapes: {frozen_param_shapes}")
121
+ param_names += list(frozen_param_shapes.keys())
122
+
123
+ # handle shared params
124
+ shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
125
+
126
+ ds_version = state_dict.get(DS_VERSION, None)
127
+
128
+ frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
129
+
130
+ z_model_state = zero_model_state(buffers=buffers,
131
+ param_shapes=param_shapes,
132
+ shared_params=shared_params,
133
+ ds_version=ds_version,
134
+ frozen_param_shapes=frozen_param_shapes,
135
+ frozen_param_fragments=frozen_param_fragments)
136
+ zero_model_states.append(z_model_state)
137
+
138
+ return zero_model_states
139
+
140
+
141
+ def parse_optim_states(files, ds_checkpoint_dir):
142
+
143
+ total_files = len(files)
144
+ state_dicts = []
145
+ for f in files:
146
+ state_dict = torch.load(f, map_location=device)
147
+ # immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
148
+ # and also handle the case where it was already removed by another helper script
149
+ state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
150
+ state_dicts.append(state_dict)
151
+
152
+ if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:
153
+ raise ValueError(f"{files[0]} is not a zero checkpoint")
154
+ zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
155
+ world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
156
+
157
+ # For ZeRO-2 each param group can have different partition_count as data parallelism for expert
158
+ # parameters can be different from data parallelism for non-expert parameters. So we can just
159
+ # use the max of the partition_count to get the dp world_size.
160
+
161
+ if type(world_size) is list:
162
+ world_size = max(world_size)
163
+
164
+ if world_size != total_files:
165
+ raise ValueError(
166
+ f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
167
+ "Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
168
+ )
169
+
170
+ # the groups are named differently in each stage
171
+ if zero_stage <= 2:
172
+ fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
173
+ elif zero_stage == 3:
174
+ fp32_groups_key = FP32_FLAT_GROUPS
175
+ else:
176
+ raise ValueError(f"unknown zero stage {zero_stage}")
177
+
178
+ if zero_stage <= 2:
179
+ fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
180
+ elif zero_stage == 3:
181
+ # if there is more than one param group, there will be multiple flattened tensors - one
182
+ # flattened tensor per group - for simplicity merge them into a single tensor
183
+ #
184
+ # XXX: could make the script more memory efficient for when there are multiple groups - it
185
+ # will require matching the sub-lists of param_shapes for each param group flattened tensor
186
+
187
+ fp32_flat_groups = [
188
+ torch.cat(state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key], 0) for i in range(len(state_dicts))
189
+ ]
190
+
191
+ return zero_stage, world_size, fp32_flat_groups
192
+
193
+
194
+ def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir):
195
+ """
196
+ Returns fp32 state_dict reconstructed from ds checkpoint
197
+
198
+ Args:
199
+ - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
200
+
201
+ """
202
+ print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
203
+
204
+ optim_files = get_optim_files(ds_checkpoint_dir)
205
+ zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
206
+ print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
207
+
208
+ model_files = get_model_state_files(ds_checkpoint_dir)
209
+
210
+ zero_model_states = parse_model_states(model_files)
211
+ print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
212
+
213
+ if zero_stage <= 2:
214
+ return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states)
215
+ elif zero_stage == 3:
216
+ return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states)
217
+
218
+
219
+ def _zero2_merge_frozen_params(state_dict, zero_model_states):
220
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
221
+ return
222
+
223
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
224
+ frozen_param_fragments = zero_model_states[0].frozen_param_fragments
225
+
226
+ if debug:
227
+ num_elem = sum(s.numel() for s in frozen_param_shapes.values())
228
+ print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
229
+
230
+ wanted_params = len(frozen_param_shapes)
231
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
232
+ avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
233
+ print(f'Frozen params: Have {avail_numel} numels to process.')
234
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
235
+
236
+ total_params = 0
237
+ total_numel = 0
238
+ for name, shape in frozen_param_shapes.items():
239
+ total_params += 1
240
+ unpartitioned_numel = shape.numel()
241
+ total_numel += unpartitioned_numel
242
+
243
+ state_dict[name] = frozen_param_fragments[name]
244
+
245
+ if debug:
246
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
247
+
248
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
249
+
250
+
251
+ def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
252
+ param_shapes = zero_model_states[0].param_shapes
253
+
254
+ # Reconstruction protocol:
255
+ #
256
+ # XXX: document this
257
+
258
+ if debug:
259
+ for i in range(world_size):
260
+ for j in range(len(fp32_flat_groups[0])):
261
+ print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
262
+
263
+ # XXX: memory usage doubles here (zero2)
264
+ num_param_groups = len(fp32_flat_groups[0])
265
+ merged_single_partition_of_fp32_groups = []
266
+ for i in range(num_param_groups):
267
+ merged_partitions = [sd[i] for sd in fp32_flat_groups]
268
+ full_single_fp32_vector = torch.cat(merged_partitions, 0)
269
+ merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
270
+ avail_numel = sum(
271
+ [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
272
+
273
+ if debug:
274
+ wanted_params = sum([len(shapes) for shapes in param_shapes])
275
+ wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
276
+ # not asserting if there is a mismatch due to possible padding
277
+ print(f"Have {avail_numel} numels to process.")
278
+ print(f"Need {wanted_numel} numels in {wanted_params} params.")
279
+
280
+ # params
281
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
282
+ # out-of-core computing solution
283
+ total_numel = 0
284
+ total_params = 0
285
+ for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
286
+ offset = 0
287
+ avail_numel = full_single_fp32_vector.numel()
288
+ for name, shape in shapes.items():
289
+
290
+ unpartitioned_numel = shape.numel()
291
+ total_numel += unpartitioned_numel
292
+ total_params += 1
293
+
294
+ if debug:
295
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
296
+ state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
297
+ offset += unpartitioned_numel
298
+
299
+ # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
300
+ # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
301
+ # paddings performed in the code it's almost impossible to predict the exact numbers w/o the
302
+ # live optimizer object, so we are checking that the numbers are within the right range
303
+ align_to = 2 * world_size
304
+
305
+ def zero2_align(x):
306
+ return align_to * math.ceil(x / align_to)
307
+
308
+ if debug:
309
+ print(f"original offset={offset}, avail_numel={avail_numel}")
310
+
311
+ offset = zero2_align(offset)
312
+ avail_numel = zero2_align(avail_numel)
313
+
314
+ if debug:
315
+ print(f"aligned offset={offset}, avail_numel={avail_numel}")
316
+
317
+ # Sanity check
318
+ if offset != avail_numel:
319
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
320
+
321
+ print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
322
+
323
+
324
+ def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states):
325
+ state_dict = OrderedDict()
326
+
327
+ # buffers
328
+ buffers = zero_model_states[0].buffers
329
+ state_dict.update(buffers)
330
+ if debug:
331
+ print(f"added {len(buffers)} buffers")
332
+
333
+ _zero2_merge_frozen_params(state_dict, zero_model_states)
334
+
335
+ _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
336
+
337
+ # recover shared parameters
338
+ for pair in zero_model_states[0].shared_params:
339
+ if pair[1] in state_dict:
340
+ state_dict[pair[0]] = state_dict[pair[1]]
341
+
342
+ return state_dict
343
+
344
+
345
+ def zero3_partitioned_param_info(unpartitioned_numel, world_size):
346
+ remainder = unpartitioned_numel % world_size
347
+ padding_numel = (world_size - remainder) if remainder else 0
348
+ partitioned_numel = math.ceil(unpartitioned_numel / world_size)
349
+ return partitioned_numel, padding_numel
350
+
351
+
352
+ def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
353
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
354
+ return
355
+
356
+ if debug:
357
+ for i in range(world_size):
358
+ num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
359
+ print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
360
+
361
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
362
+ wanted_params = len(frozen_param_shapes)
363
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
364
+ avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
365
+ print(f'Frozen params: Have {avail_numel} numels to process.')
366
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
367
+
368
+ total_params = 0
369
+ total_numel = 0
370
+ for name, shape in zero_model_states[0].frozen_param_shapes.items():
371
+ total_params += 1
372
+ unpartitioned_numel = shape.numel()
373
+ total_numel += unpartitioned_numel
374
+
375
+ param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
376
+ state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
377
+
378
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
379
+
380
+ if debug:
381
+ print(
382
+ f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
383
+ )
384
+
385
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
386
+
387
+
388
+ def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
389
+ param_shapes = zero_model_states[0].param_shapes
390
+ avail_numel = fp32_flat_groups[0].numel() * world_size
391
+ # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
392
+ # param, re-consolidating each param, while dealing with padding if any
393
+
394
+ # merge list of dicts, preserving order
395
+ param_shapes = {k: v for d in param_shapes for k, v in d.items()}
396
+
397
+ if debug:
398
+ for i in range(world_size):
399
+ print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
400
+
401
+ wanted_params = len(param_shapes)
402
+ wanted_numel = sum(shape.numel() for shape in param_shapes.values())
403
+ # not asserting if there is a mismatch due to possible padding
404
+ avail_numel = fp32_flat_groups[0].numel() * world_size
405
+ print(f"Trainable params: Have {avail_numel} numels to process.")
406
+ print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
407
+
408
+ # params
409
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
410
+ # out-of-core computing solution
411
+ offset = 0
412
+ total_numel = 0
413
+ total_params = 0
414
+ for name, shape in param_shapes.items():
415
+
416
+ unpartitioned_numel = shape.numel()
417
+ total_numel += unpartitioned_numel
418
+ total_params += 1
419
+
420
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
421
+
422
+ if debug:
423
+ print(
424
+ f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
425
+ )
426
+
427
+ # XXX: memory usage doubles here
428
+ state_dict[name] = torch.cat(
429
+ tuple(fp32_flat_groups[i].narrow(0, offset, partitioned_numel) for i in range(world_size)),
430
+ 0).narrow(0, 0, unpartitioned_numel).view(shape)
431
+ offset += partitioned_numel
432
+
433
+ offset *= world_size
434
+
435
+ # Sanity check
436
+ if offset != avail_numel:
437
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
438
+
439
+ print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
440
+
441
+
442
+ def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states):
443
+ state_dict = OrderedDict()
444
+
445
+ # buffers
446
+ buffers = zero_model_states[0].buffers
447
+ state_dict.update(buffers)
448
+ if debug:
449
+ print(f"added {len(buffers)} buffers")
450
+
451
+ _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
452
+
453
+ _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
454
+
455
+ # recover shared parameters
456
+ for pair in zero_model_states[0].shared_params:
457
+ if pair[1] in state_dict:
458
+ state_dict[pair[0]] = state_dict[pair[1]]
459
+
460
+ return state_dict
461
+
462
+
463
+ def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag=None):
464
+ """
465
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
466
+ ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
467
+ via a model hub.
468
+
469
+ Args:
470
+ - ``checkpoint_dir``: path to the desired checkpoint folder
471
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``
472
+
473
+ Returns:
474
+ - pytorch ``state_dict``
475
+
476
+ Note: this approach may not work if your application doesn't have sufficient free CPU memory and
477
+ you may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
478
+ the checkpoint.
479
+
480
+ A typical usage might be ::
481
+
482
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
483
+ # do the training and checkpoint saving
484
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
485
+ model = model.cpu() # move to cpu
486
+ model.load_state_dict(state_dict)
487
+ # submit to model hub or save the model to share with others
488
+
489
+ In this example the ``model`` will no longer be usable in the deepspeed context of the same
490
+ application. i.e. you will need to re-initialize the deepspeed engine, since
491
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
492
+
493
+ If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
494
+
495
+ """
496
+ if tag is None:
497
+ latest_path = os.path.join(checkpoint_dir, 'latest')
498
+ if os.path.isfile(latest_path):
499
+ with open(latest_path, 'r') as fd:
500
+ tag = fd.read().strip()
501
+ else:
502
+ raise ValueError(f"Unable to find 'latest' file at {latest_path}")
503
+
504
+ ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
505
+
506
+ if not os.path.isdir(ds_checkpoint_dir):
507
+ raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
508
+
509
+ return _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir)
510
+
511
+
512
+ def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir, output_file, tag=None):
513
+ """
514
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
515
+ loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
516
+
517
+ Args:
518
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
519
+ - ``output_file``: path to the pytorch fp32 state_dict output file (e.g. path/pytorch_model.bin)
520
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
521
+ """
522
+
523
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
524
+ print(f"Saving fp32 state dict to {output_file}")
525
+ torch.save(state_dict, output_file)
526
+
527
+
528
+ def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
529
+ """
530
+ 1. Put the provided model to cpu
531
+ 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
532
+ 3. Load it into the provided model
533
+
534
+ Args:
535
+ - ``model``: the model object to update
536
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
537
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
538
+
539
+ Returns:
540
+ - ``model`: modified model
541
+
542
+ Make sure you have plenty of CPU memory available before you call this function. If you don't
543
+ have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
544
+ conveniently placed for you in the checkpoint folder.
545
+
546
+ A typical usage might be ::
547
+
548
+ from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
549
+ model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
550
+ # submit to model hub or save the model to share with others
551
+
552
+ Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
553
+ of the same application. i.e. you will need to re-initialize the deepspeed engine, since
554
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
555
+
556
+ """
557
+ logger.info(f"Extracting fp32 weights")
558
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
559
+
560
+ logger.info(f"Overwriting model with fp32 weights")
561
+ model = model.cpu()
562
+ model.load_state_dict(state_dict, strict=False)
563
+
564
+ return model
565
+
566
+
567
+ if __name__ == "__main__":
568
+
569
+ parser = argparse.ArgumentParser()
570
+ parser.add_argument("checkpoint_dir",
571
+ type=str,
572
+ help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
573
+ parser.add_argument(
574
+ "output_file",
575
+ type=str,
576
+ help="path to the pytorch fp32 state_dict output file (e.g. path/checkpoint-12/pytorch_model.bin)")
577
+ parser.add_argument("-t",
578
+ "--tag",
579
+ type=str,
580
+ default=None,
581
+ help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
582
+ parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
583
+ args = parser.parse_args()
584
+
585
+ debug = args.debug
586
+
587
+ convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir, args.output_file, tag=args.tag)
checkpoint-4518/1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 1024,
3
+ "pooling_mode_cls_token": true,
4
+ "pooling_mode_mean_tokens": false,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
checkpoint-4518/README.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: sentence-transformers
3
+ pipeline_tag: sentence-similarity
4
+ tags:
5
+ - sentence-transformers
6
+ - feature-extraction
7
+ - sentence-similarity
8
+
9
+ ---
10
+
11
+ # {MODEL_NAME}
12
+
13
+ This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 1024 dimensional dense vector space and can be used for tasks like clustering or semantic search.
14
+
15
+ <!--- Describe your model here -->
16
+
17
+ ## Usage (Sentence-Transformers)
18
+
19
+ Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
20
+
21
+ ```
22
+ pip install -U sentence-transformers
23
+ ```
24
+
25
+ Then you can use the model like this:
26
+
27
+ ```python
28
+ from sentence_transformers import SentenceTransformer
29
+ sentences = ["This is an example sentence", "Each sentence is converted"]
30
+
31
+ model = SentenceTransformer('{MODEL_NAME}')
32
+ embeddings = model.encode(sentences)
33
+ print(embeddings)
34
+ ```
35
+
36
+
37
+
38
+ ## Evaluation Results
39
+
40
+ <!--- Describe how your model was evaluated -->
41
+
42
+ For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
43
+
44
+
45
+
46
+ ## Full Model Architecture
47
+ ```
48
+ SentenceTransformer(
49
+ (0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
50
+ (1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
51
+ (2): Normalize()
52
+ )
53
+ ```
54
+
55
+ ## Citing & Authors
56
+
57
+ <!--- Describe where people can find more information -->
checkpoint-4518/colbert_linear.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:babc29a1ac86ee527a72a0b0fd28b100ef35d8c6e6742fea1809dab1030c6565
3
+ size 2100227
checkpoint-4518/config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "saved_models/bgem3_unified_finetune_20240330/checkpoint-4518",
3
+ "architectures": [
4
+ "XLMRobertaModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 1024,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 4096,
15
+ "layer_norm_eps": 1e-05,
16
+ "max_position_embeddings": 8194,
17
+ "model_type": "xlm-roberta",
18
+ "num_attention_heads": 16,
19
+ "num_hidden_layers": 24,
20
+ "output_past": true,
21
+ "pad_token_id": 1,
22
+ "position_embedding_type": "absolute",
23
+ "torch_dtype": "float32",
24
+ "transformers_version": "4.39.1",
25
+ "type_vocab_size": 1,
26
+ "use_cache": true,
27
+ "vocab_size": 250002
28
+ }
checkpoint-4518/config_sentence_transformers.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "2.6.0",
4
+ "transformers": "4.39.1",
5
+ "pytorch": "2.0.1+cu117"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null
9
+ }