Upload folder using huggingface_hub
Browse files- added_tokens.json +3 -0
 - checkpoint-100/added_tokens.json +3 -0
 - checkpoint-100/config.json +28 -0
 - checkpoint-100/generation_config.json +7 -0
 - checkpoint-100/global_step100/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt +3 -0
 - checkpoint-100/global_step100/mp_rank_00_model_states.pt +3 -0
 - checkpoint-100/latest +1 -0
 - checkpoint-100/model.safetensors +3 -0
 - checkpoint-100/rng_state.pth +3 -0
 - checkpoint-100/special_tokens_map.json +30 -0
 - checkpoint-100/tokenizer.model +3 -0
 - checkpoint-100/tokenizer_config.json +50 -0
 - checkpoint-100/trainer_state.json +661 -0
 - checkpoint-100/training_args.bin +3 -0
 - checkpoint-100/zero_to_fp32.py +760 -0
 - config.json +28 -0
 - generation_config.json +7 -0
 - model.safetensors +3 -0
 - runs/events.out.tfevents.1741888807.4814b075da02 +3 -0
 - special_tokens_map.json +30 -0
 - tokenizer.model +3 -0
 - tokenizer_config.json +50 -0
 - trainer_state.json +670 -0
 - training_args.bin +3 -0
 
    	
        added_tokens.json
    ADDED
    
    | 
         @@ -0,0 +1,3 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            {
         
     | 
| 2 | 
         
            +
              "[PAD]": 32000
         
     | 
| 3 | 
         
            +
            }
         
     | 
    	
        checkpoint-100/added_tokens.json
    ADDED
    
    | 
         @@ -0,0 +1,3 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            {
         
     | 
| 2 | 
         
            +
              "[PAD]": 32000
         
     | 
| 3 | 
         
            +
            }
         
     | 
    	
        checkpoint-100/config.json
    ADDED
    
    | 
         @@ -0,0 +1,28 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            {
         
     | 
| 2 | 
         
            +
              "_name_or_path": "../models/TinyLlama_v1.1/",
         
     | 
| 3 | 
         
            +
              "architectures": [
         
     | 
| 4 | 
         
            +
                "LlamaForCausalLM"
         
     | 
| 5 | 
         
            +
              ],
         
     | 
| 6 | 
         
            +
              "attention_bias": false,
         
     | 
| 7 | 
         
            +
              "attention_dropout": 0.0,
         
     | 
| 8 | 
         
            +
              "bos_token_id": 1,
         
     | 
| 9 | 
         
            +
              "eos_token_id": 2,
         
     | 
| 10 | 
         
            +
              "hidden_act": "silu",
         
     | 
| 11 | 
         
            +
              "hidden_size": 2048,
         
     | 
| 12 | 
         
            +
              "initializer_range": 0.02,
         
     | 
| 13 | 
         
            +
              "intermediate_size": 5632,
         
     | 
| 14 | 
         
            +
              "max_position_embeddings": 2048,
         
     | 
| 15 | 
         
            +
              "model_type": "llama",
         
     | 
| 16 | 
         
            +
              "num_attention_heads": 32,
         
     | 
| 17 | 
         
            +
              "num_hidden_layers": 22,
         
     | 
| 18 | 
         
            +
              "num_key_value_heads": 4,
         
     | 
| 19 | 
         
            +
              "pretraining_tp": 1,
         
     | 
| 20 | 
         
            +
              "rms_norm_eps": 1e-05,
         
     | 
| 21 | 
         
            +
              "rope_scaling": null,
         
     | 
| 22 | 
         
            +
              "rope_theta": 10000.0,
         
     | 
| 23 | 
         
            +
              "tie_word_embeddings": false,
         
     | 
| 24 | 
         
            +
              "torch_dtype": "bfloat16",
         
     | 
| 25 | 
         
            +
              "transformers_version": "4.37.0",
         
     | 
| 26 | 
         
            +
              "use_cache": true,
         
     | 
| 27 | 
         
            +
              "vocab_size": 32001
         
     | 
| 28 | 
         
            +
            }
         
     | 
    	
        checkpoint-100/generation_config.json
    ADDED
    
    | 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            {
         
     | 
| 2 | 
         
            +
              "bos_token_id": 1,
         
     | 
| 3 | 
         
            +
              "eos_token_id": 2,
         
     | 
| 4 | 
         
            +
              "max_length": 2048,
         
     | 
| 5 | 
         
            +
              "pad_token_id": 0,
         
     | 
| 6 | 
         
            +
              "transformers_version": "4.37.0"
         
     | 
| 7 | 
         
            +
            }
         
     | 
    	
        checkpoint-100/global_step100/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:aa4becebcca79ebb9ce87eb12141e4f41aa76056915241db26f07deef57d3ee6
         
     | 
| 3 | 
         
            +
            size 13200649212
         
     | 
    	
        checkpoint-100/global_step100/mp_rank_00_model_states.pt
    ADDED
    
    | 
         @@ -0,0 +1,3 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            version https://git-lfs.github.com/spec/v1
         
     | 
| 2 | 
         
            +
            oid sha256:03d9ac951151cef9960ef4ea90d51adca441551ea108e52c926950b3f6cb3f82
         
     | 
| 3 | 
         
            +
            size 2200176684
         
     | 
    	
        checkpoint-100/latest
    ADDED
    
    | 
         @@ -0,0 +1 @@ 
     | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            global_step100
         
     | 
    	
        checkpoint-100/model.safetensors
    ADDED
    
    | 
         @@ -0,0 +1,3 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            version https://git-lfs.github.com/spec/v1
         
     | 
| 2 | 
         
            +
            oid sha256:386bc2aeb33d853c45e0c966ae8ed98e6966c04a9e181fba003cfafb57a7b33c
         
     | 
| 3 | 
         
            +
            size 2200128056
         
     | 
    	
        checkpoint-100/rng_state.pth
    ADDED
    
    | 
         @@ -0,0 +1,3 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            version https://git-lfs.github.com/spec/v1
         
     | 
| 2 | 
         
            +
            oid sha256:e8fb28a881c0e7b4c1fb479fe9c6c0b1cc512552a85e0ae2814beae19544d8b3
         
     | 
| 3 | 
         
            +
            size 14244
         
     | 
    	
        checkpoint-100/special_tokens_map.json
    ADDED
    
    | 
         @@ -0,0 +1,30 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            {
         
     | 
| 2 | 
         
            +
              "bos_token": {
         
     | 
| 3 | 
         
            +
                "content": "<s>",
         
     | 
| 4 | 
         
            +
                "lstrip": false,
         
     | 
| 5 | 
         
            +
                "normalized": false,
         
     | 
| 6 | 
         
            +
                "rstrip": false,
         
     | 
| 7 | 
         
            +
                "single_word": false
         
     | 
| 8 | 
         
            +
              },
         
     | 
| 9 | 
         
            +
              "eos_token": {
         
     | 
| 10 | 
         
            +
                "content": "</s>",
         
     | 
| 11 | 
         
            +
                "lstrip": false,
         
     | 
| 12 | 
         
            +
                "normalized": false,
         
     | 
| 13 | 
         
            +
                "rstrip": false,
         
     | 
| 14 | 
         
            +
                "single_word": false
         
     | 
| 15 | 
         
            +
              },
         
     | 
| 16 | 
         
            +
              "pad_token": {
         
     | 
| 17 | 
         
            +
                "content": "[PAD]",
         
     | 
| 18 | 
         
            +
                "lstrip": false,
         
     | 
| 19 | 
         
            +
                "normalized": false,
         
     | 
| 20 | 
         
            +
                "rstrip": false,
         
     | 
| 21 | 
         
            +
                "single_word": false
         
     | 
| 22 | 
         
            +
              },
         
     | 
| 23 | 
         
            +
              "unk_token": {
         
     | 
| 24 | 
         
            +
                "content": "<unk>",
         
     | 
| 25 | 
         
            +
                "lstrip": false,
         
     | 
| 26 | 
         
            +
                "normalized": false,
         
     | 
| 27 | 
         
            +
                "rstrip": false,
         
     | 
| 28 | 
         
            +
                "single_word": false
         
     | 
| 29 | 
         
            +
              }
         
     | 
| 30 | 
         
            +
            }
         
     | 
    	
        checkpoint-100/tokenizer.model
    ADDED
    
    | 
         @@ -0,0 +1,3 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            version https://git-lfs.github.com/spec/v1
         
     | 
| 2 | 
         
            +
            oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
         
     | 
| 3 | 
         
            +
            size 499723
         
     | 
    	
        checkpoint-100/tokenizer_config.json
    ADDED
    
    | 
         @@ -0,0 +1,50 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            {
         
     | 
| 2 | 
         
            +
              "add_bos_token": true,
         
     | 
| 3 | 
         
            +
              "add_eos_token": false,
         
     | 
| 4 | 
         
            +
              "added_tokens_decoder": {
         
     | 
| 5 | 
         
            +
                "0": {
         
     | 
| 6 | 
         
            +
                  "content": "<unk>",
         
     | 
| 7 | 
         
            +
                  "lstrip": false,
         
     | 
| 8 | 
         
            +
                  "normalized": false,
         
     | 
| 9 | 
         
            +
                  "rstrip": false,
         
     | 
| 10 | 
         
            +
                  "single_word": false,
         
     | 
| 11 | 
         
            +
                  "special": true
         
     | 
| 12 | 
         
            +
                },
         
     | 
| 13 | 
         
            +
                "1": {
         
     | 
| 14 | 
         
            +
                  "content": "<s>",
         
     | 
| 15 | 
         
            +
                  "lstrip": false,
         
     | 
| 16 | 
         
            +
                  "normalized": false,
         
     | 
| 17 | 
         
            +
                  "rstrip": false,
         
     | 
| 18 | 
         
            +
                  "single_word": false,
         
     | 
| 19 | 
         
            +
                  "special": true
         
     | 
| 20 | 
         
            +
                },
         
     | 
| 21 | 
         
            +
                "2": {
         
     | 
| 22 | 
         
            +
                  "content": "</s>",
         
     | 
| 23 | 
         
            +
                  "lstrip": false,
         
     | 
| 24 | 
         
            +
                  "normalized": false,
         
     | 
| 25 | 
         
            +
                  "rstrip": false,
         
     | 
| 26 | 
         
            +
                  "single_word": false,
         
     | 
| 27 | 
         
            +
                  "special": true
         
     | 
| 28 | 
         
            +
                },
         
     | 
| 29 | 
         
            +
                "32000": {
         
     | 
| 30 | 
         
            +
                  "content": "[PAD]",
         
     | 
| 31 | 
         
            +
                  "lstrip": false,
         
     | 
| 32 | 
         
            +
                  "normalized": false,
         
     | 
| 33 | 
         
            +
                  "rstrip": false,
         
     | 
| 34 | 
         
            +
                  "single_word": false,
         
     | 
| 35 | 
         
            +
                  "special": true
         
     | 
| 36 | 
         
            +
                }
         
     | 
| 37 | 
         
            +
              },
         
     | 
| 38 | 
         
            +
              "bos_token": "<s>",
         
     | 
| 39 | 
         
            +
              "clean_up_tokenization_spaces": false,
         
     | 
| 40 | 
         
            +
              "eos_token": "</s>",
         
     | 
| 41 | 
         
            +
              "legacy": false,
         
     | 
| 42 | 
         
            +
              "model_max_length": 1024,
         
     | 
| 43 | 
         
            +
              "pad_token": "[PAD]",
         
     | 
| 44 | 
         
            +
              "padding_side": "right",
         
     | 
| 45 | 
         
            +
              "sp_model_kwargs": {},
         
     | 
| 46 | 
         
            +
              "spaces_between_special_tokens": false,
         
     | 
| 47 | 
         
            +
              "tokenizer_class": "LlamaTokenizer",
         
     | 
| 48 | 
         
            +
              "unk_token": "<unk>",
         
     | 
| 49 | 
         
            +
              "use_default_system_prompt": false
         
     | 
| 50 | 
         
            +
            }
         
     | 
    	
        checkpoint-100/trainer_state.json
    ADDED
    
    | 
         @@ -0,0 +1,661 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            {
         
     | 
| 2 | 
         
            +
              "best_metric": 4192.994140625,
         
     | 
| 3 | 
         
            +
              "best_model_checkpoint": "./ckpts/tiny_llama_v1.1/int1-g64/checkpoint-100",
         
     | 
| 4 | 
         
            +
              "epoch": 1.0,
         
     | 
| 5 | 
         
            +
              "eval_steps": 20,
         
     | 
| 6 | 
         
            +
              "global_step": 100,
         
     | 
| 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 | 
         
            +
                  "learning_rate": 0.0,
         
     | 
| 14 | 
         
            +
                  "loss": 11332.127,
         
     | 
| 15 | 
         
            +
                  "step": 1
         
     | 
| 16 | 
         
            +
                },
         
     | 
| 17 | 
         
            +
                {
         
     | 
| 18 | 
         
            +
                  "epoch": 0.02,
         
     | 
| 19 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 20 | 
         
            +
                  "loss": 13003.6738,
         
     | 
| 21 | 
         
            +
                  "step": 2
         
     | 
| 22 | 
         
            +
                },
         
     | 
| 23 | 
         
            +
                {
         
     | 
| 24 | 
         
            +
                  "epoch": 0.03,
         
     | 
| 25 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 26 | 
         
            +
                  "loss": 12640.6924,
         
     | 
| 27 | 
         
            +
                  "step": 3
         
     | 
| 28 | 
         
            +
                },
         
     | 
| 29 | 
         
            +
                {
         
     | 
| 30 | 
         
            +
                  "epoch": 0.04,
         
     | 
| 31 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 32 | 
         
            +
                  "loss": 12323.6543,
         
     | 
| 33 | 
         
            +
                  "step": 4
         
     | 
| 34 | 
         
            +
                },
         
     | 
| 35 | 
         
            +
                {
         
     | 
| 36 | 
         
            +
                  "epoch": 0.05,
         
     | 
| 37 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 38 | 
         
            +
                  "loss": 9819.7383,
         
     | 
| 39 | 
         
            +
                  "step": 5
         
     | 
| 40 | 
         
            +
                },
         
     | 
| 41 | 
         
            +
                {
         
     | 
| 42 | 
         
            +
                  "epoch": 0.06,
         
     | 
| 43 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 44 | 
         
            +
                  "loss": 9137.5908,
         
     | 
| 45 | 
         
            +
                  "step": 6
         
     | 
| 46 | 
         
            +
                },
         
     | 
| 47 | 
         
            +
                {
         
     | 
| 48 | 
         
            +
                  "epoch": 0.07,
         
     | 
| 49 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 50 | 
         
            +
                  "loss": 7284.5757,
         
     | 
| 51 | 
         
            +
                  "step": 7
         
     | 
| 52 | 
         
            +
                },
         
     | 
| 53 | 
         
            +
                {
         
     | 
| 54 | 
         
            +
                  "epoch": 0.08,
         
     | 
| 55 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 56 | 
         
            +
                  "loss": 7775.0503,
         
     | 
| 57 | 
         
            +
                  "step": 8
         
     | 
| 58 | 
         
            +
                },
         
     | 
| 59 | 
         
            +
                {
         
     | 
| 60 | 
         
            +
                  "epoch": 0.09,
         
     | 
| 61 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 62 | 
         
            +
                  "loss": 9720.2578,
         
     | 
| 63 | 
         
            +
                  "step": 9
         
     | 
| 64 | 
         
            +
                },
         
     | 
| 65 | 
         
            +
                {
         
     | 
| 66 | 
         
            +
                  "epoch": 0.1,
         
     | 
| 67 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 68 | 
         
            +
                  "loss": 7152.9434,
         
     | 
| 69 | 
         
            +
                  "step": 10
         
     | 
| 70 | 
         
            +
                },
         
     | 
| 71 | 
         
            +
                {
         
     | 
| 72 | 
         
            +
                  "epoch": 0.11,
         
     | 
| 73 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 74 | 
         
            +
                  "loss": 7262.2422,
         
     | 
| 75 | 
         
            +
                  "step": 11
         
     | 
| 76 | 
         
            +
                },
         
     | 
| 77 | 
         
            +
                {
         
     | 
| 78 | 
         
            +
                  "epoch": 0.12,
         
     | 
| 79 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 80 | 
         
            +
                  "loss": 7487.1406,
         
     | 
| 81 | 
         
            +
                  "step": 12
         
     | 
| 82 | 
         
            +
                },
         
     | 
| 83 | 
         
            +
                {
         
     | 
| 84 | 
         
            +
                  "epoch": 0.13,
         
     | 
| 85 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 86 | 
         
            +
                  "loss": 6070.3867,
         
     | 
| 87 | 
         
            +
                  "step": 13
         
     | 
| 88 | 
         
            +
                },
         
     | 
| 89 | 
         
            +
                {
         
     | 
| 90 | 
         
            +
                  "epoch": 0.14,
         
     | 
| 91 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 92 | 
         
            +
                  "loss": 6826.375,
         
     | 
| 93 | 
         
            +
                  "step": 14
         
     | 
| 94 | 
         
            +
                },
         
     | 
| 95 | 
         
            +
                {
         
     | 
| 96 | 
         
            +
                  "epoch": 0.15,
         
     | 
| 97 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 98 | 
         
            +
                  "loss": 6165.5347,
         
     | 
| 99 | 
         
            +
                  "step": 15
         
     | 
| 100 | 
         
            +
                },
         
     | 
| 101 | 
         
            +
                {
         
     | 
| 102 | 
         
            +
                  "epoch": 0.16,
         
     | 
| 103 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 104 | 
         
            +
                  "loss": 6286.1201,
         
     | 
| 105 | 
         
            +
                  "step": 16
         
     | 
| 106 | 
         
            +
                },
         
     | 
| 107 | 
         
            +
                {
         
     | 
| 108 | 
         
            +
                  "epoch": 0.17,
         
     | 
| 109 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 110 | 
         
            +
                  "loss": 5659.8989,
         
     | 
| 111 | 
         
            +
                  "step": 17
         
     | 
| 112 | 
         
            +
                },
         
     | 
| 113 | 
         
            +
                {
         
     | 
| 114 | 
         
            +
                  "epoch": 0.18,
         
     | 
| 115 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 116 | 
         
            +
                  "loss": 5265.5771,
         
     | 
| 117 | 
         
            +
                  "step": 18
         
     | 
| 118 | 
         
            +
                },
         
     | 
| 119 | 
         
            +
                {
         
     | 
| 120 | 
         
            +
                  "epoch": 0.19,
         
     | 
| 121 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 122 | 
         
            +
                  "loss": 6167.3711,
         
     | 
| 123 | 
         
            +
                  "step": 19
         
     | 
| 124 | 
         
            +
                },
         
     | 
| 125 | 
         
            +
                {
         
     | 
| 126 | 
         
            +
                  "epoch": 0.2,
         
     | 
| 127 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 128 | 
         
            +
                  "loss": 4837.1528,
         
     | 
| 129 | 
         
            +
                  "step": 20
         
     | 
| 130 | 
         
            +
                },
         
     | 
| 131 | 
         
            +
                {
         
     | 
| 132 | 
         
            +
                  "epoch": 0.2,
         
     | 
| 133 | 
         
            +
                  "eval_loss": 5480.544921875,
         
     | 
| 134 | 
         
            +
                  "eval_runtime": 92.2143,
         
     | 
| 135 | 
         
            +
                  "eval_samples_per_second": 17.308,
         
     | 
| 136 | 
         
            +
                  "eval_steps_per_second": 1.084,
         
     | 
| 137 | 
         
            +
                  "step": 20
         
     | 
| 138 | 
         
            +
                },
         
     | 
| 139 | 
         
            +
                {
         
     | 
| 140 | 
         
            +
                  "epoch": 0.21,
         
     | 
| 141 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 142 | 
         
            +
                  "loss": 5657.3369,
         
     | 
| 143 | 
         
            +
                  "step": 21
         
     | 
| 144 | 
         
            +
                },
         
     | 
| 145 | 
         
            +
                {
         
     | 
| 146 | 
         
            +
                  "epoch": 0.22,
         
     | 
| 147 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 148 | 
         
            +
                  "loss": 5309.2593,
         
     | 
| 149 | 
         
            +
                  "step": 22
         
     | 
| 150 | 
         
            +
                },
         
     | 
| 151 | 
         
            +
                {
         
     | 
| 152 | 
         
            +
                  "epoch": 0.23,
         
     | 
| 153 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 154 | 
         
            +
                  "loss": 5365.457,
         
     | 
| 155 | 
         
            +
                  "step": 23
         
     | 
| 156 | 
         
            +
                },
         
     | 
| 157 | 
         
            +
                {
         
     | 
| 158 | 
         
            +
                  "epoch": 0.24,
         
     | 
| 159 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 160 | 
         
            +
                  "loss": 5510.3174,
         
     | 
| 161 | 
         
            +
                  "step": 24
         
     | 
| 162 | 
         
            +
                },
         
     | 
| 163 | 
         
            +
                {
         
     | 
| 164 | 
         
            +
                  "epoch": 0.25,
         
     | 
| 165 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 166 | 
         
            +
                  "loss": 5117.6543,
         
     | 
| 167 | 
         
            +
                  "step": 25
         
     | 
| 168 | 
         
            +
                },
         
     | 
| 169 | 
         
            +
                {
         
     | 
| 170 | 
         
            +
                  "epoch": 0.26,
         
     | 
| 171 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 172 | 
         
            +
                  "loss": 5166.3486,
         
     | 
| 173 | 
         
            +
                  "step": 26
         
     | 
| 174 | 
         
            +
                },
         
     | 
| 175 | 
         
            +
                {
         
     | 
| 176 | 
         
            +
                  "epoch": 0.27,
         
     | 
| 177 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 178 | 
         
            +
                  "loss": 4838.2803,
         
     | 
| 179 | 
         
            +
                  "step": 27
         
     | 
| 180 | 
         
            +
                },
         
     | 
| 181 | 
         
            +
                {
         
     | 
| 182 | 
         
            +
                  "epoch": 0.28,
         
     | 
| 183 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 184 | 
         
            +
                  "loss": 4877.5884,
         
     | 
| 185 | 
         
            +
                  "step": 28
         
     | 
| 186 | 
         
            +
                },
         
     | 
| 187 | 
         
            +
                {
         
     | 
| 188 | 
         
            +
                  "epoch": 0.29,
         
     | 
| 189 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 190 | 
         
            +
                  "loss": 4623.229,
         
     | 
| 191 | 
         
            +
                  "step": 29
         
     | 
| 192 | 
         
            +
                },
         
     | 
| 193 | 
         
            +
                {
         
     | 
| 194 | 
         
            +
                  "epoch": 0.3,
         
     | 
| 195 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 196 | 
         
            +
                  "loss": 4779.0234,
         
     | 
| 197 | 
         
            +
                  "step": 30
         
     | 
| 198 | 
         
            +
                },
         
     | 
| 199 | 
         
            +
                {
         
     | 
| 200 | 
         
            +
                  "epoch": 0.31,
         
     | 
| 201 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 202 | 
         
            +
                  "loss": 5317.6387,
         
     | 
| 203 | 
         
            +
                  "step": 31
         
     | 
| 204 | 
         
            +
                },
         
     | 
| 205 | 
         
            +
                {
         
     | 
| 206 | 
         
            +
                  "epoch": 0.32,
         
     | 
| 207 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 208 | 
         
            +
                  "loss": 4317.855,
         
     | 
| 209 | 
         
            +
                  "step": 32
         
     | 
| 210 | 
         
            +
                },
         
     | 
| 211 | 
         
            +
                {
         
     | 
| 212 | 
         
            +
                  "epoch": 0.33,
         
     | 
| 213 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 214 | 
         
            +
                  "loss": 5043.9761,
         
     | 
| 215 | 
         
            +
                  "step": 33
         
     | 
| 216 | 
         
            +
                },
         
     | 
| 217 | 
         
            +
                {
         
     | 
| 218 | 
         
            +
                  "epoch": 0.34,
         
     | 
| 219 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 220 | 
         
            +
                  "loss": 4491.8066,
         
     | 
| 221 | 
         
            +
                  "step": 34
         
     | 
| 222 | 
         
            +
                },
         
     | 
| 223 | 
         
            +
                {
         
     | 
| 224 | 
         
            +
                  "epoch": 0.35,
         
     | 
| 225 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 226 | 
         
            +
                  "loss": 5415.9023,
         
     | 
| 227 | 
         
            +
                  "step": 35
         
     | 
| 228 | 
         
            +
                },
         
     | 
| 229 | 
         
            +
                {
         
     | 
| 230 | 
         
            +
                  "epoch": 0.36,
         
     | 
| 231 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 232 | 
         
            +
                  "loss": 4991.374,
         
     | 
| 233 | 
         
            +
                  "step": 36
         
     | 
| 234 | 
         
            +
                },
         
     | 
| 235 | 
         
            +
                {
         
     | 
| 236 | 
         
            +
                  "epoch": 0.37,
         
     | 
| 237 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 238 | 
         
            +
                  "loss": 4780.9639,
         
     | 
| 239 | 
         
            +
                  "step": 37
         
     | 
| 240 | 
         
            +
                },
         
     | 
| 241 | 
         
            +
                {
         
     | 
| 242 | 
         
            +
                  "epoch": 0.38,
         
     | 
| 243 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 244 | 
         
            +
                  "loss": 4221.0063,
         
     | 
| 245 | 
         
            +
                  "step": 38
         
     | 
| 246 | 
         
            +
                },
         
     | 
| 247 | 
         
            +
                {
         
     | 
| 248 | 
         
            +
                  "epoch": 0.39,
         
     | 
| 249 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 250 | 
         
            +
                  "loss": 4799.8457,
         
     | 
| 251 | 
         
            +
                  "step": 39
         
     | 
| 252 | 
         
            +
                },
         
     | 
| 253 | 
         
            +
                {
         
     | 
| 254 | 
         
            +
                  "epoch": 0.4,
         
     | 
| 255 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 256 | 
         
            +
                  "loss": 4103.8979,
         
     | 
| 257 | 
         
            +
                  "step": 40
         
     | 
| 258 | 
         
            +
                },
         
     | 
| 259 | 
         
            +
                {
         
     | 
| 260 | 
         
            +
                  "epoch": 0.4,
         
     | 
| 261 | 
         
            +
                  "eval_loss": 4667.49365234375,
         
     | 
| 262 | 
         
            +
                  "eval_runtime": 92.2679,
         
     | 
| 263 | 
         
            +
                  "eval_samples_per_second": 17.297,
         
     | 
| 264 | 
         
            +
                  "eval_steps_per_second": 1.084,
         
     | 
| 265 | 
         
            +
                  "step": 40
         
     | 
| 266 | 
         
            +
                },
         
     | 
| 267 | 
         
            +
                {
         
     | 
| 268 | 
         
            +
                  "epoch": 0.41,
         
     | 
| 269 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 270 | 
         
            +
                  "loss": 4590.7832,
         
     | 
| 271 | 
         
            +
                  "step": 41
         
     | 
| 272 | 
         
            +
                },
         
     | 
| 273 | 
         
            +
                {
         
     | 
| 274 | 
         
            +
                  "epoch": 0.42,
         
     | 
| 275 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 276 | 
         
            +
                  "loss": 4595.626,
         
     | 
| 277 | 
         
            +
                  "step": 42
         
     | 
| 278 | 
         
            +
                },
         
     | 
| 279 | 
         
            +
                {
         
     | 
| 280 | 
         
            +
                  "epoch": 0.43,
         
     | 
| 281 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 282 | 
         
            +
                  "loss": 4715.1865,
         
     | 
| 283 | 
         
            +
                  "step": 43
         
     | 
| 284 | 
         
            +
                },
         
     | 
| 285 | 
         
            +
                {
         
     | 
| 286 | 
         
            +
                  "epoch": 0.44,
         
     | 
| 287 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 288 | 
         
            +
                  "loss": 5100.9668,
         
     | 
| 289 | 
         
            +
                  "step": 44
         
     | 
| 290 | 
         
            +
                },
         
     | 
| 291 | 
         
            +
                {
         
     | 
| 292 | 
         
            +
                  "epoch": 0.45,
         
     | 
| 293 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 294 | 
         
            +
                  "loss": 5335.4043,
         
     | 
| 295 | 
         
            +
                  "step": 45
         
     | 
| 296 | 
         
            +
                },
         
     | 
| 297 | 
         
            +
                {
         
     | 
| 298 | 
         
            +
                  "epoch": 0.46,
         
     | 
| 299 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 300 | 
         
            +
                  "loss": 4065.293,
         
     | 
| 301 | 
         
            +
                  "step": 46
         
     | 
| 302 | 
         
            +
                },
         
     | 
| 303 | 
         
            +
                {
         
     | 
| 304 | 
         
            +
                  "epoch": 0.47,
         
     | 
| 305 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 306 | 
         
            +
                  "loss": 4155.9297,
         
     | 
| 307 | 
         
            +
                  "step": 47
         
     | 
| 308 | 
         
            +
                },
         
     | 
| 309 | 
         
            +
                {
         
     | 
| 310 | 
         
            +
                  "epoch": 0.48,
         
     | 
| 311 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 312 | 
         
            +
                  "loss": 3953.8406,
         
     | 
| 313 | 
         
            +
                  "step": 48
         
     | 
| 314 | 
         
            +
                },
         
     | 
| 315 | 
         
            +
                {
         
     | 
| 316 | 
         
            +
                  "epoch": 0.49,
         
     | 
| 317 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 318 | 
         
            +
                  "loss": 4083.9575,
         
     | 
| 319 | 
         
            +
                  "step": 49
         
     | 
| 320 | 
         
            +
                },
         
     | 
| 321 | 
         
            +
                {
         
     | 
| 322 | 
         
            +
                  "epoch": 0.5,
         
     | 
| 323 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 324 | 
         
            +
                  "loss": 4542.7334,
         
     | 
| 325 | 
         
            +
                  "step": 50
         
     | 
| 326 | 
         
            +
                },
         
     | 
| 327 | 
         
            +
                {
         
     | 
| 328 | 
         
            +
                  "epoch": 0.51,
         
     | 
| 329 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 330 | 
         
            +
                  "loss": 4298.4731,
         
     | 
| 331 | 
         
            +
                  "step": 51
         
     | 
| 332 | 
         
            +
                },
         
     | 
| 333 | 
         
            +
                {
         
     | 
| 334 | 
         
            +
                  "epoch": 0.52,
         
     | 
| 335 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 336 | 
         
            +
                  "loss": 5286.6616,
         
     | 
| 337 | 
         
            +
                  "step": 52
         
     | 
| 338 | 
         
            +
                },
         
     | 
| 339 | 
         
            +
                {
         
     | 
| 340 | 
         
            +
                  "epoch": 0.53,
         
     | 
| 341 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 342 | 
         
            +
                  "loss": 4883.1421,
         
     | 
| 343 | 
         
            +
                  "step": 53
         
     | 
| 344 | 
         
            +
                },
         
     | 
| 345 | 
         
            +
                {
         
     | 
| 346 | 
         
            +
                  "epoch": 0.54,
         
     | 
| 347 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 348 | 
         
            +
                  "loss": 4699.5859,
         
     | 
| 349 | 
         
            +
                  "step": 54
         
     | 
| 350 | 
         
            +
                },
         
     | 
| 351 | 
         
            +
                {
         
     | 
| 352 | 
         
            +
                  "epoch": 0.55,
         
     | 
| 353 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 354 | 
         
            +
                  "loss": 4913.7065,
         
     | 
| 355 | 
         
            +
                  "step": 55
         
     | 
| 356 | 
         
            +
                },
         
     | 
| 357 | 
         
            +
                {
         
     | 
| 358 | 
         
            +
                  "epoch": 0.56,
         
     | 
| 359 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 360 | 
         
            +
                  "loss": 4242.9907,
         
     | 
| 361 | 
         
            +
                  "step": 56
         
     | 
| 362 | 
         
            +
                },
         
     | 
| 363 | 
         
            +
                {
         
     | 
| 364 | 
         
            +
                  "epoch": 0.57,
         
     | 
| 365 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 366 | 
         
            +
                  "loss": 4300.0186,
         
     | 
| 367 | 
         
            +
                  "step": 57
         
     | 
| 368 | 
         
            +
                },
         
     | 
| 369 | 
         
            +
                {
         
     | 
| 370 | 
         
            +
                  "epoch": 0.58,
         
     | 
| 371 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 372 | 
         
            +
                  "loss": 5107.3906,
         
     | 
| 373 | 
         
            +
                  "step": 58
         
     | 
| 374 | 
         
            +
                },
         
     | 
| 375 | 
         
            +
                {
         
     | 
| 376 | 
         
            +
                  "epoch": 0.59,
         
     | 
| 377 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 378 | 
         
            +
                  "loss": 4310.7656,
         
     | 
| 379 | 
         
            +
                  "step": 59
         
     | 
| 380 | 
         
            +
                },
         
     | 
| 381 | 
         
            +
                {
         
     | 
| 382 | 
         
            +
                  "epoch": 0.6,
         
     | 
| 383 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 384 | 
         
            +
                  "loss": 3961.2295,
         
     | 
| 385 | 
         
            +
                  "step": 60
         
     | 
| 386 | 
         
            +
                },
         
     | 
| 387 | 
         
            +
                {
         
     | 
| 388 | 
         
            +
                  "epoch": 0.6,
         
     | 
| 389 | 
         
            +
                  "eval_loss": 4429.16552734375,
         
     | 
| 390 | 
         
            +
                  "eval_runtime": 92.2074,
         
     | 
| 391 | 
         
            +
                  "eval_samples_per_second": 17.309,
         
     | 
| 392 | 
         
            +
                  "eval_steps_per_second": 1.085,
         
     | 
| 393 | 
         
            +
                  "step": 60
         
     | 
| 394 | 
         
            +
                },
         
     | 
| 395 | 
         
            +
                {
         
     | 
| 396 | 
         
            +
                  "epoch": 0.61,
         
     | 
| 397 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 398 | 
         
            +
                  "loss": 4180.4727,
         
     | 
| 399 | 
         
            +
                  "step": 61
         
     | 
| 400 | 
         
            +
                },
         
     | 
| 401 | 
         
            +
                {
         
     | 
| 402 | 
         
            +
                  "epoch": 0.62,
         
     | 
| 403 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 404 | 
         
            +
                  "loss": 4279.3091,
         
     | 
| 405 | 
         
            +
                  "step": 62
         
     | 
| 406 | 
         
            +
                },
         
     | 
| 407 | 
         
            +
                {
         
     | 
| 408 | 
         
            +
                  "epoch": 0.63,
         
     | 
| 409 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 410 | 
         
            +
                  "loss": 4267.8306,
         
     | 
| 411 | 
         
            +
                  "step": 63
         
     | 
| 412 | 
         
            +
                },
         
     | 
| 413 | 
         
            +
                {
         
     | 
| 414 | 
         
            +
                  "epoch": 0.64,
         
     | 
| 415 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 416 | 
         
            +
                  "loss": 4734.5288,
         
     | 
| 417 | 
         
            +
                  "step": 64
         
     | 
| 418 | 
         
            +
                },
         
     | 
| 419 | 
         
            +
                {
         
     | 
| 420 | 
         
            +
                  "epoch": 0.65,
         
     | 
| 421 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 422 | 
         
            +
                  "loss": 4555.5713,
         
     | 
| 423 | 
         
            +
                  "step": 65
         
     | 
| 424 | 
         
            +
                },
         
     | 
| 425 | 
         
            +
                {
         
     | 
| 426 | 
         
            +
                  "epoch": 0.66,
         
     | 
| 427 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 428 | 
         
            +
                  "loss": 3992.9912,
         
     | 
| 429 | 
         
            +
                  "step": 66
         
     | 
| 430 | 
         
            +
                },
         
     | 
| 431 | 
         
            +
                {
         
     | 
| 432 | 
         
            +
                  "epoch": 0.67,
         
     | 
| 433 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 434 | 
         
            +
                  "loss": 4209.2476,
         
     | 
| 435 | 
         
            +
                  "step": 67
         
     | 
| 436 | 
         
            +
                },
         
     | 
| 437 | 
         
            +
                {
         
     | 
| 438 | 
         
            +
                  "epoch": 0.68,
         
     | 
| 439 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 440 | 
         
            +
                  "loss": 4822.8975,
         
     | 
| 441 | 
         
            +
                  "step": 68
         
     | 
| 442 | 
         
            +
                },
         
     | 
| 443 | 
         
            +
                {
         
     | 
| 444 | 
         
            +
                  "epoch": 0.69,
         
     | 
| 445 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 446 | 
         
            +
                  "loss": 4524.1753,
         
     | 
| 447 | 
         
            +
                  "step": 69
         
     | 
| 448 | 
         
            +
                },
         
     | 
| 449 | 
         
            +
                {
         
     | 
| 450 | 
         
            +
                  "epoch": 0.7,
         
     | 
| 451 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 452 | 
         
            +
                  "loss": 4046.7612,
         
     | 
| 453 | 
         
            +
                  "step": 70
         
     | 
| 454 | 
         
            +
                },
         
     | 
| 455 | 
         
            +
                {
         
     | 
| 456 | 
         
            +
                  "epoch": 0.71,
         
     | 
| 457 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 458 | 
         
            +
                  "loss": 4119.7842,
         
     | 
| 459 | 
         
            +
                  "step": 71
         
     | 
| 460 | 
         
            +
                },
         
     | 
| 461 | 
         
            +
                {
         
     | 
| 462 | 
         
            +
                  "epoch": 0.72,
         
     | 
| 463 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 464 | 
         
            +
                  "loss": 4543.3413,
         
     | 
| 465 | 
         
            +
                  "step": 72
         
     | 
| 466 | 
         
            +
                },
         
     | 
| 467 | 
         
            +
                {
         
     | 
| 468 | 
         
            +
                  "epoch": 0.73,
         
     | 
| 469 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 470 | 
         
            +
                  "loss": 4397.4639,
         
     | 
| 471 | 
         
            +
                  "step": 73
         
     | 
| 472 | 
         
            +
                },
         
     | 
| 473 | 
         
            +
                {
         
     | 
| 474 | 
         
            +
                  "epoch": 0.74,
         
     | 
| 475 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 476 | 
         
            +
                  "loss": 4307.0034,
         
     | 
| 477 | 
         
            +
                  "step": 74
         
     | 
| 478 | 
         
            +
                },
         
     | 
| 479 | 
         
            +
                {
         
     | 
| 480 | 
         
            +
                  "epoch": 0.75,
         
     | 
| 481 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 482 | 
         
            +
                  "loss": 4010.03,
         
     | 
| 483 | 
         
            +
                  "step": 75
         
     | 
| 484 | 
         
            +
                },
         
     | 
| 485 | 
         
            +
                {
         
     | 
| 486 | 
         
            +
                  "epoch": 0.76,
         
     | 
| 487 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 488 | 
         
            +
                  "loss": 4285.71,
         
     | 
| 489 | 
         
            +
                  "step": 76
         
     | 
| 490 | 
         
            +
                },
         
     | 
| 491 | 
         
            +
                {
         
     | 
| 492 | 
         
            +
                  "epoch": 0.77,
         
     | 
| 493 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 494 | 
         
            +
                  "loss": 4588.3975,
         
     | 
| 495 | 
         
            +
                  "step": 77
         
     | 
| 496 | 
         
            +
                },
         
     | 
| 497 | 
         
            +
                {
         
     | 
| 498 | 
         
            +
                  "epoch": 0.78,
         
     | 
| 499 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 500 | 
         
            +
                  "loss": 4258.2319,
         
     | 
| 501 | 
         
            +
                  "step": 78
         
     | 
| 502 | 
         
            +
                },
         
     | 
| 503 | 
         
            +
                {
         
     | 
| 504 | 
         
            +
                  "epoch": 0.79,
         
     | 
| 505 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 506 | 
         
            +
                  "loss": 4595.4858,
         
     | 
| 507 | 
         
            +
                  "step": 79
         
     | 
| 508 | 
         
            +
                },
         
     | 
| 509 | 
         
            +
                {
         
     | 
| 510 | 
         
            +
                  "epoch": 0.8,
         
     | 
| 511 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 512 | 
         
            +
                  "loss": 4038.6848,
         
     | 
| 513 | 
         
            +
                  "step": 80
         
     | 
| 514 | 
         
            +
                },
         
     | 
| 515 | 
         
            +
                {
         
     | 
| 516 | 
         
            +
                  "epoch": 0.8,
         
     | 
| 517 | 
         
            +
                  "eval_loss": 4310.54833984375,
         
     | 
| 518 | 
         
            +
                  "eval_runtime": 92.2471,
         
     | 
| 519 | 
         
            +
                  "eval_samples_per_second": 17.301,
         
     | 
| 520 | 
         
            +
                  "eval_steps_per_second": 1.084,
         
     | 
| 521 | 
         
            +
                  "step": 80
         
     | 
| 522 | 
         
            +
                },
         
     | 
| 523 | 
         
            +
                {
         
     | 
| 524 | 
         
            +
                  "epoch": 0.81,
         
     | 
| 525 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 526 | 
         
            +
                  "loss": 4118.8779,
         
     | 
| 527 | 
         
            +
                  "step": 81
         
     | 
| 528 | 
         
            +
                },
         
     | 
| 529 | 
         
            +
                {
         
     | 
| 530 | 
         
            +
                  "epoch": 0.82,
         
     | 
| 531 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 532 | 
         
            +
                  "loss": 4262.9771,
         
     | 
| 533 | 
         
            +
                  "step": 82
         
     | 
| 534 | 
         
            +
                },
         
     | 
| 535 | 
         
            +
                {
         
     | 
| 536 | 
         
            +
                  "epoch": 0.83,
         
     | 
| 537 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 538 | 
         
            +
                  "loss": 4513.5244,
         
     | 
| 539 | 
         
            +
                  "step": 83
         
     | 
| 540 | 
         
            +
                },
         
     | 
| 541 | 
         
            +
                {
         
     | 
| 542 | 
         
            +
                  "epoch": 0.84,
         
     | 
| 543 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 544 | 
         
            +
                  "loss": 4361.1787,
         
     | 
| 545 | 
         
            +
                  "step": 84
         
     | 
| 546 | 
         
            +
                },
         
     | 
| 547 | 
         
            +
                {
         
     | 
| 548 | 
         
            +
                  "epoch": 0.85,
         
     | 
| 549 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 550 | 
         
            +
                  "loss": 4480.5659,
         
     | 
| 551 | 
         
            +
                  "step": 85
         
     | 
| 552 | 
         
            +
                },
         
     | 
| 553 | 
         
            +
                {
         
     | 
| 554 | 
         
            +
                  "epoch": 0.86,
         
     | 
| 555 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 556 | 
         
            +
                  "loss": 3874.5522,
         
     | 
| 557 | 
         
            +
                  "step": 86
         
     | 
| 558 | 
         
            +
                },
         
     | 
| 559 | 
         
            +
                {
         
     | 
| 560 | 
         
            +
                  "epoch": 0.87,
         
     | 
| 561 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 562 | 
         
            +
                  "loss": 4457.2578,
         
     | 
| 563 | 
         
            +
                  "step": 87
         
     | 
| 564 | 
         
            +
                },
         
     | 
| 565 | 
         
            +
                {
         
     | 
| 566 | 
         
            +
                  "epoch": 0.88,
         
     | 
| 567 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 568 | 
         
            +
                  "loss": 4396.7188,
         
     | 
| 569 | 
         
            +
                  "step": 88
         
     | 
| 570 | 
         
            +
                },
         
     | 
| 571 | 
         
            +
                {
         
     | 
| 572 | 
         
            +
                  "epoch": 0.89,
         
     | 
| 573 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 574 | 
         
            +
                  "loss": 3549.261,
         
     | 
| 575 | 
         
            +
                  "step": 89
         
     | 
| 576 | 
         
            +
                },
         
     | 
| 577 | 
         
            +
                {
         
     | 
| 578 | 
         
            +
                  "epoch": 0.9,
         
     | 
| 579 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 580 | 
         
            +
                  "loss": 3747.9395,
         
     | 
| 581 | 
         
            +
                  "step": 90
         
     | 
| 582 | 
         
            +
                },
         
     | 
| 583 | 
         
            +
                {
         
     | 
| 584 | 
         
            +
                  "epoch": 0.91,
         
     | 
| 585 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 586 | 
         
            +
                  "loss": 4490.166,
         
     | 
| 587 | 
         
            +
                  "step": 91
         
     | 
| 588 | 
         
            +
                },
         
     | 
| 589 | 
         
            +
                {
         
     | 
| 590 | 
         
            +
                  "epoch": 0.92,
         
     | 
| 591 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 592 | 
         
            +
                  "loss": 4745.7881,
         
     | 
| 593 | 
         
            +
                  "step": 92
         
     | 
| 594 | 
         
            +
                },
         
     | 
| 595 | 
         
            +
                {
         
     | 
| 596 | 
         
            +
                  "epoch": 0.93,
         
     | 
| 597 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 598 | 
         
            +
                  "loss": 4586.4639,
         
     | 
| 599 | 
         
            +
                  "step": 93
         
     | 
| 600 | 
         
            +
                },
         
     | 
| 601 | 
         
            +
                {
         
     | 
| 602 | 
         
            +
                  "epoch": 0.94,
         
     | 
| 603 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 604 | 
         
            +
                  "loss": 4502.7104,
         
     | 
| 605 | 
         
            +
                  "step": 94
         
     | 
| 606 | 
         
            +
                },
         
     | 
| 607 | 
         
            +
                {
         
     | 
| 608 | 
         
            +
                  "epoch": 0.95,
         
     | 
| 609 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 610 | 
         
            +
                  "loss": 4409.7378,
         
     | 
| 611 | 
         
            +
                  "step": 95
         
     | 
| 612 | 
         
            +
                },
         
     | 
| 613 | 
         
            +
                {
         
     | 
| 614 | 
         
            +
                  "epoch": 0.96,
         
     | 
| 615 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 616 | 
         
            +
                  "loss": 4332.5742,
         
     | 
| 617 | 
         
            +
                  "step": 96
         
     | 
| 618 | 
         
            +
                },
         
     | 
| 619 | 
         
            +
                {
         
     | 
| 620 | 
         
            +
                  "epoch": 0.97,
         
     | 
| 621 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 622 | 
         
            +
                  "loss": 3850.6021,
         
     | 
| 623 | 
         
            +
                  "step": 97
         
     | 
| 624 | 
         
            +
                },
         
     | 
| 625 | 
         
            +
                {
         
     | 
| 626 | 
         
            +
                  "epoch": 0.98,
         
     | 
| 627 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 628 | 
         
            +
                  "loss": 4482.1929,
         
     | 
| 629 | 
         
            +
                  "step": 98
         
     | 
| 630 | 
         
            +
                },
         
     | 
| 631 | 
         
            +
                {
         
     | 
| 632 | 
         
            +
                  "epoch": 0.99,
         
     | 
| 633 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 634 | 
         
            +
                  "loss": 4852.4854,
         
     | 
| 635 | 
         
            +
                  "step": 99
         
     | 
| 636 | 
         
            +
                },
         
     | 
| 637 | 
         
            +
                {
         
     | 
| 638 | 
         
            +
                  "epoch": 1.0,
         
     | 
| 639 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 640 | 
         
            +
                  "loss": 3658.8279,
         
     | 
| 641 | 
         
            +
                  "step": 100
         
     | 
| 642 | 
         
            +
                },
         
     | 
| 643 | 
         
            +
                {
         
     | 
| 644 | 
         
            +
                  "epoch": 1.0,
         
     | 
| 645 | 
         
            +
                  "eval_loss": 4192.994140625,
         
     | 
| 646 | 
         
            +
                  "eval_runtime": 92.249,
         
     | 
| 647 | 
         
            +
                  "eval_samples_per_second": 17.301,
         
     | 
| 648 | 
         
            +
                  "eval_steps_per_second": 1.084,
         
     | 
| 649 | 
         
            +
                  "step": 100
         
     | 
| 650 | 
         
            +
                }
         
     | 
| 651 | 
         
            +
              ],
         
     | 
| 652 | 
         
            +
              "logging_steps": 1.0,
         
     | 
| 653 | 
         
            +
              "max_steps": 100,
         
     | 
| 654 | 
         
            +
              "num_input_tokens_seen": 0,
         
     | 
| 655 | 
         
            +
              "num_train_epochs": 1,
         
     | 
| 656 | 
         
            +
              "save_steps": 20,
         
     | 
| 657 | 
         
            +
              "total_flos": 4.06024900092887e+16,
         
     | 
| 658 | 
         
            +
              "train_batch_size": 16,
         
     | 
| 659 | 
         
            +
              "trial_name": null,
         
     | 
| 660 | 
         
            +
              "trial_params": null
         
     | 
| 661 | 
         
            +
            }
         
     | 
    	
        checkpoint-100/training_args.bin
    ADDED
    
    | 
         @@ -0,0 +1,3 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            version https://git-lfs.github.com/spec/v1
         
     | 
| 2 | 
         
            +
            oid sha256:e3e1dc8cf4cfa08847424d54c60a695326a3385a031956a0c7346067280f630c
         
     | 
| 3 | 
         
            +
            size 6392
         
     | 
    	
        checkpoint-100/zero_to_fp32.py
    ADDED
    
    | 
         @@ -0,0 +1,760 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 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:
         
     | 
| 14 | 
         
            +
            #   python zero_to_fp32.py . output_dir/
         
     | 
| 15 | 
         
            +
            #   or
         
     | 
| 16 | 
         
            +
            #   python zero_to_fp32.py . output_dir/ --safe_serialization
         
     | 
| 17 | 
         
            +
             
     | 
| 18 | 
         
            +
            import argparse
         
     | 
| 19 | 
         
            +
            import torch
         
     | 
| 20 | 
         
            +
            import glob
         
     | 
| 21 | 
         
            +
            import math
         
     | 
| 22 | 
         
            +
            import os
         
     | 
| 23 | 
         
            +
            import re
         
     | 
| 24 | 
         
            +
            import gc
         
     | 
| 25 | 
         
            +
            import json
         
     | 
| 26 | 
         
            +
            import numpy as np
         
     | 
| 27 | 
         
            +
            from tqdm import tqdm
         
     | 
| 28 | 
         
            +
            from collections import OrderedDict
         
     | 
| 29 | 
         
            +
            from dataclasses import dataclass
         
     | 
| 30 | 
         
            +
             
     | 
| 31 | 
         
            +
            # while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
         
     | 
| 32 | 
         
            +
            # DeepSpeed data structures it has to be available in the current python environment.
         
     | 
| 33 | 
         
            +
            from deepspeed.utils import logger
         
     | 
| 34 | 
         
            +
            from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
         
     | 
| 35 | 
         
            +
                                                        FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
         
     | 
| 36 | 
         
            +
                                                        FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
         
     | 
| 37 | 
         
            +
             
     | 
| 38 | 
         
            +
             
     | 
| 39 | 
         
            +
            @dataclass
         
     | 
| 40 | 
         
            +
            class zero_model_state:
         
     | 
| 41 | 
         
            +
                buffers: dict()
         
     | 
| 42 | 
         
            +
                param_shapes: dict()
         
     | 
| 43 | 
         
            +
                shared_params: list
         
     | 
| 44 | 
         
            +
                ds_version: int
         
     | 
| 45 | 
         
            +
                frozen_param_shapes: dict()
         
     | 
| 46 | 
         
            +
                frozen_param_fragments: dict()
         
     | 
| 47 | 
         
            +
             
     | 
| 48 | 
         
            +
             
     | 
| 49 | 
         
            +
            debug = 0
         
     | 
| 50 | 
         
            +
             
     | 
| 51 | 
         
            +
            # load to cpu
         
     | 
| 52 | 
         
            +
            device = torch.device('cpu')
         
     | 
| 53 | 
         
            +
             
     | 
| 54 | 
         
            +
             
     | 
| 55 | 
         
            +
            def atoi(text):
         
     | 
| 56 | 
         
            +
                return int(text) if text.isdigit() else text
         
     | 
| 57 | 
         
            +
             
     | 
| 58 | 
         
            +
             
     | 
| 59 | 
         
            +
            def natural_keys(text):
         
     | 
| 60 | 
         
            +
                '''
         
     | 
| 61 | 
         
            +
                alist.sort(key=natural_keys) sorts in human order
         
     | 
| 62 | 
         
            +
                http://nedbatchelder.com/blog/200712/human_sorting.html
         
     | 
| 63 | 
         
            +
                (See Toothy's implementation in the comments)
         
     | 
| 64 | 
         
            +
                '''
         
     | 
| 65 | 
         
            +
                return [atoi(c) for c in re.split(r'(\d+)', text)]
         
     | 
| 66 | 
         
            +
             
     | 
| 67 | 
         
            +
             
     | 
| 68 | 
         
            +
            def get_model_state_file(checkpoint_dir, zero_stage):
         
     | 
| 69 | 
         
            +
                if not os.path.isdir(checkpoint_dir):
         
     | 
| 70 | 
         
            +
                    raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
         
     | 
| 71 | 
         
            +
             
     | 
| 72 | 
         
            +
                # there should be only one file
         
     | 
| 73 | 
         
            +
                if zero_stage <= 2:
         
     | 
| 74 | 
         
            +
                    file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
         
     | 
| 75 | 
         
            +
                elif zero_stage == 3:
         
     | 
| 76 | 
         
            +
                    file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
         
     | 
| 77 | 
         
            +
             
     | 
| 78 | 
         
            +
                if not os.path.exists(file):
         
     | 
| 79 | 
         
            +
                    raise FileNotFoundError(f"can't find model states file at '{file}'")
         
     | 
| 80 | 
         
            +
             
     | 
| 81 | 
         
            +
                return file
         
     | 
| 82 | 
         
            +
             
     | 
| 83 | 
         
            +
             
     | 
| 84 | 
         
            +
            def get_checkpoint_files(checkpoint_dir, glob_pattern):
         
     | 
| 85 | 
         
            +
                # XXX: need to test that this simple glob rule works for multi-node setup too
         
     | 
| 86 | 
         
            +
                ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
         
     | 
| 87 | 
         
            +
             
     | 
| 88 | 
         
            +
                if len(ckpt_files) == 0:
         
     | 
| 89 | 
         
            +
                    raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
         
     | 
| 90 | 
         
            +
             
     | 
| 91 | 
         
            +
                return ckpt_files
         
     | 
| 92 | 
         
            +
             
     | 
| 93 | 
         
            +
             
     | 
| 94 | 
         
            +
            def get_optim_files(checkpoint_dir):
         
     | 
| 95 | 
         
            +
                return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
         
     | 
| 96 | 
         
            +
             
     | 
| 97 | 
         
            +
             
     | 
| 98 | 
         
            +
            def get_model_state_files(checkpoint_dir):
         
     | 
| 99 | 
         
            +
                return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
         
     | 
| 100 | 
         
            +
             
     | 
| 101 | 
         
            +
             
     | 
| 102 | 
         
            +
            def parse_model_states(files):
         
     | 
| 103 | 
         
            +
                zero_model_states = []
         
     | 
| 104 | 
         
            +
                for file in files:
         
     | 
| 105 | 
         
            +
                    state_dict = torch.load(file, map_location=device, weights_only=False)
         
     | 
| 106 | 
         
            +
             
     | 
| 107 | 
         
            +
                    if BUFFER_NAMES not in state_dict:
         
     | 
| 108 | 
         
            +
                        raise ValueError(f"{file} is not a model state checkpoint")
         
     | 
| 109 | 
         
            +
                    buffer_names = state_dict[BUFFER_NAMES]
         
     | 
| 110 | 
         
            +
                    if debug:
         
     | 
| 111 | 
         
            +
                        print("Found buffers:", buffer_names)
         
     | 
| 112 | 
         
            +
             
     | 
| 113 | 
         
            +
                    # recover just the buffers while restoring them to fp32 if they were saved in fp16
         
     | 
| 114 | 
         
            +
                    buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
         
     | 
| 115 | 
         
            +
                    param_shapes = state_dict[PARAM_SHAPES]
         
     | 
| 116 | 
         
            +
             
     | 
| 117 | 
         
            +
                    # collect parameters that are included in param_shapes
         
     | 
| 118 | 
         
            +
                    param_names = []
         
     | 
| 119 | 
         
            +
                    for s in param_shapes:
         
     | 
| 120 | 
         
            +
                        for name in s.keys():
         
     | 
| 121 | 
         
            +
                            param_names.append(name)
         
     | 
| 122 | 
         
            +
             
     | 
| 123 | 
         
            +
                    # update with frozen parameters
         
     | 
| 124 | 
         
            +
                    frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
         
     | 
| 125 | 
         
            +
                    if frozen_param_shapes is not None:
         
     | 
| 126 | 
         
            +
                        if debug:
         
     | 
| 127 | 
         
            +
                            print(f"Found frozen_param_shapes: {frozen_param_shapes}")
         
     | 
| 128 | 
         
            +
                        param_names += list(frozen_param_shapes.keys())
         
     | 
| 129 | 
         
            +
             
     | 
| 130 | 
         
            +
                    # handle shared params
         
     | 
| 131 | 
         
            +
                    shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
         
     | 
| 132 | 
         
            +
             
     | 
| 133 | 
         
            +
                    ds_version = state_dict.get(DS_VERSION, None)
         
     | 
| 134 | 
         
            +
             
     | 
| 135 | 
         
            +
                    frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
         
     | 
| 136 | 
         
            +
             
     | 
| 137 | 
         
            +
                    z_model_state = zero_model_state(buffers=buffers,
         
     | 
| 138 | 
         
            +
                                                     param_shapes=param_shapes,
         
     | 
| 139 | 
         
            +
                                                     shared_params=shared_params,
         
     | 
| 140 | 
         
            +
                                                     ds_version=ds_version,
         
     | 
| 141 | 
         
            +
                                                     frozen_param_shapes=frozen_param_shapes,
         
     | 
| 142 | 
         
            +
                                                     frozen_param_fragments=frozen_param_fragments)
         
     | 
| 143 | 
         
            +
                    zero_model_states.append(z_model_state)
         
     | 
| 144 | 
         
            +
             
     | 
| 145 | 
         
            +
                return zero_model_states
         
     | 
| 146 | 
         
            +
             
     | 
| 147 | 
         
            +
             
     | 
| 148 | 
         
            +
            def parse_optim_states(files, ds_checkpoint_dir):
         
     | 
| 149 | 
         
            +
                total_files = len(files)
         
     | 
| 150 | 
         
            +
                state_dicts = []
         
     | 
| 151 | 
         
            +
                for f in tqdm(files, desc='Loading checkpoint shards'):
         
     | 
| 152 | 
         
            +
                    state_dict = torch.load(f, map_location=device, mmap=True, weights_only=False)
         
     | 
| 153 | 
         
            +
                    # immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
         
     | 
| 154 | 
         
            +
                    # and also handle the case where it was already removed by another helper script
         
     | 
| 155 | 
         
            +
                    state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
         
     | 
| 156 | 
         
            +
                    state_dicts.append(state_dict)
         
     | 
| 157 | 
         
            +
             
     | 
| 158 | 
         
            +
                if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:
         
     | 
| 159 | 
         
            +
                    raise ValueError(f"{files[0]} is not a zero checkpoint")
         
     | 
| 160 | 
         
            +
                zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
         
     | 
| 161 | 
         
            +
                world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
         
     | 
| 162 | 
         
            +
             
     | 
| 163 | 
         
            +
                # For ZeRO-2 each param group can have different partition_count as data parallelism for expert
         
     | 
| 164 | 
         
            +
                # parameters can be different from data parallelism for non-expert parameters. So we can just
         
     | 
| 165 | 
         
            +
                # use the max of the partition_count to get the dp world_size.
         
     | 
| 166 | 
         
            +
             
     | 
| 167 | 
         
            +
                if type(world_size) is list:
         
     | 
| 168 | 
         
            +
                    world_size = max(world_size)
         
     | 
| 169 | 
         
            +
             
     | 
| 170 | 
         
            +
                if world_size != total_files:
         
     | 
| 171 | 
         
            +
                    raise ValueError(
         
     | 
| 172 | 
         
            +
                        f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
         
     | 
| 173 | 
         
            +
                        "Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
         
     | 
| 174 | 
         
            +
                    )
         
     | 
| 175 | 
         
            +
             
     | 
| 176 | 
         
            +
                # the groups are named differently in each stage
         
     | 
| 177 | 
         
            +
                if zero_stage <= 2:
         
     | 
| 178 | 
         
            +
                    fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
         
     | 
| 179 | 
         
            +
                elif zero_stage == 3:
         
     | 
| 180 | 
         
            +
                    fp32_groups_key = FP32_FLAT_GROUPS
         
     | 
| 181 | 
         
            +
                else:
         
     | 
| 182 | 
         
            +
                    raise ValueError(f"unknown zero stage {zero_stage}")
         
     | 
| 183 | 
         
            +
             
     | 
| 184 | 
         
            +
                fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
         
     | 
| 185 | 
         
            +
                return zero_stage, world_size, fp32_flat_groups
         
     | 
| 186 | 
         
            +
             
     | 
| 187 | 
         
            +
             
     | 
| 188 | 
         
            +
            def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters):
         
     | 
| 189 | 
         
            +
                """
         
     | 
| 190 | 
         
            +
                Returns fp32 state_dict reconstructed from ds checkpoint
         
     | 
| 191 | 
         
            +
             
     | 
| 192 | 
         
            +
                Args:
         
     | 
| 193 | 
         
            +
                    - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
         
     | 
| 194 | 
         
            +
             
     | 
| 195 | 
         
            +
                """
         
     | 
| 196 | 
         
            +
                print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
         
     | 
| 197 | 
         
            +
             
     | 
| 198 | 
         
            +
                optim_files = get_optim_files(ds_checkpoint_dir)
         
     | 
| 199 | 
         
            +
                zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
         
     | 
| 200 | 
         
            +
                print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
         
     | 
| 201 | 
         
            +
             
     | 
| 202 | 
         
            +
                model_files = get_model_state_files(ds_checkpoint_dir)
         
     | 
| 203 | 
         
            +
             
     | 
| 204 | 
         
            +
                zero_model_states = parse_model_states(model_files)
         
     | 
| 205 | 
         
            +
                print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
         
     | 
| 206 | 
         
            +
             
     | 
| 207 | 
         
            +
                if zero_stage <= 2:
         
     | 
| 208 | 
         
            +
                    return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
         
     | 
| 209 | 
         
            +
                                                                      exclude_frozen_parameters)
         
     | 
| 210 | 
         
            +
                elif zero_stage == 3:
         
     | 
| 211 | 
         
            +
                    return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
         
     | 
| 212 | 
         
            +
                                                                      exclude_frozen_parameters)
         
     | 
| 213 | 
         
            +
             
     | 
| 214 | 
         
            +
             
     | 
| 215 | 
         
            +
            def _zero2_merge_frozen_params(state_dict, zero_model_states):
         
     | 
| 216 | 
         
            +
                if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
         
     | 
| 217 | 
         
            +
                    return
         
     | 
| 218 | 
         
            +
             
     | 
| 219 | 
         
            +
                frozen_param_shapes = zero_model_states[0].frozen_param_shapes
         
     | 
| 220 | 
         
            +
                frozen_param_fragments = zero_model_states[0].frozen_param_fragments
         
     | 
| 221 | 
         
            +
             
     | 
| 222 | 
         
            +
                if debug:
         
     | 
| 223 | 
         
            +
                    num_elem = sum(s.numel() for s in frozen_param_shapes.values())
         
     | 
| 224 | 
         
            +
                    print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
         
     | 
| 225 | 
         
            +
             
     | 
| 226 | 
         
            +
                    wanted_params = len(frozen_param_shapes)
         
     | 
| 227 | 
         
            +
                    wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
         
     | 
| 228 | 
         
            +
                    avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
         
     | 
| 229 | 
         
            +
                    print(f'Frozen params: Have {avail_numel} numels to process.')
         
     | 
| 230 | 
         
            +
                    print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
         
     | 
| 231 | 
         
            +
             
     | 
| 232 | 
         
            +
                total_params = 0
         
     | 
| 233 | 
         
            +
                total_numel = 0
         
     | 
| 234 | 
         
            +
                for name, shape in frozen_param_shapes.items():
         
     | 
| 235 | 
         
            +
                    total_params += 1
         
     | 
| 236 | 
         
            +
                    unpartitioned_numel = shape.numel()
         
     | 
| 237 | 
         
            +
                    total_numel += unpartitioned_numel
         
     | 
| 238 | 
         
            +
             
     | 
| 239 | 
         
            +
                    state_dict[name] = frozen_param_fragments[name]
         
     | 
| 240 | 
         
            +
             
     | 
| 241 | 
         
            +
                    if debug:
         
     | 
| 242 | 
         
            +
                        print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
         
     | 
| 243 | 
         
            +
             
     | 
| 244 | 
         
            +
                print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
         
     | 
| 245 | 
         
            +
             
     | 
| 246 | 
         
            +
             
     | 
| 247 | 
         
            +
            def _has_callable(obj, fn):
         
     | 
| 248 | 
         
            +
                attr = getattr(obj, fn, None)
         
     | 
| 249 | 
         
            +
                return callable(attr)
         
     | 
| 250 | 
         
            +
             
     | 
| 251 | 
         
            +
             
     | 
| 252 | 
         
            +
            def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
         
     | 
| 253 | 
         
            +
                param_shapes = zero_model_states[0].param_shapes
         
     | 
| 254 | 
         
            +
             
     | 
| 255 | 
         
            +
                # Reconstruction protocol:
         
     | 
| 256 | 
         
            +
                #
         
     | 
| 257 | 
         
            +
                # XXX: document this
         
     | 
| 258 | 
         
            +
             
     | 
| 259 | 
         
            +
                if debug:
         
     | 
| 260 | 
         
            +
                    for i in range(world_size):
         
     | 
| 261 | 
         
            +
                        for j in range(len(fp32_flat_groups[0])):
         
     | 
| 262 | 
         
            +
                            print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
         
     | 
| 263 | 
         
            +
             
     | 
| 264 | 
         
            +
                # XXX: memory usage doubles here (zero2)
         
     | 
| 265 | 
         
            +
                num_param_groups = len(fp32_flat_groups[0])
         
     | 
| 266 | 
         
            +
                merged_single_partition_of_fp32_groups = []
         
     | 
| 267 | 
         
            +
                for i in range(num_param_groups):
         
     | 
| 268 | 
         
            +
                    merged_partitions = [sd[i] for sd in fp32_flat_groups]
         
     | 
| 269 | 
         
            +
                    full_single_fp32_vector = torch.cat(merged_partitions, 0)
         
     | 
| 270 | 
         
            +
                    merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
         
     | 
| 271 | 
         
            +
                avail_numel = sum(
         
     | 
| 272 | 
         
            +
                    [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
         
     | 
| 273 | 
         
            +
             
     | 
| 274 | 
         
            +
                if debug:
         
     | 
| 275 | 
         
            +
                    wanted_params = sum([len(shapes) for shapes in param_shapes])
         
     | 
| 276 | 
         
            +
                    wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
         
     | 
| 277 | 
         
            +
                    # not asserting if there is a mismatch due to possible padding
         
     | 
| 278 | 
         
            +
                    print(f"Have {avail_numel} numels to process.")
         
     | 
| 279 | 
         
            +
                    print(f"Need {wanted_numel} numels in {wanted_params} params.")
         
     | 
| 280 | 
         
            +
             
     | 
| 281 | 
         
            +
                # params
         
     | 
| 282 | 
         
            +
                # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
         
     | 
| 283 | 
         
            +
                # out-of-core computing solution
         
     | 
| 284 | 
         
            +
                total_numel = 0
         
     | 
| 285 | 
         
            +
                total_params = 0
         
     | 
| 286 | 
         
            +
                for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
         
     | 
| 287 | 
         
            +
                    offset = 0
         
     | 
| 288 | 
         
            +
                    avail_numel = full_single_fp32_vector.numel()
         
     | 
| 289 | 
         
            +
                    for name, shape in shapes.items():
         
     | 
| 290 | 
         
            +
             
     | 
| 291 | 
         
            +
                        unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
         
     | 
| 292 | 
         
            +
                        total_numel += unpartitioned_numel
         
     | 
| 293 | 
         
            +
                        total_params += 1
         
     | 
| 294 | 
         
            +
             
     | 
| 295 | 
         
            +
                        if debug:
         
     | 
| 296 | 
         
            +
                            print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
         
     | 
| 297 | 
         
            +
                        state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
         
     | 
| 298 | 
         
            +
                        offset += unpartitioned_numel
         
     | 
| 299 | 
         
            +
             
     | 
| 300 | 
         
            +
                    # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
         
     | 
| 301 | 
         
            +
                    # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
         
     | 
| 302 | 
         
            +
                    # paddings performed in the code it's almost impossible to predict the exact numbers w/o the
         
     | 
| 303 | 
         
            +
                    # live optimizer object, so we are checking that the numbers are within the right range
         
     | 
| 304 | 
         
            +
                    align_to = 2 * world_size
         
     | 
| 305 | 
         
            +
             
     | 
| 306 | 
         
            +
                    def zero2_align(x):
         
     | 
| 307 | 
         
            +
                        return align_to * math.ceil(x / align_to)
         
     | 
| 308 | 
         
            +
             
     | 
| 309 | 
         
            +
                    if debug:
         
     | 
| 310 | 
         
            +
                        print(f"original offset={offset}, avail_numel={avail_numel}")
         
     | 
| 311 | 
         
            +
             
     | 
| 312 | 
         
            +
                    offset = zero2_align(offset)
         
     | 
| 313 | 
         
            +
                    avail_numel = zero2_align(avail_numel)
         
     | 
| 314 | 
         
            +
             
     | 
| 315 | 
         
            +
                    if debug:
         
     | 
| 316 | 
         
            +
                        print(f"aligned  offset={offset}, avail_numel={avail_numel}")
         
     | 
| 317 | 
         
            +
             
     | 
| 318 | 
         
            +
                    # Sanity check
         
     | 
| 319 | 
         
            +
                    if offset != avail_numel:
         
     | 
| 320 | 
         
            +
                        raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
         
     | 
| 321 | 
         
            +
             
     | 
| 322 | 
         
            +
                print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
         
     | 
| 323 | 
         
            +
             
     | 
| 324 | 
         
            +
             
     | 
| 325 | 
         
            +
            def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
         
     | 
| 326 | 
         
            +
                                                           exclude_frozen_parameters):
         
     | 
| 327 | 
         
            +
                state_dict = OrderedDict()
         
     | 
| 328 | 
         
            +
             
     | 
| 329 | 
         
            +
                # buffers
         
     | 
| 330 | 
         
            +
                buffers = zero_model_states[0].buffers
         
     | 
| 331 | 
         
            +
                state_dict.update(buffers)
         
     | 
| 332 | 
         
            +
                if debug:
         
     | 
| 333 | 
         
            +
                    print(f"added {len(buffers)} buffers")
         
     | 
| 334 | 
         
            +
             
     | 
| 335 | 
         
            +
                if not exclude_frozen_parameters:
         
     | 
| 336 | 
         
            +
                    _zero2_merge_frozen_params(state_dict, zero_model_states)
         
     | 
| 337 | 
         
            +
             
     | 
| 338 | 
         
            +
                _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
         
     | 
| 339 | 
         
            +
             
     | 
| 340 | 
         
            +
                # recover shared parameters
         
     | 
| 341 | 
         
            +
                for pair in zero_model_states[0].shared_params:
         
     | 
| 342 | 
         
            +
                    if pair[1] in state_dict:
         
     | 
| 343 | 
         
            +
                        state_dict[pair[0]] = state_dict[pair[1]]
         
     | 
| 344 | 
         
            +
             
     | 
| 345 | 
         
            +
                return state_dict
         
     | 
| 346 | 
         
            +
             
     | 
| 347 | 
         
            +
             
     | 
| 348 | 
         
            +
            def zero3_partitioned_param_info(unpartitioned_numel, world_size):
         
     | 
| 349 | 
         
            +
                remainder = unpartitioned_numel % world_size
         
     | 
| 350 | 
         
            +
                padding_numel = (world_size - remainder) if remainder else 0
         
     | 
| 351 | 
         
            +
                partitioned_numel = math.ceil(unpartitioned_numel / world_size)
         
     | 
| 352 | 
         
            +
                return partitioned_numel, padding_numel
         
     | 
| 353 | 
         
            +
             
     | 
| 354 | 
         
            +
             
     | 
| 355 | 
         
            +
            def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
         
     | 
| 356 | 
         
            +
                if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
         
     | 
| 357 | 
         
            +
                    return
         
     | 
| 358 | 
         
            +
             
     | 
| 359 | 
         
            +
                if debug:
         
     | 
| 360 | 
         
            +
                    for i in range(world_size):
         
     | 
| 361 | 
         
            +
                        num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
         
     | 
| 362 | 
         
            +
                        print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
         
     | 
| 363 | 
         
            +
             
     | 
| 364 | 
         
            +
                    frozen_param_shapes = zero_model_states[0].frozen_param_shapes
         
     | 
| 365 | 
         
            +
                    wanted_params = len(frozen_param_shapes)
         
     | 
| 366 | 
         
            +
                    wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
         
     | 
| 367 | 
         
            +
                    avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
         
     | 
| 368 | 
         
            +
                    print(f'Frozen params: Have {avail_numel} numels to process.')
         
     | 
| 369 | 
         
            +
                    print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
         
     | 
| 370 | 
         
            +
             
     | 
| 371 | 
         
            +
                total_params = 0
         
     | 
| 372 | 
         
            +
                total_numel = 0
         
     | 
| 373 | 
         
            +
                for name, shape in zero_model_states[0].frozen_param_shapes.items():
         
     | 
| 374 | 
         
            +
                    total_params += 1
         
     | 
| 375 | 
         
            +
                    unpartitioned_numel = shape.numel()
         
     | 
| 376 | 
         
            +
                    total_numel += unpartitioned_numel
         
     | 
| 377 | 
         
            +
             
     | 
| 378 | 
         
            +
                    param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
         
     | 
| 379 | 
         
            +
                    state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
         
     | 
| 380 | 
         
            +
             
     | 
| 381 | 
         
            +
                    partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
         
     | 
| 382 | 
         
            +
             
     | 
| 383 | 
         
            +
                    if debug:
         
     | 
| 384 | 
         
            +
                        print(
         
     | 
| 385 | 
         
            +
                            f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
         
     | 
| 386 | 
         
            +
                        )
         
     | 
| 387 | 
         
            +
             
     | 
| 388 | 
         
            +
                print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
         
     | 
| 389 | 
         
            +
             
     | 
| 390 | 
         
            +
             
     | 
| 391 | 
         
            +
            class GatheredTensor:
         
     | 
| 392 | 
         
            +
                """
         
     | 
| 393 | 
         
            +
                A pseudo tensor that collects partitioned weights.
         
     | 
| 394 | 
         
            +
                It is more memory efficient when there are multiple groups.
         
     | 
| 395 | 
         
            +
                """
         
     | 
| 396 | 
         
            +
             
     | 
| 397 | 
         
            +
                def __init__(self, flat_groups, flat_groups_offset, offset, partitioned_numel, shape):
         
     | 
| 398 | 
         
            +
                    self.flat_groups = flat_groups
         
     | 
| 399 | 
         
            +
                    self.flat_groups_offset = flat_groups_offset
         
     | 
| 400 | 
         
            +
                    self.offset = offset
         
     | 
| 401 | 
         
            +
                    self.partitioned_numel = partitioned_numel
         
     | 
| 402 | 
         
            +
                    self.shape = shape
         
     | 
| 403 | 
         
            +
                    self.dtype = self.flat_groups[0][0].dtype
         
     | 
| 404 | 
         
            +
             
     | 
| 405 | 
         
            +
                def contiguous(self):
         
     | 
| 406 | 
         
            +
                    """
         
     | 
| 407 | 
         
            +
                    Merge partitioned weights from flat_groups into a single tensor.
         
     | 
| 408 | 
         
            +
                    """
         
     | 
| 409 | 
         
            +
                    end_idx = self.offset + self.partitioned_numel
         
     | 
| 410 | 
         
            +
                    world_size = len(self.flat_groups)
         
     | 
| 411 | 
         
            +
                    pad_flat_param_chunks = []
         
     | 
| 412 | 
         
            +
             
     | 
| 413 | 
         
            +
                    for rank_i in range(world_size):
         
     | 
| 414 | 
         
            +
                        # for each rank, we need to collect weights from related group/groups
         
     | 
| 415 | 
         
            +
                        flat_groups_at_rank_i = self.flat_groups[rank_i]
         
     | 
| 416 | 
         
            +
                        start_group_id = None
         
     | 
| 417 | 
         
            +
                        end_group_id = None
         
     | 
| 418 | 
         
            +
                        for group_id in range(len(self.flat_groups_offset)):
         
     | 
| 419 | 
         
            +
                            if self.flat_groups_offset[group_id] <= self.offset < self.flat_groups_offset[group_id + 1]:
         
     | 
| 420 | 
         
            +
                                start_group_id = group_id
         
     | 
| 421 | 
         
            +
                            if self.flat_groups_offset[group_id] < end_idx <= self.flat_groups_offset[group_id + 1]:
         
     | 
| 422 | 
         
            +
                                end_group_id = group_id
         
     | 
| 423 | 
         
            +
                                break
         
     | 
| 424 | 
         
            +
                        # collect weights from related group/groups
         
     | 
| 425 | 
         
            +
                        for group_id in range(start_group_id, end_group_id + 1):
         
     | 
| 426 | 
         
            +
                            flat_tensor = flat_groups_at_rank_i[group_id]
         
     | 
| 427 | 
         
            +
                            start_offset = self.offset - self.flat_groups_offset[group_id]
         
     | 
| 428 | 
         
            +
                            end_offset = min(end_idx, self.flat_groups_offset[group_id + 1]) - self.flat_groups_offset[group_id]
         
     | 
| 429 | 
         
            +
                            pad_flat_param_chunks.append(flat_tensor[start_offset:end_offset])
         
     | 
| 430 | 
         
            +
             
     | 
| 431 | 
         
            +
                    # collect weights from all ranks
         
     | 
| 432 | 
         
            +
                    pad_flat_param = torch.cat(pad_flat_param_chunks, dim=0)
         
     | 
| 433 | 
         
            +
                    param = pad_flat_param[:self.shape.numel()].view(self.shape).contiguous()
         
     | 
| 434 | 
         
            +
                    return param
         
     | 
| 435 | 
         
            +
             
     | 
| 436 | 
         
            +
             
     | 
| 437 | 
         
            +
            def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
         
     | 
| 438 | 
         
            +
                param_shapes = zero_model_states[0].param_shapes
         
     | 
| 439 | 
         
            +
                avail_numel = sum([flat_group.numel() for flat_group in fp32_flat_groups[0]]) * world_size
         
     | 
| 440 | 
         
            +
             
     | 
| 441 | 
         
            +
                # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
         
     | 
| 442 | 
         
            +
                # param, re-consolidating each param, while dealing with padding if any
         
     | 
| 443 | 
         
            +
             
     | 
| 444 | 
         
            +
                # merge list of dicts, preserving order
         
     | 
| 445 | 
         
            +
                param_shapes = {k: v for d in param_shapes for k, v in d.items()}
         
     | 
| 446 | 
         
            +
             
     | 
| 447 | 
         
            +
                if debug:
         
     | 
| 448 | 
         
            +
                    for i in range(world_size):
         
     | 
| 449 | 
         
            +
                        print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
         
     | 
| 450 | 
         
            +
             
     | 
| 451 | 
         
            +
                    wanted_params = len(param_shapes)
         
     | 
| 452 | 
         
            +
                    wanted_numel = sum(shape.numel() for shape in param_shapes.values())
         
     | 
| 453 | 
         
            +
                    # not asserting if there is a mismatch due to possible padding
         
     | 
| 454 | 
         
            +
                    avail_numel = fp32_flat_groups[0].numel() * world_size
         
     | 
| 455 | 
         
            +
                    print(f"Trainable params: Have {avail_numel} numels to process.")
         
     | 
| 456 | 
         
            +
                    print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
         
     | 
| 457 | 
         
            +
             
     | 
| 458 | 
         
            +
                # params
         
     | 
| 459 | 
         
            +
                # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
         
     | 
| 460 | 
         
            +
                # out-of-core computing solution
         
     | 
| 461 | 
         
            +
                offset = 0
         
     | 
| 462 | 
         
            +
                total_numel = 0
         
     | 
| 463 | 
         
            +
                total_params = 0
         
     | 
| 464 | 
         
            +
                flat_groups_offset = [0] + list(np.cumsum([flat_tensor.numel() for flat_tensor in fp32_flat_groups[0]]))
         
     | 
| 465 | 
         
            +
                for name, shape in tqdm(param_shapes.items(), desc='Gathering sharded weights'):
         
     | 
| 466 | 
         
            +
                    unpartitioned_numel = shape.numel()
         
     | 
| 467 | 
         
            +
                    total_numel += unpartitioned_numel
         
     | 
| 468 | 
         
            +
                    total_params += 1
         
     | 
| 469 | 
         
            +
                    partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
         
     | 
| 470 | 
         
            +
             
     | 
| 471 | 
         
            +
                    if debug:
         
     | 
| 472 | 
         
            +
                        print(
         
     | 
| 473 | 
         
            +
                            f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
         
     | 
| 474 | 
         
            +
                        )
         
     | 
| 475 | 
         
            +
             
     | 
| 476 | 
         
            +
                    # memory efficient tensor
         
     | 
| 477 | 
         
            +
                    tensor = GatheredTensor(fp32_flat_groups, flat_groups_offset, offset, partitioned_numel, shape)
         
     | 
| 478 | 
         
            +
                    state_dict[name] = tensor
         
     | 
| 479 | 
         
            +
                    offset += partitioned_numel
         
     | 
| 480 | 
         
            +
             
     | 
| 481 | 
         
            +
                offset *= world_size
         
     | 
| 482 | 
         
            +
             
     | 
| 483 | 
         
            +
                # Sanity check
         
     | 
| 484 | 
         
            +
                if offset != avail_numel:
         
     | 
| 485 | 
         
            +
                    raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
         
     | 
| 486 | 
         
            +
             
     | 
| 487 | 
         
            +
                print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
         
     | 
| 488 | 
         
            +
             
     | 
| 489 | 
         
            +
             
     | 
| 490 | 
         
            +
            def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
         
     | 
| 491 | 
         
            +
                                                           exclude_frozen_parameters):
         
     | 
| 492 | 
         
            +
                state_dict = OrderedDict()
         
     | 
| 493 | 
         
            +
             
     | 
| 494 | 
         
            +
                # buffers
         
     | 
| 495 | 
         
            +
                buffers = zero_model_states[0].buffers
         
     | 
| 496 | 
         
            +
                state_dict.update(buffers)
         
     | 
| 497 | 
         
            +
                if debug:
         
     | 
| 498 | 
         
            +
                    print(f"added {len(buffers)} buffers")
         
     | 
| 499 | 
         
            +
             
     | 
| 500 | 
         
            +
                if not exclude_frozen_parameters:
         
     | 
| 501 | 
         
            +
                    _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
         
     | 
| 502 | 
         
            +
             
     | 
| 503 | 
         
            +
                _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
         
     | 
| 504 | 
         
            +
             
     | 
| 505 | 
         
            +
                # recover shared parameters
         
     | 
| 506 | 
         
            +
                for pair in zero_model_states[0].shared_params:
         
     | 
| 507 | 
         
            +
                    if pair[1] in state_dict:
         
     | 
| 508 | 
         
            +
                        state_dict[pair[0]] = state_dict[pair[1]]
         
     | 
| 509 | 
         
            +
             
     | 
| 510 | 
         
            +
                return state_dict
         
     | 
| 511 | 
         
            +
             
     | 
| 512 | 
         
            +
             
     | 
| 513 | 
         
            +
            def to_torch_tensor(state_dict, return_empty_tensor=False):
         
     | 
| 514 | 
         
            +
                """
         
     | 
| 515 | 
         
            +
                Convert state_dict of GatheredTensor to torch tensor
         
     | 
| 516 | 
         
            +
                """
         
     | 
| 517 | 
         
            +
                torch_state_dict = {}
         
     | 
| 518 | 
         
            +
                converted_tensors = {}
         
     | 
| 519 | 
         
            +
                for name, tensor in state_dict.items():
         
     | 
| 520 | 
         
            +
                    tensor_id = id(tensor)
         
     | 
| 521 | 
         
            +
                    if tensor_id in converted_tensors:  # shared tensors
         
     | 
| 522 | 
         
            +
                        shared_tensor = torch_state_dict[converted_tensors[tensor_id]]
         
     | 
| 523 | 
         
            +
                        torch_state_dict[name] = shared_tensor
         
     | 
| 524 | 
         
            +
                    else:
         
     | 
| 525 | 
         
            +
                        converted_tensors[tensor_id] = name
         
     | 
| 526 | 
         
            +
                        if return_empty_tensor:
         
     | 
| 527 | 
         
            +
                            torch_state_dict[name] = torch.empty(tensor.shape, dtype=tensor.dtype)
         
     | 
| 528 | 
         
            +
                        else:
         
     | 
| 529 | 
         
            +
                            torch_state_dict[name] = tensor.contiguous()
         
     | 
| 530 | 
         
            +
                return torch_state_dict
         
     | 
| 531 | 
         
            +
             
     | 
| 532 | 
         
            +
             
     | 
| 533 | 
         
            +
            def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
         
     | 
| 534 | 
         
            +
                                                         tag=None,
         
     | 
| 535 | 
         
            +
                                                         exclude_frozen_parameters=False,
         
     | 
| 536 | 
         
            +
                                                         lazy_mode=False):
         
     | 
| 537 | 
         
            +
                """
         
     | 
| 538 | 
         
            +
                Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
         
     | 
| 539 | 
         
            +
                ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
         
     | 
| 540 | 
         
            +
                via a model hub.
         
     | 
| 541 | 
         
            +
             
     | 
| 542 | 
         
            +
                Args:
         
     | 
| 543 | 
         
            +
                    - ``checkpoint_dir``: path to the desired checkpoint folder
         
     | 
| 544 | 
         
            +
                    - ``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``
         
     | 
| 545 | 
         
            +
                    - ``exclude_frozen_parameters``: exclude frozen parameters
         
     | 
| 546 | 
         
            +
                    - ``lazy_mode``: get state_dict in lazy mode. It returns a dict of pesduo tensor instead of torch tensor, which is more memory efficient.
         
     | 
| 547 | 
         
            +
                      Convert the pesduo tensor to torch tensor by ``.contiguous()``
         
     | 
| 548 | 
         
            +
             
     | 
| 549 | 
         
            +
                Returns:
         
     | 
| 550 | 
         
            +
                    - pytorch ``state_dict``
         
     | 
| 551 | 
         
            +
             
     | 
| 552 | 
         
            +
                A typical usage might be ::
         
     | 
| 553 | 
         
            +
             
     | 
| 554 | 
         
            +
                    from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
         
     | 
| 555 | 
         
            +
                    # do the training and checkpoint saving
         
     | 
| 556 | 
         
            +
                    state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
         
     | 
| 557 | 
         
            +
                    model = model.cpu() # move to cpu
         
     | 
| 558 | 
         
            +
                    model.load_state_dict(state_dict)
         
     | 
| 559 | 
         
            +
                    # submit to model hub or save the model to share with others
         
     | 
| 560 | 
         
            +
             
     | 
| 561 | 
         
            +
                In this example the ``model`` will no longer be usable in the deepspeed context of the same
         
     | 
| 562 | 
         
            +
                application. i.e. you will need to re-initialize the deepspeed engine, since
         
     | 
| 563 | 
         
            +
                ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
         
     | 
| 564 | 
         
            +
             
     | 
| 565 | 
         
            +
                If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
         
     | 
| 566 | 
         
            +
             
     | 
| 567 | 
         
            +
                Note: the above usage may not work if your application doesn't have sufficient free CPU memory.
         
     | 
| 568 | 
         
            +
                You may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
         
     | 
| 569 | 
         
            +
                the checkpoint. Or you can load state_dict in lazy mode ::
         
     | 
| 570 | 
         
            +
             
     | 
| 571 | 
         
            +
                    from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
         
     | 
| 572 | 
         
            +
                    state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, lazy_mode=True) # not on cpu
         
     | 
| 573 | 
         
            +
                    for name, lazy_tensor in state_dict.item():
         
     | 
| 574 | 
         
            +
                        tensor = lazy_tensor.contiguous()  # to cpu
         
     | 
| 575 | 
         
            +
                        print(name, tensor)
         
     | 
| 576 | 
         
            +
                        # del tensor to release memory if it no longer in use
         
     | 
| 577 | 
         
            +
                """
         
     | 
| 578 | 
         
            +
                if tag is None:
         
     | 
| 579 | 
         
            +
                    latest_path = os.path.join(checkpoint_dir, 'latest')
         
     | 
| 580 | 
         
            +
                    if os.path.isfile(latest_path):
         
     | 
| 581 | 
         
            +
                        with open(latest_path, 'r') as fd:
         
     | 
| 582 | 
         
            +
                            tag = fd.read().strip()
         
     | 
| 583 | 
         
            +
                    else:
         
     | 
| 584 | 
         
            +
                        raise ValueError(f"Unable to find 'latest' file at {latest_path}")
         
     | 
| 585 | 
         
            +
             
     | 
| 586 | 
         
            +
                ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
         
     | 
| 587 | 
         
            +
             
     | 
| 588 | 
         
            +
                if not os.path.isdir(ds_checkpoint_dir):
         
     | 
| 589 | 
         
            +
                    raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
         
     | 
| 590 | 
         
            +
             
     | 
| 591 | 
         
            +
                state_dict = _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
         
     | 
| 592 | 
         
            +
                if lazy_mode:
         
     | 
| 593 | 
         
            +
                    return state_dict
         
     | 
| 594 | 
         
            +
                else:
         
     | 
| 595 | 
         
            +
                    return to_torch_tensor(state_dict)
         
     | 
| 596 | 
         
            +
             
     | 
| 597 | 
         
            +
             
     | 
| 598 | 
         
            +
            def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir,
         
     | 
| 599 | 
         
            +
                                                           output_dir,
         
     | 
| 600 | 
         
            +
                                                           max_shard_size="5GB",
         
     | 
| 601 | 
         
            +
                                                           safe_serialization=False,
         
     | 
| 602 | 
         
            +
                                                           tag=None,
         
     | 
| 603 | 
         
            +
                                                           exclude_frozen_parameters=False):
         
     | 
| 604 | 
         
            +
                """
         
     | 
| 605 | 
         
            +
                Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
         
     | 
| 606 | 
         
            +
                loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
         
     | 
| 607 | 
         
            +
             
     | 
| 608 | 
         
            +
                Args:
         
     | 
| 609 | 
         
            +
                    - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
         
     | 
| 610 | 
         
            +
                    - ``output_dir``: directory to the pytorch fp32 state_dict output files
         
     | 
| 611 | 
         
            +
                    - ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB
         
     | 
| 612 | 
         
            +
                    - ``safe_serialization``:  whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).
         
     | 
| 613 | 
         
            +
                    - ``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``
         
     | 
| 614 | 
         
            +
                    - ``exclude_frozen_parameters``: exclude frozen parameters
         
     | 
| 615 | 
         
            +
                """
         
     | 
| 616 | 
         
            +
             
     | 
| 617 | 
         
            +
                # Dependency pre-check
         
     | 
| 618 | 
         
            +
                if safe_serialization:
         
     | 
| 619 | 
         
            +
                    try:
         
     | 
| 620 | 
         
            +
                        from safetensors.torch import save_file
         
     | 
| 621 | 
         
            +
                    except ImportError:
         
     | 
| 622 | 
         
            +
                        print('If you want to use `safe_serialization`, please `pip install safetensors`')
         
     | 
| 623 | 
         
            +
                        raise
         
     | 
| 624 | 
         
            +
                if max_shard_size is not None:
         
     | 
| 625 | 
         
            +
                    try:
         
     | 
| 626 | 
         
            +
                        from huggingface_hub import split_torch_state_dict_into_shards
         
     | 
| 627 | 
         
            +
                    except ImportError:
         
     | 
| 628 | 
         
            +
                        print('If you want to use `max_shard_size`, please `pip install huggingface_hub`')
         
     | 
| 629 | 
         
            +
                        raise
         
     | 
| 630 | 
         
            +
             
     | 
| 631 | 
         
            +
                # Convert zero checkpoint to state_dict
         
     | 
| 632 | 
         
            +
                state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
         
     | 
| 633 | 
         
            +
                                                                      tag,
         
     | 
| 634 | 
         
            +
                                                                      exclude_frozen_parameters,
         
     | 
| 635 | 
         
            +
                                                                      lazy_mode=True)
         
     | 
| 636 | 
         
            +
             
     | 
| 637 | 
         
            +
                # Shard the model if it is too big.
         
     | 
| 638 | 
         
            +
                weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin"
         
     | 
| 639 | 
         
            +
                if max_shard_size is not None:
         
     | 
| 640 | 
         
            +
                    filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors")
         
     | 
| 641 | 
         
            +
                    # an memory-efficient approach for sharding
         
     | 
| 642 | 
         
            +
                    empty_state_dict = to_torch_tensor(state_dict, return_empty_tensor=True)
         
     | 
| 643 | 
         
            +
                    state_dict_split = split_torch_state_dict_into_shards(empty_state_dict,
         
     | 
| 644 | 
         
            +
                                                                          filename_pattern=filename_pattern,
         
     | 
| 645 | 
         
            +
                                                                          max_shard_size=max_shard_size)
         
     | 
| 646 | 
         
            +
                else:
         
     | 
| 647 | 
         
            +
                    from collections import namedtuple
         
     | 
| 648 | 
         
            +
                    StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"])
         
     | 
| 649 | 
         
            +
                    state_dict_split = StateDictSplit(is_sharded=False,
         
     | 
| 650 | 
         
            +
                                                      filename_to_tensors={weights_name: list(state_dict.keys())})
         
     | 
| 651 | 
         
            +
             
     | 
| 652 | 
         
            +
                # Save the model by shard
         
     | 
| 653 | 
         
            +
                os.makedirs(output_dir, exist_ok=True)
         
     | 
| 654 | 
         
            +
                filename_to_tensors = state_dict_split.filename_to_tensors.items()
         
     | 
| 655 | 
         
            +
                for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"):
         
     | 
| 656 | 
         
            +
                    shard_state_dict = {tensor_name: state_dict[tensor_name] for tensor_name in tensors}
         
     | 
| 657 | 
         
            +
                    shard_state_dict = to_torch_tensor(shard_state_dict)
         
     | 
| 658 | 
         
            +
                    output_path = os.path.join(output_dir, shard_file)
         
     | 
| 659 | 
         
            +
                    if safe_serialization:
         
     | 
| 660 | 
         
            +
                        save_file(shard_state_dict, output_path, metadata={"format": "pt"})
         
     | 
| 661 | 
         
            +
                    else:
         
     | 
| 662 | 
         
            +
                        torch.save(shard_state_dict, output_path)
         
     | 
| 663 | 
         
            +
                    # release the memory of current shard
         
     | 
| 664 | 
         
            +
                    for tensor_name in list(shard_state_dict.keys()):
         
     | 
| 665 | 
         
            +
                        del state_dict[tensor_name]
         
     | 
| 666 | 
         
            +
                        del shard_state_dict[tensor_name]
         
     | 
| 667 | 
         
            +
                    del shard_state_dict
         
     | 
| 668 | 
         
            +
                    gc.collect()
         
     | 
| 669 | 
         
            +
             
     | 
| 670 | 
         
            +
                # Save index if sharded
         
     | 
| 671 | 
         
            +
                if state_dict_split.is_sharded:
         
     | 
| 672 | 
         
            +
                    index = {
         
     | 
| 673 | 
         
            +
                        "metadata": state_dict_split.metadata,
         
     | 
| 674 | 
         
            +
                        "weight_map": state_dict_split.tensor_to_filename,
         
     | 
| 675 | 
         
            +
                    }
         
     | 
| 676 | 
         
            +
                    save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json"
         
     | 
| 677 | 
         
            +
                    save_index_file = os.path.join(output_dir, save_index_file)
         
     | 
| 678 | 
         
            +
                    with open(save_index_file, "w", encoding="utf-8") as f:
         
     | 
| 679 | 
         
            +
                        content = json.dumps(index, indent=2, sort_keys=True) + "\n"
         
     | 
| 680 | 
         
            +
                        f.write(content)
         
     | 
| 681 | 
         
            +
             
     | 
| 682 | 
         
            +
             
     | 
| 683 | 
         
            +
            def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
         
     | 
| 684 | 
         
            +
                """
         
     | 
| 685 | 
         
            +
                1. Put the provided model to cpu
         
     | 
| 686 | 
         
            +
                2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
         
     | 
| 687 | 
         
            +
                3. Load it into the provided model
         
     | 
| 688 | 
         
            +
             
     | 
| 689 | 
         
            +
                Args:
         
     | 
| 690 | 
         
            +
                    - ``model``: the model object to update
         
     | 
| 691 | 
         
            +
                    - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
         
     | 
| 692 | 
         
            +
                    - ``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``
         
     | 
| 693 | 
         
            +
             
     | 
| 694 | 
         
            +
                Returns:
         
     | 
| 695 | 
         
            +
                    - ``model`: modified model
         
     | 
| 696 | 
         
            +
             
     | 
| 697 | 
         
            +
                Make sure you have plenty of CPU memory available before you call this function. If you don't
         
     | 
| 698 | 
         
            +
                have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
         
     | 
| 699 | 
         
            +
                conveniently placed for you in the checkpoint folder.
         
     | 
| 700 | 
         
            +
             
     | 
| 701 | 
         
            +
                A typical usage might be ::
         
     | 
| 702 | 
         
            +
             
     | 
| 703 | 
         
            +
                    from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
         
     | 
| 704 | 
         
            +
                    model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
         
     | 
| 705 | 
         
            +
                    # submit to model hub or save the model to share with others
         
     | 
| 706 | 
         
            +
             
     | 
| 707 | 
         
            +
                Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
         
     | 
| 708 | 
         
            +
                of the same application. i.e. you will need to re-initialize the deepspeed engine, since
         
     | 
| 709 | 
         
            +
                ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
         
     | 
| 710 | 
         
            +
             
     | 
| 711 | 
         
            +
                """
         
     | 
| 712 | 
         
            +
                logger.info(f"Extracting fp32 weights")
         
     | 
| 713 | 
         
            +
                state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
         
     | 
| 714 | 
         
            +
             
     | 
| 715 | 
         
            +
                logger.info(f"Overwriting model with fp32 weights")
         
     | 
| 716 | 
         
            +
                model = model.cpu()
         
     | 
| 717 | 
         
            +
                model.load_state_dict(state_dict, strict=False)
         
     | 
| 718 | 
         
            +
             
     | 
| 719 | 
         
            +
                return model
         
     | 
| 720 | 
         
            +
             
     | 
| 721 | 
         
            +
             
     | 
| 722 | 
         
            +
            if __name__ == "__main__":
         
     | 
| 723 | 
         
            +
                parser = argparse.ArgumentParser()
         
     | 
| 724 | 
         
            +
                parser.add_argument("checkpoint_dir",
         
     | 
| 725 | 
         
            +
                                    type=str,
         
     | 
| 726 | 
         
            +
                                    help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
         
     | 
| 727 | 
         
            +
                parser.add_argument("output_dir",
         
     | 
| 728 | 
         
            +
                                    type=str,
         
     | 
| 729 | 
         
            +
                                    help="directory to the pytorch fp32 state_dict output files"
         
     | 
| 730 | 
         
            +
                                    "(e.g. path/checkpoint-12-output/)")
         
     | 
| 731 | 
         
            +
                parser.add_argument(
         
     | 
| 732 | 
         
            +
                    "--max_shard_size",
         
     | 
| 733 | 
         
            +
                    type=str,
         
     | 
| 734 | 
         
            +
                    default="5GB",
         
     | 
| 735 | 
         
            +
                    help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size"
         
     | 
| 736 | 
         
            +
                    "lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`"
         
     | 
| 737 | 
         
            +
                    "We default it to 5GB in order for models to be able to run easily on free-tier google colab instances"
         
     | 
| 738 | 
         
            +
                    "without CPU OOM issues.")
         
     | 
| 739 | 
         
            +
                parser.add_argument(
         
     | 
| 740 | 
         
            +
                    "--safe_serialization",
         
     | 
| 741 | 
         
            +
                    default=False,
         
     | 
| 742 | 
         
            +
                    action='store_true',
         
     | 
| 743 | 
         
            +
                    help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).")
         
     | 
| 744 | 
         
            +
                parser.add_argument("-t",
         
     | 
| 745 | 
         
            +
                                    "--tag",
         
     | 
| 746 | 
         
            +
                                    type=str,
         
     | 
| 747 | 
         
            +
                                    default=None,
         
     | 
| 748 | 
         
            +
                                    help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
         
     | 
| 749 | 
         
            +
                parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
         
     | 
| 750 | 
         
            +
                parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
         
     | 
| 751 | 
         
            +
                args = parser.parse_args()
         
     | 
| 752 | 
         
            +
             
     | 
| 753 | 
         
            +
                debug = args.debug
         
     | 
| 754 | 
         
            +
             
     | 
| 755 | 
         
            +
                convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
         
     | 
| 756 | 
         
            +
                                                           args.output_dir,
         
     | 
| 757 | 
         
            +
                                                           max_shard_size=args.max_shard_size,
         
     | 
| 758 | 
         
            +
                                                           safe_serialization=args.safe_serialization,
         
     | 
| 759 | 
         
            +
                                                           tag=args.tag,
         
     | 
| 760 | 
         
            +
                                                           exclude_frozen_parameters=args.exclude_frozen_parameters)
         
     | 
    	
        config.json
    ADDED
    
    | 
         @@ -0,0 +1,28 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            {
         
     | 
| 2 | 
         
            +
              "_name_or_path": "../models/TinyLlama_v1.1/",
         
     | 
| 3 | 
         
            +
              "architectures": [
         
     | 
| 4 | 
         
            +
                "LlamaForCausalLM"
         
     | 
| 5 | 
         
            +
              ],
         
     | 
| 6 | 
         
            +
              "attention_bias": false,
         
     | 
| 7 | 
         
            +
              "attention_dropout": 0.0,
         
     | 
| 8 | 
         
            +
              "bos_token_id": 1,
         
     | 
| 9 | 
         
            +
              "eos_token_id": 2,
         
     | 
| 10 | 
         
            +
              "hidden_act": "silu",
         
     | 
| 11 | 
         
            +
              "hidden_size": 2048,
         
     | 
| 12 | 
         
            +
              "initializer_range": 0.02,
         
     | 
| 13 | 
         
            +
              "intermediate_size": 5632,
         
     | 
| 14 | 
         
            +
              "max_position_embeddings": 2048,
         
     | 
| 15 | 
         
            +
              "model_type": "llama",
         
     | 
| 16 | 
         
            +
              "num_attention_heads": 32,
         
     | 
| 17 | 
         
            +
              "num_hidden_layers": 22,
         
     | 
| 18 | 
         
            +
              "num_key_value_heads": 4,
         
     | 
| 19 | 
         
            +
              "pretraining_tp": 1,
         
     | 
| 20 | 
         
            +
              "rms_norm_eps": 1e-05,
         
     | 
| 21 | 
         
            +
              "rope_scaling": null,
         
     | 
| 22 | 
         
            +
              "rope_theta": 10000.0,
         
     | 
| 23 | 
         
            +
              "tie_word_embeddings": false,
         
     | 
| 24 | 
         
            +
              "torch_dtype": "bfloat16",
         
     | 
| 25 | 
         
            +
              "transformers_version": "4.37.0",
         
     | 
| 26 | 
         
            +
              "use_cache": true,
         
     | 
| 27 | 
         
            +
              "vocab_size": 32001
         
     | 
| 28 | 
         
            +
            }
         
     | 
    	
        generation_config.json
    ADDED
    
    | 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            {
         
     | 
| 2 | 
         
            +
              "bos_token_id": 1,
         
     | 
| 3 | 
         
            +
              "eos_token_id": 2,
         
     | 
| 4 | 
         
            +
              "max_length": 2048,
         
     | 
| 5 | 
         
            +
              "pad_token_id": 0,
         
     | 
| 6 | 
         
            +
              "transformers_version": "4.37.0"
         
     | 
| 7 | 
         
            +
            }
         
     | 
    	
        model.safetensors
    ADDED
    
    | 
         @@ -0,0 +1,3 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            version https://git-lfs.github.com/spec/v1
         
     | 
| 2 | 
         
            +
            oid sha256:386bc2aeb33d853c45e0c966ae8ed98e6966c04a9e181fba003cfafb57a7b33c
         
     | 
| 3 | 
         
            +
            size 2200128056
         
     | 
    	
        runs/events.out.tfevents.1741888807.4814b075da02
    ADDED
    
    | 
         @@ -0,0 +1,3 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            version https://git-lfs.github.com/spec/v1
         
     | 
| 2 | 
         
            +
            oid sha256:10525f33581509af3202561c53489039bc8dab6c0f2f411eda7235f8361ab342
         
     | 
| 3 | 
         
            +
            size 21719
         
     | 
    	
        special_tokens_map.json
    ADDED
    
    | 
         @@ -0,0 +1,30 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            {
         
     | 
| 2 | 
         
            +
              "bos_token": {
         
     | 
| 3 | 
         
            +
                "content": "<s>",
         
     | 
| 4 | 
         
            +
                "lstrip": false,
         
     | 
| 5 | 
         
            +
                "normalized": false,
         
     | 
| 6 | 
         
            +
                "rstrip": false,
         
     | 
| 7 | 
         
            +
                "single_word": false
         
     | 
| 8 | 
         
            +
              },
         
     | 
| 9 | 
         
            +
              "eos_token": {
         
     | 
| 10 | 
         
            +
                "content": "</s>",
         
     | 
| 11 | 
         
            +
                "lstrip": false,
         
     | 
| 12 | 
         
            +
                "normalized": false,
         
     | 
| 13 | 
         
            +
                "rstrip": false,
         
     | 
| 14 | 
         
            +
                "single_word": false
         
     | 
| 15 | 
         
            +
              },
         
     | 
| 16 | 
         
            +
              "pad_token": {
         
     | 
| 17 | 
         
            +
                "content": "[PAD]",
         
     | 
| 18 | 
         
            +
                "lstrip": false,
         
     | 
| 19 | 
         
            +
                "normalized": false,
         
     | 
| 20 | 
         
            +
                "rstrip": false,
         
     | 
| 21 | 
         
            +
                "single_word": false
         
     | 
| 22 | 
         
            +
              },
         
     | 
| 23 | 
         
            +
              "unk_token": {
         
     | 
| 24 | 
         
            +
                "content": "<unk>",
         
     | 
| 25 | 
         
            +
                "lstrip": false,
         
     | 
| 26 | 
         
            +
                "normalized": false,
         
     | 
| 27 | 
         
            +
                "rstrip": false,
         
     | 
| 28 | 
         
            +
                "single_word": false
         
     | 
| 29 | 
         
            +
              }
         
     | 
| 30 | 
         
            +
            }
         
     | 
    	
        tokenizer.model
    ADDED
    
    | 
         @@ -0,0 +1,3 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            version https://git-lfs.github.com/spec/v1
         
     | 
| 2 | 
         
            +
            oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
         
     | 
| 3 | 
         
            +
            size 499723
         
     | 
    	
        tokenizer_config.json
    ADDED
    
    | 
         @@ -0,0 +1,50 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            {
         
     | 
| 2 | 
         
            +
              "add_bos_token": true,
         
     | 
| 3 | 
         
            +
              "add_eos_token": false,
         
     | 
| 4 | 
         
            +
              "added_tokens_decoder": {
         
     | 
| 5 | 
         
            +
                "0": {
         
     | 
| 6 | 
         
            +
                  "content": "<unk>",
         
     | 
| 7 | 
         
            +
                  "lstrip": false,
         
     | 
| 8 | 
         
            +
                  "normalized": false,
         
     | 
| 9 | 
         
            +
                  "rstrip": false,
         
     | 
| 10 | 
         
            +
                  "single_word": false,
         
     | 
| 11 | 
         
            +
                  "special": true
         
     | 
| 12 | 
         
            +
                },
         
     | 
| 13 | 
         
            +
                "1": {
         
     | 
| 14 | 
         
            +
                  "content": "<s>",
         
     | 
| 15 | 
         
            +
                  "lstrip": false,
         
     | 
| 16 | 
         
            +
                  "normalized": false,
         
     | 
| 17 | 
         
            +
                  "rstrip": false,
         
     | 
| 18 | 
         
            +
                  "single_word": false,
         
     | 
| 19 | 
         
            +
                  "special": true
         
     | 
| 20 | 
         
            +
                },
         
     | 
| 21 | 
         
            +
                "2": {
         
     | 
| 22 | 
         
            +
                  "content": "</s>",
         
     | 
| 23 | 
         
            +
                  "lstrip": false,
         
     | 
| 24 | 
         
            +
                  "normalized": false,
         
     | 
| 25 | 
         
            +
                  "rstrip": false,
         
     | 
| 26 | 
         
            +
                  "single_word": false,
         
     | 
| 27 | 
         
            +
                  "special": true
         
     | 
| 28 | 
         
            +
                },
         
     | 
| 29 | 
         
            +
                "32000": {
         
     | 
| 30 | 
         
            +
                  "content": "[PAD]",
         
     | 
| 31 | 
         
            +
                  "lstrip": false,
         
     | 
| 32 | 
         
            +
                  "normalized": false,
         
     | 
| 33 | 
         
            +
                  "rstrip": false,
         
     | 
| 34 | 
         
            +
                  "single_word": false,
         
     | 
| 35 | 
         
            +
                  "special": true
         
     | 
| 36 | 
         
            +
                }
         
     | 
| 37 | 
         
            +
              },
         
     | 
| 38 | 
         
            +
              "bos_token": "<s>",
         
     | 
| 39 | 
         
            +
              "clean_up_tokenization_spaces": false,
         
     | 
| 40 | 
         
            +
              "eos_token": "</s>",
         
     | 
| 41 | 
         
            +
              "legacy": false,
         
     | 
| 42 | 
         
            +
              "model_max_length": 1024,
         
     | 
| 43 | 
         
            +
              "pad_token": "[PAD]",
         
     | 
| 44 | 
         
            +
              "padding_side": "right",
         
     | 
| 45 | 
         
            +
              "sp_model_kwargs": {},
         
     | 
| 46 | 
         
            +
              "spaces_between_special_tokens": false,
         
     | 
| 47 | 
         
            +
              "tokenizer_class": "LlamaTokenizer",
         
     | 
| 48 | 
         
            +
              "unk_token": "<unk>",
         
     | 
| 49 | 
         
            +
              "use_default_system_prompt": false
         
     | 
| 50 | 
         
            +
            }
         
     | 
    	
        trainer_state.json
    ADDED
    
    | 
         @@ -0,0 +1,670 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            {
         
     | 
| 2 | 
         
            +
              "best_metric": 4192.994140625,
         
     | 
| 3 | 
         
            +
              "best_model_checkpoint": "./ckpts/tiny_llama_v1.1/int1-g64/checkpoint-100",
         
     | 
| 4 | 
         
            +
              "epoch": 1.0,
         
     | 
| 5 | 
         
            +
              "eval_steps": 20,
         
     | 
| 6 | 
         
            +
              "global_step": 100,
         
     | 
| 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 | 
         
            +
                  "learning_rate": 0.0,
         
     | 
| 14 | 
         
            +
                  "loss": 11332.127,
         
     | 
| 15 | 
         
            +
                  "step": 1
         
     | 
| 16 | 
         
            +
                },
         
     | 
| 17 | 
         
            +
                {
         
     | 
| 18 | 
         
            +
                  "epoch": 0.02,
         
     | 
| 19 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 20 | 
         
            +
                  "loss": 13003.6738,
         
     | 
| 21 | 
         
            +
                  "step": 2
         
     | 
| 22 | 
         
            +
                },
         
     | 
| 23 | 
         
            +
                {
         
     | 
| 24 | 
         
            +
                  "epoch": 0.03,
         
     | 
| 25 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 26 | 
         
            +
                  "loss": 12640.6924,
         
     | 
| 27 | 
         
            +
                  "step": 3
         
     | 
| 28 | 
         
            +
                },
         
     | 
| 29 | 
         
            +
                {
         
     | 
| 30 | 
         
            +
                  "epoch": 0.04,
         
     | 
| 31 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 32 | 
         
            +
                  "loss": 12323.6543,
         
     | 
| 33 | 
         
            +
                  "step": 4
         
     | 
| 34 | 
         
            +
                },
         
     | 
| 35 | 
         
            +
                {
         
     | 
| 36 | 
         
            +
                  "epoch": 0.05,
         
     | 
| 37 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 38 | 
         
            +
                  "loss": 9819.7383,
         
     | 
| 39 | 
         
            +
                  "step": 5
         
     | 
| 40 | 
         
            +
                },
         
     | 
| 41 | 
         
            +
                {
         
     | 
| 42 | 
         
            +
                  "epoch": 0.06,
         
     | 
| 43 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 44 | 
         
            +
                  "loss": 9137.5908,
         
     | 
| 45 | 
         
            +
                  "step": 6
         
     | 
| 46 | 
         
            +
                },
         
     | 
| 47 | 
         
            +
                {
         
     | 
| 48 | 
         
            +
                  "epoch": 0.07,
         
     | 
| 49 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 50 | 
         
            +
                  "loss": 7284.5757,
         
     | 
| 51 | 
         
            +
                  "step": 7
         
     | 
| 52 | 
         
            +
                },
         
     | 
| 53 | 
         
            +
                {
         
     | 
| 54 | 
         
            +
                  "epoch": 0.08,
         
     | 
| 55 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 56 | 
         
            +
                  "loss": 7775.0503,
         
     | 
| 57 | 
         
            +
                  "step": 8
         
     | 
| 58 | 
         
            +
                },
         
     | 
| 59 | 
         
            +
                {
         
     | 
| 60 | 
         
            +
                  "epoch": 0.09,
         
     | 
| 61 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 62 | 
         
            +
                  "loss": 9720.2578,
         
     | 
| 63 | 
         
            +
                  "step": 9
         
     | 
| 64 | 
         
            +
                },
         
     | 
| 65 | 
         
            +
                {
         
     | 
| 66 | 
         
            +
                  "epoch": 0.1,
         
     | 
| 67 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 68 | 
         
            +
                  "loss": 7152.9434,
         
     | 
| 69 | 
         
            +
                  "step": 10
         
     | 
| 70 | 
         
            +
                },
         
     | 
| 71 | 
         
            +
                {
         
     | 
| 72 | 
         
            +
                  "epoch": 0.11,
         
     | 
| 73 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 74 | 
         
            +
                  "loss": 7262.2422,
         
     | 
| 75 | 
         
            +
                  "step": 11
         
     | 
| 76 | 
         
            +
                },
         
     | 
| 77 | 
         
            +
                {
         
     | 
| 78 | 
         
            +
                  "epoch": 0.12,
         
     | 
| 79 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 80 | 
         
            +
                  "loss": 7487.1406,
         
     | 
| 81 | 
         
            +
                  "step": 12
         
     | 
| 82 | 
         
            +
                },
         
     | 
| 83 | 
         
            +
                {
         
     | 
| 84 | 
         
            +
                  "epoch": 0.13,
         
     | 
| 85 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 86 | 
         
            +
                  "loss": 6070.3867,
         
     | 
| 87 | 
         
            +
                  "step": 13
         
     | 
| 88 | 
         
            +
                },
         
     | 
| 89 | 
         
            +
                {
         
     | 
| 90 | 
         
            +
                  "epoch": 0.14,
         
     | 
| 91 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 92 | 
         
            +
                  "loss": 6826.375,
         
     | 
| 93 | 
         
            +
                  "step": 14
         
     | 
| 94 | 
         
            +
                },
         
     | 
| 95 | 
         
            +
                {
         
     | 
| 96 | 
         
            +
                  "epoch": 0.15,
         
     | 
| 97 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 98 | 
         
            +
                  "loss": 6165.5347,
         
     | 
| 99 | 
         
            +
                  "step": 15
         
     | 
| 100 | 
         
            +
                },
         
     | 
| 101 | 
         
            +
                {
         
     | 
| 102 | 
         
            +
                  "epoch": 0.16,
         
     | 
| 103 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 104 | 
         
            +
                  "loss": 6286.1201,
         
     | 
| 105 | 
         
            +
                  "step": 16
         
     | 
| 106 | 
         
            +
                },
         
     | 
| 107 | 
         
            +
                {
         
     | 
| 108 | 
         
            +
                  "epoch": 0.17,
         
     | 
| 109 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 110 | 
         
            +
                  "loss": 5659.8989,
         
     | 
| 111 | 
         
            +
                  "step": 17
         
     | 
| 112 | 
         
            +
                },
         
     | 
| 113 | 
         
            +
                {
         
     | 
| 114 | 
         
            +
                  "epoch": 0.18,
         
     | 
| 115 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 116 | 
         
            +
                  "loss": 5265.5771,
         
     | 
| 117 | 
         
            +
                  "step": 18
         
     | 
| 118 | 
         
            +
                },
         
     | 
| 119 | 
         
            +
                {
         
     | 
| 120 | 
         
            +
                  "epoch": 0.19,
         
     | 
| 121 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 122 | 
         
            +
                  "loss": 6167.3711,
         
     | 
| 123 | 
         
            +
                  "step": 19
         
     | 
| 124 | 
         
            +
                },
         
     | 
| 125 | 
         
            +
                {
         
     | 
| 126 | 
         
            +
                  "epoch": 0.2,
         
     | 
| 127 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 128 | 
         
            +
                  "loss": 4837.1528,
         
     | 
| 129 | 
         
            +
                  "step": 20
         
     | 
| 130 | 
         
            +
                },
         
     | 
| 131 | 
         
            +
                {
         
     | 
| 132 | 
         
            +
                  "epoch": 0.2,
         
     | 
| 133 | 
         
            +
                  "eval_loss": 5480.544921875,
         
     | 
| 134 | 
         
            +
                  "eval_runtime": 92.2143,
         
     | 
| 135 | 
         
            +
                  "eval_samples_per_second": 17.308,
         
     | 
| 136 | 
         
            +
                  "eval_steps_per_second": 1.084,
         
     | 
| 137 | 
         
            +
                  "step": 20
         
     | 
| 138 | 
         
            +
                },
         
     | 
| 139 | 
         
            +
                {
         
     | 
| 140 | 
         
            +
                  "epoch": 0.21,
         
     | 
| 141 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 142 | 
         
            +
                  "loss": 5657.3369,
         
     | 
| 143 | 
         
            +
                  "step": 21
         
     | 
| 144 | 
         
            +
                },
         
     | 
| 145 | 
         
            +
                {
         
     | 
| 146 | 
         
            +
                  "epoch": 0.22,
         
     | 
| 147 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 148 | 
         
            +
                  "loss": 5309.2593,
         
     | 
| 149 | 
         
            +
                  "step": 22
         
     | 
| 150 | 
         
            +
                },
         
     | 
| 151 | 
         
            +
                {
         
     | 
| 152 | 
         
            +
                  "epoch": 0.23,
         
     | 
| 153 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 154 | 
         
            +
                  "loss": 5365.457,
         
     | 
| 155 | 
         
            +
                  "step": 23
         
     | 
| 156 | 
         
            +
                },
         
     | 
| 157 | 
         
            +
                {
         
     | 
| 158 | 
         
            +
                  "epoch": 0.24,
         
     | 
| 159 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 160 | 
         
            +
                  "loss": 5510.3174,
         
     | 
| 161 | 
         
            +
                  "step": 24
         
     | 
| 162 | 
         
            +
                },
         
     | 
| 163 | 
         
            +
                {
         
     | 
| 164 | 
         
            +
                  "epoch": 0.25,
         
     | 
| 165 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 166 | 
         
            +
                  "loss": 5117.6543,
         
     | 
| 167 | 
         
            +
                  "step": 25
         
     | 
| 168 | 
         
            +
                },
         
     | 
| 169 | 
         
            +
                {
         
     | 
| 170 | 
         
            +
                  "epoch": 0.26,
         
     | 
| 171 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 172 | 
         
            +
                  "loss": 5166.3486,
         
     | 
| 173 | 
         
            +
                  "step": 26
         
     | 
| 174 | 
         
            +
                },
         
     | 
| 175 | 
         
            +
                {
         
     | 
| 176 | 
         
            +
                  "epoch": 0.27,
         
     | 
| 177 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 178 | 
         
            +
                  "loss": 4838.2803,
         
     | 
| 179 | 
         
            +
                  "step": 27
         
     | 
| 180 | 
         
            +
                },
         
     | 
| 181 | 
         
            +
                {
         
     | 
| 182 | 
         
            +
                  "epoch": 0.28,
         
     | 
| 183 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 184 | 
         
            +
                  "loss": 4877.5884,
         
     | 
| 185 | 
         
            +
                  "step": 28
         
     | 
| 186 | 
         
            +
                },
         
     | 
| 187 | 
         
            +
                {
         
     | 
| 188 | 
         
            +
                  "epoch": 0.29,
         
     | 
| 189 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 190 | 
         
            +
                  "loss": 4623.229,
         
     | 
| 191 | 
         
            +
                  "step": 29
         
     | 
| 192 | 
         
            +
                },
         
     | 
| 193 | 
         
            +
                {
         
     | 
| 194 | 
         
            +
                  "epoch": 0.3,
         
     | 
| 195 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 196 | 
         
            +
                  "loss": 4779.0234,
         
     | 
| 197 | 
         
            +
                  "step": 30
         
     | 
| 198 | 
         
            +
                },
         
     | 
| 199 | 
         
            +
                {
         
     | 
| 200 | 
         
            +
                  "epoch": 0.31,
         
     | 
| 201 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 202 | 
         
            +
                  "loss": 5317.6387,
         
     | 
| 203 | 
         
            +
                  "step": 31
         
     | 
| 204 | 
         
            +
                },
         
     | 
| 205 | 
         
            +
                {
         
     | 
| 206 | 
         
            +
                  "epoch": 0.32,
         
     | 
| 207 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 208 | 
         
            +
                  "loss": 4317.855,
         
     | 
| 209 | 
         
            +
                  "step": 32
         
     | 
| 210 | 
         
            +
                },
         
     | 
| 211 | 
         
            +
                {
         
     | 
| 212 | 
         
            +
                  "epoch": 0.33,
         
     | 
| 213 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 214 | 
         
            +
                  "loss": 5043.9761,
         
     | 
| 215 | 
         
            +
                  "step": 33
         
     | 
| 216 | 
         
            +
                },
         
     | 
| 217 | 
         
            +
                {
         
     | 
| 218 | 
         
            +
                  "epoch": 0.34,
         
     | 
| 219 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 220 | 
         
            +
                  "loss": 4491.8066,
         
     | 
| 221 | 
         
            +
                  "step": 34
         
     | 
| 222 | 
         
            +
                },
         
     | 
| 223 | 
         
            +
                {
         
     | 
| 224 | 
         
            +
                  "epoch": 0.35,
         
     | 
| 225 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 226 | 
         
            +
                  "loss": 5415.9023,
         
     | 
| 227 | 
         
            +
                  "step": 35
         
     | 
| 228 | 
         
            +
                },
         
     | 
| 229 | 
         
            +
                {
         
     | 
| 230 | 
         
            +
                  "epoch": 0.36,
         
     | 
| 231 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 232 | 
         
            +
                  "loss": 4991.374,
         
     | 
| 233 | 
         
            +
                  "step": 36
         
     | 
| 234 | 
         
            +
                },
         
     | 
| 235 | 
         
            +
                {
         
     | 
| 236 | 
         
            +
                  "epoch": 0.37,
         
     | 
| 237 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 238 | 
         
            +
                  "loss": 4780.9639,
         
     | 
| 239 | 
         
            +
                  "step": 37
         
     | 
| 240 | 
         
            +
                },
         
     | 
| 241 | 
         
            +
                {
         
     | 
| 242 | 
         
            +
                  "epoch": 0.38,
         
     | 
| 243 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 244 | 
         
            +
                  "loss": 4221.0063,
         
     | 
| 245 | 
         
            +
                  "step": 38
         
     | 
| 246 | 
         
            +
                },
         
     | 
| 247 | 
         
            +
                {
         
     | 
| 248 | 
         
            +
                  "epoch": 0.39,
         
     | 
| 249 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 250 | 
         
            +
                  "loss": 4799.8457,
         
     | 
| 251 | 
         
            +
                  "step": 39
         
     | 
| 252 | 
         
            +
                },
         
     | 
| 253 | 
         
            +
                {
         
     | 
| 254 | 
         
            +
                  "epoch": 0.4,
         
     | 
| 255 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 256 | 
         
            +
                  "loss": 4103.8979,
         
     | 
| 257 | 
         
            +
                  "step": 40
         
     | 
| 258 | 
         
            +
                },
         
     | 
| 259 | 
         
            +
                {
         
     | 
| 260 | 
         
            +
                  "epoch": 0.4,
         
     | 
| 261 | 
         
            +
                  "eval_loss": 4667.49365234375,
         
     | 
| 262 | 
         
            +
                  "eval_runtime": 92.2679,
         
     | 
| 263 | 
         
            +
                  "eval_samples_per_second": 17.297,
         
     | 
| 264 | 
         
            +
                  "eval_steps_per_second": 1.084,
         
     | 
| 265 | 
         
            +
                  "step": 40
         
     | 
| 266 | 
         
            +
                },
         
     | 
| 267 | 
         
            +
                {
         
     | 
| 268 | 
         
            +
                  "epoch": 0.41,
         
     | 
| 269 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 270 | 
         
            +
                  "loss": 4590.7832,
         
     | 
| 271 | 
         
            +
                  "step": 41
         
     | 
| 272 | 
         
            +
                },
         
     | 
| 273 | 
         
            +
                {
         
     | 
| 274 | 
         
            +
                  "epoch": 0.42,
         
     | 
| 275 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 276 | 
         
            +
                  "loss": 4595.626,
         
     | 
| 277 | 
         
            +
                  "step": 42
         
     | 
| 278 | 
         
            +
                },
         
     | 
| 279 | 
         
            +
                {
         
     | 
| 280 | 
         
            +
                  "epoch": 0.43,
         
     | 
| 281 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 282 | 
         
            +
                  "loss": 4715.1865,
         
     | 
| 283 | 
         
            +
                  "step": 43
         
     | 
| 284 | 
         
            +
                },
         
     | 
| 285 | 
         
            +
                {
         
     | 
| 286 | 
         
            +
                  "epoch": 0.44,
         
     | 
| 287 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 288 | 
         
            +
                  "loss": 5100.9668,
         
     | 
| 289 | 
         
            +
                  "step": 44
         
     | 
| 290 | 
         
            +
                },
         
     | 
| 291 | 
         
            +
                {
         
     | 
| 292 | 
         
            +
                  "epoch": 0.45,
         
     | 
| 293 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 294 | 
         
            +
                  "loss": 5335.4043,
         
     | 
| 295 | 
         
            +
                  "step": 45
         
     | 
| 296 | 
         
            +
                },
         
     | 
| 297 | 
         
            +
                {
         
     | 
| 298 | 
         
            +
                  "epoch": 0.46,
         
     | 
| 299 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 300 | 
         
            +
                  "loss": 4065.293,
         
     | 
| 301 | 
         
            +
                  "step": 46
         
     | 
| 302 | 
         
            +
                },
         
     | 
| 303 | 
         
            +
                {
         
     | 
| 304 | 
         
            +
                  "epoch": 0.47,
         
     | 
| 305 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 306 | 
         
            +
                  "loss": 4155.9297,
         
     | 
| 307 | 
         
            +
                  "step": 47
         
     | 
| 308 | 
         
            +
                },
         
     | 
| 309 | 
         
            +
                {
         
     | 
| 310 | 
         
            +
                  "epoch": 0.48,
         
     | 
| 311 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 312 | 
         
            +
                  "loss": 3953.8406,
         
     | 
| 313 | 
         
            +
                  "step": 48
         
     | 
| 314 | 
         
            +
                },
         
     | 
| 315 | 
         
            +
                {
         
     | 
| 316 | 
         
            +
                  "epoch": 0.49,
         
     | 
| 317 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 318 | 
         
            +
                  "loss": 4083.9575,
         
     | 
| 319 | 
         
            +
                  "step": 49
         
     | 
| 320 | 
         
            +
                },
         
     | 
| 321 | 
         
            +
                {
         
     | 
| 322 | 
         
            +
                  "epoch": 0.5,
         
     | 
| 323 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 324 | 
         
            +
                  "loss": 4542.7334,
         
     | 
| 325 | 
         
            +
                  "step": 50
         
     | 
| 326 | 
         
            +
                },
         
     | 
| 327 | 
         
            +
                {
         
     | 
| 328 | 
         
            +
                  "epoch": 0.51,
         
     | 
| 329 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 330 | 
         
            +
                  "loss": 4298.4731,
         
     | 
| 331 | 
         
            +
                  "step": 51
         
     | 
| 332 | 
         
            +
                },
         
     | 
| 333 | 
         
            +
                {
         
     | 
| 334 | 
         
            +
                  "epoch": 0.52,
         
     | 
| 335 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 336 | 
         
            +
                  "loss": 5286.6616,
         
     | 
| 337 | 
         
            +
                  "step": 52
         
     | 
| 338 | 
         
            +
                },
         
     | 
| 339 | 
         
            +
                {
         
     | 
| 340 | 
         
            +
                  "epoch": 0.53,
         
     | 
| 341 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 342 | 
         
            +
                  "loss": 4883.1421,
         
     | 
| 343 | 
         
            +
                  "step": 53
         
     | 
| 344 | 
         
            +
                },
         
     | 
| 345 | 
         
            +
                {
         
     | 
| 346 | 
         
            +
                  "epoch": 0.54,
         
     | 
| 347 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 348 | 
         
            +
                  "loss": 4699.5859,
         
     | 
| 349 | 
         
            +
                  "step": 54
         
     | 
| 350 | 
         
            +
                },
         
     | 
| 351 | 
         
            +
                {
         
     | 
| 352 | 
         
            +
                  "epoch": 0.55,
         
     | 
| 353 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 354 | 
         
            +
                  "loss": 4913.7065,
         
     | 
| 355 | 
         
            +
                  "step": 55
         
     | 
| 356 | 
         
            +
                },
         
     | 
| 357 | 
         
            +
                {
         
     | 
| 358 | 
         
            +
                  "epoch": 0.56,
         
     | 
| 359 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 360 | 
         
            +
                  "loss": 4242.9907,
         
     | 
| 361 | 
         
            +
                  "step": 56
         
     | 
| 362 | 
         
            +
                },
         
     | 
| 363 | 
         
            +
                {
         
     | 
| 364 | 
         
            +
                  "epoch": 0.57,
         
     | 
| 365 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 366 | 
         
            +
                  "loss": 4300.0186,
         
     | 
| 367 | 
         
            +
                  "step": 57
         
     | 
| 368 | 
         
            +
                },
         
     | 
| 369 | 
         
            +
                {
         
     | 
| 370 | 
         
            +
                  "epoch": 0.58,
         
     | 
| 371 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 372 | 
         
            +
                  "loss": 5107.3906,
         
     | 
| 373 | 
         
            +
                  "step": 58
         
     | 
| 374 | 
         
            +
                },
         
     | 
| 375 | 
         
            +
                {
         
     | 
| 376 | 
         
            +
                  "epoch": 0.59,
         
     | 
| 377 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 378 | 
         
            +
                  "loss": 4310.7656,
         
     | 
| 379 | 
         
            +
                  "step": 59
         
     | 
| 380 | 
         
            +
                },
         
     | 
| 381 | 
         
            +
                {
         
     | 
| 382 | 
         
            +
                  "epoch": 0.6,
         
     | 
| 383 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 384 | 
         
            +
                  "loss": 3961.2295,
         
     | 
| 385 | 
         
            +
                  "step": 60
         
     | 
| 386 | 
         
            +
                },
         
     | 
| 387 | 
         
            +
                {
         
     | 
| 388 | 
         
            +
                  "epoch": 0.6,
         
     | 
| 389 | 
         
            +
                  "eval_loss": 4429.16552734375,
         
     | 
| 390 | 
         
            +
                  "eval_runtime": 92.2074,
         
     | 
| 391 | 
         
            +
                  "eval_samples_per_second": 17.309,
         
     | 
| 392 | 
         
            +
                  "eval_steps_per_second": 1.085,
         
     | 
| 393 | 
         
            +
                  "step": 60
         
     | 
| 394 | 
         
            +
                },
         
     | 
| 395 | 
         
            +
                {
         
     | 
| 396 | 
         
            +
                  "epoch": 0.61,
         
     | 
| 397 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 398 | 
         
            +
                  "loss": 4180.4727,
         
     | 
| 399 | 
         
            +
                  "step": 61
         
     | 
| 400 | 
         
            +
                },
         
     | 
| 401 | 
         
            +
                {
         
     | 
| 402 | 
         
            +
                  "epoch": 0.62,
         
     | 
| 403 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 404 | 
         
            +
                  "loss": 4279.3091,
         
     | 
| 405 | 
         
            +
                  "step": 62
         
     | 
| 406 | 
         
            +
                },
         
     | 
| 407 | 
         
            +
                {
         
     | 
| 408 | 
         
            +
                  "epoch": 0.63,
         
     | 
| 409 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 410 | 
         
            +
                  "loss": 4267.8306,
         
     | 
| 411 | 
         
            +
                  "step": 63
         
     | 
| 412 | 
         
            +
                },
         
     | 
| 413 | 
         
            +
                {
         
     | 
| 414 | 
         
            +
                  "epoch": 0.64,
         
     | 
| 415 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 416 | 
         
            +
                  "loss": 4734.5288,
         
     | 
| 417 | 
         
            +
                  "step": 64
         
     | 
| 418 | 
         
            +
                },
         
     | 
| 419 | 
         
            +
                {
         
     | 
| 420 | 
         
            +
                  "epoch": 0.65,
         
     | 
| 421 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 422 | 
         
            +
                  "loss": 4555.5713,
         
     | 
| 423 | 
         
            +
                  "step": 65
         
     | 
| 424 | 
         
            +
                },
         
     | 
| 425 | 
         
            +
                {
         
     | 
| 426 | 
         
            +
                  "epoch": 0.66,
         
     | 
| 427 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 428 | 
         
            +
                  "loss": 3992.9912,
         
     | 
| 429 | 
         
            +
                  "step": 66
         
     | 
| 430 | 
         
            +
                },
         
     | 
| 431 | 
         
            +
                {
         
     | 
| 432 | 
         
            +
                  "epoch": 0.67,
         
     | 
| 433 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 434 | 
         
            +
                  "loss": 4209.2476,
         
     | 
| 435 | 
         
            +
                  "step": 67
         
     | 
| 436 | 
         
            +
                },
         
     | 
| 437 | 
         
            +
                {
         
     | 
| 438 | 
         
            +
                  "epoch": 0.68,
         
     | 
| 439 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 440 | 
         
            +
                  "loss": 4822.8975,
         
     | 
| 441 | 
         
            +
                  "step": 68
         
     | 
| 442 | 
         
            +
                },
         
     | 
| 443 | 
         
            +
                {
         
     | 
| 444 | 
         
            +
                  "epoch": 0.69,
         
     | 
| 445 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 446 | 
         
            +
                  "loss": 4524.1753,
         
     | 
| 447 | 
         
            +
                  "step": 69
         
     | 
| 448 | 
         
            +
                },
         
     | 
| 449 | 
         
            +
                {
         
     | 
| 450 | 
         
            +
                  "epoch": 0.7,
         
     | 
| 451 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 452 | 
         
            +
                  "loss": 4046.7612,
         
     | 
| 453 | 
         
            +
                  "step": 70
         
     | 
| 454 | 
         
            +
                },
         
     | 
| 455 | 
         
            +
                {
         
     | 
| 456 | 
         
            +
                  "epoch": 0.71,
         
     | 
| 457 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 458 | 
         
            +
                  "loss": 4119.7842,
         
     | 
| 459 | 
         
            +
                  "step": 71
         
     | 
| 460 | 
         
            +
                },
         
     | 
| 461 | 
         
            +
                {
         
     | 
| 462 | 
         
            +
                  "epoch": 0.72,
         
     | 
| 463 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 464 | 
         
            +
                  "loss": 4543.3413,
         
     | 
| 465 | 
         
            +
                  "step": 72
         
     | 
| 466 | 
         
            +
                },
         
     | 
| 467 | 
         
            +
                {
         
     | 
| 468 | 
         
            +
                  "epoch": 0.73,
         
     | 
| 469 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 470 | 
         
            +
                  "loss": 4397.4639,
         
     | 
| 471 | 
         
            +
                  "step": 73
         
     | 
| 472 | 
         
            +
                },
         
     | 
| 473 | 
         
            +
                {
         
     | 
| 474 | 
         
            +
                  "epoch": 0.74,
         
     | 
| 475 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 476 | 
         
            +
                  "loss": 4307.0034,
         
     | 
| 477 | 
         
            +
                  "step": 74
         
     | 
| 478 | 
         
            +
                },
         
     | 
| 479 | 
         
            +
                {
         
     | 
| 480 | 
         
            +
                  "epoch": 0.75,
         
     | 
| 481 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 482 | 
         
            +
                  "loss": 4010.03,
         
     | 
| 483 | 
         
            +
                  "step": 75
         
     | 
| 484 | 
         
            +
                },
         
     | 
| 485 | 
         
            +
                {
         
     | 
| 486 | 
         
            +
                  "epoch": 0.76,
         
     | 
| 487 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 488 | 
         
            +
                  "loss": 4285.71,
         
     | 
| 489 | 
         
            +
                  "step": 76
         
     | 
| 490 | 
         
            +
                },
         
     | 
| 491 | 
         
            +
                {
         
     | 
| 492 | 
         
            +
                  "epoch": 0.77,
         
     | 
| 493 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 494 | 
         
            +
                  "loss": 4588.3975,
         
     | 
| 495 | 
         
            +
                  "step": 77
         
     | 
| 496 | 
         
            +
                },
         
     | 
| 497 | 
         
            +
                {
         
     | 
| 498 | 
         
            +
                  "epoch": 0.78,
         
     | 
| 499 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 500 | 
         
            +
                  "loss": 4258.2319,
         
     | 
| 501 | 
         
            +
                  "step": 78
         
     | 
| 502 | 
         
            +
                },
         
     | 
| 503 | 
         
            +
                {
         
     | 
| 504 | 
         
            +
                  "epoch": 0.79,
         
     | 
| 505 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 506 | 
         
            +
                  "loss": 4595.4858,
         
     | 
| 507 | 
         
            +
                  "step": 79
         
     | 
| 508 | 
         
            +
                },
         
     | 
| 509 | 
         
            +
                {
         
     | 
| 510 | 
         
            +
                  "epoch": 0.8,
         
     | 
| 511 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 512 | 
         
            +
                  "loss": 4038.6848,
         
     | 
| 513 | 
         
            +
                  "step": 80
         
     | 
| 514 | 
         
            +
                },
         
     | 
| 515 | 
         
            +
                {
         
     | 
| 516 | 
         
            +
                  "epoch": 0.8,
         
     | 
| 517 | 
         
            +
                  "eval_loss": 4310.54833984375,
         
     | 
| 518 | 
         
            +
                  "eval_runtime": 92.2471,
         
     | 
| 519 | 
         
            +
                  "eval_samples_per_second": 17.301,
         
     | 
| 520 | 
         
            +
                  "eval_steps_per_second": 1.084,
         
     | 
| 521 | 
         
            +
                  "step": 80
         
     | 
| 522 | 
         
            +
                },
         
     | 
| 523 | 
         
            +
                {
         
     | 
| 524 | 
         
            +
                  "epoch": 0.81,
         
     | 
| 525 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 526 | 
         
            +
                  "loss": 4118.8779,
         
     | 
| 527 | 
         
            +
                  "step": 81
         
     | 
| 528 | 
         
            +
                },
         
     | 
| 529 | 
         
            +
                {
         
     | 
| 530 | 
         
            +
                  "epoch": 0.82,
         
     | 
| 531 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 532 | 
         
            +
                  "loss": 4262.9771,
         
     | 
| 533 | 
         
            +
                  "step": 82
         
     | 
| 534 | 
         
            +
                },
         
     | 
| 535 | 
         
            +
                {
         
     | 
| 536 | 
         
            +
                  "epoch": 0.83,
         
     | 
| 537 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 538 | 
         
            +
                  "loss": 4513.5244,
         
     | 
| 539 | 
         
            +
                  "step": 83
         
     | 
| 540 | 
         
            +
                },
         
     | 
| 541 | 
         
            +
                {
         
     | 
| 542 | 
         
            +
                  "epoch": 0.84,
         
     | 
| 543 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 544 | 
         
            +
                  "loss": 4361.1787,
         
     | 
| 545 | 
         
            +
                  "step": 84
         
     | 
| 546 | 
         
            +
                },
         
     | 
| 547 | 
         
            +
                {
         
     | 
| 548 | 
         
            +
                  "epoch": 0.85,
         
     | 
| 549 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 550 | 
         
            +
                  "loss": 4480.5659,
         
     | 
| 551 | 
         
            +
                  "step": 85
         
     | 
| 552 | 
         
            +
                },
         
     | 
| 553 | 
         
            +
                {
         
     | 
| 554 | 
         
            +
                  "epoch": 0.86,
         
     | 
| 555 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 556 | 
         
            +
                  "loss": 3874.5522,
         
     | 
| 557 | 
         
            +
                  "step": 86
         
     | 
| 558 | 
         
            +
                },
         
     | 
| 559 | 
         
            +
                {
         
     | 
| 560 | 
         
            +
                  "epoch": 0.87,
         
     | 
| 561 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 562 | 
         
            +
                  "loss": 4457.2578,
         
     | 
| 563 | 
         
            +
                  "step": 87
         
     | 
| 564 | 
         
            +
                },
         
     | 
| 565 | 
         
            +
                {
         
     | 
| 566 | 
         
            +
                  "epoch": 0.88,
         
     | 
| 567 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 568 | 
         
            +
                  "loss": 4396.7188,
         
     | 
| 569 | 
         
            +
                  "step": 88
         
     | 
| 570 | 
         
            +
                },
         
     | 
| 571 | 
         
            +
                {
         
     | 
| 572 | 
         
            +
                  "epoch": 0.89,
         
     | 
| 573 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 574 | 
         
            +
                  "loss": 3549.261,
         
     | 
| 575 | 
         
            +
                  "step": 89
         
     | 
| 576 | 
         
            +
                },
         
     | 
| 577 | 
         
            +
                {
         
     | 
| 578 | 
         
            +
                  "epoch": 0.9,
         
     | 
| 579 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 580 | 
         
            +
                  "loss": 3747.9395,
         
     | 
| 581 | 
         
            +
                  "step": 90
         
     | 
| 582 | 
         
            +
                },
         
     | 
| 583 | 
         
            +
                {
         
     | 
| 584 | 
         
            +
                  "epoch": 0.91,
         
     | 
| 585 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 586 | 
         
            +
                  "loss": 4490.166,
         
     | 
| 587 | 
         
            +
                  "step": 91
         
     | 
| 588 | 
         
            +
                },
         
     | 
| 589 | 
         
            +
                {
         
     | 
| 590 | 
         
            +
                  "epoch": 0.92,
         
     | 
| 591 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 592 | 
         
            +
                  "loss": 4745.7881,
         
     | 
| 593 | 
         
            +
                  "step": 92
         
     | 
| 594 | 
         
            +
                },
         
     | 
| 595 | 
         
            +
                {
         
     | 
| 596 | 
         
            +
                  "epoch": 0.93,
         
     | 
| 597 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 598 | 
         
            +
                  "loss": 4586.4639,
         
     | 
| 599 | 
         
            +
                  "step": 93
         
     | 
| 600 | 
         
            +
                },
         
     | 
| 601 | 
         
            +
                {
         
     | 
| 602 | 
         
            +
                  "epoch": 0.94,
         
     | 
| 603 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 604 | 
         
            +
                  "loss": 4502.7104,
         
     | 
| 605 | 
         
            +
                  "step": 94
         
     | 
| 606 | 
         
            +
                },
         
     | 
| 607 | 
         
            +
                {
         
     | 
| 608 | 
         
            +
                  "epoch": 0.95,
         
     | 
| 609 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 610 | 
         
            +
                  "loss": 4409.7378,
         
     | 
| 611 | 
         
            +
                  "step": 95
         
     | 
| 612 | 
         
            +
                },
         
     | 
| 613 | 
         
            +
                {
         
     | 
| 614 | 
         
            +
                  "epoch": 0.96,
         
     | 
| 615 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 616 | 
         
            +
                  "loss": 4332.5742,
         
     | 
| 617 | 
         
            +
                  "step": 96
         
     | 
| 618 | 
         
            +
                },
         
     | 
| 619 | 
         
            +
                {
         
     | 
| 620 | 
         
            +
                  "epoch": 0.97,
         
     | 
| 621 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 622 | 
         
            +
                  "loss": 3850.6021,
         
     | 
| 623 | 
         
            +
                  "step": 97
         
     | 
| 624 | 
         
            +
                },
         
     | 
| 625 | 
         
            +
                {
         
     | 
| 626 | 
         
            +
                  "epoch": 0.98,
         
     | 
| 627 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 628 | 
         
            +
                  "loss": 4482.1929,
         
     | 
| 629 | 
         
            +
                  "step": 98
         
     | 
| 630 | 
         
            +
                },
         
     | 
| 631 | 
         
            +
                {
         
     | 
| 632 | 
         
            +
                  "epoch": 0.99,
         
     | 
| 633 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 634 | 
         
            +
                  "loss": 4852.4854,
         
     | 
| 635 | 
         
            +
                  "step": 99
         
     | 
| 636 | 
         
            +
                },
         
     | 
| 637 | 
         
            +
                {
         
     | 
| 638 | 
         
            +
                  "epoch": 1.0,
         
     | 
| 639 | 
         
            +
                  "learning_rate": 2e-05,
         
     | 
| 640 | 
         
            +
                  "loss": 3658.8279,
         
     | 
| 641 | 
         
            +
                  "step": 100
         
     | 
| 642 | 
         
            +
                },
         
     | 
| 643 | 
         
            +
                {
         
     | 
| 644 | 
         
            +
                  "epoch": 1.0,
         
     | 
| 645 | 
         
            +
                  "eval_loss": 4192.994140625,
         
     | 
| 646 | 
         
            +
                  "eval_runtime": 92.249,
         
     | 
| 647 | 
         
            +
                  "eval_samples_per_second": 17.301,
         
     | 
| 648 | 
         
            +
                  "eval_steps_per_second": 1.084,
         
     | 
| 649 | 
         
            +
                  "step": 100
         
     | 
| 650 | 
         
            +
                },
         
     | 
| 651 | 
         
            +
                {
         
     | 
| 652 | 
         
            +
                  "epoch": 1.0,
         
     | 
| 653 | 
         
            +
                  "step": 100,
         
     | 
| 654 | 
         
            +
                  "total_flos": 4.06024900092887e+16,
         
     | 
| 655 | 
         
            +
                  "train_loss": 5245.228693847656,
         
     | 
| 656 | 
         
            +
                  "train_runtime": 1551.7264,
         
     | 
| 657 | 
         
            +
                  "train_samples_per_second": 4.117,
         
     | 
| 658 | 
         
            +
                  "train_steps_per_second": 0.064
         
     | 
| 659 | 
         
            +
                }
         
     | 
| 660 | 
         
            +
              ],
         
     | 
| 661 | 
         
            +
              "logging_steps": 1.0,
         
     | 
| 662 | 
         
            +
              "max_steps": 100,
         
     | 
| 663 | 
         
            +
              "num_input_tokens_seen": 0,
         
     | 
| 664 | 
         
            +
              "num_train_epochs": 1,
         
     | 
| 665 | 
         
            +
              "save_steps": 20,
         
     | 
| 666 | 
         
            +
              "total_flos": 4.06024900092887e+16,
         
     | 
| 667 | 
         
            +
              "train_batch_size": 16,
         
     | 
| 668 | 
         
            +
              "trial_name": null,
         
     | 
| 669 | 
         
            +
              "trial_params": null
         
     | 
| 670 | 
         
            +
            }
         
     | 
    	
        training_args.bin
    ADDED
    
    | 
         @@ -0,0 +1,3 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            version https://git-lfs.github.com/spec/v1
         
     | 
| 2 | 
         
            +
            oid sha256:e3e1dc8cf4cfa08847424d54c60a695326a3385a031956a0c7346067280f630c
         
     | 
| 3 | 
         
            +
            size 6392
         
     |