upload models (3 splits and 2 languages)
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- s1/README.md +9 -0
- s1/adapter_config.json +26 -0
- s1/adapter_model.bin +3 -0
- s1/config.json +44 -0
- s1/global_step16000/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt +3 -0
- s1/global_step16000/mp_rank_00_model_states.pt +3 -0
- s1/latest +1 -0
- s1/non_lora_trainables.bin +3 -0
- s1/rng_state.pth +3 -0
- s1/special_tokens_map.json +24 -0
- s1/tokenizer.model +3 -0
- s1/tokenizer_config.json +35 -0
- s1/trainer_state.json +0 -0
- s1/training_args.bin +3 -0
- s1/zero_to_fp32.py +578 -0
- s1_en/README.md +9 -0
- s1_en/adapter_config.json +26 -0
- s1_en/adapter_model.bin +3 -0
- s1_en/config.json +44 -0
- s1_en/global_step9000/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt +3 -0
- s1_en/global_step9000/mp_rank_00_model_states.pt +3 -0
- s1_en/latest +1 -0
- s1_en/non_lora_trainables.bin +3 -0
- s1_en/rng_state.pth +3 -0
- s1_en/special_tokens_map.json +24 -0
- s1_en/tokenizer.model +3 -0
- s1_en/tokenizer_config.json +35 -0
- s1_en/trainer_state.json +0 -0
- s1_en/training_args.bin +3 -0
- s1_en/zero_to_fp32.py +760 -0
- s2/README.md +9 -0
- s2/adapter_config.json +26 -0
- s2/adapter_model.bin +3 -0
- s2/config.json +44 -0
- s2/global_step6000/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt +3 -0
- s2/global_step6000/mp_rank_00_model_states.pt +3 -0
- s2/latest +1 -0
- s2/non_lora_trainables.bin +3 -0
- s2/rng_state.pth +3 -0
- s2/special_tokens_map.json +24 -0
- s2/tokenizer.model +3 -0
- s2/tokenizer_config.json +35 -0
- s2/trainer_state.json +3616 -0
- s2/training_args.bin +3 -0
- s2/zero_to_fp32.py +578 -0
- s2_en/README.md +9 -0
- s2_en/adapter_config.json +26 -0
- s2_en/adapter_model.bin +3 -0
- s2_en/config.json +44 -0
- s2_en/global_step11000/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt +3 -0
s1/README.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: peft
|
| 3 |
+
---
|
| 4 |
+
## Training procedure
|
| 5 |
+
|
| 6 |
+
### Framework versions
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
- PEFT 0.4.0
|
s1/adapter_config.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"auto_mapping": null,
|
| 3 |
+
"base_model_name_or_path": "liuhaotian/llava-v1.5-7b",
|
| 4 |
+
"bias": "none",
|
| 5 |
+
"fan_in_fan_out": false,
|
| 6 |
+
"inference_mode": true,
|
| 7 |
+
"init_lora_weights": true,
|
| 8 |
+
"layers_pattern": null,
|
| 9 |
+
"layers_to_transform": null,
|
| 10 |
+
"lora_alpha": 256,
|
| 11 |
+
"lora_dropout": 0.05,
|
| 12 |
+
"modules_to_save": null,
|
| 13 |
+
"peft_type": "LORA",
|
| 14 |
+
"r": 128,
|
| 15 |
+
"revision": null,
|
| 16 |
+
"target_modules": [
|
| 17 |
+
"k_proj",
|
| 18 |
+
"up_proj",
|
| 19 |
+
"down_proj",
|
| 20 |
+
"gate_proj",
|
| 21 |
+
"v_proj",
|
| 22 |
+
"q_proj",
|
| 23 |
+
"o_proj"
|
| 24 |
+
],
|
| 25 |
+
"task_type": "CAUSAL_LM"
|
| 26 |
+
}
|
s1/adapter_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1d3febffb0fd3e2a025ce3cb029bebed8acaa25e1000903988aaeb13108c285e
|
| 3 |
+
size 639786637
|
s1/config.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "liuhaotian/llava-v1.5-7b",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"LlavaLlamaForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"bos_token_id": 1,
|
| 7 |
+
"eos_token_id": 2,
|
| 8 |
+
"freeze_mm_mlp_adapter": false,
|
| 9 |
+
"freeze_mm_vision_resampler": false,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 4096,
|
| 12 |
+
"image_aspect_ratio": "pad",
|
| 13 |
+
"image_grid_pinpoints": null,
|
| 14 |
+
"initializer_range": 0.02,
|
| 15 |
+
"intermediate_size": 11008,
|
| 16 |
+
"max_length": 4096,
|
| 17 |
+
"max_position_embeddings": 4096,
|
| 18 |
+
"mm_hidden_size": 1024,
|
| 19 |
+
"mm_projector_lr": 2e-05,
|
| 20 |
+
"mm_projector_type": "mlp2x_gelu",
|
| 21 |
+
"mm_resampler_type": null,
|
| 22 |
+
"mm_use_im_patch_token": false,
|
| 23 |
+
"mm_use_im_start_end": false,
|
| 24 |
+
"mm_vision_select_feature": "patch",
|
| 25 |
+
"mm_vision_select_layer": -2,
|
| 26 |
+
"mm_vision_tower": "openai/clip-vit-large-patch14-336",
|
| 27 |
+
"model_type": "llava",
|
| 28 |
+
"num_attention_heads": 32,
|
| 29 |
+
"num_hidden_layers": 32,
|
| 30 |
+
"num_key_value_heads": 32,
|
| 31 |
+
"pad_token_id": 0,
|
| 32 |
+
"pretraining_tp": 1,
|
| 33 |
+
"rms_norm_eps": 1e-05,
|
| 34 |
+
"rope_scaling": null,
|
| 35 |
+
"tie_word_embeddings": false,
|
| 36 |
+
"torch_dtype": "float16",
|
| 37 |
+
"transformers_version": "4.31.0",
|
| 38 |
+
"tune_mm_mlp_adapter": false,
|
| 39 |
+
"tune_mm_vision_resampler": false,
|
| 40 |
+
"unfreeze_mm_vision_tower": false,
|
| 41 |
+
"use_cache": true,
|
| 42 |
+
"use_mm_proj": true,
|
| 43 |
+
"vocab_size": 32000
|
| 44 |
+
}
|
s1/global_step16000/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:d7f8eef59b5a3c0c4ec6e82319eeef44e4323b2c8ac07d75566dff8a351b157f
|
| 3 |
+
size 4089599575
|
s1/global_step16000/mp_rank_00_model_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d28eb31954dc91f37189a42f4995323cdb662187f21669e7b07705c7ccedd678
|
| 3 |
+
size 28850200126
|
s1/latest
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
global_step16000
|
s1/non_lora_trainables.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b4198193940865ffcf86b34f70405ce8adbc1c0071f1b49d6024360adce75538
|
| 3 |
+
size 41961191
|
s1/rng_state.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1f2b92e3dbbeb0695186b26a8876ed34fe0191fb75d370352321df9b44c28b69
|
| 3 |
+
size 14575
|
s1/special_tokens_map.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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": "<unk>",
|
| 17 |
+
"unk_token": {
|
| 18 |
+
"content": "<unk>",
|
| 19 |
+
"lstrip": false,
|
| 20 |
+
"normalized": false,
|
| 21 |
+
"rstrip": false,
|
| 22 |
+
"single_word": false
|
| 23 |
+
}
|
| 24 |
+
}
|
s1/tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
| 3 |
+
size 499723
|
s1/tokenizer_config.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
+
"bos_token": {
|
| 5 |
+
"__type": "AddedToken",
|
| 6 |
+
"content": "<s>",
|
| 7 |
+
"lstrip": false,
|
| 8 |
+
"normalized": false,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false
|
| 11 |
+
},
|
| 12 |
+
"clean_up_tokenization_spaces": false,
|
| 13 |
+
"eos_token": {
|
| 14 |
+
"__type": "AddedToken",
|
| 15 |
+
"content": "</s>",
|
| 16 |
+
"lstrip": false,
|
| 17 |
+
"normalized": false,
|
| 18 |
+
"rstrip": false,
|
| 19 |
+
"single_word": false
|
| 20 |
+
},
|
| 21 |
+
"legacy": false,
|
| 22 |
+
"model_max_length": 2048,
|
| 23 |
+
"pad_token": null,
|
| 24 |
+
"padding_side": "right",
|
| 25 |
+
"sp_model_kwargs": {},
|
| 26 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 27 |
+
"unk_token": {
|
| 28 |
+
"__type": "AddedToken",
|
| 29 |
+
"content": "<unk>",
|
| 30 |
+
"lstrip": false,
|
| 31 |
+
"normalized": false,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false
|
| 34 |
+
}
|
| 35 |
+
}
|
s1/trainer_state.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
s1/training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:87f1ffd8be10f016d5b0f1117c5a9d55c37250231e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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 2 and 3 DeepSpeed checkpoints. It gets
|
| 9 |
+
# copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
|
| 10 |
+
# the future. Once extracted, the weights don't require DeepSpeed and can be used in any
|
| 11 |
+
# application.
|
| 12 |
+
#
|
| 13 |
+
# example: python zero_to_fp32.py . pytorch_model.bin
|
| 14 |
+
|
| 15 |
+
import argparse
|
| 16 |
+
import torch
|
| 17 |
+
import glob
|
| 18 |
+
import math
|
| 19 |
+
import os
|
| 20 |
+
import re
|
| 21 |
+
from collections import OrderedDict
|
| 22 |
+
from dataclasses import dataclass
|
| 23 |
+
|
| 24 |
+
# while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
|
| 25 |
+
# DeepSpeed data structures it has to be available in the current python environment.
|
| 26 |
+
from deepspeed.utils import logger
|
| 27 |
+
from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
|
| 28 |
+
FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
|
| 29 |
+
FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
@dataclass
|
| 33 |
+
class zero_model_state:
|
| 34 |
+
buffers: dict()
|
| 35 |
+
param_shapes: dict()
|
| 36 |
+
shared_params: list
|
| 37 |
+
ds_version: int
|
| 38 |
+
frozen_param_shapes: dict()
|
| 39 |
+
frozen_param_fragments: dict()
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
debug = 0
|
| 43 |
+
|
| 44 |
+
# load to cpu
|
| 45 |
+
device = torch.device('cpu')
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
def atoi(text):
|
| 49 |
+
return int(text) if text.isdigit() else text
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
def natural_keys(text):
|
| 53 |
+
'''
|
| 54 |
+
alist.sort(key=natural_keys) sorts in human order
|
| 55 |
+
http://nedbatchelder.com/blog/200712/human_sorting.html
|
| 56 |
+
(See Toothy's implementation in the comments)
|
| 57 |
+
'''
|
| 58 |
+
return [atoi(c) for c in re.split(r'(\d+)', text)]
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
def get_model_state_file(checkpoint_dir, zero_stage):
|
| 62 |
+
if not os.path.isdir(checkpoint_dir):
|
| 63 |
+
raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
|
| 64 |
+
|
| 65 |
+
# there should be only one file
|
| 66 |
+
if zero_stage == 2:
|
| 67 |
+
file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
|
| 68 |
+
elif zero_stage == 3:
|
| 69 |
+
file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
|
| 70 |
+
|
| 71 |
+
if not os.path.exists(file):
|
| 72 |
+
raise FileNotFoundError(f"can't find model states file at '{file}'")
|
| 73 |
+
|
| 74 |
+
return file
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
def get_checkpoint_files(checkpoint_dir, glob_pattern):
|
| 78 |
+
# XXX: need to test that this simple glob rule works for multi-node setup too
|
| 79 |
+
ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
|
| 80 |
+
|
| 81 |
+
if len(ckpt_files) == 0:
|
| 82 |
+
raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
|
| 83 |
+
|
| 84 |
+
return ckpt_files
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
def get_optim_files(checkpoint_dir):
|
| 88 |
+
return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
def get_model_state_files(checkpoint_dir):
|
| 92 |
+
return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
def parse_model_states(files):
|
| 96 |
+
zero_model_states = []
|
| 97 |
+
for file in files:
|
| 98 |
+
state_dict = torch.load(file, map_location=device)
|
| 99 |
+
|
| 100 |
+
if BUFFER_NAMES not in state_dict:
|
| 101 |
+
raise ValueError(f"{file} is not a model state checkpoint")
|
| 102 |
+
buffer_names = state_dict[BUFFER_NAMES]
|
| 103 |
+
if debug:
|
| 104 |
+
print("Found buffers:", buffer_names)
|
| 105 |
+
|
| 106 |
+
# recover just the buffers while restoring them to fp32 if they were saved in fp16
|
| 107 |
+
buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
|
| 108 |
+
param_shapes = state_dict[PARAM_SHAPES]
|
| 109 |
+
|
| 110 |
+
# collect parameters that are included in param_shapes
|
| 111 |
+
param_names = []
|
| 112 |
+
for s in param_shapes:
|
| 113 |
+
for name in s.keys():
|
| 114 |
+
param_names.append(name)
|
| 115 |
+
|
| 116 |
+
# update with frozen parameters
|
| 117 |
+
frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
|
| 118 |
+
if frozen_param_shapes is not None:
|
| 119 |
+
if debug:
|
| 120 |
+
print(f"Found frozen_param_shapes: {frozen_param_shapes}")
|
| 121 |
+
param_names += list(frozen_param_shapes.keys())
|
| 122 |
+
|
| 123 |
+
# handle shared params
|
| 124 |
+
shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
|
| 125 |
+
|
| 126 |
+
ds_version = state_dict.get(DS_VERSION, None)
|
| 127 |
+
|
| 128 |
+
frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
|
| 129 |
+
|
| 130 |
+
z_model_state = zero_model_state(buffers=buffers,
|
| 131 |
+
param_shapes=param_shapes,
|
| 132 |
+
shared_params=shared_params,
|
| 133 |
+
ds_version=ds_version,
|
| 134 |
+
frozen_param_shapes=frozen_param_shapes,
|
| 135 |
+
frozen_param_fragments=frozen_param_fragments)
|
| 136 |
+
zero_model_states.append(z_model_state)
|
| 137 |
+
|
| 138 |
+
return zero_model_states
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
def parse_optim_states(files, ds_checkpoint_dir):
|
| 142 |
+
|
| 143 |
+
total_files = len(files)
|
| 144 |
+
state_dicts = []
|
| 145 |
+
for f in files:
|
| 146 |
+
state_dicts.append(torch.load(f, map_location=device))
|
| 147 |
+
|
| 148 |
+
if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:
|
| 149 |
+
raise ValueError(f"{files[0]} is not a zero checkpoint")
|
| 150 |
+
zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
|
| 151 |
+
world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
|
| 152 |
+
|
| 153 |
+
# For ZeRO-2 each param group can have different partition_count as data parallelism for expert
|
| 154 |
+
# parameters can be different from data parallelism for non-expert parameters. So we can just
|
| 155 |
+
# use the max of the partition_count to get the dp world_size.
|
| 156 |
+
|
| 157 |
+
if type(world_size) is list:
|
| 158 |
+
world_size = max(world_size)
|
| 159 |
+
|
| 160 |
+
if world_size != total_files:
|
| 161 |
+
raise ValueError(
|
| 162 |
+
f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
|
| 163 |
+
"Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
|
| 164 |
+
)
|
| 165 |
+
|
| 166 |
+
# the groups are named differently in each stage
|
| 167 |
+
if zero_stage == 2:
|
| 168 |
+
fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
|
| 169 |
+
elif zero_stage == 3:
|
| 170 |
+
fp32_groups_key = FP32_FLAT_GROUPS
|
| 171 |
+
else:
|
| 172 |
+
raise ValueError(f"unknown zero stage {zero_stage}")
|
| 173 |
+
|
| 174 |
+
if zero_stage == 2:
|
| 175 |
+
fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
|
| 176 |
+
elif zero_stage == 3:
|
| 177 |
+
# if there is more than one param group, there will be multiple flattened tensors - one
|
| 178 |
+
# flattened tensor per group - for simplicity merge them into a single tensor
|
| 179 |
+
#
|
| 180 |
+
# XXX: could make the script more memory efficient for when there are multiple groups - it
|
| 181 |
+
# will require matching the sub-lists of param_shapes for each param group flattened tensor
|
| 182 |
+
|
| 183 |
+
fp32_flat_groups = [
|
| 184 |
+
torch.cat(state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key], 0) for i in range(len(state_dicts))
|
| 185 |
+
]
|
| 186 |
+
|
| 187 |
+
return zero_stage, world_size, fp32_flat_groups
|
| 188 |
+
|
| 189 |
+
|
| 190 |
+
def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir):
|
| 191 |
+
"""
|
| 192 |
+
Returns fp32 state_dict reconstructed from ds checkpoint
|
| 193 |
+
|
| 194 |
+
Args:
|
| 195 |
+
- ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
|
| 196 |
+
|
| 197 |
+
"""
|
| 198 |
+
print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
|
| 199 |
+
|
| 200 |
+
optim_files = get_optim_files(ds_checkpoint_dir)
|
| 201 |
+
zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
|
| 202 |
+
print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
|
| 203 |
+
|
| 204 |
+
model_files = get_model_state_files(ds_checkpoint_dir)
|
| 205 |
+
|
| 206 |
+
zero_model_states = parse_model_states(model_files)
|
| 207 |
+
print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
|
| 208 |
+
|
| 209 |
+
if zero_stage == 2:
|
| 210 |
+
return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states)
|
| 211 |
+
elif zero_stage == 3:
|
| 212 |
+
return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states)
|
| 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 _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
|
| 248 |
+
param_shapes = zero_model_states[0].param_shapes
|
| 249 |
+
|
| 250 |
+
# Reconstruction protocol:
|
| 251 |
+
#
|
| 252 |
+
# XXX: document this
|
| 253 |
+
|
| 254 |
+
if debug:
|
| 255 |
+
for i in range(world_size):
|
| 256 |
+
for j in range(len(fp32_flat_groups[0])):
|
| 257 |
+
print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
|
| 258 |
+
|
| 259 |
+
# XXX: memory usage doubles here (zero2)
|
| 260 |
+
num_param_groups = len(fp32_flat_groups[0])
|
| 261 |
+
merged_single_partition_of_fp32_groups = []
|
| 262 |
+
for i in range(num_param_groups):
|
| 263 |
+
merged_partitions = [sd[i] for sd in fp32_flat_groups]
|
| 264 |
+
full_single_fp32_vector = torch.cat(merged_partitions, 0)
|
| 265 |
+
merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
|
| 266 |
+
avail_numel = sum(
|
| 267 |
+
[full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
|
| 268 |
+
|
| 269 |
+
if debug:
|
| 270 |
+
wanted_params = sum([len(shapes) for shapes in param_shapes])
|
| 271 |
+
wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
|
| 272 |
+
# not asserting if there is a mismatch due to possible padding
|
| 273 |
+
print(f"Have {avail_numel} numels to process.")
|
| 274 |
+
print(f"Need {wanted_numel} numels in {wanted_params} params.")
|
| 275 |
+
|
| 276 |
+
# params
|
| 277 |
+
# XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
|
| 278 |
+
# out-of-core computing solution
|
| 279 |
+
total_numel = 0
|
| 280 |
+
total_params = 0
|
| 281 |
+
for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
|
| 282 |
+
offset = 0
|
| 283 |
+
avail_numel = full_single_fp32_vector.numel()
|
| 284 |
+
for name, shape in shapes.items():
|
| 285 |
+
|
| 286 |
+
unpartitioned_numel = shape.numel()
|
| 287 |
+
total_numel += unpartitioned_numel
|
| 288 |
+
total_params += 1
|
| 289 |
+
|
| 290 |
+
if debug:
|
| 291 |
+
print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
|
| 292 |
+
state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
|
| 293 |
+
offset += unpartitioned_numel
|
| 294 |
+
|
| 295 |
+
# Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
|
| 296 |
+
# avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
|
| 297 |
+
# paddings performed in the code it's almost impossible to predict the exact numbers w/o the
|
| 298 |
+
# live optimizer object, so we are checking that the numbers are within the right range
|
| 299 |
+
align_to = 2 * world_size
|
| 300 |
+
|
| 301 |
+
def zero2_align(x):
|
| 302 |
+
return align_to * math.ceil(x / align_to)
|
| 303 |
+
|
| 304 |
+
if debug:
|
| 305 |
+
print(f"original offset={offset}, avail_numel={avail_numel}")
|
| 306 |
+
|
| 307 |
+
offset = zero2_align(offset)
|
| 308 |
+
avail_numel = zero2_align(avail_numel)
|
| 309 |
+
|
| 310 |
+
if debug:
|
| 311 |
+
print(f"aligned offset={offset}, avail_numel={avail_numel}")
|
| 312 |
+
|
| 313 |
+
# Sanity check
|
| 314 |
+
if offset != avail_numel:
|
| 315 |
+
raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
|
| 316 |
+
|
| 317 |
+
print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
|
| 318 |
+
|
| 319 |
+
|
| 320 |
+
def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states):
|
| 321 |
+
state_dict = OrderedDict()
|
| 322 |
+
|
| 323 |
+
# buffers
|
| 324 |
+
buffers = zero_model_states[0].buffers
|
| 325 |
+
state_dict.update(buffers)
|
| 326 |
+
if debug:
|
| 327 |
+
print(f"added {len(buffers)} buffers")
|
| 328 |
+
|
| 329 |
+
_zero2_merge_frozen_params(state_dict, zero_model_states)
|
| 330 |
+
|
| 331 |
+
_zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
|
| 332 |
+
|
| 333 |
+
# recover shared parameters
|
| 334 |
+
for pair in zero_model_states[0].shared_params:
|
| 335 |
+
if pair[1] in state_dict:
|
| 336 |
+
state_dict[pair[0]] = state_dict[pair[1]]
|
| 337 |
+
|
| 338 |
+
return state_dict
|
| 339 |
+
|
| 340 |
+
|
| 341 |
+
def zero3_partitioned_param_info(unpartitioned_numel, world_size):
|
| 342 |
+
remainder = unpartitioned_numel % world_size
|
| 343 |
+
padding_numel = (world_size - remainder) if remainder else 0
|
| 344 |
+
partitioned_numel = math.ceil(unpartitioned_numel / world_size)
|
| 345 |
+
return partitioned_numel, padding_numel
|
| 346 |
+
|
| 347 |
+
|
| 348 |
+
def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
|
| 349 |
+
if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
|
| 350 |
+
return
|
| 351 |
+
|
| 352 |
+
if debug:
|
| 353 |
+
for i in range(world_size):
|
| 354 |
+
num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
|
| 355 |
+
print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
|
| 356 |
+
|
| 357 |
+
frozen_param_shapes = zero_model_states[0].frozen_param_shapes
|
| 358 |
+
wanted_params = len(frozen_param_shapes)
|
| 359 |
+
wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
|
| 360 |
+
avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
|
| 361 |
+
print(f'Frozen params: Have {avail_numel} numels to process.')
|
| 362 |
+
print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
|
| 363 |
+
|
| 364 |
+
total_params = 0
|
| 365 |
+
total_numel = 0
|
| 366 |
+
for name, shape in zero_model_states[0].frozen_param_shapes.items():
|
| 367 |
+
total_params += 1
|
| 368 |
+
unpartitioned_numel = shape.numel()
|
| 369 |
+
total_numel += unpartitioned_numel
|
| 370 |
+
|
| 371 |
+
param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
|
| 372 |
+
state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
|
| 373 |
+
|
| 374 |
+
partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
|
| 375 |
+
|
| 376 |
+
if debug:
|
| 377 |
+
print(
|
| 378 |
+
f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
|
| 379 |
+
)
|
| 380 |
+
|
| 381 |
+
print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
|
| 382 |
+
|
| 383 |
+
|
| 384 |
+
def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
|
| 385 |
+
param_shapes = zero_model_states[0].param_shapes
|
| 386 |
+
avail_numel = fp32_flat_groups[0].numel() * world_size
|
| 387 |
+
# Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
|
| 388 |
+
# param, re-consolidating each param, while dealing with padding if any
|
| 389 |
+
|
| 390 |
+
# merge list of dicts, preserving order
|
| 391 |
+
param_shapes = {k: v for d in param_shapes for k, v in d.items()}
|
| 392 |
+
|
| 393 |
+
if debug:
|
| 394 |
+
for i in range(world_size):
|
| 395 |
+
print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
|
| 396 |
+
|
| 397 |
+
wanted_params = len(param_shapes)
|
| 398 |
+
wanted_numel = sum(shape.numel() for shape in param_shapes.values())
|
| 399 |
+
# not asserting if there is a mismatch due to possible padding
|
| 400 |
+
avail_numel = fp32_flat_groups[0].numel() * world_size
|
| 401 |
+
print(f"Trainable params: Have {avail_numel} numels to process.")
|
| 402 |
+
print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
|
| 403 |
+
|
| 404 |
+
# params
|
| 405 |
+
# XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
|
| 406 |
+
# out-of-core computing solution
|
| 407 |
+
offset = 0
|
| 408 |
+
total_numel = 0
|
| 409 |
+
total_params = 0
|
| 410 |
+
for name, shape in param_shapes.items():
|
| 411 |
+
|
| 412 |
+
unpartitioned_numel = shape.numel()
|
| 413 |
+
total_numel += unpartitioned_numel
|
| 414 |
+
total_params += 1
|
| 415 |
+
|
| 416 |
+
partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
|
| 417 |
+
|
| 418 |
+
if debug:
|
| 419 |
+
print(
|
| 420 |
+
f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
|
| 421 |
+
)
|
| 422 |
+
|
| 423 |
+
# XXX: memory usage doubles here
|
| 424 |
+
state_dict[name] = torch.cat(
|
| 425 |
+
tuple(fp32_flat_groups[i].narrow(0, offset, partitioned_numel) for i in range(world_size)),
|
| 426 |
+
0).narrow(0, 0, unpartitioned_numel).view(shape)
|
| 427 |
+
offset += partitioned_numel
|
| 428 |
+
|
| 429 |
+
offset *= world_size
|
| 430 |
+
|
| 431 |
+
# Sanity check
|
| 432 |
+
if offset != avail_numel:
|
| 433 |
+
raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
|
| 434 |
+
|
| 435 |
+
print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
|
| 436 |
+
|
| 437 |
+
|
| 438 |
+
def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states):
|
| 439 |
+
state_dict = OrderedDict()
|
| 440 |
+
|
| 441 |
+
# buffers
|
| 442 |
+
buffers = zero_model_states[0].buffers
|
| 443 |
+
state_dict.update(buffers)
|
| 444 |
+
if debug:
|
| 445 |
+
print(f"added {len(buffers)} buffers")
|
| 446 |
+
|
| 447 |
+
_zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
|
| 448 |
+
|
| 449 |
+
_zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
|
| 450 |
+
|
| 451 |
+
# recover shared parameters
|
| 452 |
+
for pair in zero_model_states[0].shared_params:
|
| 453 |
+
if pair[1] in state_dict:
|
| 454 |
+
state_dict[pair[0]] = state_dict[pair[1]]
|
| 455 |
+
|
| 456 |
+
return state_dict
|
| 457 |
+
|
| 458 |
+
|
| 459 |
+
def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag=None):
|
| 460 |
+
"""
|
| 461 |
+
Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
|
| 462 |
+
``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
|
| 463 |
+
via a model hub.
|
| 464 |
+
|
| 465 |
+
Args:
|
| 466 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder
|
| 467 |
+
- ``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``
|
| 468 |
+
|
| 469 |
+
Returns:
|
| 470 |
+
- pytorch ``state_dict``
|
| 471 |
+
|
| 472 |
+
Note: this approach may not work if your application doesn't have sufficient free CPU memory and
|
| 473 |
+
you may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
|
| 474 |
+
the checkpoint.
|
| 475 |
+
|
| 476 |
+
A typical usage might be ::
|
| 477 |
+
|
| 478 |
+
from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
|
| 479 |
+
# do the training and checkpoint saving
|
| 480 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
|
| 481 |
+
model = model.cpu() # move to cpu
|
| 482 |
+
model.load_state_dict(state_dict)
|
| 483 |
+
# submit to model hub or save the model to share with others
|
| 484 |
+
|
| 485 |
+
In this example the ``model`` will no longer be usable in the deepspeed context of the same
|
| 486 |
+
application. i.e. you will need to re-initialize the deepspeed engine, since
|
| 487 |
+
``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
|
| 488 |
+
|
| 489 |
+
If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
|
| 490 |
+
|
| 491 |
+
"""
|
| 492 |
+
if tag is None:
|
| 493 |
+
latest_path = os.path.join(checkpoint_dir, 'latest')
|
| 494 |
+
if os.path.isfile(latest_path):
|
| 495 |
+
with open(latest_path, 'r') as fd:
|
| 496 |
+
tag = fd.read().strip()
|
| 497 |
+
else:
|
| 498 |
+
raise ValueError(f"Unable to find 'latest' file at {latest_path}")
|
| 499 |
+
|
| 500 |
+
ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
|
| 501 |
+
|
| 502 |
+
if not os.path.isdir(ds_checkpoint_dir):
|
| 503 |
+
raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
|
| 504 |
+
|
| 505 |
+
return _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir)
|
| 506 |
+
|
| 507 |
+
|
| 508 |
+
def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir, output_file, tag=None):
|
| 509 |
+
"""
|
| 510 |
+
Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
|
| 511 |
+
loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
|
| 512 |
+
|
| 513 |
+
Args:
|
| 514 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
|
| 515 |
+
- ``output_file``: path to the pytorch fp32 state_dict output file (e.g. path/pytorch_model.bin)
|
| 516 |
+
- ``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``
|
| 517 |
+
"""
|
| 518 |
+
|
| 519 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
|
| 520 |
+
print(f"Saving fp32 state dict to {output_file}")
|
| 521 |
+
torch.save(state_dict, output_file)
|
| 522 |
+
|
| 523 |
+
|
| 524 |
+
def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
|
| 525 |
+
"""
|
| 526 |
+
1. Put the provided model to cpu
|
| 527 |
+
2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
|
| 528 |
+
3. Load it into the provided model
|
| 529 |
+
|
| 530 |
+
Args:
|
| 531 |
+
- ``model``: the model object to update
|
| 532 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
|
| 533 |
+
- ``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``
|
| 534 |
+
|
| 535 |
+
Returns:
|
| 536 |
+
- ``model`: modified model
|
| 537 |
+
|
| 538 |
+
Make sure you have plenty of CPU memory available before you call this function. If you don't
|
| 539 |
+
have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
|
| 540 |
+
conveniently placed for you in the checkpoint folder.
|
| 541 |
+
|
| 542 |
+
A typical usage might be ::
|
| 543 |
+
|
| 544 |
+
from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
|
| 545 |
+
model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
|
| 546 |
+
# submit to model hub or save the model to share with others
|
| 547 |
+
|
| 548 |
+
Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
|
| 549 |
+
of the same application. i.e. you will need to re-initialize the deepspeed engine, since
|
| 550 |
+
``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
|
| 551 |
+
|
| 552 |
+
"""
|
| 553 |
+
logger.info(f"Extracting fp32 weights")
|
| 554 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
|
| 555 |
+
|
| 556 |
+
logger.info(f"Overwriting model with fp32 weights")
|
| 557 |
+
model = model.cpu()
|
| 558 |
+
model.load_state_dict(state_dict, strict=False)
|
| 559 |
+
|
| 560 |
+
return model
|
| 561 |
+
|
| 562 |
+
|
| 563 |
+
if __name__ == "__main__":
|
| 564 |
+
|
| 565 |
+
parser = argparse.ArgumentParser()
|
| 566 |
+
parser.add_argument("checkpoint_dir",
|
| 567 |
+
type=str,
|
| 568 |
+
help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
|
| 569 |
+
parser.add_argument(
|
| 570 |
+
"output_file",
|
| 571 |
+
type=str,
|
| 572 |
+
help="path to the pytorch fp32 state_dict output file (e.g. path/checkpoint-12/pytorch_model.bin)")
|
| 573 |
+
parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
|
| 574 |
+
args = parser.parse_args()
|
| 575 |
+
|
| 576 |
+
debug = args.debug
|
| 577 |
+
|
| 578 |
+
convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir, args.output_file)
|
s1_en/README.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: peft
|
| 3 |
+
---
|
| 4 |
+
## Training procedure
|
| 5 |
+
|
| 6 |
+
### Framework versions
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
- PEFT 0.4.0
|
s1_en/adapter_config.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"auto_mapping": null,
|
| 3 |
+
"base_model_name_or_path": "liuhaotian/llava-v1.5-7b",
|
| 4 |
+
"bias": "none",
|
| 5 |
+
"fan_in_fan_out": false,
|
| 6 |
+
"inference_mode": true,
|
| 7 |
+
"init_lora_weights": true,
|
| 8 |
+
"layers_pattern": null,
|
| 9 |
+
"layers_to_transform": null,
|
| 10 |
+
"lora_alpha": 256,
|
| 11 |
+
"lora_dropout": 0.05,
|
| 12 |
+
"modules_to_save": null,
|
| 13 |
+
"peft_type": "LORA",
|
| 14 |
+
"r": 128,
|
| 15 |
+
"revision": null,
|
| 16 |
+
"target_modules": [
|
| 17 |
+
"o_proj",
|
| 18 |
+
"gate_proj",
|
| 19 |
+
"k_proj",
|
| 20 |
+
"up_proj",
|
| 21 |
+
"v_proj",
|
| 22 |
+
"down_proj",
|
| 23 |
+
"q_proj"
|
| 24 |
+
],
|
| 25 |
+
"task_type": "CAUSAL_LM"
|
| 26 |
+
}
|
s1_en/adapter_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bc9db79395c61ca721098c42fa0604509f6486b854b170f74f5f3f094450850d
|
| 3 |
+
size 639787082
|
s1_en/config.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "liuhaotian/llava-v1.5-7b",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"LlavaLlamaForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"bos_token_id": 1,
|
| 7 |
+
"eos_token_id": 2,
|
| 8 |
+
"freeze_mm_mlp_adapter": false,
|
| 9 |
+
"freeze_mm_vision_resampler": false,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 4096,
|
| 12 |
+
"image_aspect_ratio": "pad",
|
| 13 |
+
"image_grid_pinpoints": null,
|
| 14 |
+
"initializer_range": 0.02,
|
| 15 |
+
"intermediate_size": 11008,
|
| 16 |
+
"max_length": 4096,
|
| 17 |
+
"max_position_embeddings": 4096,
|
| 18 |
+
"mm_hidden_size": 1024,
|
| 19 |
+
"mm_projector_lr": 2e-05,
|
| 20 |
+
"mm_projector_type": "mlp2x_gelu",
|
| 21 |
+
"mm_resampler_type": null,
|
| 22 |
+
"mm_use_im_patch_token": false,
|
| 23 |
+
"mm_use_im_start_end": false,
|
| 24 |
+
"mm_vision_select_feature": "patch",
|
| 25 |
+
"mm_vision_select_layer": -2,
|
| 26 |
+
"mm_vision_tower": "openai/clip-vit-large-patch14-336",
|
| 27 |
+
"model_type": "llava",
|
| 28 |
+
"num_attention_heads": 32,
|
| 29 |
+
"num_hidden_layers": 32,
|
| 30 |
+
"num_key_value_heads": 32,
|
| 31 |
+
"pad_token_id": 0,
|
| 32 |
+
"pretraining_tp": 1,
|
| 33 |
+
"rms_norm_eps": 1e-05,
|
| 34 |
+
"rope_scaling": null,
|
| 35 |
+
"tie_word_embeddings": false,
|
| 36 |
+
"torch_dtype": "float16",
|
| 37 |
+
"transformers_version": "4.31.0",
|
| 38 |
+
"tune_mm_mlp_adapter": false,
|
| 39 |
+
"tune_mm_vision_resampler": false,
|
| 40 |
+
"unfreeze_mm_vision_tower": false,
|
| 41 |
+
"use_cache": true,
|
| 42 |
+
"use_mm_proj": true,
|
| 43 |
+
"vocab_size": 32000
|
| 44 |
+
}
|
s1_en/global_step9000/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:834a66d3e6038595959d043acd94e8307f2cc3d99b1bd7c086e3ea2b0c2db7f2
|
| 3 |
+
size 4089600080
|
s1_en/global_step9000/mp_rank_00_model_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2b2df990e43d817071629b6f3d8595491b9b28bd994e08cff95295e85abed0a5
|
| 3 |
+
size 28850200603
|
s1_en/latest
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
global_step9000
|
s1_en/non_lora_trainables.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:32b51a7f52ae8e9f73dcaa6749addaa2061b0e2c36c2d8808d0db708c5ff6571
|
| 3 |
+
size 41961648
|
s1_en/rng_state.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:de6235bea9da7d32a83efa288efc2ba3fb1faa6f936d34421a99a0ab1b4f0e31
|
| 3 |
+
size 14244
|
s1_en/special_tokens_map.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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": "<unk>",
|
| 17 |
+
"unk_token": {
|
| 18 |
+
"content": "<unk>",
|
| 19 |
+
"lstrip": false,
|
| 20 |
+
"normalized": false,
|
| 21 |
+
"rstrip": false,
|
| 22 |
+
"single_word": false
|
| 23 |
+
}
|
| 24 |
+
}
|
s1_en/tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
| 3 |
+
size 499723
|
s1_en/tokenizer_config.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
+
"bos_token": {
|
| 5 |
+
"__type": "AddedToken",
|
| 6 |
+
"content": "<s>",
|
| 7 |
+
"lstrip": false,
|
| 8 |
+
"normalized": false,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false
|
| 11 |
+
},
|
| 12 |
+
"clean_up_tokenization_spaces": false,
|
| 13 |
+
"eos_token": {
|
| 14 |
+
"__type": "AddedToken",
|
| 15 |
+
"content": "</s>",
|
| 16 |
+
"lstrip": false,
|
| 17 |
+
"normalized": false,
|
| 18 |
+
"rstrip": false,
|
| 19 |
+
"single_word": false
|
| 20 |
+
},
|
| 21 |
+
"legacy": false,
|
| 22 |
+
"model_max_length": 2048,
|
| 23 |
+
"pad_token": null,
|
| 24 |
+
"padding_side": "right",
|
| 25 |
+
"sp_model_kwargs": {},
|
| 26 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 27 |
+
"unk_token": {
|
| 28 |
+
"__type": "AddedToken",
|
| 29 |
+
"content": "<unk>",
|
| 30 |
+
"lstrip": false,
|
| 31 |
+
"normalized": false,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false
|
| 34 |
+
}
|
| 35 |
+
}
|
s1_en/trainer_state.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
s1_en/training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4786c5345d302e6b458af37541702ba130c2950bc2a2c1d2cdf2001843001b92
|
| 3 |
+
size 6264
|
s1_en/zero_to_fp32.py
ADDED
|
@@ -0,0 +1,760 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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)
|
s2/README.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: peft
|
| 3 |
+
---
|
| 4 |
+
## Training procedure
|
| 5 |
+
|
| 6 |
+
### Framework versions
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
- PEFT 0.4.0
|
s2/adapter_config.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"auto_mapping": null,
|
| 3 |
+
"base_model_name_or_path": "liuhaotian/llava-v1.5-7b",
|
| 4 |
+
"bias": "none",
|
| 5 |
+
"fan_in_fan_out": false,
|
| 6 |
+
"inference_mode": true,
|
| 7 |
+
"init_lora_weights": true,
|
| 8 |
+
"layers_pattern": null,
|
| 9 |
+
"layers_to_transform": null,
|
| 10 |
+
"lora_alpha": 256,
|
| 11 |
+
"lora_dropout": 0.05,
|
| 12 |
+
"modules_to_save": null,
|
| 13 |
+
"peft_type": "LORA",
|
| 14 |
+
"r": 128,
|
| 15 |
+
"revision": null,
|
| 16 |
+
"target_modules": [
|
| 17 |
+
"gate_proj",
|
| 18 |
+
"o_proj",
|
| 19 |
+
"up_proj",
|
| 20 |
+
"down_proj",
|
| 21 |
+
"v_proj",
|
| 22 |
+
"k_proj",
|
| 23 |
+
"q_proj"
|
| 24 |
+
],
|
| 25 |
+
"task_type": "CAUSAL_LM"
|
| 26 |
+
}
|
s2/adapter_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:657313672dfd64ea5545a29eeda7f79040e21b724057b163e61b4f9bde5254c1
|
| 3 |
+
size 639786637
|
s2/config.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "liuhaotian/llava-v1.5-7b",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"LlavaLlamaForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"bos_token_id": 1,
|
| 7 |
+
"eos_token_id": 2,
|
| 8 |
+
"freeze_mm_mlp_adapter": false,
|
| 9 |
+
"freeze_mm_vision_resampler": false,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 4096,
|
| 12 |
+
"image_aspect_ratio": "pad",
|
| 13 |
+
"image_grid_pinpoints": null,
|
| 14 |
+
"initializer_range": 0.02,
|
| 15 |
+
"intermediate_size": 11008,
|
| 16 |
+
"max_length": 4096,
|
| 17 |
+
"max_position_embeddings": 4096,
|
| 18 |
+
"mm_hidden_size": 1024,
|
| 19 |
+
"mm_projector_lr": 2e-05,
|
| 20 |
+
"mm_projector_type": "mlp2x_gelu",
|
| 21 |
+
"mm_resampler_type": null,
|
| 22 |
+
"mm_use_im_patch_token": false,
|
| 23 |
+
"mm_use_im_start_end": false,
|
| 24 |
+
"mm_vision_select_feature": "patch",
|
| 25 |
+
"mm_vision_select_layer": -2,
|
| 26 |
+
"mm_vision_tower": "openai/clip-vit-large-patch14-336",
|
| 27 |
+
"model_type": "llava",
|
| 28 |
+
"num_attention_heads": 32,
|
| 29 |
+
"num_hidden_layers": 32,
|
| 30 |
+
"num_key_value_heads": 32,
|
| 31 |
+
"pad_token_id": 0,
|
| 32 |
+
"pretraining_tp": 1,
|
| 33 |
+
"rms_norm_eps": 1e-05,
|
| 34 |
+
"rope_scaling": null,
|
| 35 |
+
"tie_word_embeddings": false,
|
| 36 |
+
"torch_dtype": "float16",
|
| 37 |
+
"transformers_version": "4.31.0",
|
| 38 |
+
"tune_mm_mlp_adapter": false,
|
| 39 |
+
"tune_mm_vision_resampler": false,
|
| 40 |
+
"unfreeze_mm_vision_tower": false,
|
| 41 |
+
"use_cache": true,
|
| 42 |
+
"use_mm_proj": true,
|
| 43 |
+
"vocab_size": 32000
|
| 44 |
+
}
|
s2/global_step6000/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:235c3c2d5ebc5cc4e622b2f6c86c0936e6fbfe1d05cb8e7314f0d6f521c98d02
|
| 3 |
+
size 4089599575
|
s2/global_step6000/mp_rank_00_model_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eb4898e6378bd9b8e2d3817dfa868077e19aa7156a78daf0eab939a965962028
|
| 3 |
+
size 28850200126
|
s2/latest
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
global_step6000
|
s2/non_lora_trainables.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ca16573ba2935eb1df5756e9b23cc2487e048a9ce1e8a02e76ef2271b47feea
|
| 3 |
+
size 41961191
|
s2/rng_state.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:58b571a0ec7a60a1d36dde4a941ac919260dbdf1599a2822ccc2feaeb81b4eee
|
| 3 |
+
size 14575
|
s2/special_tokens_map.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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": "<unk>",
|
| 17 |
+
"unk_token": {
|
| 18 |
+
"content": "<unk>",
|
| 19 |
+
"lstrip": false,
|
| 20 |
+
"normalized": false,
|
| 21 |
+
"rstrip": false,
|
| 22 |
+
"single_word": false
|
| 23 |
+
}
|
| 24 |
+
}
|
s2/tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
| 3 |
+
size 499723
|
s2/tokenizer_config.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
+
"bos_token": {
|
| 5 |
+
"__type": "AddedToken",
|
| 6 |
+
"content": "<s>",
|
| 7 |
+
"lstrip": false,
|
| 8 |
+
"normalized": false,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false
|
| 11 |
+
},
|
| 12 |
+
"clean_up_tokenization_spaces": false,
|
| 13 |
+
"eos_token": {
|
| 14 |
+
"__type": "AddedToken",
|
| 15 |
+
"content": "</s>",
|
| 16 |
+
"lstrip": false,
|
| 17 |
+
"normalized": false,
|
| 18 |
+
"rstrip": false,
|
| 19 |
+
"single_word": false
|
| 20 |
+
},
|
| 21 |
+
"legacy": false,
|
| 22 |
+
"model_max_length": 2048,
|
| 23 |
+
"pad_token": null,
|
| 24 |
+
"padding_side": "right",
|
| 25 |
+
"sp_model_kwargs": {},
|
| 26 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 27 |
+
"unk_token": {
|
| 28 |
+
"__type": "AddedToken",
|
| 29 |
+
"content": "<unk>",
|
| 30 |
+
"lstrip": false,
|
| 31 |
+
"normalized": false,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false
|
| 34 |
+
}
|
| 35 |
+
}
|
s2/trainer_state.json
ADDED
|
@@ -0,0 +1,3616 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": null,
|
| 3 |
+
"best_model_checkpoint": null,
|
| 4 |
+
"epoch": 13.392857142857142,
|
| 5 |
+
"global_step": 6000,
|
| 6 |
+
"is_hyper_param_search": false,
|
| 7 |
+
"is_local_process_zero": true,
|
| 8 |
+
"is_world_process_zero": true,
|
| 9 |
+
"log_history": [
|
| 10 |
+
{
|
| 11 |
+
"epoch": 0.02,
|
| 12 |
+
"learning_rate": 3.7174721189591085e-07,
|
| 13 |
+
"loss": 6.9406,
|
| 14 |
+
"step": 10
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"epoch": 0.04,
|
| 18 |
+
"learning_rate": 7.434944237918217e-07,
|
| 19 |
+
"loss": 6.9625,
|
| 20 |
+
"step": 20
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"epoch": 0.07,
|
| 24 |
+
"learning_rate": 1.1152416356877324e-06,
|
| 25 |
+
"loss": 5.4781,
|
| 26 |
+
"step": 30
|
| 27 |
+
},
|
| 28 |
+
{
|
| 29 |
+
"epoch": 0.09,
|
| 30 |
+
"learning_rate": 1.4869888475836434e-06,
|
| 31 |
+
"loss": 4.2969,
|
| 32 |
+
"step": 40
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"epoch": 0.11,
|
| 36 |
+
"learning_rate": 1.858736059479554e-06,
|
| 37 |
+
"loss": 3.7406,
|
| 38 |
+
"step": 50
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"epoch": 0.13,
|
| 42 |
+
"learning_rate": 2.2304832713754648e-06,
|
| 43 |
+
"loss": 3.3547,
|
| 44 |
+
"step": 60
|
| 45 |
+
},
|
| 46 |
+
{
|
| 47 |
+
"epoch": 0.16,
|
| 48 |
+
"learning_rate": 2.6022304832713758e-06,
|
| 49 |
+
"loss": 2.9609,
|
| 50 |
+
"step": 70
|
| 51 |
+
},
|
| 52 |
+
{
|
| 53 |
+
"epoch": 0.18,
|
| 54 |
+
"learning_rate": 2.973977695167287e-06,
|
| 55 |
+
"loss": 2.9625,
|
| 56 |
+
"step": 80
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"epoch": 0.2,
|
| 60 |
+
"learning_rate": 3.3457249070631974e-06,
|
| 61 |
+
"loss": 2.5938,
|
| 62 |
+
"step": 90
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"epoch": 0.22,
|
| 66 |
+
"learning_rate": 3.717472118959108e-06,
|
| 67 |
+
"loss": 2.2594,
|
| 68 |
+
"step": 100
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"epoch": 0.25,
|
| 72 |
+
"learning_rate": 4.089219330855019e-06,
|
| 73 |
+
"loss": 1.9625,
|
| 74 |
+
"step": 110
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"epoch": 0.27,
|
| 78 |
+
"learning_rate": 4.4609665427509296e-06,
|
| 79 |
+
"loss": 1.8102,
|
| 80 |
+
"step": 120
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"epoch": 0.29,
|
| 84 |
+
"learning_rate": 4.83271375464684e-06,
|
| 85 |
+
"loss": 1.625,
|
| 86 |
+
"step": 130
|
| 87 |
+
},
|
| 88 |
+
{
|
| 89 |
+
"epoch": 0.31,
|
| 90 |
+
"learning_rate": 5.2044609665427516e-06,
|
| 91 |
+
"loss": 1.4773,
|
| 92 |
+
"step": 140
|
| 93 |
+
},
|
| 94 |
+
{
|
| 95 |
+
"epoch": 0.33,
|
| 96 |
+
"learning_rate": 5.576208178438662e-06,
|
| 97 |
+
"loss": 1.3578,
|
| 98 |
+
"step": 150
|
| 99 |
+
},
|
| 100 |
+
{
|
| 101 |
+
"epoch": 0.36,
|
| 102 |
+
"learning_rate": 5.947955390334574e-06,
|
| 103 |
+
"loss": 1.2027,
|
| 104 |
+
"step": 160
|
| 105 |
+
},
|
| 106 |
+
{
|
| 107 |
+
"epoch": 0.38,
|
| 108 |
+
"learning_rate": 6.319702602230484e-06,
|
| 109 |
+
"loss": 1.0359,
|
| 110 |
+
"step": 170
|
| 111 |
+
},
|
| 112 |
+
{
|
| 113 |
+
"epoch": 0.4,
|
| 114 |
+
"learning_rate": 6.691449814126395e-06,
|
| 115 |
+
"loss": 0.917,
|
| 116 |
+
"step": 180
|
| 117 |
+
},
|
| 118 |
+
{
|
| 119 |
+
"epoch": 0.42,
|
| 120 |
+
"learning_rate": 7.063197026022306e-06,
|
| 121 |
+
"loss": 0.9805,
|
| 122 |
+
"step": 190
|
| 123 |
+
},
|
| 124 |
+
{
|
| 125 |
+
"epoch": 0.45,
|
| 126 |
+
"learning_rate": 7.434944237918216e-06,
|
| 127 |
+
"loss": 0.7047,
|
| 128 |
+
"step": 200
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"epoch": 0.47,
|
| 132 |
+
"learning_rate": 7.806691449814127e-06,
|
| 133 |
+
"loss": 0.8602,
|
| 134 |
+
"step": 210
|
| 135 |
+
},
|
| 136 |
+
{
|
| 137 |
+
"epoch": 0.49,
|
| 138 |
+
"learning_rate": 8.178438661710038e-06,
|
| 139 |
+
"loss": 0.9711,
|
| 140 |
+
"step": 220
|
| 141 |
+
},
|
| 142 |
+
{
|
| 143 |
+
"epoch": 0.51,
|
| 144 |
+
"learning_rate": 8.550185873605949e-06,
|
| 145 |
+
"loss": 0.4922,
|
| 146 |
+
"step": 230
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"epoch": 0.54,
|
| 150 |
+
"learning_rate": 8.921933085501859e-06,
|
| 151 |
+
"loss": 0.6744,
|
| 152 |
+
"step": 240
|
| 153 |
+
},
|
| 154 |
+
{
|
| 155 |
+
"epoch": 0.56,
|
| 156 |
+
"learning_rate": 9.29368029739777e-06,
|
| 157 |
+
"loss": 1.0547,
|
| 158 |
+
"step": 250
|
| 159 |
+
},
|
| 160 |
+
{
|
| 161 |
+
"epoch": 0.58,
|
| 162 |
+
"learning_rate": 9.66542750929368e-06,
|
| 163 |
+
"loss": 0.6121,
|
| 164 |
+
"step": 260
|
| 165 |
+
},
|
| 166 |
+
{
|
| 167 |
+
"epoch": 0.6,
|
| 168 |
+
"learning_rate": 1.0037174721189591e-05,
|
| 169 |
+
"loss": 0.5311,
|
| 170 |
+
"step": 270
|
| 171 |
+
},
|
| 172 |
+
{
|
| 173 |
+
"epoch": 0.62,
|
| 174 |
+
"learning_rate": 1.0408921933085503e-05,
|
| 175 |
+
"loss": 0.4962,
|
| 176 |
+
"step": 280
|
| 177 |
+
},
|
| 178 |
+
{
|
| 179 |
+
"epoch": 0.65,
|
| 180 |
+
"learning_rate": 1.0780669144981412e-05,
|
| 181 |
+
"loss": 0.4607,
|
| 182 |
+
"step": 290
|
| 183 |
+
},
|
| 184 |
+
{
|
| 185 |
+
"epoch": 0.67,
|
| 186 |
+
"learning_rate": 1.1152416356877324e-05,
|
| 187 |
+
"loss": 0.6136,
|
| 188 |
+
"step": 300
|
| 189 |
+
},
|
| 190 |
+
{
|
| 191 |
+
"epoch": 0.69,
|
| 192 |
+
"learning_rate": 1.1524163568773235e-05,
|
| 193 |
+
"loss": 0.6199,
|
| 194 |
+
"step": 310
|
| 195 |
+
},
|
| 196 |
+
{
|
| 197 |
+
"epoch": 0.71,
|
| 198 |
+
"learning_rate": 1.1895910780669147e-05,
|
| 199 |
+
"loss": 0.5402,
|
| 200 |
+
"step": 320
|
| 201 |
+
},
|
| 202 |
+
{
|
| 203 |
+
"epoch": 0.74,
|
| 204 |
+
"learning_rate": 1.2267657992565056e-05,
|
| 205 |
+
"loss": 0.5375,
|
| 206 |
+
"step": 330
|
| 207 |
+
},
|
| 208 |
+
{
|
| 209 |
+
"epoch": 0.76,
|
| 210 |
+
"learning_rate": 1.2639405204460968e-05,
|
| 211 |
+
"loss": 0.4029,
|
| 212 |
+
"step": 340
|
| 213 |
+
},
|
| 214 |
+
{
|
| 215 |
+
"epoch": 0.78,
|
| 216 |
+
"learning_rate": 1.3011152416356879e-05,
|
| 217 |
+
"loss": 0.4354,
|
| 218 |
+
"step": 350
|
| 219 |
+
},
|
| 220 |
+
{
|
| 221 |
+
"epoch": 0.8,
|
| 222 |
+
"learning_rate": 1.338289962825279e-05,
|
| 223 |
+
"loss": 0.7154,
|
| 224 |
+
"step": 360
|
| 225 |
+
},
|
| 226 |
+
{
|
| 227 |
+
"epoch": 0.83,
|
| 228 |
+
"learning_rate": 1.37546468401487e-05,
|
| 229 |
+
"loss": 0.4764,
|
| 230 |
+
"step": 370
|
| 231 |
+
},
|
| 232 |
+
{
|
| 233 |
+
"epoch": 0.85,
|
| 234 |
+
"learning_rate": 1.4126394052044612e-05,
|
| 235 |
+
"loss": 0.4047,
|
| 236 |
+
"step": 380
|
| 237 |
+
},
|
| 238 |
+
{
|
| 239 |
+
"epoch": 0.87,
|
| 240 |
+
"learning_rate": 1.4498141263940521e-05,
|
| 241 |
+
"loss": 0.4208,
|
| 242 |
+
"step": 390
|
| 243 |
+
},
|
| 244 |
+
{
|
| 245 |
+
"epoch": 0.89,
|
| 246 |
+
"learning_rate": 1.4869888475836432e-05,
|
| 247 |
+
"loss": 0.3448,
|
| 248 |
+
"step": 400
|
| 249 |
+
},
|
| 250 |
+
{
|
| 251 |
+
"epoch": 0.92,
|
| 252 |
+
"learning_rate": 1.5241635687732344e-05,
|
| 253 |
+
"loss": 0.4429,
|
| 254 |
+
"step": 410
|
| 255 |
+
},
|
| 256 |
+
{
|
| 257 |
+
"epoch": 0.94,
|
| 258 |
+
"learning_rate": 1.5613382899628255e-05,
|
| 259 |
+
"loss": 0.7079,
|
| 260 |
+
"step": 420
|
| 261 |
+
},
|
| 262 |
+
{
|
| 263 |
+
"epoch": 0.96,
|
| 264 |
+
"learning_rate": 1.5985130111524165e-05,
|
| 265 |
+
"loss": 0.5989,
|
| 266 |
+
"step": 430
|
| 267 |
+
},
|
| 268 |
+
{
|
| 269 |
+
"epoch": 0.98,
|
| 270 |
+
"learning_rate": 1.6356877323420076e-05,
|
| 271 |
+
"loss": 0.4419,
|
| 272 |
+
"step": 440
|
| 273 |
+
},
|
| 274 |
+
{
|
| 275 |
+
"epoch": 1.0,
|
| 276 |
+
"learning_rate": 1.6728624535315986e-05,
|
| 277 |
+
"loss": 0.3883,
|
| 278 |
+
"step": 450
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"epoch": 1.03,
|
| 282 |
+
"learning_rate": 1.7100371747211897e-05,
|
| 283 |
+
"loss": 0.3784,
|
| 284 |
+
"step": 460
|
| 285 |
+
},
|
| 286 |
+
{
|
| 287 |
+
"epoch": 1.05,
|
| 288 |
+
"learning_rate": 1.7472118959107808e-05,
|
| 289 |
+
"loss": 0.3872,
|
| 290 |
+
"step": 470
|
| 291 |
+
},
|
| 292 |
+
{
|
| 293 |
+
"epoch": 1.07,
|
| 294 |
+
"learning_rate": 1.7843866171003718e-05,
|
| 295 |
+
"loss": 0.4399,
|
| 296 |
+
"step": 480
|
| 297 |
+
},
|
| 298 |
+
{
|
| 299 |
+
"epoch": 1.09,
|
| 300 |
+
"learning_rate": 1.8215613382899632e-05,
|
| 301 |
+
"loss": 0.346,
|
| 302 |
+
"step": 490
|
| 303 |
+
},
|
| 304 |
+
{
|
| 305 |
+
"epoch": 1.12,
|
| 306 |
+
"learning_rate": 1.858736059479554e-05,
|
| 307 |
+
"loss": 0.3869,
|
| 308 |
+
"step": 500
|
| 309 |
+
},
|
| 310 |
+
{
|
| 311 |
+
"epoch": 1.14,
|
| 312 |
+
"learning_rate": 1.8959107806691453e-05,
|
| 313 |
+
"loss": 0.3469,
|
| 314 |
+
"step": 510
|
| 315 |
+
},
|
| 316 |
+
{
|
| 317 |
+
"epoch": 1.16,
|
| 318 |
+
"learning_rate": 1.933085501858736e-05,
|
| 319 |
+
"loss": 0.3942,
|
| 320 |
+
"step": 520
|
| 321 |
+
},
|
| 322 |
+
{
|
| 323 |
+
"epoch": 1.18,
|
| 324 |
+
"learning_rate": 1.970260223048327e-05,
|
| 325 |
+
"loss": 0.497,
|
| 326 |
+
"step": 530
|
| 327 |
+
},
|
| 328 |
+
{
|
| 329 |
+
"epoch": 1.21,
|
| 330 |
+
"learning_rate": 1.9999999346673545e-05,
|
| 331 |
+
"loss": 0.3417,
|
| 332 |
+
"step": 540
|
| 333 |
+
},
|
| 334 |
+
{
|
| 335 |
+
"epoch": 1.23,
|
| 336 |
+
"learning_rate": 1.9999976480256544e-05,
|
| 337 |
+
"loss": 0.41,
|
| 338 |
+
"step": 550
|
| 339 |
+
},
|
| 340 |
+
{
|
| 341 |
+
"epoch": 1.25,
|
| 342 |
+
"learning_rate": 1.9999920947602093e-05,
|
| 343 |
+
"loss": 0.5033,
|
| 344 |
+
"step": 560
|
| 345 |
+
},
|
| 346 |
+
{
|
| 347 |
+
"epoch": 1.27,
|
| 348 |
+
"learning_rate": 1.9999832748891602e-05,
|
| 349 |
+
"loss": 0.4127,
|
| 350 |
+
"step": 570
|
| 351 |
+
},
|
| 352 |
+
{
|
| 353 |
+
"epoch": 1.29,
|
| 354 |
+
"learning_rate": 1.999971188441319e-05,
|
| 355 |
+
"loss": 0.4914,
|
| 356 |
+
"step": 580
|
| 357 |
+
},
|
| 358 |
+
{
|
| 359 |
+
"epoch": 1.32,
|
| 360 |
+
"learning_rate": 1.999955835456167e-05,
|
| 361 |
+
"loss": 0.2726,
|
| 362 |
+
"step": 590
|
| 363 |
+
},
|
| 364 |
+
{
|
| 365 |
+
"epoch": 1.34,
|
| 366 |
+
"learning_rate": 1.9999372159838563e-05,
|
| 367 |
+
"loss": 0.3555,
|
| 368 |
+
"step": 600
|
| 369 |
+
},
|
| 370 |
+
{
|
| 371 |
+
"epoch": 1.36,
|
| 372 |
+
"learning_rate": 1.9999153300852108e-05,
|
| 373 |
+
"loss": 0.4463,
|
| 374 |
+
"step": 610
|
| 375 |
+
},
|
| 376 |
+
{
|
| 377 |
+
"epoch": 1.38,
|
| 378 |
+
"learning_rate": 1.999890177831723e-05,
|
| 379 |
+
"loss": 0.3625,
|
| 380 |
+
"step": 620
|
| 381 |
+
},
|
| 382 |
+
{
|
| 383 |
+
"epoch": 1.41,
|
| 384 |
+
"learning_rate": 1.9998617593055565e-05,
|
| 385 |
+
"loss": 0.559,
|
| 386 |
+
"step": 630
|
| 387 |
+
},
|
| 388 |
+
{
|
| 389 |
+
"epoch": 1.43,
|
| 390 |
+
"learning_rate": 1.9998300745995437e-05,
|
| 391 |
+
"loss": 0.2857,
|
| 392 |
+
"step": 640
|
| 393 |
+
},
|
| 394 |
+
{
|
| 395 |
+
"epoch": 1.45,
|
| 396 |
+
"learning_rate": 1.9997951238171875e-05,
|
| 397 |
+
"loss": 0.339,
|
| 398 |
+
"step": 650
|
| 399 |
+
},
|
| 400 |
+
{
|
| 401 |
+
"epoch": 1.47,
|
| 402 |
+
"learning_rate": 1.9997569070726585e-05,
|
| 403 |
+
"loss": 0.4425,
|
| 404 |
+
"step": 660
|
| 405 |
+
},
|
| 406 |
+
{
|
| 407 |
+
"epoch": 1.5,
|
| 408 |
+
"learning_rate": 1.9997154244907972e-05,
|
| 409 |
+
"loss": 0.386,
|
| 410 |
+
"step": 670
|
| 411 |
+
},
|
| 412 |
+
{
|
| 413 |
+
"epoch": 1.52,
|
| 414 |
+
"learning_rate": 1.999670676207112e-05,
|
| 415 |
+
"loss": 0.2583,
|
| 416 |
+
"step": 680
|
| 417 |
+
},
|
| 418 |
+
{
|
| 419 |
+
"epoch": 1.54,
|
| 420 |
+
"learning_rate": 1.999622662367778e-05,
|
| 421 |
+
"loss": 0.2287,
|
| 422 |
+
"step": 690
|
| 423 |
+
},
|
| 424 |
+
{
|
| 425 |
+
"epoch": 1.56,
|
| 426 |
+
"learning_rate": 1.99957138312964e-05,
|
| 427 |
+
"loss": 0.4197,
|
| 428 |
+
"step": 700
|
| 429 |
+
},
|
| 430 |
+
{
|
| 431 |
+
"epoch": 1.58,
|
| 432 |
+
"learning_rate": 1.999516838660208e-05,
|
| 433 |
+
"loss": 0.5672,
|
| 434 |
+
"step": 710
|
| 435 |
+
},
|
| 436 |
+
{
|
| 437 |
+
"epoch": 1.61,
|
| 438 |
+
"learning_rate": 1.9994590291376585e-05,
|
| 439 |
+
"loss": 0.4251,
|
| 440 |
+
"step": 720
|
| 441 |
+
},
|
| 442 |
+
{
|
| 443 |
+
"epoch": 1.63,
|
| 444 |
+
"learning_rate": 1.999397954750834e-05,
|
| 445 |
+
"loss": 0.2164,
|
| 446 |
+
"step": 730
|
| 447 |
+
},
|
| 448 |
+
{
|
| 449 |
+
"epoch": 1.65,
|
| 450 |
+
"learning_rate": 1.999333615699242e-05,
|
| 451 |
+
"loss": 0.4329,
|
| 452 |
+
"step": 740
|
| 453 |
+
},
|
| 454 |
+
{
|
| 455 |
+
"epoch": 1.67,
|
| 456 |
+
"learning_rate": 1.999266012193054e-05,
|
| 457 |
+
"loss": 0.3667,
|
| 458 |
+
"step": 750
|
| 459 |
+
},
|
| 460 |
+
{
|
| 461 |
+
"epoch": 1.7,
|
| 462 |
+
"learning_rate": 1.9991951444531067e-05,
|
| 463 |
+
"loss": 0.5154,
|
| 464 |
+
"step": 760
|
| 465 |
+
},
|
| 466 |
+
{
|
| 467 |
+
"epoch": 1.72,
|
| 468 |
+
"learning_rate": 1.999121012710898e-05,
|
| 469 |
+
"loss": 0.4191,
|
| 470 |
+
"step": 770
|
| 471 |
+
},
|
| 472 |
+
{
|
| 473 |
+
"epoch": 1.74,
|
| 474 |
+
"learning_rate": 1.9990436172085896e-05,
|
| 475 |
+
"loss": 0.4372,
|
| 476 |
+
"step": 780
|
| 477 |
+
},
|
| 478 |
+
{
|
| 479 |
+
"epoch": 1.76,
|
| 480 |
+
"learning_rate": 1.9989629581990038e-05,
|
| 481 |
+
"loss": 0.3543,
|
| 482 |
+
"step": 790
|
| 483 |
+
},
|
| 484 |
+
{
|
| 485 |
+
"epoch": 1.79,
|
| 486 |
+
"learning_rate": 1.9988790359456236e-05,
|
| 487 |
+
"loss": 0.2781,
|
| 488 |
+
"step": 800
|
| 489 |
+
},
|
| 490 |
+
{
|
| 491 |
+
"epoch": 1.81,
|
| 492 |
+
"learning_rate": 1.998791850722593e-05,
|
| 493 |
+
"loss": 0.3889,
|
| 494 |
+
"step": 810
|
| 495 |
+
},
|
| 496 |
+
{
|
| 497 |
+
"epoch": 1.83,
|
| 498 |
+
"learning_rate": 1.9987014028147124e-05,
|
| 499 |
+
"loss": 0.3639,
|
| 500 |
+
"step": 820
|
| 501 |
+
},
|
| 502 |
+
{
|
| 503 |
+
"epoch": 1.85,
|
| 504 |
+
"learning_rate": 1.9986076925174433e-05,
|
| 505 |
+
"loss": 0.2839,
|
| 506 |
+
"step": 830
|
| 507 |
+
},
|
| 508 |
+
{
|
| 509 |
+
"epoch": 1.88,
|
| 510 |
+
"learning_rate": 1.9985107201369024e-05,
|
| 511 |
+
"loss": 0.3239,
|
| 512 |
+
"step": 840
|
| 513 |
+
},
|
| 514 |
+
{
|
| 515 |
+
"epoch": 1.9,
|
| 516 |
+
"learning_rate": 1.998410485989862e-05,
|
| 517 |
+
"loss": 0.2576,
|
| 518 |
+
"step": 850
|
| 519 |
+
},
|
| 520 |
+
{
|
| 521 |
+
"epoch": 1.92,
|
| 522 |
+
"learning_rate": 1.9983069904037506e-05,
|
| 523 |
+
"loss": 0.3892,
|
| 524 |
+
"step": 860
|
| 525 |
+
},
|
| 526 |
+
{
|
| 527 |
+
"epoch": 1.94,
|
| 528 |
+
"learning_rate": 1.99820023371665e-05,
|
| 529 |
+
"loss": 0.2446,
|
| 530 |
+
"step": 870
|
| 531 |
+
},
|
| 532 |
+
{
|
| 533 |
+
"epoch": 1.96,
|
| 534 |
+
"learning_rate": 1.9980902162772952e-05,
|
| 535 |
+
"loss": 0.3531,
|
| 536 |
+
"step": 880
|
| 537 |
+
},
|
| 538 |
+
{
|
| 539 |
+
"epoch": 1.99,
|
| 540 |
+
"learning_rate": 1.9979769384450728e-05,
|
| 541 |
+
"loss": 0.4144,
|
| 542 |
+
"step": 890
|
| 543 |
+
},
|
| 544 |
+
{
|
| 545 |
+
"epoch": 2.01,
|
| 546 |
+
"learning_rate": 1.9978604005900187e-05,
|
| 547 |
+
"loss": 0.3633,
|
| 548 |
+
"step": 900
|
| 549 |
+
},
|
| 550 |
+
{
|
| 551 |
+
"epoch": 2.03,
|
| 552 |
+
"learning_rate": 1.9977406030928205e-05,
|
| 553 |
+
"loss": 0.3056,
|
| 554 |
+
"step": 910
|
| 555 |
+
},
|
| 556 |
+
{
|
| 557 |
+
"epoch": 2.05,
|
| 558 |
+
"learning_rate": 1.9976175463448113e-05,
|
| 559 |
+
"loss": 0.2005,
|
| 560 |
+
"step": 920
|
| 561 |
+
},
|
| 562 |
+
{
|
| 563 |
+
"epoch": 2.08,
|
| 564 |
+
"learning_rate": 1.997491230747973e-05,
|
| 565 |
+
"loss": 0.3426,
|
| 566 |
+
"step": 930
|
| 567 |
+
},
|
| 568 |
+
{
|
| 569 |
+
"epoch": 2.1,
|
| 570 |
+
"learning_rate": 1.9973616567149316e-05,
|
| 571 |
+
"loss": 0.2796,
|
| 572 |
+
"step": 940
|
| 573 |
+
},
|
| 574 |
+
{
|
| 575 |
+
"epoch": 2.12,
|
| 576 |
+
"learning_rate": 1.9972288246689576e-05,
|
| 577 |
+
"loss": 0.37,
|
| 578 |
+
"step": 950
|
| 579 |
+
},
|
| 580 |
+
{
|
| 581 |
+
"epoch": 2.14,
|
| 582 |
+
"learning_rate": 1.9970927350439647e-05,
|
| 583 |
+
"loss": 0.2958,
|
| 584 |
+
"step": 960
|
| 585 |
+
},
|
| 586 |
+
{
|
| 587 |
+
"epoch": 2.17,
|
| 588 |
+
"learning_rate": 1.9969533882845076e-05,
|
| 589 |
+
"loss": 0.2895,
|
| 590 |
+
"step": 970
|
| 591 |
+
},
|
| 592 |
+
{
|
| 593 |
+
"epoch": 2.19,
|
| 594 |
+
"learning_rate": 1.9968107848457804e-05,
|
| 595 |
+
"loss": 0.2656,
|
| 596 |
+
"step": 980
|
| 597 |
+
},
|
| 598 |
+
{
|
| 599 |
+
"epoch": 2.21,
|
| 600 |
+
"learning_rate": 1.9966649251936164e-05,
|
| 601 |
+
"loss": 0.2885,
|
| 602 |
+
"step": 990
|
| 603 |
+
},
|
| 604 |
+
{
|
| 605 |
+
"epoch": 2.23,
|
| 606 |
+
"learning_rate": 1.996515809804485e-05,
|
| 607 |
+
"loss": 0.3175,
|
| 608 |
+
"step": 1000
|
| 609 |
+
},
|
| 610 |
+
{
|
| 611 |
+
"epoch": 2.25,
|
| 612 |
+
"learning_rate": 1.9963634391654912e-05,
|
| 613 |
+
"loss": 0.2314,
|
| 614 |
+
"step": 1010
|
| 615 |
+
},
|
| 616 |
+
{
|
| 617 |
+
"epoch": 2.28,
|
| 618 |
+
"learning_rate": 1.996207813774374e-05,
|
| 619 |
+
"loss": 0.3122,
|
| 620 |
+
"step": 1020
|
| 621 |
+
},
|
| 622 |
+
{
|
| 623 |
+
"epoch": 2.3,
|
| 624 |
+
"learning_rate": 1.9960489341395043e-05,
|
| 625 |
+
"loss": 0.1354,
|
| 626 |
+
"step": 1030
|
| 627 |
+
},
|
| 628 |
+
{
|
| 629 |
+
"epoch": 2.32,
|
| 630 |
+
"learning_rate": 1.9958868007798828e-05,
|
| 631 |
+
"loss": 0.2356,
|
| 632 |
+
"step": 1040
|
| 633 |
+
},
|
| 634 |
+
{
|
| 635 |
+
"epoch": 2.34,
|
| 636 |
+
"learning_rate": 1.9957214142251392e-05,
|
| 637 |
+
"loss": 0.2,
|
| 638 |
+
"step": 1050
|
| 639 |
+
},
|
| 640 |
+
{
|
| 641 |
+
"epoch": 2.37,
|
| 642 |
+
"learning_rate": 1.9955527750155315e-05,
|
| 643 |
+
"loss": 0.2901,
|
| 644 |
+
"step": 1060
|
| 645 |
+
},
|
| 646 |
+
{
|
| 647 |
+
"epoch": 2.39,
|
| 648 |
+
"learning_rate": 1.995380883701941e-05,
|
| 649 |
+
"loss": 0.2357,
|
| 650 |
+
"step": 1070
|
| 651 |
+
},
|
| 652 |
+
{
|
| 653 |
+
"epoch": 2.41,
|
| 654 |
+
"learning_rate": 1.995205740845874e-05,
|
| 655 |
+
"loss": 0.3321,
|
| 656 |
+
"step": 1080
|
| 657 |
+
},
|
| 658 |
+
{
|
| 659 |
+
"epoch": 2.43,
|
| 660 |
+
"learning_rate": 1.9950273470194566e-05,
|
| 661 |
+
"loss": 0.227,
|
| 662 |
+
"step": 1090
|
| 663 |
+
},
|
| 664 |
+
{
|
| 665 |
+
"epoch": 2.46,
|
| 666 |
+
"learning_rate": 1.9948457028054364e-05,
|
| 667 |
+
"loss": 0.2477,
|
| 668 |
+
"step": 1100
|
| 669 |
+
},
|
| 670 |
+
{
|
| 671 |
+
"epoch": 2.48,
|
| 672 |
+
"learning_rate": 1.994660808797178e-05,
|
| 673 |
+
"loss": 0.2848,
|
| 674 |
+
"step": 1110
|
| 675 |
+
},
|
| 676 |
+
{
|
| 677 |
+
"epoch": 2.5,
|
| 678 |
+
"learning_rate": 1.9944726655986618e-05,
|
| 679 |
+
"loss": 0.2755,
|
| 680 |
+
"step": 1120
|
| 681 |
+
},
|
| 682 |
+
{
|
| 683 |
+
"epoch": 2.52,
|
| 684 |
+
"learning_rate": 1.9942812738244827e-05,
|
| 685 |
+
"loss": 0.2539,
|
| 686 |
+
"step": 1130
|
| 687 |
+
},
|
| 688 |
+
{
|
| 689 |
+
"epoch": 2.54,
|
| 690 |
+
"learning_rate": 1.9940866340998464e-05,
|
| 691 |
+
"loss": 0.2153,
|
| 692 |
+
"step": 1140
|
| 693 |
+
},
|
| 694 |
+
{
|
| 695 |
+
"epoch": 2.57,
|
| 696 |
+
"learning_rate": 1.99388874706057e-05,
|
| 697 |
+
"loss": 0.3135,
|
| 698 |
+
"step": 1150
|
| 699 |
+
},
|
| 700 |
+
{
|
| 701 |
+
"epoch": 2.59,
|
| 702 |
+
"learning_rate": 1.9936876133530766e-05,
|
| 703 |
+
"loss": 0.2413,
|
| 704 |
+
"step": 1160
|
| 705 |
+
},
|
| 706 |
+
{
|
| 707 |
+
"epoch": 2.61,
|
| 708 |
+
"learning_rate": 1.9934832336343968e-05,
|
| 709 |
+
"loss": 0.2698,
|
| 710 |
+
"step": 1170
|
| 711 |
+
},
|
| 712 |
+
{
|
| 713 |
+
"epoch": 2.63,
|
| 714 |
+
"learning_rate": 1.993275608572163e-05,
|
| 715 |
+
"loss": 0.3131,
|
| 716 |
+
"step": 1180
|
| 717 |
+
},
|
| 718 |
+
{
|
| 719 |
+
"epoch": 2.66,
|
| 720 |
+
"learning_rate": 1.99306473884461e-05,
|
| 721 |
+
"loss": 0.2826,
|
| 722 |
+
"step": 1190
|
| 723 |
+
},
|
| 724 |
+
{
|
| 725 |
+
"epoch": 2.68,
|
| 726 |
+
"learning_rate": 1.992850625140572e-05,
|
| 727 |
+
"loss": 0.2425,
|
| 728 |
+
"step": 1200
|
| 729 |
+
},
|
| 730 |
+
{
|
| 731 |
+
"epoch": 2.7,
|
| 732 |
+
"learning_rate": 1.992633268159479e-05,
|
| 733 |
+
"loss": 0.2397,
|
| 734 |
+
"step": 1210
|
| 735 |
+
},
|
| 736 |
+
{
|
| 737 |
+
"epoch": 2.72,
|
| 738 |
+
"learning_rate": 1.992412668611356e-05,
|
| 739 |
+
"loss": 0.2258,
|
| 740 |
+
"step": 1220
|
| 741 |
+
},
|
| 742 |
+
{
|
| 743 |
+
"epoch": 2.75,
|
| 744 |
+
"learning_rate": 1.992188827216821e-05,
|
| 745 |
+
"loss": 0.2616,
|
| 746 |
+
"step": 1230
|
| 747 |
+
},
|
| 748 |
+
{
|
| 749 |
+
"epoch": 2.77,
|
| 750 |
+
"learning_rate": 1.9919617447070808e-05,
|
| 751 |
+
"loss": 0.2745,
|
| 752 |
+
"step": 1240
|
| 753 |
+
},
|
| 754 |
+
{
|
| 755 |
+
"epoch": 2.79,
|
| 756 |
+
"learning_rate": 1.991731421823931e-05,
|
| 757 |
+
"loss": 0.2235,
|
| 758 |
+
"step": 1250
|
| 759 |
+
},
|
| 760 |
+
{
|
| 761 |
+
"epoch": 2.81,
|
| 762 |
+
"learning_rate": 1.9914978593197507e-05,
|
| 763 |
+
"loss": 0.281,
|
| 764 |
+
"step": 1260
|
| 765 |
+
},
|
| 766 |
+
{
|
| 767 |
+
"epoch": 2.83,
|
| 768 |
+
"learning_rate": 1.991261057957503e-05,
|
| 769 |
+
"loss": 0.2768,
|
| 770 |
+
"step": 1270
|
| 771 |
+
},
|
| 772 |
+
{
|
| 773 |
+
"epoch": 2.86,
|
| 774 |
+
"learning_rate": 1.9910210185107306e-05,
|
| 775 |
+
"loss": 0.1956,
|
| 776 |
+
"step": 1280
|
| 777 |
+
},
|
| 778 |
+
{
|
| 779 |
+
"epoch": 2.88,
|
| 780 |
+
"learning_rate": 1.9907777417635537e-05,
|
| 781 |
+
"loss": 0.4028,
|
| 782 |
+
"step": 1290
|
| 783 |
+
},
|
| 784 |
+
{
|
| 785 |
+
"epoch": 2.9,
|
| 786 |
+
"learning_rate": 1.9905312285106682e-05,
|
| 787 |
+
"loss": 0.2349,
|
| 788 |
+
"step": 1300
|
| 789 |
+
},
|
| 790 |
+
{
|
| 791 |
+
"epoch": 2.92,
|
| 792 |
+
"learning_rate": 1.9902814795573416e-05,
|
| 793 |
+
"loss": 0.3584,
|
| 794 |
+
"step": 1310
|
| 795 |
+
},
|
| 796 |
+
{
|
| 797 |
+
"epoch": 2.95,
|
| 798 |
+
"learning_rate": 1.9900284957194115e-05,
|
| 799 |
+
"loss": 0.2127,
|
| 800 |
+
"step": 1320
|
| 801 |
+
},
|
| 802 |
+
{
|
| 803 |
+
"epoch": 2.97,
|
| 804 |
+
"learning_rate": 1.9897722778232836e-05,
|
| 805 |
+
"loss": 0.2892,
|
| 806 |
+
"step": 1330
|
| 807 |
+
},
|
| 808 |
+
{
|
| 809 |
+
"epoch": 2.99,
|
| 810 |
+
"learning_rate": 1.9895128267059268e-05,
|
| 811 |
+
"loss": 0.2294,
|
| 812 |
+
"step": 1340
|
| 813 |
+
},
|
| 814 |
+
{
|
| 815 |
+
"epoch": 3.01,
|
| 816 |
+
"learning_rate": 1.9892501432148728e-05,
|
| 817 |
+
"loss": 0.1796,
|
| 818 |
+
"step": 1350
|
| 819 |
+
},
|
| 820 |
+
{
|
| 821 |
+
"epoch": 3.04,
|
| 822 |
+
"learning_rate": 1.988984228208211e-05,
|
| 823 |
+
"loss": 0.1547,
|
| 824 |
+
"step": 1360
|
| 825 |
+
},
|
| 826 |
+
{
|
| 827 |
+
"epoch": 3.06,
|
| 828 |
+
"learning_rate": 1.988715082554588e-05,
|
| 829 |
+
"loss": 0.2344,
|
| 830 |
+
"step": 1370
|
| 831 |
+
},
|
| 832 |
+
{
|
| 833 |
+
"epoch": 3.08,
|
| 834 |
+
"learning_rate": 1.988442707133204e-05,
|
| 835 |
+
"loss": 0.1938,
|
| 836 |
+
"step": 1380
|
| 837 |
+
},
|
| 838 |
+
{
|
| 839 |
+
"epoch": 3.1,
|
| 840 |
+
"learning_rate": 1.988167102833808e-05,
|
| 841 |
+
"loss": 0.1642,
|
| 842 |
+
"step": 1390
|
| 843 |
+
},
|
| 844 |
+
{
|
| 845 |
+
"epoch": 3.12,
|
| 846 |
+
"learning_rate": 1.9878882705566988e-05,
|
| 847 |
+
"loss": 0.2037,
|
| 848 |
+
"step": 1400
|
| 849 |
+
},
|
| 850 |
+
{
|
| 851 |
+
"epoch": 3.15,
|
| 852 |
+
"learning_rate": 1.9876062112127176e-05,
|
| 853 |
+
"loss": 0.1806,
|
| 854 |
+
"step": 1410
|
| 855 |
+
},
|
| 856 |
+
{
|
| 857 |
+
"epoch": 3.17,
|
| 858 |
+
"learning_rate": 1.9873209257232494e-05,
|
| 859 |
+
"loss": 0.1858,
|
| 860 |
+
"step": 1420
|
| 861 |
+
},
|
| 862 |
+
{
|
| 863 |
+
"epoch": 3.19,
|
| 864 |
+
"learning_rate": 1.987032415020216e-05,
|
| 865 |
+
"loss": 0.2068,
|
| 866 |
+
"step": 1430
|
| 867 |
+
},
|
| 868 |
+
{
|
| 869 |
+
"epoch": 3.21,
|
| 870 |
+
"learning_rate": 1.986740680046076e-05,
|
| 871 |
+
"loss": 0.1787,
|
| 872 |
+
"step": 1440
|
| 873 |
+
},
|
| 874 |
+
{
|
| 875 |
+
"epoch": 3.24,
|
| 876 |
+
"learning_rate": 1.9864457217538198e-05,
|
| 877 |
+
"loss": 0.1947,
|
| 878 |
+
"step": 1450
|
| 879 |
+
},
|
| 880 |
+
{
|
| 881 |
+
"epoch": 3.26,
|
| 882 |
+
"learning_rate": 1.986147541106967e-05,
|
| 883 |
+
"loss": 0.1804,
|
| 884 |
+
"step": 1460
|
| 885 |
+
},
|
| 886 |
+
{
|
| 887 |
+
"epoch": 3.28,
|
| 888 |
+
"learning_rate": 1.9858461390795648e-05,
|
| 889 |
+
"loss": 0.2003,
|
| 890 |
+
"step": 1470
|
| 891 |
+
},
|
| 892 |
+
{
|
| 893 |
+
"epoch": 3.3,
|
| 894 |
+
"learning_rate": 1.985541516656182e-05,
|
| 895 |
+
"loss": 0.141,
|
| 896 |
+
"step": 1480
|
| 897 |
+
},
|
| 898 |
+
{
|
| 899 |
+
"epoch": 3.33,
|
| 900 |
+
"learning_rate": 1.985233674831908e-05,
|
| 901 |
+
"loss": 0.1854,
|
| 902 |
+
"step": 1490
|
| 903 |
+
},
|
| 904 |
+
{
|
| 905 |
+
"epoch": 3.35,
|
| 906 |
+
"learning_rate": 1.984922614612348e-05,
|
| 907 |
+
"loss": 0.1827,
|
| 908 |
+
"step": 1500
|
| 909 |
+
},
|
| 910 |
+
{
|
| 911 |
+
"epoch": 3.37,
|
| 912 |
+
"learning_rate": 1.9846083370136217e-05,
|
| 913 |
+
"loss": 0.2692,
|
| 914 |
+
"step": 1510
|
| 915 |
+
},
|
| 916 |
+
{
|
| 917 |
+
"epoch": 3.39,
|
| 918 |
+
"learning_rate": 1.984290843062358e-05,
|
| 919 |
+
"loss": 0.1865,
|
| 920 |
+
"step": 1520
|
| 921 |
+
},
|
| 922 |
+
{
|
| 923 |
+
"epoch": 3.42,
|
| 924 |
+
"learning_rate": 1.9839701337956922e-05,
|
| 925 |
+
"loss": 0.1885,
|
| 926 |
+
"step": 1530
|
| 927 |
+
},
|
| 928 |
+
{
|
| 929 |
+
"epoch": 3.44,
|
| 930 |
+
"learning_rate": 1.9836462102612643e-05,
|
| 931 |
+
"loss": 0.2657,
|
| 932 |
+
"step": 1540
|
| 933 |
+
},
|
| 934 |
+
{
|
| 935 |
+
"epoch": 3.46,
|
| 936 |
+
"learning_rate": 1.9833190735172117e-05,
|
| 937 |
+
"loss": 0.1626,
|
| 938 |
+
"step": 1550
|
| 939 |
+
},
|
| 940 |
+
{
|
| 941 |
+
"epoch": 3.48,
|
| 942 |
+
"learning_rate": 1.982988724632171e-05,
|
| 943 |
+
"loss": 0.237,
|
| 944 |
+
"step": 1560
|
| 945 |
+
},
|
| 946 |
+
{
|
| 947 |
+
"epoch": 3.5,
|
| 948 |
+
"learning_rate": 1.9826551646852696e-05,
|
| 949 |
+
"loss": 0.2337,
|
| 950 |
+
"step": 1570
|
| 951 |
+
},
|
| 952 |
+
{
|
| 953 |
+
"epoch": 3.53,
|
| 954 |
+
"learning_rate": 1.982318394766124e-05,
|
| 955 |
+
"loss": 0.2103,
|
| 956 |
+
"step": 1580
|
| 957 |
+
},
|
| 958 |
+
{
|
| 959 |
+
"epoch": 3.55,
|
| 960 |
+
"learning_rate": 1.9819784159748394e-05,
|
| 961 |
+
"loss": 0.217,
|
| 962 |
+
"step": 1590
|
| 963 |
+
},
|
| 964 |
+
{
|
| 965 |
+
"epoch": 3.57,
|
| 966 |
+
"learning_rate": 1.9816352294219995e-05,
|
| 967 |
+
"loss": 0.1827,
|
| 968 |
+
"step": 1600
|
| 969 |
+
},
|
| 970 |
+
{
|
| 971 |
+
"epoch": 3.59,
|
| 972 |
+
"learning_rate": 1.981288836228669e-05,
|
| 973 |
+
"loss": 0.2204,
|
| 974 |
+
"step": 1610
|
| 975 |
+
},
|
| 976 |
+
{
|
| 977 |
+
"epoch": 3.62,
|
| 978 |
+
"learning_rate": 1.9809392375263865e-05,
|
| 979 |
+
"loss": 0.2232,
|
| 980 |
+
"step": 1620
|
| 981 |
+
},
|
| 982 |
+
{
|
| 983 |
+
"epoch": 3.64,
|
| 984 |
+
"learning_rate": 1.9805864344571625e-05,
|
| 985 |
+
"loss": 0.1535,
|
| 986 |
+
"step": 1630
|
| 987 |
+
},
|
| 988 |
+
{
|
| 989 |
+
"epoch": 3.66,
|
| 990 |
+
"learning_rate": 1.980230428173474e-05,
|
| 991 |
+
"loss": 0.1905,
|
| 992 |
+
"step": 1640
|
| 993 |
+
},
|
| 994 |
+
{
|
| 995 |
+
"epoch": 3.68,
|
| 996 |
+
"learning_rate": 1.979871219838263e-05,
|
| 997 |
+
"loss": 0.1729,
|
| 998 |
+
"step": 1650
|
| 999 |
+
},
|
| 1000 |
+
{
|
| 1001 |
+
"epoch": 3.71,
|
| 1002 |
+
"learning_rate": 1.9795088106249306e-05,
|
| 1003 |
+
"loss": 0.2792,
|
| 1004 |
+
"step": 1660
|
| 1005 |
+
},
|
| 1006 |
+
{
|
| 1007 |
+
"epoch": 3.73,
|
| 1008 |
+
"learning_rate": 1.9791432017173338e-05,
|
| 1009 |
+
"loss": 0.2183,
|
| 1010 |
+
"step": 1670
|
| 1011 |
+
},
|
| 1012 |
+
{
|
| 1013 |
+
"epoch": 3.75,
|
| 1014 |
+
"learning_rate": 1.978774394309782e-05,
|
| 1015 |
+
"loss": 0.1739,
|
| 1016 |
+
"step": 1680
|
| 1017 |
+
},
|
| 1018 |
+
{
|
| 1019 |
+
"epoch": 3.77,
|
| 1020 |
+
"learning_rate": 1.9784023896070336e-05,
|
| 1021 |
+
"loss": 0.1829,
|
| 1022 |
+
"step": 1690
|
| 1023 |
+
},
|
| 1024 |
+
{
|
| 1025 |
+
"epoch": 3.79,
|
| 1026 |
+
"learning_rate": 1.9780271888242904e-05,
|
| 1027 |
+
"loss": 0.1702,
|
| 1028 |
+
"step": 1700
|
| 1029 |
+
},
|
| 1030 |
+
{
|
| 1031 |
+
"epoch": 3.82,
|
| 1032 |
+
"learning_rate": 1.9776487931871958e-05,
|
| 1033 |
+
"loss": 0.2107,
|
| 1034 |
+
"step": 1710
|
| 1035 |
+
},
|
| 1036 |
+
{
|
| 1037 |
+
"epoch": 3.84,
|
| 1038 |
+
"learning_rate": 1.9772672039318278e-05,
|
| 1039 |
+
"loss": 0.2757,
|
| 1040 |
+
"step": 1720
|
| 1041 |
+
},
|
| 1042 |
+
{
|
| 1043 |
+
"epoch": 3.86,
|
| 1044 |
+
"learning_rate": 1.976882422304699e-05,
|
| 1045 |
+
"loss": 0.2264,
|
| 1046 |
+
"step": 1730
|
| 1047 |
+
},
|
| 1048 |
+
{
|
| 1049 |
+
"epoch": 3.88,
|
| 1050 |
+
"learning_rate": 1.976494449562748e-05,
|
| 1051 |
+
"loss": 0.1797,
|
| 1052 |
+
"step": 1740
|
| 1053 |
+
},
|
| 1054 |
+
{
|
| 1055 |
+
"epoch": 3.91,
|
| 1056 |
+
"learning_rate": 1.9761032869733397e-05,
|
| 1057 |
+
"loss": 0.1772,
|
| 1058 |
+
"step": 1750
|
| 1059 |
+
},
|
| 1060 |
+
{
|
| 1061 |
+
"epoch": 3.93,
|
| 1062 |
+
"learning_rate": 1.9757089358142573e-05,
|
| 1063 |
+
"loss": 0.294,
|
| 1064 |
+
"step": 1760
|
| 1065 |
+
},
|
| 1066 |
+
{
|
| 1067 |
+
"epoch": 3.95,
|
| 1068 |
+
"learning_rate": 1.9753113973737016e-05,
|
| 1069 |
+
"loss": 0.2024,
|
| 1070 |
+
"step": 1770
|
| 1071 |
+
},
|
| 1072 |
+
{
|
| 1073 |
+
"epoch": 3.97,
|
| 1074 |
+
"learning_rate": 1.9749106729502833e-05,
|
| 1075 |
+
"loss": 0.2291,
|
| 1076 |
+
"step": 1780
|
| 1077 |
+
},
|
| 1078 |
+
{
|
| 1079 |
+
"epoch": 4.0,
|
| 1080 |
+
"learning_rate": 1.974506763853022e-05,
|
| 1081 |
+
"loss": 0.1425,
|
| 1082 |
+
"step": 1790
|
| 1083 |
+
},
|
| 1084 |
+
{
|
| 1085 |
+
"epoch": 4.02,
|
| 1086 |
+
"learning_rate": 1.9740996714013394e-05,
|
| 1087 |
+
"loss": 0.1358,
|
| 1088 |
+
"step": 1800
|
| 1089 |
+
},
|
| 1090 |
+
{
|
| 1091 |
+
"epoch": 4.04,
|
| 1092 |
+
"learning_rate": 1.9736893969250567e-05,
|
| 1093 |
+
"loss": 0.143,
|
| 1094 |
+
"step": 1810
|
| 1095 |
+
},
|
| 1096 |
+
{
|
| 1097 |
+
"epoch": 4.06,
|
| 1098 |
+
"learning_rate": 1.97327594176439e-05,
|
| 1099 |
+
"loss": 0.1534,
|
| 1100 |
+
"step": 1820
|
| 1101 |
+
},
|
| 1102 |
+
{
|
| 1103 |
+
"epoch": 4.08,
|
| 1104 |
+
"learning_rate": 1.972859307269944e-05,
|
| 1105 |
+
"loss": 0.1792,
|
| 1106 |
+
"step": 1830
|
| 1107 |
+
},
|
| 1108 |
+
{
|
| 1109 |
+
"epoch": 4.11,
|
| 1110 |
+
"learning_rate": 1.9724394948027102e-05,
|
| 1111 |
+
"loss": 0.1508,
|
| 1112 |
+
"step": 1840
|
| 1113 |
+
},
|
| 1114 |
+
{
|
| 1115 |
+
"epoch": 4.13,
|
| 1116 |
+
"learning_rate": 1.9720165057340616e-05,
|
| 1117 |
+
"loss": 0.1316,
|
| 1118 |
+
"step": 1850
|
| 1119 |
+
},
|
| 1120 |
+
{
|
| 1121 |
+
"epoch": 4.15,
|
| 1122 |
+
"learning_rate": 1.971590341445747e-05,
|
| 1123 |
+
"loss": 0.1316,
|
| 1124 |
+
"step": 1860
|
| 1125 |
+
},
|
| 1126 |
+
{
|
| 1127 |
+
"epoch": 4.17,
|
| 1128 |
+
"learning_rate": 1.9711610033298888e-05,
|
| 1129 |
+
"loss": 0.1558,
|
| 1130 |
+
"step": 1870
|
| 1131 |
+
},
|
| 1132 |
+
{
|
| 1133 |
+
"epoch": 4.2,
|
| 1134 |
+
"learning_rate": 1.9707284927889757e-05,
|
| 1135 |
+
"loss": 0.136,
|
| 1136 |
+
"step": 1880
|
| 1137 |
+
},
|
| 1138 |
+
{
|
| 1139 |
+
"epoch": 4.22,
|
| 1140 |
+
"learning_rate": 1.970292811235861e-05,
|
| 1141 |
+
"loss": 0.1113,
|
| 1142 |
+
"step": 1890
|
| 1143 |
+
},
|
| 1144 |
+
{
|
| 1145 |
+
"epoch": 4.24,
|
| 1146 |
+
"learning_rate": 1.969853960093755e-05,
|
| 1147 |
+
"loss": 0.1663,
|
| 1148 |
+
"step": 1900
|
| 1149 |
+
},
|
| 1150 |
+
{
|
| 1151 |
+
"epoch": 4.26,
|
| 1152 |
+
"learning_rate": 1.969411940796223e-05,
|
| 1153 |
+
"loss": 0.1571,
|
| 1154 |
+
"step": 1910
|
| 1155 |
+
},
|
| 1156 |
+
{
|
| 1157 |
+
"epoch": 4.29,
|
| 1158 |
+
"learning_rate": 1.9689667547871788e-05,
|
| 1159 |
+
"loss": 0.1738,
|
| 1160 |
+
"step": 1920
|
| 1161 |
+
},
|
| 1162 |
+
{
|
| 1163 |
+
"epoch": 4.31,
|
| 1164 |
+
"learning_rate": 1.9685184035208814e-05,
|
| 1165 |
+
"loss": 0.1491,
|
| 1166 |
+
"step": 1930
|
| 1167 |
+
},
|
| 1168 |
+
{
|
| 1169 |
+
"epoch": 4.33,
|
| 1170 |
+
"learning_rate": 1.968066888461929e-05,
|
| 1171 |
+
"loss": 0.206,
|
| 1172 |
+
"step": 1940
|
| 1173 |
+
},
|
| 1174 |
+
{
|
| 1175 |
+
"epoch": 4.35,
|
| 1176 |
+
"learning_rate": 1.9676122110852547e-05,
|
| 1177 |
+
"loss": 0.1792,
|
| 1178 |
+
"step": 1950
|
| 1179 |
+
},
|
| 1180 |
+
{
|
| 1181 |
+
"epoch": 4.38,
|
| 1182 |
+
"learning_rate": 1.9671543728761226e-05,
|
| 1183 |
+
"loss": 0.1409,
|
| 1184 |
+
"step": 1960
|
| 1185 |
+
},
|
| 1186 |
+
{
|
| 1187 |
+
"epoch": 4.4,
|
| 1188 |
+
"learning_rate": 1.9666933753301203e-05,
|
| 1189 |
+
"loss": 0.1634,
|
| 1190 |
+
"step": 1970
|
| 1191 |
+
},
|
| 1192 |
+
{
|
| 1193 |
+
"epoch": 4.42,
|
| 1194 |
+
"learning_rate": 1.9662292199531575e-05,
|
| 1195 |
+
"loss": 0.1211,
|
| 1196 |
+
"step": 1980
|
| 1197 |
+
},
|
| 1198 |
+
{
|
| 1199 |
+
"epoch": 4.44,
|
| 1200 |
+
"learning_rate": 1.9657619082614588e-05,
|
| 1201 |
+
"loss": 0.2405,
|
| 1202 |
+
"step": 1990
|
| 1203 |
+
},
|
| 1204 |
+
{
|
| 1205 |
+
"epoch": 4.46,
|
| 1206 |
+
"learning_rate": 1.965291441781559e-05,
|
| 1207 |
+
"loss": 0.1525,
|
| 1208 |
+
"step": 2000
|
| 1209 |
+
},
|
| 1210 |
+
{
|
| 1211 |
+
"epoch": 4.49,
|
| 1212 |
+
"learning_rate": 1.964817822050299e-05,
|
| 1213 |
+
"loss": 0.1682,
|
| 1214 |
+
"step": 2010
|
| 1215 |
+
},
|
| 1216 |
+
{
|
| 1217 |
+
"epoch": 4.51,
|
| 1218 |
+
"learning_rate": 1.9643410506148196e-05,
|
| 1219 |
+
"loss": 0.1604,
|
| 1220 |
+
"step": 2020
|
| 1221 |
+
},
|
| 1222 |
+
{
|
| 1223 |
+
"epoch": 4.53,
|
| 1224 |
+
"learning_rate": 1.9638611290325576e-05,
|
| 1225 |
+
"loss": 0.1401,
|
| 1226 |
+
"step": 2030
|
| 1227 |
+
},
|
| 1228 |
+
{
|
| 1229 |
+
"epoch": 4.55,
|
| 1230 |
+
"learning_rate": 1.96337805887124e-05,
|
| 1231 |
+
"loss": 0.1205,
|
| 1232 |
+
"step": 2040
|
| 1233 |
+
},
|
| 1234 |
+
{
|
| 1235 |
+
"epoch": 4.58,
|
| 1236 |
+
"learning_rate": 1.9628918417088785e-05,
|
| 1237 |
+
"loss": 0.1611,
|
| 1238 |
+
"step": 2050
|
| 1239 |
+
},
|
| 1240 |
+
{
|
| 1241 |
+
"epoch": 4.6,
|
| 1242 |
+
"learning_rate": 1.9624024791337657e-05,
|
| 1243 |
+
"loss": 0.1259,
|
| 1244 |
+
"step": 2060
|
| 1245 |
+
},
|
| 1246 |
+
{
|
| 1247 |
+
"epoch": 4.62,
|
| 1248 |
+
"learning_rate": 1.9619099727444686e-05,
|
| 1249 |
+
"loss": 0.1404,
|
| 1250 |
+
"step": 2070
|
| 1251 |
+
},
|
| 1252 |
+
{
|
| 1253 |
+
"epoch": 4.64,
|
| 1254 |
+
"learning_rate": 1.961414324149824e-05,
|
| 1255 |
+
"loss": 0.1372,
|
| 1256 |
+
"step": 2080
|
| 1257 |
+
},
|
| 1258 |
+
{
|
| 1259 |
+
"epoch": 4.67,
|
| 1260 |
+
"learning_rate": 1.9609155349689338e-05,
|
| 1261 |
+
"loss": 0.1626,
|
| 1262 |
+
"step": 2090
|
| 1263 |
+
},
|
| 1264 |
+
{
|
| 1265 |
+
"epoch": 4.69,
|
| 1266 |
+
"learning_rate": 1.9604136068311577e-05,
|
| 1267 |
+
"loss": 0.1819,
|
| 1268 |
+
"step": 2100
|
| 1269 |
+
},
|
| 1270 |
+
{
|
| 1271 |
+
"epoch": 4.71,
|
| 1272 |
+
"learning_rate": 1.95990854137611e-05,
|
| 1273 |
+
"loss": 0.1552,
|
| 1274 |
+
"step": 2110
|
| 1275 |
+
},
|
| 1276 |
+
{
|
| 1277 |
+
"epoch": 4.73,
|
| 1278 |
+
"learning_rate": 1.959400340253654e-05,
|
| 1279 |
+
"loss": 0.1783,
|
| 1280 |
+
"step": 2120
|
| 1281 |
+
},
|
| 1282 |
+
{
|
| 1283 |
+
"epoch": 4.75,
|
| 1284 |
+
"learning_rate": 1.9588890051238945e-05,
|
| 1285 |
+
"loss": 0.147,
|
| 1286 |
+
"step": 2130
|
| 1287 |
+
},
|
| 1288 |
+
{
|
| 1289 |
+
"epoch": 4.78,
|
| 1290 |
+
"learning_rate": 1.9583745376571756e-05,
|
| 1291 |
+
"loss": 0.1625,
|
| 1292 |
+
"step": 2140
|
| 1293 |
+
},
|
| 1294 |
+
{
|
| 1295 |
+
"epoch": 4.8,
|
| 1296 |
+
"learning_rate": 1.9578569395340727e-05,
|
| 1297 |
+
"loss": 0.1435,
|
| 1298 |
+
"step": 2150
|
| 1299 |
+
},
|
| 1300 |
+
{
|
| 1301 |
+
"epoch": 4.82,
|
| 1302 |
+
"learning_rate": 1.9573362124453884e-05,
|
| 1303 |
+
"loss": 0.1255,
|
| 1304 |
+
"step": 2160
|
| 1305 |
+
},
|
| 1306 |
+
{
|
| 1307 |
+
"epoch": 4.84,
|
| 1308 |
+
"learning_rate": 1.9568123580921453e-05,
|
| 1309 |
+
"loss": 0.0939,
|
| 1310 |
+
"step": 2170
|
| 1311 |
+
},
|
| 1312 |
+
{
|
| 1313 |
+
"epoch": 4.87,
|
| 1314 |
+
"learning_rate": 1.9562853781855836e-05,
|
| 1315 |
+
"loss": 0.1851,
|
| 1316 |
+
"step": 2180
|
| 1317 |
+
},
|
| 1318 |
+
{
|
| 1319 |
+
"epoch": 4.89,
|
| 1320 |
+
"learning_rate": 1.9557552744471517e-05,
|
| 1321 |
+
"loss": 0.1553,
|
| 1322 |
+
"step": 2190
|
| 1323 |
+
},
|
| 1324 |
+
{
|
| 1325 |
+
"epoch": 4.91,
|
| 1326 |
+
"learning_rate": 1.9552220486085033e-05,
|
| 1327 |
+
"loss": 0.1919,
|
| 1328 |
+
"step": 2200
|
| 1329 |
+
},
|
| 1330 |
+
{
|
| 1331 |
+
"epoch": 4.93,
|
| 1332 |
+
"learning_rate": 1.954685702411491e-05,
|
| 1333 |
+
"loss": 0.1703,
|
| 1334 |
+
"step": 2210
|
| 1335 |
+
},
|
| 1336 |
+
{
|
| 1337 |
+
"epoch": 4.96,
|
| 1338 |
+
"learning_rate": 1.9541462376081594e-05,
|
| 1339 |
+
"loss": 0.1302,
|
| 1340 |
+
"step": 2220
|
| 1341 |
+
},
|
| 1342 |
+
{
|
| 1343 |
+
"epoch": 4.98,
|
| 1344 |
+
"learning_rate": 1.953603655960742e-05,
|
| 1345 |
+
"loss": 0.1564,
|
| 1346 |
+
"step": 2230
|
| 1347 |
+
},
|
| 1348 |
+
{
|
| 1349 |
+
"epoch": 5.0,
|
| 1350 |
+
"learning_rate": 1.9530579592416522e-05,
|
| 1351 |
+
"loss": 0.152,
|
| 1352 |
+
"step": 2240
|
| 1353 |
+
},
|
| 1354 |
+
{
|
| 1355 |
+
"epoch": 5.02,
|
| 1356 |
+
"learning_rate": 1.9525091492334813e-05,
|
| 1357 |
+
"loss": 0.1249,
|
| 1358 |
+
"step": 2250
|
| 1359 |
+
},
|
| 1360 |
+
{
|
| 1361 |
+
"epoch": 5.04,
|
| 1362 |
+
"learning_rate": 1.951957227728988e-05,
|
| 1363 |
+
"loss": 0.1187,
|
| 1364 |
+
"step": 2260
|
| 1365 |
+
},
|
| 1366 |
+
{
|
| 1367 |
+
"epoch": 5.07,
|
| 1368 |
+
"learning_rate": 1.9514021965310972e-05,
|
| 1369 |
+
"loss": 0.091,
|
| 1370 |
+
"step": 2270
|
| 1371 |
+
},
|
| 1372 |
+
{
|
| 1373 |
+
"epoch": 5.09,
|
| 1374 |
+
"learning_rate": 1.950844057452891e-05,
|
| 1375 |
+
"loss": 0.127,
|
| 1376 |
+
"step": 2280
|
| 1377 |
+
},
|
| 1378 |
+
{
|
| 1379 |
+
"epoch": 5.11,
|
| 1380 |
+
"learning_rate": 1.9502828123176042e-05,
|
| 1381 |
+
"loss": 0.11,
|
| 1382 |
+
"step": 2290
|
| 1383 |
+
},
|
| 1384 |
+
{
|
| 1385 |
+
"epoch": 5.13,
|
| 1386 |
+
"learning_rate": 1.9497184629586176e-05,
|
| 1387 |
+
"loss": 0.1098,
|
| 1388 |
+
"step": 2300
|
| 1389 |
+
},
|
| 1390 |
+
{
|
| 1391 |
+
"epoch": 5.16,
|
| 1392 |
+
"learning_rate": 1.949151011219453e-05,
|
| 1393 |
+
"loss": 0.1008,
|
| 1394 |
+
"step": 2310
|
| 1395 |
+
},
|
| 1396 |
+
{
|
| 1397 |
+
"epoch": 5.18,
|
| 1398 |
+
"learning_rate": 1.9485804589537655e-05,
|
| 1399 |
+
"loss": 0.1226,
|
| 1400 |
+
"step": 2320
|
| 1401 |
+
},
|
| 1402 |
+
{
|
| 1403 |
+
"epoch": 5.2,
|
| 1404 |
+
"learning_rate": 1.9480068080253393e-05,
|
| 1405 |
+
"loss": 0.1098,
|
| 1406 |
+
"step": 2330
|
| 1407 |
+
},
|
| 1408 |
+
{
|
| 1409 |
+
"epoch": 5.22,
|
| 1410 |
+
"learning_rate": 1.9474300603080805e-05,
|
| 1411 |
+
"loss": 0.1296,
|
| 1412 |
+
"step": 2340
|
| 1413 |
+
},
|
| 1414 |
+
{
|
| 1415 |
+
"epoch": 5.25,
|
| 1416 |
+
"learning_rate": 1.9468502176860117e-05,
|
| 1417 |
+
"loss": 0.0975,
|
| 1418 |
+
"step": 2350
|
| 1419 |
+
},
|
| 1420 |
+
{
|
| 1421 |
+
"epoch": 5.27,
|
| 1422 |
+
"learning_rate": 1.9462672820532643e-05,
|
| 1423 |
+
"loss": 0.1068,
|
| 1424 |
+
"step": 2360
|
| 1425 |
+
},
|
| 1426 |
+
{
|
| 1427 |
+
"epoch": 5.29,
|
| 1428 |
+
"learning_rate": 1.9456812553140744e-05,
|
| 1429 |
+
"loss": 0.1191,
|
| 1430 |
+
"step": 2370
|
| 1431 |
+
},
|
| 1432 |
+
{
|
| 1433 |
+
"epoch": 5.31,
|
| 1434 |
+
"learning_rate": 1.945092139382776e-05,
|
| 1435 |
+
"loss": 0.102,
|
| 1436 |
+
"step": 2380
|
| 1437 |
+
},
|
| 1438 |
+
{
|
| 1439 |
+
"epoch": 5.33,
|
| 1440 |
+
"learning_rate": 1.944499936183793e-05,
|
| 1441 |
+
"loss": 0.123,
|
| 1442 |
+
"step": 2390
|
| 1443 |
+
},
|
| 1444 |
+
{
|
| 1445 |
+
"epoch": 5.36,
|
| 1446 |
+
"learning_rate": 1.9439046476516356e-05,
|
| 1447 |
+
"loss": 0.1195,
|
| 1448 |
+
"step": 2400
|
| 1449 |
+
},
|
| 1450 |
+
{
|
| 1451 |
+
"epoch": 5.38,
|
| 1452 |
+
"learning_rate": 1.9433062757308914e-05,
|
| 1453 |
+
"loss": 0.1326,
|
| 1454 |
+
"step": 2410
|
| 1455 |
+
},
|
| 1456 |
+
{
|
| 1457 |
+
"epoch": 5.4,
|
| 1458 |
+
"learning_rate": 1.9427048223762212e-05,
|
| 1459 |
+
"loss": 0.1262,
|
| 1460 |
+
"step": 2420
|
| 1461 |
+
},
|
| 1462 |
+
{
|
| 1463 |
+
"epoch": 5.42,
|
| 1464 |
+
"learning_rate": 1.9421002895523515e-05,
|
| 1465 |
+
"loss": 0.0987,
|
| 1466 |
+
"step": 2430
|
| 1467 |
+
},
|
| 1468 |
+
{
|
| 1469 |
+
"epoch": 5.45,
|
| 1470 |
+
"learning_rate": 1.941492679234068e-05,
|
| 1471 |
+
"loss": 0.1205,
|
| 1472 |
+
"step": 2440
|
| 1473 |
+
},
|
| 1474 |
+
{
|
| 1475 |
+
"epoch": 5.47,
|
| 1476 |
+
"learning_rate": 1.9408819934062098e-05,
|
| 1477 |
+
"loss": 0.1237,
|
| 1478 |
+
"step": 2450
|
| 1479 |
+
},
|
| 1480 |
+
{
|
| 1481 |
+
"epoch": 5.49,
|
| 1482 |
+
"learning_rate": 1.9402682340636625e-05,
|
| 1483 |
+
"loss": 0.1588,
|
| 1484 |
+
"step": 2460
|
| 1485 |
+
},
|
| 1486 |
+
{
|
| 1487 |
+
"epoch": 5.51,
|
| 1488 |
+
"learning_rate": 1.9396514032113514e-05,
|
| 1489 |
+
"loss": 0.1303,
|
| 1490 |
+
"step": 2470
|
| 1491 |
+
},
|
| 1492 |
+
{
|
| 1493 |
+
"epoch": 5.54,
|
| 1494 |
+
"learning_rate": 1.9390315028642355e-05,
|
| 1495 |
+
"loss": 0.1057,
|
| 1496 |
+
"step": 2480
|
| 1497 |
+
},
|
| 1498 |
+
{
|
| 1499 |
+
"epoch": 5.56,
|
| 1500 |
+
"learning_rate": 1.9384085350473016e-05,
|
| 1501 |
+
"loss": 0.1137,
|
| 1502 |
+
"step": 2490
|
| 1503 |
+
},
|
| 1504 |
+
{
|
| 1505 |
+
"epoch": 5.58,
|
| 1506 |
+
"learning_rate": 1.9377825017955548e-05,
|
| 1507 |
+
"loss": 0.1101,
|
| 1508 |
+
"step": 2500
|
| 1509 |
+
},
|
| 1510 |
+
{
|
| 1511 |
+
"epoch": 5.6,
|
| 1512 |
+
"learning_rate": 1.9371534051540158e-05,
|
| 1513 |
+
"loss": 0.1159,
|
| 1514 |
+
"step": 2510
|
| 1515 |
+
},
|
| 1516 |
+
{
|
| 1517 |
+
"epoch": 5.62,
|
| 1518 |
+
"learning_rate": 1.9365212471777113e-05,
|
| 1519 |
+
"loss": 0.129,
|
| 1520 |
+
"step": 2520
|
| 1521 |
+
},
|
| 1522 |
+
{
|
| 1523 |
+
"epoch": 5.65,
|
| 1524 |
+
"learning_rate": 1.935886029931668e-05,
|
| 1525 |
+
"loss": 0.1154,
|
| 1526 |
+
"step": 2530
|
| 1527 |
+
},
|
| 1528 |
+
{
|
| 1529 |
+
"epoch": 5.67,
|
| 1530 |
+
"learning_rate": 1.9352477554909067e-05,
|
| 1531 |
+
"loss": 0.1108,
|
| 1532 |
+
"step": 2540
|
| 1533 |
+
},
|
| 1534 |
+
{
|
| 1535 |
+
"epoch": 5.69,
|
| 1536 |
+
"learning_rate": 1.934606425940435e-05,
|
| 1537 |
+
"loss": 0.1231,
|
| 1538 |
+
"step": 2550
|
| 1539 |
+
},
|
| 1540 |
+
{
|
| 1541 |
+
"epoch": 5.71,
|
| 1542 |
+
"learning_rate": 1.93396204337524e-05,
|
| 1543 |
+
"loss": 0.1221,
|
| 1544 |
+
"step": 2560
|
| 1545 |
+
},
|
| 1546 |
+
{
|
| 1547 |
+
"epoch": 5.74,
|
| 1548 |
+
"learning_rate": 1.9333146099002826e-05,
|
| 1549 |
+
"loss": 0.1374,
|
| 1550 |
+
"step": 2570
|
| 1551 |
+
},
|
| 1552 |
+
{
|
| 1553 |
+
"epoch": 5.76,
|
| 1554 |
+
"learning_rate": 1.932664127630488e-05,
|
| 1555 |
+
"loss": 0.1277,
|
| 1556 |
+
"step": 2580
|
| 1557 |
+
},
|
| 1558 |
+
{
|
| 1559 |
+
"epoch": 5.78,
|
| 1560 |
+
"learning_rate": 1.9320105986907433e-05,
|
| 1561 |
+
"loss": 0.1126,
|
| 1562 |
+
"step": 2590
|
| 1563 |
+
},
|
| 1564 |
+
{
|
| 1565 |
+
"epoch": 5.8,
|
| 1566 |
+
"learning_rate": 1.931354025215886e-05,
|
| 1567 |
+
"loss": 0.1074,
|
| 1568 |
+
"step": 2600
|
| 1569 |
+
},
|
| 1570 |
+
{
|
| 1571 |
+
"epoch": 5.83,
|
| 1572 |
+
"learning_rate": 1.9306944093507e-05,
|
| 1573 |
+
"loss": 0.1211,
|
| 1574 |
+
"step": 2610
|
| 1575 |
+
},
|
| 1576 |
+
{
|
| 1577 |
+
"epoch": 5.85,
|
| 1578 |
+
"learning_rate": 1.930031753249907e-05,
|
| 1579 |
+
"loss": 0.124,
|
| 1580 |
+
"step": 2620
|
| 1581 |
+
},
|
| 1582 |
+
{
|
| 1583 |
+
"epoch": 5.87,
|
| 1584 |
+
"learning_rate": 1.9293660590781603e-05,
|
| 1585 |
+
"loss": 0.122,
|
| 1586 |
+
"step": 2630
|
| 1587 |
+
},
|
| 1588 |
+
{
|
| 1589 |
+
"epoch": 5.89,
|
| 1590 |
+
"learning_rate": 1.928697329010037e-05,
|
| 1591 |
+
"loss": 0.1246,
|
| 1592 |
+
"step": 2640
|
| 1593 |
+
},
|
| 1594 |
+
{
|
| 1595 |
+
"epoch": 5.92,
|
| 1596 |
+
"learning_rate": 1.9280255652300326e-05,
|
| 1597 |
+
"loss": 0.1281,
|
| 1598 |
+
"step": 2650
|
| 1599 |
+
},
|
| 1600 |
+
{
|
| 1601 |
+
"epoch": 5.94,
|
| 1602 |
+
"learning_rate": 1.9273507699325513e-05,
|
| 1603 |
+
"loss": 0.1117,
|
| 1604 |
+
"step": 2660
|
| 1605 |
+
},
|
| 1606 |
+
{
|
| 1607 |
+
"epoch": 5.96,
|
| 1608 |
+
"learning_rate": 1.9266729453219008e-05,
|
| 1609 |
+
"loss": 0.1462,
|
| 1610 |
+
"step": 2670
|
| 1611 |
+
},
|
| 1612 |
+
{
|
| 1613 |
+
"epoch": 5.98,
|
| 1614 |
+
"learning_rate": 1.925992093612284e-05,
|
| 1615 |
+
"loss": 0.093,
|
| 1616 |
+
"step": 2680
|
| 1617 |
+
},
|
| 1618 |
+
{
|
| 1619 |
+
"epoch": 6.0,
|
| 1620 |
+
"learning_rate": 1.925308217027792e-05,
|
| 1621 |
+
"loss": 0.1543,
|
| 1622 |
+
"step": 2690
|
| 1623 |
+
},
|
| 1624 |
+
{
|
| 1625 |
+
"epoch": 6.03,
|
| 1626 |
+
"learning_rate": 1.924621317802399e-05,
|
| 1627 |
+
"loss": 0.0921,
|
| 1628 |
+
"step": 2700
|
| 1629 |
+
},
|
| 1630 |
+
{
|
| 1631 |
+
"epoch": 6.05,
|
| 1632 |
+
"learning_rate": 1.9239313981799507e-05,
|
| 1633 |
+
"loss": 0.1139,
|
| 1634 |
+
"step": 2710
|
| 1635 |
+
},
|
| 1636 |
+
{
|
| 1637 |
+
"epoch": 6.07,
|
| 1638 |
+
"learning_rate": 1.92323846041416e-05,
|
| 1639 |
+
"loss": 0.1115,
|
| 1640 |
+
"step": 2720
|
| 1641 |
+
},
|
| 1642 |
+
{
|
| 1643 |
+
"epoch": 6.09,
|
| 1644 |
+
"learning_rate": 1.9225425067685995e-05,
|
| 1645 |
+
"loss": 0.0748,
|
| 1646 |
+
"step": 2730
|
| 1647 |
+
},
|
| 1648 |
+
{
|
| 1649 |
+
"epoch": 6.12,
|
| 1650 |
+
"learning_rate": 1.9218435395166933e-05,
|
| 1651 |
+
"loss": 0.1428,
|
| 1652 |
+
"step": 2740
|
| 1653 |
+
},
|
| 1654 |
+
{
|
| 1655 |
+
"epoch": 6.14,
|
| 1656 |
+
"learning_rate": 1.9211415609417097e-05,
|
| 1657 |
+
"loss": 0.1,
|
| 1658 |
+
"step": 2750
|
| 1659 |
+
},
|
| 1660 |
+
{
|
| 1661 |
+
"epoch": 6.16,
|
| 1662 |
+
"learning_rate": 1.920436573336754e-05,
|
| 1663 |
+
"loss": 0.1159,
|
| 1664 |
+
"step": 2760
|
| 1665 |
+
},
|
| 1666 |
+
{
|
| 1667 |
+
"epoch": 6.18,
|
| 1668 |
+
"learning_rate": 1.919728579004761e-05,
|
| 1669 |
+
"loss": 0.1254,
|
| 1670 |
+
"step": 2770
|
| 1671 |
+
},
|
| 1672 |
+
{
|
| 1673 |
+
"epoch": 6.21,
|
| 1674 |
+
"learning_rate": 1.919017580258487e-05,
|
| 1675 |
+
"loss": 0.0951,
|
| 1676 |
+
"step": 2780
|
| 1677 |
+
},
|
| 1678 |
+
{
|
| 1679 |
+
"epoch": 6.23,
|
| 1680 |
+
"learning_rate": 1.918303579420503e-05,
|
| 1681 |
+
"loss": 0.0798,
|
| 1682 |
+
"step": 2790
|
| 1683 |
+
},
|
| 1684 |
+
{
|
| 1685 |
+
"epoch": 6.25,
|
| 1686 |
+
"learning_rate": 1.917586578823186e-05,
|
| 1687 |
+
"loss": 0.0978,
|
| 1688 |
+
"step": 2800
|
| 1689 |
+
},
|
| 1690 |
+
{
|
| 1691 |
+
"epoch": 6.27,
|
| 1692 |
+
"learning_rate": 1.916866580808714e-05,
|
| 1693 |
+
"loss": 0.1121,
|
| 1694 |
+
"step": 2810
|
| 1695 |
+
},
|
| 1696 |
+
{
|
| 1697 |
+
"epoch": 6.29,
|
| 1698 |
+
"learning_rate": 1.9161435877290538e-05,
|
| 1699 |
+
"loss": 0.0811,
|
| 1700 |
+
"step": 2820
|
| 1701 |
+
},
|
| 1702 |
+
{
|
| 1703 |
+
"epoch": 6.32,
|
| 1704 |
+
"learning_rate": 1.915417601945958e-05,
|
| 1705 |
+
"loss": 0.0841,
|
| 1706 |
+
"step": 2830
|
| 1707 |
+
},
|
| 1708 |
+
{
|
| 1709 |
+
"epoch": 6.34,
|
| 1710 |
+
"learning_rate": 1.9146886258309548e-05,
|
| 1711 |
+
"loss": 0.1058,
|
| 1712 |
+
"step": 2840
|
| 1713 |
+
},
|
| 1714 |
+
{
|
| 1715 |
+
"epoch": 6.36,
|
| 1716 |
+
"learning_rate": 1.9139566617653395e-05,
|
| 1717 |
+
"loss": 0.1103,
|
| 1718 |
+
"step": 2850
|
| 1719 |
+
},
|
| 1720 |
+
{
|
| 1721 |
+
"epoch": 6.38,
|
| 1722 |
+
"learning_rate": 1.9132217121401698e-05,
|
| 1723 |
+
"loss": 0.1101,
|
| 1724 |
+
"step": 2860
|
| 1725 |
+
},
|
| 1726 |
+
{
|
| 1727 |
+
"epoch": 6.41,
|
| 1728 |
+
"learning_rate": 1.912483779356255e-05,
|
| 1729 |
+
"loss": 0.0994,
|
| 1730 |
+
"step": 2870
|
| 1731 |
+
},
|
| 1732 |
+
{
|
| 1733 |
+
"epoch": 6.43,
|
| 1734 |
+
"learning_rate": 1.9117428658241498e-05,
|
| 1735 |
+
"loss": 0.1068,
|
| 1736 |
+
"step": 2880
|
| 1737 |
+
},
|
| 1738 |
+
{
|
| 1739 |
+
"epoch": 6.45,
|
| 1740 |
+
"learning_rate": 1.9109989739641446e-05,
|
| 1741 |
+
"loss": 0.0887,
|
| 1742 |
+
"step": 2890
|
| 1743 |
+
},
|
| 1744 |
+
{
|
| 1745 |
+
"epoch": 6.47,
|
| 1746 |
+
"learning_rate": 1.9102521062062615e-05,
|
| 1747 |
+
"loss": 0.0963,
|
| 1748 |
+
"step": 2900
|
| 1749 |
+
},
|
| 1750 |
+
{
|
| 1751 |
+
"epoch": 6.5,
|
| 1752 |
+
"learning_rate": 1.909502264990241e-05,
|
| 1753 |
+
"loss": 0.1173,
|
| 1754 |
+
"step": 2910
|
| 1755 |
+
},
|
| 1756 |
+
{
|
| 1757 |
+
"epoch": 6.52,
|
| 1758 |
+
"learning_rate": 1.9087494527655383e-05,
|
| 1759 |
+
"loss": 0.1129,
|
| 1760 |
+
"step": 2920
|
| 1761 |
+
},
|
| 1762 |
+
{
|
| 1763 |
+
"epoch": 6.54,
|
| 1764 |
+
"learning_rate": 1.9079936719913138e-05,
|
| 1765 |
+
"loss": 0.1068,
|
| 1766 |
+
"step": 2930
|
| 1767 |
+
},
|
| 1768 |
+
{
|
| 1769 |
+
"epoch": 6.56,
|
| 1770 |
+
"learning_rate": 1.9072349251364238e-05,
|
| 1771 |
+
"loss": 0.0932,
|
| 1772 |
+
"step": 2940
|
| 1773 |
+
},
|
| 1774 |
+
{
|
| 1775 |
+
"epoch": 6.58,
|
| 1776 |
+
"learning_rate": 1.906473214679416e-05,
|
| 1777 |
+
"loss": 0.0824,
|
| 1778 |
+
"step": 2950
|
| 1779 |
+
},
|
| 1780 |
+
{
|
| 1781 |
+
"epoch": 6.61,
|
| 1782 |
+
"learning_rate": 1.9057085431085163e-05,
|
| 1783 |
+
"loss": 0.0976,
|
| 1784 |
+
"step": 2960
|
| 1785 |
+
},
|
| 1786 |
+
{
|
| 1787 |
+
"epoch": 6.63,
|
| 1788 |
+
"learning_rate": 1.904940912921626e-05,
|
| 1789 |
+
"loss": 0.1071,
|
| 1790 |
+
"step": 2970
|
| 1791 |
+
},
|
| 1792 |
+
{
|
| 1793 |
+
"epoch": 6.65,
|
| 1794 |
+
"learning_rate": 1.9041703266263095e-05,
|
| 1795 |
+
"loss": 0.1087,
|
| 1796 |
+
"step": 2980
|
| 1797 |
+
},
|
| 1798 |
+
{
|
| 1799 |
+
"epoch": 6.67,
|
| 1800 |
+
"learning_rate": 1.9033967867397883e-05,
|
| 1801 |
+
"loss": 0.1006,
|
| 1802 |
+
"step": 2990
|
| 1803 |
+
},
|
| 1804 |
+
{
|
| 1805 |
+
"epoch": 6.7,
|
| 1806 |
+
"learning_rate": 1.902620295788932e-05,
|
| 1807 |
+
"loss": 0.1139,
|
| 1808 |
+
"step": 3000
|
| 1809 |
+
},
|
| 1810 |
+
{
|
| 1811 |
+
"epoch": 6.72,
|
| 1812 |
+
"learning_rate": 1.9018408563102505e-05,
|
| 1813 |
+
"loss": 0.1065,
|
| 1814 |
+
"step": 3010
|
| 1815 |
+
},
|
| 1816 |
+
{
|
| 1817 |
+
"epoch": 6.74,
|
| 1818 |
+
"learning_rate": 1.901058470849885e-05,
|
| 1819 |
+
"loss": 0.1183,
|
| 1820 |
+
"step": 3020
|
| 1821 |
+
},
|
| 1822 |
+
{
|
| 1823 |
+
"epoch": 6.76,
|
| 1824 |
+
"learning_rate": 1.900273141963601e-05,
|
| 1825 |
+
"loss": 0.1106,
|
| 1826 |
+
"step": 3030
|
| 1827 |
+
},
|
| 1828 |
+
{
|
| 1829 |
+
"epoch": 6.79,
|
| 1830 |
+
"learning_rate": 1.899484872216778e-05,
|
| 1831 |
+
"loss": 0.1263,
|
| 1832 |
+
"step": 3040
|
| 1833 |
+
},
|
| 1834 |
+
{
|
| 1835 |
+
"epoch": 6.81,
|
| 1836 |
+
"learning_rate": 1.8986936641844025e-05,
|
| 1837 |
+
"loss": 0.0902,
|
| 1838 |
+
"step": 3050
|
| 1839 |
+
},
|
| 1840 |
+
{
|
| 1841 |
+
"epoch": 6.83,
|
| 1842 |
+
"learning_rate": 1.8978995204510605e-05,
|
| 1843 |
+
"loss": 0.1197,
|
| 1844 |
+
"step": 3060
|
| 1845 |
+
},
|
| 1846 |
+
{
|
| 1847 |
+
"epoch": 6.85,
|
| 1848 |
+
"learning_rate": 1.897102443610926e-05,
|
| 1849 |
+
"loss": 0.1006,
|
| 1850 |
+
"step": 3070
|
| 1851 |
+
},
|
| 1852 |
+
{
|
| 1853 |
+
"epoch": 6.88,
|
| 1854 |
+
"learning_rate": 1.8963024362677557e-05,
|
| 1855 |
+
"loss": 0.1146,
|
| 1856 |
+
"step": 3080
|
| 1857 |
+
},
|
| 1858 |
+
{
|
| 1859 |
+
"epoch": 6.9,
|
| 1860 |
+
"learning_rate": 1.895499501034878e-05,
|
| 1861 |
+
"loss": 0.1128,
|
| 1862 |
+
"step": 3090
|
| 1863 |
+
},
|
| 1864 |
+
{
|
| 1865 |
+
"epoch": 6.92,
|
| 1866 |
+
"learning_rate": 1.8946936405351877e-05,
|
| 1867 |
+
"loss": 0.0985,
|
| 1868 |
+
"step": 3100
|
| 1869 |
+
},
|
| 1870 |
+
{
|
| 1871 |
+
"epoch": 6.94,
|
| 1872 |
+
"learning_rate": 1.893884857401133e-05,
|
| 1873 |
+
"loss": 0.091,
|
| 1874 |
+
"step": 3110
|
| 1875 |
+
},
|
| 1876 |
+
{
|
| 1877 |
+
"epoch": 6.96,
|
| 1878 |
+
"learning_rate": 1.8930731542747108e-05,
|
| 1879 |
+
"loss": 0.0872,
|
| 1880 |
+
"step": 3120
|
| 1881 |
+
},
|
| 1882 |
+
{
|
| 1883 |
+
"epoch": 6.99,
|
| 1884 |
+
"learning_rate": 1.8922585338074556e-05,
|
| 1885 |
+
"loss": 0.0998,
|
| 1886 |
+
"step": 3130
|
| 1887 |
+
},
|
| 1888 |
+
{
|
| 1889 |
+
"epoch": 7.01,
|
| 1890 |
+
"learning_rate": 1.8914409986604327e-05,
|
| 1891 |
+
"loss": 0.0923,
|
| 1892 |
+
"step": 3140
|
| 1893 |
+
},
|
| 1894 |
+
{
|
| 1895 |
+
"epoch": 7.03,
|
| 1896 |
+
"learning_rate": 1.8906205515042272e-05,
|
| 1897 |
+
"loss": 0.071,
|
| 1898 |
+
"step": 3150
|
| 1899 |
+
},
|
| 1900 |
+
{
|
| 1901 |
+
"epoch": 7.05,
|
| 1902 |
+
"learning_rate": 1.8897971950189385e-05,
|
| 1903 |
+
"loss": 0.0893,
|
| 1904 |
+
"step": 3160
|
| 1905 |
+
},
|
| 1906 |
+
{
|
| 1907 |
+
"epoch": 7.08,
|
| 1908 |
+
"learning_rate": 1.888970931894169e-05,
|
| 1909 |
+
"loss": 0.0929,
|
| 1910 |
+
"step": 3170
|
| 1911 |
+
},
|
| 1912 |
+
{
|
| 1913 |
+
"epoch": 7.1,
|
| 1914 |
+
"learning_rate": 1.888141764829015e-05,
|
| 1915 |
+
"loss": 0.0892,
|
| 1916 |
+
"step": 3180
|
| 1917 |
+
},
|
| 1918 |
+
{
|
| 1919 |
+
"epoch": 7.12,
|
| 1920 |
+
"learning_rate": 1.8873096965320597e-05,
|
| 1921 |
+
"loss": 0.0739,
|
| 1922 |
+
"step": 3190
|
| 1923 |
+
},
|
| 1924 |
+
{
|
| 1925 |
+
"epoch": 7.14,
|
| 1926 |
+
"learning_rate": 1.886474729721364e-05,
|
| 1927 |
+
"loss": 0.0783,
|
| 1928 |
+
"step": 3200
|
| 1929 |
+
},
|
| 1930 |
+
{
|
| 1931 |
+
"epoch": 7.17,
|
| 1932 |
+
"learning_rate": 1.8856368671244565e-05,
|
| 1933 |
+
"loss": 0.0783,
|
| 1934 |
+
"step": 3210
|
| 1935 |
+
},
|
| 1936 |
+
{
|
| 1937 |
+
"epoch": 7.19,
|
| 1938 |
+
"learning_rate": 1.8847961114783254e-05,
|
| 1939 |
+
"loss": 0.0847,
|
| 1940 |
+
"step": 3220
|
| 1941 |
+
},
|
| 1942 |
+
{
|
| 1943 |
+
"epoch": 7.21,
|
| 1944 |
+
"learning_rate": 1.88395246552941e-05,
|
| 1945 |
+
"loss": 0.0886,
|
| 1946 |
+
"step": 3230
|
| 1947 |
+
},
|
| 1948 |
+
{
|
| 1949 |
+
"epoch": 7.23,
|
| 1950 |
+
"learning_rate": 1.8831059320335902e-05,
|
| 1951 |
+
"loss": 0.088,
|
| 1952 |
+
"step": 3240
|
| 1953 |
+
},
|
| 1954 |
+
{
|
| 1955 |
+
"epoch": 7.25,
|
| 1956 |
+
"learning_rate": 1.882256513756179e-05,
|
| 1957 |
+
"loss": 0.082,
|
| 1958 |
+
"step": 3250
|
| 1959 |
+
},
|
| 1960 |
+
{
|
| 1961 |
+
"epoch": 7.28,
|
| 1962 |
+
"learning_rate": 1.881404213471913e-05,
|
| 1963 |
+
"loss": 0.0779,
|
| 1964 |
+
"step": 3260
|
| 1965 |
+
},
|
| 1966 |
+
{
|
| 1967 |
+
"epoch": 7.3,
|
| 1968 |
+
"learning_rate": 1.8805490339649428e-05,
|
| 1969 |
+
"loss": 0.0926,
|
| 1970 |
+
"step": 3270
|
| 1971 |
+
},
|
| 1972 |
+
{
|
| 1973 |
+
"epoch": 7.32,
|
| 1974 |
+
"learning_rate": 1.879690978028825e-05,
|
| 1975 |
+
"loss": 0.1093,
|
| 1976 |
+
"step": 3280
|
| 1977 |
+
},
|
| 1978 |
+
{
|
| 1979 |
+
"epoch": 7.34,
|
| 1980 |
+
"learning_rate": 1.8788300484665118e-05,
|
| 1981 |
+
"loss": 0.1051,
|
| 1982 |
+
"step": 3290
|
| 1983 |
+
},
|
| 1984 |
+
{
|
| 1985 |
+
"epoch": 7.37,
|
| 1986 |
+
"learning_rate": 1.877966248090343e-05,
|
| 1987 |
+
"loss": 0.0914,
|
| 1988 |
+
"step": 3300
|
| 1989 |
+
},
|
| 1990 |
+
{
|
| 1991 |
+
"epoch": 7.39,
|
| 1992 |
+
"learning_rate": 1.8770995797220356e-05,
|
| 1993 |
+
"loss": 0.0837,
|
| 1994 |
+
"step": 3310
|
| 1995 |
+
},
|
| 1996 |
+
{
|
| 1997 |
+
"epoch": 7.41,
|
| 1998 |
+
"learning_rate": 1.8762300461926766e-05,
|
| 1999 |
+
"loss": 0.0982,
|
| 2000 |
+
"step": 3320
|
| 2001 |
+
},
|
| 2002 |
+
{
|
| 2003 |
+
"epoch": 7.43,
|
| 2004 |
+
"learning_rate": 1.8753576503427107e-05,
|
| 2005 |
+
"loss": 0.0883,
|
| 2006 |
+
"step": 3330
|
| 2007 |
+
},
|
| 2008 |
+
{
|
| 2009 |
+
"epoch": 7.46,
|
| 2010 |
+
"learning_rate": 1.874482395021934e-05,
|
| 2011 |
+
"loss": 0.0949,
|
| 2012 |
+
"step": 3340
|
| 2013 |
+
},
|
| 2014 |
+
{
|
| 2015 |
+
"epoch": 7.48,
|
| 2016 |
+
"learning_rate": 1.8736042830894828e-05,
|
| 2017 |
+
"loss": 0.0872,
|
| 2018 |
+
"step": 3350
|
| 2019 |
+
},
|
| 2020 |
+
{
|
| 2021 |
+
"epoch": 7.5,
|
| 2022 |
+
"learning_rate": 1.8727233174138254e-05,
|
| 2023 |
+
"loss": 0.0851,
|
| 2024 |
+
"step": 3360
|
| 2025 |
+
},
|
| 2026 |
+
{
|
| 2027 |
+
"epoch": 7.52,
|
| 2028 |
+
"learning_rate": 1.871839500872752e-05,
|
| 2029 |
+
"loss": 0.1099,
|
| 2030 |
+
"step": 3370
|
| 2031 |
+
},
|
| 2032 |
+
{
|
| 2033 |
+
"epoch": 7.54,
|
| 2034 |
+
"learning_rate": 1.8709528363533653e-05,
|
| 2035 |
+
"loss": 0.0928,
|
| 2036 |
+
"step": 3380
|
| 2037 |
+
},
|
| 2038 |
+
{
|
| 2039 |
+
"epoch": 7.57,
|
| 2040 |
+
"learning_rate": 1.8700633267520715e-05,
|
| 2041 |
+
"loss": 0.0986,
|
| 2042 |
+
"step": 3390
|
| 2043 |
+
},
|
| 2044 |
+
{
|
| 2045 |
+
"epoch": 7.59,
|
| 2046 |
+
"learning_rate": 1.8691709749745705e-05,
|
| 2047 |
+
"loss": 0.067,
|
| 2048 |
+
"step": 3400
|
| 2049 |
+
},
|
| 2050 |
+
{
|
| 2051 |
+
"epoch": 7.61,
|
| 2052 |
+
"learning_rate": 1.8682757839358472e-05,
|
| 2053 |
+
"loss": 0.0957,
|
| 2054 |
+
"step": 3410
|
| 2055 |
+
},
|
| 2056 |
+
{
|
| 2057 |
+
"epoch": 7.63,
|
| 2058 |
+
"learning_rate": 1.86737775656016e-05,
|
| 2059 |
+
"loss": 0.0998,
|
| 2060 |
+
"step": 3420
|
| 2061 |
+
},
|
| 2062 |
+
{
|
| 2063 |
+
"epoch": 7.66,
|
| 2064 |
+
"learning_rate": 1.866476895781034e-05,
|
| 2065 |
+
"loss": 0.0705,
|
| 2066 |
+
"step": 3430
|
| 2067 |
+
},
|
| 2068 |
+
{
|
| 2069 |
+
"epoch": 7.68,
|
| 2070 |
+
"learning_rate": 1.8655732045412488e-05,
|
| 2071 |
+
"loss": 0.1001,
|
| 2072 |
+
"step": 3440
|
| 2073 |
+
},
|
| 2074 |
+
{
|
| 2075 |
+
"epoch": 7.7,
|
| 2076 |
+
"learning_rate": 1.8646666857928314e-05,
|
| 2077 |
+
"loss": 0.0987,
|
| 2078 |
+
"step": 3450
|
| 2079 |
+
},
|
| 2080 |
+
{
|
| 2081 |
+
"epoch": 7.72,
|
| 2082 |
+
"learning_rate": 1.8637573424970435e-05,
|
| 2083 |
+
"loss": 0.0999,
|
| 2084 |
+
"step": 3460
|
| 2085 |
+
},
|
| 2086 |
+
{
|
| 2087 |
+
"epoch": 7.75,
|
| 2088 |
+
"learning_rate": 1.862845177624375e-05,
|
| 2089 |
+
"loss": 0.0924,
|
| 2090 |
+
"step": 3470
|
| 2091 |
+
},
|
| 2092 |
+
{
|
| 2093 |
+
"epoch": 7.77,
|
| 2094 |
+
"learning_rate": 1.8619301941545323e-05,
|
| 2095 |
+
"loss": 0.0821,
|
| 2096 |
+
"step": 3480
|
| 2097 |
+
},
|
| 2098 |
+
{
|
| 2099 |
+
"epoch": 7.79,
|
| 2100 |
+
"learning_rate": 1.8610123950764288e-05,
|
| 2101 |
+
"loss": 0.0928,
|
| 2102 |
+
"step": 3490
|
| 2103 |
+
},
|
| 2104 |
+
{
|
| 2105 |
+
"epoch": 7.81,
|
| 2106 |
+
"learning_rate": 1.8600917833881765e-05,
|
| 2107 |
+
"loss": 0.0997,
|
| 2108 |
+
"step": 3500
|
| 2109 |
+
},
|
| 2110 |
+
{
|
| 2111 |
+
"epoch": 7.83,
|
| 2112 |
+
"learning_rate": 1.8591683620970737e-05,
|
| 2113 |
+
"loss": 0.0995,
|
| 2114 |
+
"step": 3510
|
| 2115 |
+
},
|
| 2116 |
+
{
|
| 2117 |
+
"epoch": 7.86,
|
| 2118 |
+
"learning_rate": 1.858242134219598e-05,
|
| 2119 |
+
"loss": 0.1074,
|
| 2120 |
+
"step": 3520
|
| 2121 |
+
},
|
| 2122 |
+
{
|
| 2123 |
+
"epoch": 7.88,
|
| 2124 |
+
"learning_rate": 1.8573131027813945e-05,
|
| 2125 |
+
"loss": 0.0789,
|
| 2126 |
+
"step": 3530
|
| 2127 |
+
},
|
| 2128 |
+
{
|
| 2129 |
+
"epoch": 7.9,
|
| 2130 |
+
"learning_rate": 1.856381270817266e-05,
|
| 2131 |
+
"loss": 0.1031,
|
| 2132 |
+
"step": 3540
|
| 2133 |
+
},
|
| 2134 |
+
{
|
| 2135 |
+
"epoch": 7.92,
|
| 2136 |
+
"learning_rate": 1.8554466413711644e-05,
|
| 2137 |
+
"loss": 0.0861,
|
| 2138 |
+
"step": 3550
|
| 2139 |
+
},
|
| 2140 |
+
{
|
| 2141 |
+
"epoch": 7.95,
|
| 2142 |
+
"learning_rate": 1.8545092174961795e-05,
|
| 2143 |
+
"loss": 0.1113,
|
| 2144 |
+
"step": 3560
|
| 2145 |
+
},
|
| 2146 |
+
{
|
| 2147 |
+
"epoch": 7.97,
|
| 2148 |
+
"learning_rate": 1.85356900225453e-05,
|
| 2149 |
+
"loss": 0.0801,
|
| 2150 |
+
"step": 3570
|
| 2151 |
+
},
|
| 2152 |
+
{
|
| 2153 |
+
"epoch": 7.99,
|
| 2154 |
+
"learning_rate": 1.852625998717552e-05,
|
| 2155 |
+
"loss": 0.1016,
|
| 2156 |
+
"step": 3580
|
| 2157 |
+
},
|
| 2158 |
+
{
|
| 2159 |
+
"epoch": 8.01,
|
| 2160 |
+
"learning_rate": 1.8516802099656907e-05,
|
| 2161 |
+
"loss": 0.0901,
|
| 2162 |
+
"step": 3590
|
| 2163 |
+
},
|
| 2164 |
+
{
|
| 2165 |
+
"epoch": 8.04,
|
| 2166 |
+
"learning_rate": 1.8507316390884894e-05,
|
| 2167 |
+
"loss": 0.0762,
|
| 2168 |
+
"step": 3600
|
| 2169 |
+
},
|
| 2170 |
+
{
|
| 2171 |
+
"epoch": 8.06,
|
| 2172 |
+
"learning_rate": 1.84978028918458e-05,
|
| 2173 |
+
"loss": 0.0881,
|
| 2174 |
+
"step": 3610
|
| 2175 |
+
},
|
| 2176 |
+
{
|
| 2177 |
+
"epoch": 8.08,
|
| 2178 |
+
"learning_rate": 1.848826163361671e-05,
|
| 2179 |
+
"loss": 0.0787,
|
| 2180 |
+
"step": 3620
|
| 2181 |
+
},
|
| 2182 |
+
{
|
| 2183 |
+
"epoch": 8.1,
|
| 2184 |
+
"learning_rate": 1.8478692647365402e-05,
|
| 2185 |
+
"loss": 0.0877,
|
| 2186 |
+
"step": 3630
|
| 2187 |
+
},
|
| 2188 |
+
{
|
| 2189 |
+
"epoch": 8.12,
|
| 2190 |
+
"learning_rate": 1.846909596435023e-05,
|
| 2191 |
+
"loss": 0.0935,
|
| 2192 |
+
"step": 3640
|
| 2193 |
+
},
|
| 2194 |
+
{
|
| 2195 |
+
"epoch": 8.15,
|
| 2196 |
+
"learning_rate": 1.845947161592002e-05,
|
| 2197 |
+
"loss": 0.0776,
|
| 2198 |
+
"step": 3650
|
| 2199 |
+
},
|
| 2200 |
+
{
|
| 2201 |
+
"epoch": 8.17,
|
| 2202 |
+
"learning_rate": 1.844981963351397e-05,
|
| 2203 |
+
"loss": 0.0814,
|
| 2204 |
+
"step": 3660
|
| 2205 |
+
},
|
| 2206 |
+
{
|
| 2207 |
+
"epoch": 8.19,
|
| 2208 |
+
"learning_rate": 1.8440140048661547e-05,
|
| 2209 |
+
"loss": 0.0736,
|
| 2210 |
+
"step": 3670
|
| 2211 |
+
},
|
| 2212 |
+
{
|
| 2213 |
+
"epoch": 8.21,
|
| 2214 |
+
"learning_rate": 1.843043289298239e-05,
|
| 2215 |
+
"loss": 0.0783,
|
| 2216 |
+
"step": 3680
|
| 2217 |
+
},
|
| 2218 |
+
{
|
| 2219 |
+
"epoch": 8.24,
|
| 2220 |
+
"learning_rate": 1.8420698198186197e-05,
|
| 2221 |
+
"loss": 0.0766,
|
| 2222 |
+
"step": 3690
|
| 2223 |
+
},
|
| 2224 |
+
{
|
| 2225 |
+
"epoch": 8.26,
|
| 2226 |
+
"learning_rate": 1.841093599607263e-05,
|
| 2227 |
+
"loss": 0.0738,
|
| 2228 |
+
"step": 3700
|
| 2229 |
+
},
|
| 2230 |
+
{
|
| 2231 |
+
"epoch": 8.28,
|
| 2232 |
+
"learning_rate": 1.8401146318531204e-05,
|
| 2233 |
+
"loss": 0.0875,
|
| 2234 |
+
"step": 3710
|
| 2235 |
+
},
|
| 2236 |
+
{
|
| 2237 |
+
"epoch": 8.3,
|
| 2238 |
+
"learning_rate": 1.8391329197541186e-05,
|
| 2239 |
+
"loss": 0.0804,
|
| 2240 |
+
"step": 3720
|
| 2241 |
+
},
|
| 2242 |
+
{
|
| 2243 |
+
"epoch": 8.33,
|
| 2244 |
+
"learning_rate": 1.838148466517149e-05,
|
| 2245 |
+
"loss": 0.0701,
|
| 2246 |
+
"step": 3730
|
| 2247 |
+
},
|
| 2248 |
+
{
|
| 2249 |
+
"epoch": 8.35,
|
| 2250 |
+
"learning_rate": 1.8371612753580583e-05,
|
| 2251 |
+
"loss": 0.0844,
|
| 2252 |
+
"step": 3740
|
| 2253 |
+
},
|
| 2254 |
+
{
|
| 2255 |
+
"epoch": 8.37,
|
| 2256 |
+
"learning_rate": 1.8361713495016354e-05,
|
| 2257 |
+
"loss": 0.0812,
|
| 2258 |
+
"step": 3750
|
| 2259 |
+
},
|
| 2260 |
+
{
|
| 2261 |
+
"epoch": 8.39,
|
| 2262 |
+
"learning_rate": 1.8351786921816037e-05,
|
| 2263 |
+
"loss": 0.0979,
|
| 2264 |
+
"step": 3760
|
| 2265 |
+
},
|
| 2266 |
+
{
|
| 2267 |
+
"epoch": 8.42,
|
| 2268 |
+
"learning_rate": 1.8341833066406083e-05,
|
| 2269 |
+
"loss": 0.0721,
|
| 2270 |
+
"step": 3770
|
| 2271 |
+
},
|
| 2272 |
+
{
|
| 2273 |
+
"epoch": 8.44,
|
| 2274 |
+
"learning_rate": 1.8331851961302075e-05,
|
| 2275 |
+
"loss": 0.0816,
|
| 2276 |
+
"step": 3780
|
| 2277 |
+
},
|
| 2278 |
+
{
|
| 2279 |
+
"epoch": 8.46,
|
| 2280 |
+
"learning_rate": 1.83218436391086e-05,
|
| 2281 |
+
"loss": 0.0714,
|
| 2282 |
+
"step": 3790
|
| 2283 |
+
},
|
| 2284 |
+
{
|
| 2285 |
+
"epoch": 8.48,
|
| 2286 |
+
"learning_rate": 1.8311808132519157e-05,
|
| 2287 |
+
"loss": 0.0623,
|
| 2288 |
+
"step": 3800
|
| 2289 |
+
},
|
| 2290 |
+
{
|
| 2291 |
+
"epoch": 8.5,
|
| 2292 |
+
"learning_rate": 1.830174547431605e-05,
|
| 2293 |
+
"loss": 0.0618,
|
| 2294 |
+
"step": 3810
|
| 2295 |
+
},
|
| 2296 |
+
{
|
| 2297 |
+
"epoch": 8.53,
|
| 2298 |
+
"learning_rate": 1.8291655697370276e-05,
|
| 2299 |
+
"loss": 0.0842,
|
| 2300 |
+
"step": 3820
|
| 2301 |
+
},
|
| 2302 |
+
{
|
| 2303 |
+
"epoch": 8.55,
|
| 2304 |
+
"learning_rate": 1.8281538834641416e-05,
|
| 2305 |
+
"loss": 0.0792,
|
| 2306 |
+
"step": 3830
|
| 2307 |
+
},
|
| 2308 |
+
{
|
| 2309 |
+
"epoch": 8.57,
|
| 2310 |
+
"learning_rate": 1.8271394919177528e-05,
|
| 2311 |
+
"loss": 0.0794,
|
| 2312 |
+
"step": 3840
|
| 2313 |
+
},
|
| 2314 |
+
{
|
| 2315 |
+
"epoch": 8.59,
|
| 2316 |
+
"learning_rate": 1.8261223984115052e-05,
|
| 2317 |
+
"loss": 0.0866,
|
| 2318 |
+
"step": 3850
|
| 2319 |
+
},
|
| 2320 |
+
{
|
| 2321 |
+
"epoch": 8.62,
|
| 2322 |
+
"learning_rate": 1.8251026062678673e-05,
|
| 2323 |
+
"loss": 0.0755,
|
| 2324 |
+
"step": 3860
|
| 2325 |
+
},
|
| 2326 |
+
{
|
| 2327 |
+
"epoch": 8.64,
|
| 2328 |
+
"learning_rate": 1.8240801188181257e-05,
|
| 2329 |
+
"loss": 0.0825,
|
| 2330 |
+
"step": 3870
|
| 2331 |
+
},
|
| 2332 |
+
{
|
| 2333 |
+
"epoch": 8.66,
|
| 2334 |
+
"learning_rate": 1.823054939402369e-05,
|
| 2335 |
+
"loss": 0.0842,
|
| 2336 |
+
"step": 3880
|
| 2337 |
+
},
|
| 2338 |
+
{
|
| 2339 |
+
"epoch": 8.68,
|
| 2340 |
+
"learning_rate": 1.8220270713694803e-05,
|
| 2341 |
+
"loss": 0.0776,
|
| 2342 |
+
"step": 3890
|
| 2343 |
+
},
|
| 2344 |
+
{
|
| 2345 |
+
"epoch": 8.71,
|
| 2346 |
+
"learning_rate": 1.8209965180771262e-05,
|
| 2347 |
+
"loss": 0.097,
|
| 2348 |
+
"step": 3900
|
| 2349 |
+
},
|
| 2350 |
+
{
|
| 2351 |
+
"epoch": 8.73,
|
| 2352 |
+
"learning_rate": 1.8199632828917445e-05,
|
| 2353 |
+
"loss": 0.094,
|
| 2354 |
+
"step": 3910
|
| 2355 |
+
},
|
| 2356 |
+
{
|
| 2357 |
+
"epoch": 8.75,
|
| 2358 |
+
"learning_rate": 1.8189273691885336e-05,
|
| 2359 |
+
"loss": 0.0982,
|
| 2360 |
+
"step": 3920
|
| 2361 |
+
},
|
| 2362 |
+
{
|
| 2363 |
+
"epoch": 8.77,
|
| 2364 |
+
"learning_rate": 1.8178887803514415e-05,
|
| 2365 |
+
"loss": 0.0863,
|
| 2366 |
+
"step": 3930
|
| 2367 |
+
},
|
| 2368 |
+
{
|
| 2369 |
+
"epoch": 8.79,
|
| 2370 |
+
"learning_rate": 1.8168475197731553e-05,
|
| 2371 |
+
"loss": 0.0702,
|
| 2372 |
+
"step": 3940
|
| 2373 |
+
},
|
| 2374 |
+
{
|
| 2375 |
+
"epoch": 8.82,
|
| 2376 |
+
"learning_rate": 1.81580359085509e-05,
|
| 2377 |
+
"loss": 0.0982,
|
| 2378 |
+
"step": 3950
|
| 2379 |
+
},
|
| 2380 |
+
{
|
| 2381 |
+
"epoch": 8.84,
|
| 2382 |
+
"learning_rate": 1.814756997007376e-05,
|
| 2383 |
+
"loss": 0.0843,
|
| 2384 |
+
"step": 3960
|
| 2385 |
+
},
|
| 2386 |
+
{
|
| 2387 |
+
"epoch": 8.86,
|
| 2388 |
+
"learning_rate": 1.8137077416488496e-05,
|
| 2389 |
+
"loss": 0.0759,
|
| 2390 |
+
"step": 3970
|
| 2391 |
+
},
|
| 2392 |
+
{
|
| 2393 |
+
"epoch": 8.88,
|
| 2394 |
+
"learning_rate": 1.8126558282070417e-05,
|
| 2395 |
+
"loss": 0.0956,
|
| 2396 |
+
"step": 3980
|
| 2397 |
+
},
|
| 2398 |
+
{
|
| 2399 |
+
"epoch": 8.91,
|
| 2400 |
+
"learning_rate": 1.8116012601181655e-05,
|
| 2401 |
+
"loss": 0.0852,
|
| 2402 |
+
"step": 3990
|
| 2403 |
+
},
|
| 2404 |
+
{
|
| 2405 |
+
"epoch": 8.93,
|
| 2406 |
+
"learning_rate": 1.810544040827107e-05,
|
| 2407 |
+
"loss": 0.0903,
|
| 2408 |
+
"step": 4000
|
| 2409 |
+
},
|
| 2410 |
+
{
|
| 2411 |
+
"epoch": 8.95,
|
| 2412 |
+
"learning_rate": 1.8094841737874108e-05,
|
| 2413 |
+
"loss": 0.0797,
|
| 2414 |
+
"step": 4010
|
| 2415 |
+
},
|
| 2416 |
+
{
|
| 2417 |
+
"epoch": 8.97,
|
| 2418 |
+
"learning_rate": 1.8084216624612726e-05,
|
| 2419 |
+
"loss": 0.0898,
|
| 2420 |
+
"step": 4020
|
| 2421 |
+
},
|
| 2422 |
+
{
|
| 2423 |
+
"epoch": 9.0,
|
| 2424 |
+
"learning_rate": 1.8073565103195254e-05,
|
| 2425 |
+
"loss": 0.079,
|
| 2426 |
+
"step": 4030
|
| 2427 |
+
},
|
| 2428 |
+
{
|
| 2429 |
+
"epoch": 9.02,
|
| 2430 |
+
"learning_rate": 1.8062887208416282e-05,
|
| 2431 |
+
"loss": 0.1005,
|
| 2432 |
+
"step": 4040
|
| 2433 |
+
},
|
| 2434 |
+
{
|
| 2435 |
+
"epoch": 9.04,
|
| 2436 |
+
"learning_rate": 1.8052182975156557e-05,
|
| 2437 |
+
"loss": 0.0708,
|
| 2438 |
+
"step": 4050
|
| 2439 |
+
},
|
| 2440 |
+
{
|
| 2441 |
+
"epoch": 9.06,
|
| 2442 |
+
"learning_rate": 1.8041452438382873e-05,
|
| 2443 |
+
"loss": 0.0667,
|
| 2444 |
+
"step": 4060
|
| 2445 |
+
},
|
| 2446 |
+
{
|
| 2447 |
+
"epoch": 9.08,
|
| 2448 |
+
"learning_rate": 1.8030695633147926e-05,
|
| 2449 |
+
"loss": 0.06,
|
| 2450 |
+
"step": 4070
|
| 2451 |
+
},
|
| 2452 |
+
{
|
| 2453 |
+
"epoch": 9.11,
|
| 2454 |
+
"learning_rate": 1.801991259459024e-05,
|
| 2455 |
+
"loss": 0.074,
|
| 2456 |
+
"step": 4080
|
| 2457 |
+
},
|
| 2458 |
+
{
|
| 2459 |
+
"epoch": 9.13,
|
| 2460 |
+
"learning_rate": 1.8009103357934024e-05,
|
| 2461 |
+
"loss": 0.0723,
|
| 2462 |
+
"step": 4090
|
| 2463 |
+
},
|
| 2464 |
+
{
|
| 2465 |
+
"epoch": 9.15,
|
| 2466 |
+
"learning_rate": 1.7998267958489076e-05,
|
| 2467 |
+
"loss": 0.0722,
|
| 2468 |
+
"step": 4100
|
| 2469 |
+
},
|
| 2470 |
+
{
|
| 2471 |
+
"epoch": 9.17,
|
| 2472 |
+
"learning_rate": 1.7987406431650653e-05,
|
| 2473 |
+
"loss": 0.0655,
|
| 2474 |
+
"step": 4110
|
| 2475 |
+
},
|
| 2476 |
+
{
|
| 2477 |
+
"epoch": 9.2,
|
| 2478 |
+
"learning_rate": 1.797651881289935e-05,
|
| 2479 |
+
"loss": 0.0819,
|
| 2480 |
+
"step": 4120
|
| 2481 |
+
},
|
| 2482 |
+
{
|
| 2483 |
+
"epoch": 9.22,
|
| 2484 |
+
"learning_rate": 1.7965605137801015e-05,
|
| 2485 |
+
"loss": 0.0928,
|
| 2486 |
+
"step": 4130
|
| 2487 |
+
},
|
| 2488 |
+
{
|
| 2489 |
+
"epoch": 9.24,
|
| 2490 |
+
"learning_rate": 1.79546654420066e-05,
|
| 2491 |
+
"loss": 0.0822,
|
| 2492 |
+
"step": 4140
|
| 2493 |
+
},
|
| 2494 |
+
{
|
| 2495 |
+
"epoch": 9.26,
|
| 2496 |
+
"learning_rate": 1.7943699761252057e-05,
|
| 2497 |
+
"loss": 0.0908,
|
| 2498 |
+
"step": 4150
|
| 2499 |
+
},
|
| 2500 |
+
{
|
| 2501 |
+
"epoch": 9.29,
|
| 2502 |
+
"learning_rate": 1.7932708131358222e-05,
|
| 2503 |
+
"loss": 0.0813,
|
| 2504 |
+
"step": 4160
|
| 2505 |
+
},
|
| 2506 |
+
{
|
| 2507 |
+
"epoch": 9.31,
|
| 2508 |
+
"learning_rate": 1.7921690588230698e-05,
|
| 2509 |
+
"loss": 0.0859,
|
| 2510 |
+
"step": 4170
|
| 2511 |
+
},
|
| 2512 |
+
{
|
| 2513 |
+
"epoch": 9.33,
|
| 2514 |
+
"learning_rate": 1.7910647167859744e-05,
|
| 2515 |
+
"loss": 0.0794,
|
| 2516 |
+
"step": 4180
|
| 2517 |
+
},
|
| 2518 |
+
{
|
| 2519 |
+
"epoch": 9.35,
|
| 2520 |
+
"learning_rate": 1.7899577906320135e-05,
|
| 2521 |
+
"loss": 0.0855,
|
| 2522 |
+
"step": 4190
|
| 2523 |
+
},
|
| 2524 |
+
{
|
| 2525 |
+
"epoch": 9.38,
|
| 2526 |
+
"learning_rate": 1.7888482839771074e-05,
|
| 2527 |
+
"loss": 0.0984,
|
| 2528 |
+
"step": 4200
|
| 2529 |
+
},
|
| 2530 |
+
{
|
| 2531 |
+
"epoch": 9.4,
|
| 2532 |
+
"learning_rate": 1.787736200445606e-05,
|
| 2533 |
+
"loss": 0.0797,
|
| 2534 |
+
"step": 4210
|
| 2535 |
+
},
|
| 2536 |
+
{
|
| 2537 |
+
"epoch": 9.42,
|
| 2538 |
+
"learning_rate": 1.786621543670275e-05,
|
| 2539 |
+
"loss": 0.0772,
|
| 2540 |
+
"step": 4220
|
| 2541 |
+
},
|
| 2542 |
+
{
|
| 2543 |
+
"epoch": 9.44,
|
| 2544 |
+
"learning_rate": 1.7855043172922883e-05,
|
| 2545 |
+
"loss": 0.0666,
|
| 2546 |
+
"step": 4230
|
| 2547 |
+
},
|
| 2548 |
+
{
|
| 2549 |
+
"epoch": 9.46,
|
| 2550 |
+
"learning_rate": 1.7843845249612122e-05,
|
| 2551 |
+
"loss": 0.0728,
|
| 2552 |
+
"step": 4240
|
| 2553 |
+
},
|
| 2554 |
+
{
|
| 2555 |
+
"epoch": 9.49,
|
| 2556 |
+
"learning_rate": 1.7832621703349956e-05,
|
| 2557 |
+
"loss": 0.0825,
|
| 2558 |
+
"step": 4250
|
| 2559 |
+
},
|
| 2560 |
+
{
|
| 2561 |
+
"epoch": 9.51,
|
| 2562 |
+
"learning_rate": 1.7821372570799574e-05,
|
| 2563 |
+
"loss": 0.0698,
|
| 2564 |
+
"step": 4260
|
| 2565 |
+
},
|
| 2566 |
+
{
|
| 2567 |
+
"epoch": 9.53,
|
| 2568 |
+
"learning_rate": 1.781009788870775e-05,
|
| 2569 |
+
"loss": 0.074,
|
| 2570 |
+
"step": 4270
|
| 2571 |
+
},
|
| 2572 |
+
{
|
| 2573 |
+
"epoch": 9.55,
|
| 2574 |
+
"learning_rate": 1.779879769390471e-05,
|
| 2575 |
+
"loss": 0.0862,
|
| 2576 |
+
"step": 4280
|
| 2577 |
+
},
|
| 2578 |
+
{
|
| 2579 |
+
"epoch": 9.58,
|
| 2580 |
+
"learning_rate": 1.7787472023304023e-05,
|
| 2581 |
+
"loss": 0.0768,
|
| 2582 |
+
"step": 4290
|
| 2583 |
+
},
|
| 2584 |
+
{
|
| 2585 |
+
"epoch": 9.6,
|
| 2586 |
+
"learning_rate": 1.7776120913902487e-05,
|
| 2587 |
+
"loss": 0.0814,
|
| 2588 |
+
"step": 4300
|
| 2589 |
+
},
|
| 2590 |
+
{
|
| 2591 |
+
"epoch": 9.62,
|
| 2592 |
+
"learning_rate": 1.7764744402779992e-05,
|
| 2593 |
+
"loss": 0.0829,
|
| 2594 |
+
"step": 4310
|
| 2595 |
+
},
|
| 2596 |
+
{
|
| 2597 |
+
"epoch": 9.64,
|
| 2598 |
+
"learning_rate": 1.77533425270994e-05,
|
| 2599 |
+
"loss": 0.0844,
|
| 2600 |
+
"step": 4320
|
| 2601 |
+
},
|
| 2602 |
+
{
|
| 2603 |
+
"epoch": 9.67,
|
| 2604 |
+
"learning_rate": 1.7741915324106445e-05,
|
| 2605 |
+
"loss": 0.0803,
|
| 2606 |
+
"step": 4330
|
| 2607 |
+
},
|
| 2608 |
+
{
|
| 2609 |
+
"epoch": 9.69,
|
| 2610 |
+
"learning_rate": 1.7730462831129584e-05,
|
| 2611 |
+
"loss": 0.0819,
|
| 2612 |
+
"step": 4340
|
| 2613 |
+
},
|
| 2614 |
+
{
|
| 2615 |
+
"epoch": 9.71,
|
| 2616 |
+
"learning_rate": 1.771898508557989e-05,
|
| 2617 |
+
"loss": 0.0692,
|
| 2618 |
+
"step": 4350
|
| 2619 |
+
},
|
| 2620 |
+
{
|
| 2621 |
+
"epoch": 9.73,
|
| 2622 |
+
"learning_rate": 1.7707482124950923e-05,
|
| 2623 |
+
"loss": 0.0777,
|
| 2624 |
+
"step": 4360
|
| 2625 |
+
},
|
| 2626 |
+
{
|
| 2627 |
+
"epoch": 9.75,
|
| 2628 |
+
"learning_rate": 1.7695953986818625e-05,
|
| 2629 |
+
"loss": 0.089,
|
| 2630 |
+
"step": 4370
|
| 2631 |
+
},
|
| 2632 |
+
{
|
| 2633 |
+
"epoch": 9.78,
|
| 2634 |
+
"learning_rate": 1.7684400708841165e-05,
|
| 2635 |
+
"loss": 0.092,
|
| 2636 |
+
"step": 4380
|
| 2637 |
+
},
|
| 2638 |
+
{
|
| 2639 |
+
"epoch": 9.8,
|
| 2640 |
+
"learning_rate": 1.7672822328758852e-05,
|
| 2641 |
+
"loss": 0.1097,
|
| 2642 |
+
"step": 4390
|
| 2643 |
+
},
|
| 2644 |
+
{
|
| 2645 |
+
"epoch": 9.82,
|
| 2646 |
+
"learning_rate": 1.7661218884393977e-05,
|
| 2647 |
+
"loss": 0.0755,
|
| 2648 |
+
"step": 4400
|
| 2649 |
+
},
|
| 2650 |
+
{
|
| 2651 |
+
"epoch": 9.84,
|
| 2652 |
+
"learning_rate": 1.764959041365073e-05,
|
| 2653 |
+
"loss": 0.0787,
|
| 2654 |
+
"step": 4410
|
| 2655 |
+
},
|
| 2656 |
+
{
|
| 2657 |
+
"epoch": 9.87,
|
| 2658 |
+
"learning_rate": 1.7637936954515026e-05,
|
| 2659 |
+
"loss": 0.0708,
|
| 2660 |
+
"step": 4420
|
| 2661 |
+
},
|
| 2662 |
+
{
|
| 2663 |
+
"epoch": 9.89,
|
| 2664 |
+
"learning_rate": 1.7626258545054425e-05,
|
| 2665 |
+
"loss": 0.0778,
|
| 2666 |
+
"step": 4430
|
| 2667 |
+
},
|
| 2668 |
+
{
|
| 2669 |
+
"epoch": 9.91,
|
| 2670 |
+
"learning_rate": 1.7614555223417987e-05,
|
| 2671 |
+
"loss": 0.0725,
|
| 2672 |
+
"step": 4440
|
| 2673 |
+
},
|
| 2674 |
+
{
|
| 2675 |
+
"epoch": 9.93,
|
| 2676 |
+
"learning_rate": 1.7602827027836153e-05,
|
| 2677 |
+
"loss": 0.077,
|
| 2678 |
+
"step": 4450
|
| 2679 |
+
},
|
| 2680 |
+
{
|
| 2681 |
+
"epoch": 9.96,
|
| 2682 |
+
"learning_rate": 1.7591073996620607e-05,
|
| 2683 |
+
"loss": 0.0809,
|
| 2684 |
+
"step": 4460
|
| 2685 |
+
},
|
| 2686 |
+
{
|
| 2687 |
+
"epoch": 9.98,
|
| 2688 |
+
"learning_rate": 1.757929616816418e-05,
|
| 2689 |
+
"loss": 0.0978,
|
| 2690 |
+
"step": 4470
|
| 2691 |
+
},
|
| 2692 |
+
{
|
| 2693 |
+
"epoch": 10.0,
|
| 2694 |
+
"learning_rate": 1.756749358094069e-05,
|
| 2695 |
+
"loss": 0.0759,
|
| 2696 |
+
"step": 4480
|
| 2697 |
+
},
|
| 2698 |
+
{
|
| 2699 |
+
"epoch": 10.02,
|
| 2700 |
+
"learning_rate": 1.755566627350484e-05,
|
| 2701 |
+
"loss": 0.0678,
|
| 2702 |
+
"step": 4490
|
| 2703 |
+
},
|
| 2704 |
+
{
|
| 2705 |
+
"epoch": 10.04,
|
| 2706 |
+
"learning_rate": 1.754381428449209e-05,
|
| 2707 |
+
"loss": 0.0706,
|
| 2708 |
+
"step": 4500
|
| 2709 |
+
},
|
| 2710 |
+
{
|
| 2711 |
+
"epoch": 10.07,
|
| 2712 |
+
"learning_rate": 1.7531937652618515e-05,
|
| 2713 |
+
"loss": 0.0665,
|
| 2714 |
+
"step": 4510
|
| 2715 |
+
},
|
| 2716 |
+
{
|
| 2717 |
+
"epoch": 10.09,
|
| 2718 |
+
"learning_rate": 1.7520036416680687e-05,
|
| 2719 |
+
"loss": 0.0575,
|
| 2720 |
+
"step": 4520
|
| 2721 |
+
},
|
| 2722 |
+
{
|
| 2723 |
+
"epoch": 10.11,
|
| 2724 |
+
"learning_rate": 1.7508110615555573e-05,
|
| 2725 |
+
"loss": 0.0684,
|
| 2726 |
+
"step": 4530
|
| 2727 |
+
},
|
| 2728 |
+
{
|
| 2729 |
+
"epoch": 10.13,
|
| 2730 |
+
"learning_rate": 1.749616028820036e-05,
|
| 2731 |
+
"loss": 0.0869,
|
| 2732 |
+
"step": 4540
|
| 2733 |
+
},
|
| 2734 |
+
{
|
| 2735 |
+
"epoch": 10.16,
|
| 2736 |
+
"learning_rate": 1.748418547365236e-05,
|
| 2737 |
+
"loss": 0.0648,
|
| 2738 |
+
"step": 4550
|
| 2739 |
+
},
|
| 2740 |
+
{
|
| 2741 |
+
"epoch": 10.18,
|
| 2742 |
+
"learning_rate": 1.7472186211028884e-05,
|
| 2743 |
+
"loss": 0.0673,
|
| 2744 |
+
"step": 4560
|
| 2745 |
+
},
|
| 2746 |
+
{
|
| 2747 |
+
"epoch": 10.2,
|
| 2748 |
+
"learning_rate": 1.7460162539527104e-05,
|
| 2749 |
+
"loss": 0.0677,
|
| 2750 |
+
"step": 4570
|
| 2751 |
+
},
|
| 2752 |
+
{
|
| 2753 |
+
"epoch": 10.22,
|
| 2754 |
+
"learning_rate": 1.7448114498423915e-05,
|
| 2755 |
+
"loss": 0.0687,
|
| 2756 |
+
"step": 4580
|
| 2757 |
+
},
|
| 2758 |
+
{
|
| 2759 |
+
"epoch": 10.25,
|
| 2760 |
+
"learning_rate": 1.743604212707583e-05,
|
| 2761 |
+
"loss": 0.0701,
|
| 2762 |
+
"step": 4590
|
| 2763 |
+
},
|
| 2764 |
+
{
|
| 2765 |
+
"epoch": 10.27,
|
| 2766 |
+
"learning_rate": 1.7423945464918835e-05,
|
| 2767 |
+
"loss": 0.0645,
|
| 2768 |
+
"step": 4600
|
| 2769 |
+
},
|
| 2770 |
+
{
|
| 2771 |
+
"epoch": 10.29,
|
| 2772 |
+
"learning_rate": 1.741182455146827e-05,
|
| 2773 |
+
"loss": 0.084,
|
| 2774 |
+
"step": 4610
|
| 2775 |
+
},
|
| 2776 |
+
{
|
| 2777 |
+
"epoch": 10.31,
|
| 2778 |
+
"learning_rate": 1.739967942631869e-05,
|
| 2779 |
+
"loss": 0.0649,
|
| 2780 |
+
"step": 4620
|
| 2781 |
+
},
|
| 2782 |
+
{
|
| 2783 |
+
"epoch": 10.33,
|
| 2784 |
+
"learning_rate": 1.738751012914375e-05,
|
| 2785 |
+
"loss": 0.0762,
|
| 2786 |
+
"step": 4630
|
| 2787 |
+
},
|
| 2788 |
+
{
|
| 2789 |
+
"epoch": 10.36,
|
| 2790 |
+
"learning_rate": 1.7375316699696042e-05,
|
| 2791 |
+
"loss": 0.0827,
|
| 2792 |
+
"step": 4640
|
| 2793 |
+
},
|
| 2794 |
+
{
|
| 2795 |
+
"epoch": 10.38,
|
| 2796 |
+
"learning_rate": 1.736309917780702e-05,
|
| 2797 |
+
"loss": 0.0691,
|
| 2798 |
+
"step": 4650
|
| 2799 |
+
},
|
| 2800 |
+
{
|
| 2801 |
+
"epoch": 10.4,
|
| 2802 |
+
"learning_rate": 1.7350857603386816e-05,
|
| 2803 |
+
"loss": 0.0816,
|
| 2804 |
+
"step": 4660
|
| 2805 |
+
},
|
| 2806 |
+
{
|
| 2807 |
+
"epoch": 10.42,
|
| 2808 |
+
"learning_rate": 1.733859201642415e-05,
|
| 2809 |
+
"loss": 0.0832,
|
| 2810 |
+
"step": 4670
|
| 2811 |
+
},
|
| 2812 |
+
{
|
| 2813 |
+
"epoch": 10.45,
|
| 2814 |
+
"learning_rate": 1.732630245698617e-05,
|
| 2815 |
+
"loss": 0.0778,
|
| 2816 |
+
"step": 4680
|
| 2817 |
+
},
|
| 2818 |
+
{
|
| 2819 |
+
"epoch": 10.47,
|
| 2820 |
+
"learning_rate": 1.7313988965218337e-05,
|
| 2821 |
+
"loss": 0.0765,
|
| 2822 |
+
"step": 4690
|
| 2823 |
+
},
|
| 2824 |
+
{
|
| 2825 |
+
"epoch": 10.49,
|
| 2826 |
+
"learning_rate": 1.730165158134429e-05,
|
| 2827 |
+
"loss": 0.0632,
|
| 2828 |
+
"step": 4700
|
| 2829 |
+
},
|
| 2830 |
+
{
|
| 2831 |
+
"epoch": 10.51,
|
| 2832 |
+
"learning_rate": 1.7289290345665713e-05,
|
| 2833 |
+
"loss": 0.0822,
|
| 2834 |
+
"step": 4710
|
| 2835 |
+
},
|
| 2836 |
+
{
|
| 2837 |
+
"epoch": 10.54,
|
| 2838 |
+
"learning_rate": 1.7276905298562208e-05,
|
| 2839 |
+
"loss": 0.0615,
|
| 2840 |
+
"step": 4720
|
| 2841 |
+
},
|
| 2842 |
+
{
|
| 2843 |
+
"epoch": 10.56,
|
| 2844 |
+
"learning_rate": 1.7264496480491165e-05,
|
| 2845 |
+
"loss": 0.0701,
|
| 2846 |
+
"step": 4730
|
| 2847 |
+
},
|
| 2848 |
+
{
|
| 2849 |
+
"epoch": 10.58,
|
| 2850 |
+
"learning_rate": 1.7252063931987607e-05,
|
| 2851 |
+
"loss": 0.0682,
|
| 2852 |
+
"step": 4740
|
| 2853 |
+
},
|
| 2854 |
+
{
|
| 2855 |
+
"epoch": 10.6,
|
| 2856 |
+
"learning_rate": 1.7239607693664103e-05,
|
| 2857 |
+
"loss": 0.0991,
|
| 2858 |
+
"step": 4750
|
| 2859 |
+
},
|
| 2860 |
+
{
|
| 2861 |
+
"epoch": 10.62,
|
| 2862 |
+
"learning_rate": 1.7227127806210578e-05,
|
| 2863 |
+
"loss": 0.0764,
|
| 2864 |
+
"step": 4760
|
| 2865 |
+
},
|
| 2866 |
+
{
|
| 2867 |
+
"epoch": 10.65,
|
| 2868 |
+
"learning_rate": 1.7214624310394236e-05,
|
| 2869 |
+
"loss": 0.0706,
|
| 2870 |
+
"step": 4770
|
| 2871 |
+
},
|
| 2872 |
+
{
|
| 2873 |
+
"epoch": 10.67,
|
| 2874 |
+
"learning_rate": 1.7202097247059383e-05,
|
| 2875 |
+
"loss": 0.0863,
|
| 2876 |
+
"step": 4780
|
| 2877 |
+
},
|
| 2878 |
+
{
|
| 2879 |
+
"epoch": 10.69,
|
| 2880 |
+
"learning_rate": 1.7189546657127315e-05,
|
| 2881 |
+
"loss": 0.0813,
|
| 2882 |
+
"step": 4790
|
| 2883 |
+
},
|
| 2884 |
+
{
|
| 2885 |
+
"epoch": 10.71,
|
| 2886 |
+
"learning_rate": 1.717697258159619e-05,
|
| 2887 |
+
"loss": 0.0847,
|
| 2888 |
+
"step": 4800
|
| 2889 |
+
},
|
| 2890 |
+
{
|
| 2891 |
+
"epoch": 10.74,
|
| 2892 |
+
"learning_rate": 1.7164375061540877e-05,
|
| 2893 |
+
"loss": 0.0805,
|
| 2894 |
+
"step": 4810
|
| 2895 |
+
},
|
| 2896 |
+
{
|
| 2897 |
+
"epoch": 10.76,
|
| 2898 |
+
"learning_rate": 1.715175413811283e-05,
|
| 2899 |
+
"loss": 0.0877,
|
| 2900 |
+
"step": 4820
|
| 2901 |
+
},
|
| 2902 |
+
{
|
| 2903 |
+
"epoch": 10.78,
|
| 2904 |
+
"learning_rate": 1.7139109852539954e-05,
|
| 2905 |
+
"loss": 0.0713,
|
| 2906 |
+
"step": 4830
|
| 2907 |
+
},
|
| 2908 |
+
{
|
| 2909 |
+
"epoch": 10.8,
|
| 2910 |
+
"learning_rate": 1.712644224612647e-05,
|
| 2911 |
+
"loss": 0.0776,
|
| 2912 |
+
"step": 4840
|
| 2913 |
+
},
|
| 2914 |
+
{
|
| 2915 |
+
"epoch": 10.83,
|
| 2916 |
+
"learning_rate": 1.7113751360252777e-05,
|
| 2917 |
+
"loss": 0.0685,
|
| 2918 |
+
"step": 4850
|
| 2919 |
+
},
|
| 2920 |
+
{
|
| 2921 |
+
"epoch": 10.85,
|
| 2922 |
+
"learning_rate": 1.7101037236375324e-05,
|
| 2923 |
+
"loss": 0.0825,
|
| 2924 |
+
"step": 4860
|
| 2925 |
+
},
|
| 2926 |
+
{
|
| 2927 |
+
"epoch": 10.87,
|
| 2928 |
+
"learning_rate": 1.708829991602647e-05,
|
| 2929 |
+
"loss": 0.0747,
|
| 2930 |
+
"step": 4870
|
| 2931 |
+
},
|
| 2932 |
+
{
|
| 2933 |
+
"epoch": 10.89,
|
| 2934 |
+
"learning_rate": 1.707553944081434e-05,
|
| 2935 |
+
"loss": 0.086,
|
| 2936 |
+
"step": 4880
|
| 2937 |
+
},
|
| 2938 |
+
{
|
| 2939 |
+
"epoch": 10.92,
|
| 2940 |
+
"learning_rate": 1.7062755852422705e-05,
|
| 2941 |
+
"loss": 0.0729,
|
| 2942 |
+
"step": 4890
|
| 2943 |
+
},
|
| 2944 |
+
{
|
| 2945 |
+
"epoch": 10.94,
|
| 2946 |
+
"learning_rate": 1.7049949192610845e-05,
|
| 2947 |
+
"loss": 0.0688,
|
| 2948 |
+
"step": 4900
|
| 2949 |
+
},
|
| 2950 |
+
{
|
| 2951 |
+
"epoch": 10.96,
|
| 2952 |
+
"learning_rate": 1.7037119503213385e-05,
|
| 2953 |
+
"loss": 0.0755,
|
| 2954 |
+
"step": 4910
|
| 2955 |
+
},
|
| 2956 |
+
{
|
| 2957 |
+
"epoch": 10.98,
|
| 2958 |
+
"learning_rate": 1.7024266826140194e-05,
|
| 2959 |
+
"loss": 0.0877,
|
| 2960 |
+
"step": 4920
|
| 2961 |
+
},
|
| 2962 |
+
{
|
| 2963 |
+
"epoch": 11.0,
|
| 2964 |
+
"learning_rate": 1.701139120337624e-05,
|
| 2965 |
+
"loss": 0.0785,
|
| 2966 |
+
"step": 4930
|
| 2967 |
+
},
|
| 2968 |
+
{
|
| 2969 |
+
"epoch": 11.03,
|
| 2970 |
+
"learning_rate": 1.699849267698143e-05,
|
| 2971 |
+
"loss": 0.0587,
|
| 2972 |
+
"step": 4940
|
| 2973 |
+
},
|
| 2974 |
+
{
|
| 2975 |
+
"epoch": 11.05,
|
| 2976 |
+
"learning_rate": 1.698557128909049e-05,
|
| 2977 |
+
"loss": 0.0584,
|
| 2978 |
+
"step": 4950
|
| 2979 |
+
},
|
| 2980 |
+
{
|
| 2981 |
+
"epoch": 11.07,
|
| 2982 |
+
"learning_rate": 1.6972627081912848e-05,
|
| 2983 |
+
"loss": 0.0641,
|
| 2984 |
+
"step": 4960
|
| 2985 |
+
},
|
| 2986 |
+
{
|
| 2987 |
+
"epoch": 11.09,
|
| 2988 |
+
"learning_rate": 1.695966009773244e-05,
|
| 2989 |
+
"loss": 0.0678,
|
| 2990 |
+
"step": 4970
|
| 2991 |
+
},
|
| 2992 |
+
{
|
| 2993 |
+
"epoch": 11.12,
|
| 2994 |
+
"learning_rate": 1.6946670378907635e-05,
|
| 2995 |
+
"loss": 0.0597,
|
| 2996 |
+
"step": 4980
|
| 2997 |
+
},
|
| 2998 |
+
{
|
| 2999 |
+
"epoch": 11.14,
|
| 3000 |
+
"learning_rate": 1.6933657967871056e-05,
|
| 3001 |
+
"loss": 0.0667,
|
| 3002 |
+
"step": 4990
|
| 3003 |
+
},
|
| 3004 |
+
{
|
| 3005 |
+
"epoch": 11.16,
|
| 3006 |
+
"learning_rate": 1.6920622907129452e-05,
|
| 3007 |
+
"loss": 0.0651,
|
| 3008 |
+
"step": 5000
|
| 3009 |
+
},
|
| 3010 |
+
{
|
| 3011 |
+
"epoch": 11.18,
|
| 3012 |
+
"learning_rate": 1.690756523926356e-05,
|
| 3013 |
+
"loss": 0.0648,
|
| 3014 |
+
"step": 5010
|
| 3015 |
+
},
|
| 3016 |
+
{
|
| 3017 |
+
"epoch": 11.21,
|
| 3018 |
+
"learning_rate": 1.6894485006927972e-05,
|
| 3019 |
+
"loss": 0.0671,
|
| 3020 |
+
"step": 5020
|
| 3021 |
+
},
|
| 3022 |
+
{
|
| 3023 |
+
"epoch": 11.23,
|
| 3024 |
+
"learning_rate": 1.688138225285098e-05,
|
| 3025 |
+
"loss": 0.0708,
|
| 3026 |
+
"step": 5030
|
| 3027 |
+
},
|
| 3028 |
+
{
|
| 3029 |
+
"epoch": 11.25,
|
| 3030 |
+
"learning_rate": 1.6868257019834464e-05,
|
| 3031 |
+
"loss": 0.084,
|
| 3032 |
+
"step": 5040
|
| 3033 |
+
},
|
| 3034 |
+
{
|
| 3035 |
+
"epoch": 11.27,
|
| 3036 |
+
"learning_rate": 1.685510935075371e-05,
|
| 3037 |
+
"loss": 0.0592,
|
| 3038 |
+
"step": 5050
|
| 3039 |
+
},
|
| 3040 |
+
{
|
| 3041 |
+
"epoch": 11.29,
|
| 3042 |
+
"learning_rate": 1.684193928855731e-05,
|
| 3043 |
+
"loss": 0.0681,
|
| 3044 |
+
"step": 5060
|
| 3045 |
+
},
|
| 3046 |
+
{
|
| 3047 |
+
"epoch": 11.32,
|
| 3048 |
+
"learning_rate": 1.682874687626701e-05,
|
| 3049 |
+
"loss": 0.0765,
|
| 3050 |
+
"step": 5070
|
| 3051 |
+
},
|
| 3052 |
+
{
|
| 3053 |
+
"epoch": 11.34,
|
| 3054 |
+
"learning_rate": 1.6815532156977553e-05,
|
| 3055 |
+
"loss": 0.0853,
|
| 3056 |
+
"step": 5080
|
| 3057 |
+
},
|
| 3058 |
+
{
|
| 3059 |
+
"epoch": 11.36,
|
| 3060 |
+
"learning_rate": 1.6802295173856558e-05,
|
| 3061 |
+
"loss": 0.0756,
|
| 3062 |
+
"step": 5090
|
| 3063 |
+
},
|
| 3064 |
+
{
|
| 3065 |
+
"epoch": 11.38,
|
| 3066 |
+
"learning_rate": 1.678903597014437e-05,
|
| 3067 |
+
"loss": 0.0922,
|
| 3068 |
+
"step": 5100
|
| 3069 |
+
},
|
| 3070 |
+
{
|
| 3071 |
+
"epoch": 11.41,
|
| 3072 |
+
"learning_rate": 1.6775754589153913e-05,
|
| 3073 |
+
"loss": 0.0704,
|
| 3074 |
+
"step": 5110
|
| 3075 |
+
},
|
| 3076 |
+
{
|
| 3077 |
+
"epoch": 11.43,
|
| 3078 |
+
"learning_rate": 1.676245107427058e-05,
|
| 3079 |
+
"loss": 0.0697,
|
| 3080 |
+
"step": 5120
|
| 3081 |
+
},
|
| 3082 |
+
{
|
| 3083 |
+
"epoch": 11.45,
|
| 3084 |
+
"learning_rate": 1.6749125468952033e-05,
|
| 3085 |
+
"loss": 0.0698,
|
| 3086 |
+
"step": 5130
|
| 3087 |
+
},
|
| 3088 |
+
{
|
| 3089 |
+
"epoch": 11.47,
|
| 3090 |
+
"learning_rate": 1.673577781672812e-05,
|
| 3091 |
+
"loss": 0.0672,
|
| 3092 |
+
"step": 5140
|
| 3093 |
+
},
|
| 3094 |
+
{
|
| 3095 |
+
"epoch": 11.5,
|
| 3096 |
+
"learning_rate": 1.672240816120071e-05,
|
| 3097 |
+
"loss": 0.0586,
|
| 3098 |
+
"step": 5150
|
| 3099 |
+
},
|
| 3100 |
+
{
|
| 3101 |
+
"epoch": 11.52,
|
| 3102 |
+
"learning_rate": 1.670901654604353e-05,
|
| 3103 |
+
"loss": 0.073,
|
| 3104 |
+
"step": 5160
|
| 3105 |
+
},
|
| 3106 |
+
{
|
| 3107 |
+
"epoch": 11.54,
|
| 3108 |
+
"learning_rate": 1.669560301500205e-05,
|
| 3109 |
+
"loss": 0.0759,
|
| 3110 |
+
"step": 5170
|
| 3111 |
+
},
|
| 3112 |
+
{
|
| 3113 |
+
"epoch": 11.56,
|
| 3114 |
+
"learning_rate": 1.668216761189334e-05,
|
| 3115 |
+
"loss": 0.0817,
|
| 3116 |
+
"step": 5180
|
| 3117 |
+
},
|
| 3118 |
+
{
|
| 3119 |
+
"epoch": 11.58,
|
| 3120 |
+
"learning_rate": 1.6668710380605902e-05,
|
| 3121 |
+
"loss": 0.0642,
|
| 3122 |
+
"step": 5190
|
| 3123 |
+
},
|
| 3124 |
+
{
|
| 3125 |
+
"epoch": 11.61,
|
| 3126 |
+
"learning_rate": 1.6655231365099556e-05,
|
| 3127 |
+
"loss": 0.0669,
|
| 3128 |
+
"step": 5200
|
| 3129 |
+
},
|
| 3130 |
+
{
|
| 3131 |
+
"epoch": 11.63,
|
| 3132 |
+
"learning_rate": 1.6641730609405276e-05,
|
| 3133 |
+
"loss": 0.0647,
|
| 3134 |
+
"step": 5210
|
| 3135 |
+
},
|
| 3136 |
+
{
|
| 3137 |
+
"epoch": 11.65,
|
| 3138 |
+
"learning_rate": 1.6628208157625055e-05,
|
| 3139 |
+
"loss": 0.0711,
|
| 3140 |
+
"step": 5220
|
| 3141 |
+
},
|
| 3142 |
+
{
|
| 3143 |
+
"epoch": 11.67,
|
| 3144 |
+
"learning_rate": 1.6614664053931757e-05,
|
| 3145 |
+
"loss": 0.0764,
|
| 3146 |
+
"step": 5230
|
| 3147 |
+
},
|
| 3148 |
+
{
|
| 3149 |
+
"epoch": 11.7,
|
| 3150 |
+
"learning_rate": 1.6601098342568978e-05,
|
| 3151 |
+
"loss": 0.069,
|
| 3152 |
+
"step": 5240
|
| 3153 |
+
},
|
| 3154 |
+
{
|
| 3155 |
+
"epoch": 11.72,
|
| 3156 |
+
"learning_rate": 1.65875110678509e-05,
|
| 3157 |
+
"loss": 0.0733,
|
| 3158 |
+
"step": 5250
|
| 3159 |
+
},
|
| 3160 |
+
{
|
| 3161 |
+
"epoch": 11.74,
|
| 3162 |
+
"learning_rate": 1.6573902274162135e-05,
|
| 3163 |
+
"loss": 0.0714,
|
| 3164 |
+
"step": 5260
|
| 3165 |
+
},
|
| 3166 |
+
{
|
| 3167 |
+
"epoch": 11.76,
|
| 3168 |
+
"learning_rate": 1.6560272005957604e-05,
|
| 3169 |
+
"loss": 0.0848,
|
| 3170 |
+
"step": 5270
|
| 3171 |
+
},
|
| 3172 |
+
{
|
| 3173 |
+
"epoch": 11.79,
|
| 3174 |
+
"learning_rate": 1.6546620307762364e-05,
|
| 3175 |
+
"loss": 0.0675,
|
| 3176 |
+
"step": 5280
|
| 3177 |
+
},
|
| 3178 |
+
{
|
| 3179 |
+
"epoch": 11.81,
|
| 3180 |
+
"learning_rate": 1.6532947224171482e-05,
|
| 3181 |
+
"loss": 0.0739,
|
| 3182 |
+
"step": 5290
|
| 3183 |
+
},
|
| 3184 |
+
{
|
| 3185 |
+
"epoch": 11.83,
|
| 3186 |
+
"learning_rate": 1.6519252799849887e-05,
|
| 3187 |
+
"loss": 0.085,
|
| 3188 |
+
"step": 5300
|
| 3189 |
+
},
|
| 3190 |
+
{
|
| 3191 |
+
"epoch": 11.85,
|
| 3192 |
+
"learning_rate": 1.650553707953221e-05,
|
| 3193 |
+
"loss": 0.0685,
|
| 3194 |
+
"step": 5310
|
| 3195 |
+
},
|
| 3196 |
+
{
|
| 3197 |
+
"epoch": 11.88,
|
| 3198 |
+
"learning_rate": 1.6491800108022657e-05,
|
| 3199 |
+
"loss": 0.0852,
|
| 3200 |
+
"step": 5320
|
| 3201 |
+
},
|
| 3202 |
+
{
|
| 3203 |
+
"epoch": 11.9,
|
| 3204 |
+
"learning_rate": 1.6478041930194848e-05,
|
| 3205 |
+
"loss": 0.0655,
|
| 3206 |
+
"step": 5330
|
| 3207 |
+
},
|
| 3208 |
+
{
|
| 3209 |
+
"epoch": 11.92,
|
| 3210 |
+
"learning_rate": 1.6464262590991683e-05,
|
| 3211 |
+
"loss": 0.0669,
|
| 3212 |
+
"step": 5340
|
| 3213 |
+
},
|
| 3214 |
+
{
|
| 3215 |
+
"epoch": 11.94,
|
| 3216 |
+
"learning_rate": 1.6450462135425187e-05,
|
| 3217 |
+
"loss": 0.0915,
|
| 3218 |
+
"step": 5350
|
| 3219 |
+
},
|
| 3220 |
+
{
|
| 3221 |
+
"epoch": 11.96,
|
| 3222 |
+
"learning_rate": 1.6436640608576354e-05,
|
| 3223 |
+
"loss": 0.072,
|
| 3224 |
+
"step": 5360
|
| 3225 |
+
},
|
| 3226 |
+
{
|
| 3227 |
+
"epoch": 11.99,
|
| 3228 |
+
"learning_rate": 1.642279805559502e-05,
|
| 3229 |
+
"loss": 0.0792,
|
| 3230 |
+
"step": 5370
|
| 3231 |
+
},
|
| 3232 |
+
{
|
| 3233 |
+
"epoch": 12.01,
|
| 3234 |
+
"learning_rate": 1.6408934521699706e-05,
|
| 3235 |
+
"loss": 0.0632,
|
| 3236 |
+
"step": 5380
|
| 3237 |
+
},
|
| 3238 |
+
{
|
| 3239 |
+
"epoch": 12.03,
|
| 3240 |
+
"learning_rate": 1.639505005217747e-05,
|
| 3241 |
+
"loss": 0.0591,
|
| 3242 |
+
"step": 5390
|
| 3243 |
+
},
|
| 3244 |
+
{
|
| 3245 |
+
"epoch": 12.05,
|
| 3246 |
+
"learning_rate": 1.6381144692383754e-05,
|
| 3247 |
+
"loss": 0.0628,
|
| 3248 |
+
"step": 5400
|
| 3249 |
+
},
|
| 3250 |
+
{
|
| 3251 |
+
"epoch": 12.08,
|
| 3252 |
+
"learning_rate": 1.636721848774224e-05,
|
| 3253 |
+
"loss": 0.0641,
|
| 3254 |
+
"step": 5410
|
| 3255 |
+
},
|
| 3256 |
+
{
|
| 3257 |
+
"epoch": 12.1,
|
| 3258 |
+
"learning_rate": 1.635327148374471e-05,
|
| 3259 |
+
"loss": 0.0625,
|
| 3260 |
+
"step": 5420
|
| 3261 |
+
},
|
| 3262 |
+
{
|
| 3263 |
+
"epoch": 12.12,
|
| 3264 |
+
"learning_rate": 1.633930372595088e-05,
|
| 3265 |
+
"loss": 0.0632,
|
| 3266 |
+
"step": 5430
|
| 3267 |
+
},
|
| 3268 |
+
{
|
| 3269 |
+
"epoch": 12.14,
|
| 3270 |
+
"learning_rate": 1.6325315259988275e-05,
|
| 3271 |
+
"loss": 0.0757,
|
| 3272 |
+
"step": 5440
|
| 3273 |
+
},
|
| 3274 |
+
{
|
| 3275 |
+
"epoch": 12.17,
|
| 3276 |
+
"learning_rate": 1.631130613155205e-05,
|
| 3277 |
+
"loss": 0.0576,
|
| 3278 |
+
"step": 5450
|
| 3279 |
+
},
|
| 3280 |
+
{
|
| 3281 |
+
"epoch": 12.19,
|
| 3282 |
+
"learning_rate": 1.6297276386404872e-05,
|
| 3283 |
+
"loss": 0.0825,
|
| 3284 |
+
"step": 5460
|
| 3285 |
+
},
|
| 3286 |
+
{
|
| 3287 |
+
"epoch": 12.21,
|
| 3288 |
+
"learning_rate": 1.628322607037674e-05,
|
| 3289 |
+
"loss": 0.0584,
|
| 3290 |
+
"step": 5470
|
| 3291 |
+
},
|
| 3292 |
+
{
|
| 3293 |
+
"epoch": 12.23,
|
| 3294 |
+
"learning_rate": 1.626915522936486e-05,
|
| 3295 |
+
"loss": 0.0748,
|
| 3296 |
+
"step": 5480
|
| 3297 |
+
},
|
| 3298 |
+
{
|
| 3299 |
+
"epoch": 12.25,
|
| 3300 |
+
"learning_rate": 1.6255063909333486e-05,
|
| 3301 |
+
"loss": 0.0755,
|
| 3302 |
+
"step": 5490
|
| 3303 |
+
},
|
| 3304 |
+
{
|
| 3305 |
+
"epoch": 12.28,
|
| 3306 |
+
"learning_rate": 1.6240952156313762e-05,
|
| 3307 |
+
"loss": 0.068,
|
| 3308 |
+
"step": 5500
|
| 3309 |
+
},
|
| 3310 |
+
{
|
| 3311 |
+
"epoch": 12.3,
|
| 3312 |
+
"learning_rate": 1.622682001640359e-05,
|
| 3313 |
+
"loss": 0.0621,
|
| 3314 |
+
"step": 5510
|
| 3315 |
+
},
|
| 3316 |
+
{
|
| 3317 |
+
"epoch": 12.32,
|
| 3318 |
+
"learning_rate": 1.6212667535767456e-05,
|
| 3319 |
+
"loss": 0.06,
|
| 3320 |
+
"step": 5520
|
| 3321 |
+
},
|
| 3322 |
+
{
|
| 3323 |
+
"epoch": 12.34,
|
| 3324 |
+
"learning_rate": 1.6198494760636303e-05,
|
| 3325 |
+
"loss": 0.0608,
|
| 3326 |
+
"step": 5530
|
| 3327 |
+
},
|
| 3328 |
+
{
|
| 3329 |
+
"epoch": 12.37,
|
| 3330 |
+
"learning_rate": 1.618430173730736e-05,
|
| 3331 |
+
"loss": 0.074,
|
| 3332 |
+
"step": 5540
|
| 3333 |
+
},
|
| 3334 |
+
{
|
| 3335 |
+
"epoch": 12.39,
|
| 3336 |
+
"learning_rate": 1.617008851214401e-05,
|
| 3337 |
+
"loss": 0.0655,
|
| 3338 |
+
"step": 5550
|
| 3339 |
+
},
|
| 3340 |
+
{
|
| 3341 |
+
"epoch": 12.41,
|
| 3342 |
+
"learning_rate": 1.6155855131575614e-05,
|
| 3343 |
+
"loss": 0.0627,
|
| 3344 |
+
"step": 5560
|
| 3345 |
+
},
|
| 3346 |
+
{
|
| 3347 |
+
"epoch": 12.43,
|
| 3348 |
+
"learning_rate": 1.6141601642097382e-05,
|
| 3349 |
+
"loss": 0.0769,
|
| 3350 |
+
"step": 5570
|
| 3351 |
+
},
|
| 3352 |
+
{
|
| 3353 |
+
"epoch": 12.46,
|
| 3354 |
+
"learning_rate": 1.6127328090270213e-05,
|
| 3355 |
+
"loss": 0.0869,
|
| 3356 |
+
"step": 5580
|
| 3357 |
+
},
|
| 3358 |
+
{
|
| 3359 |
+
"epoch": 12.48,
|
| 3360 |
+
"learning_rate": 1.611303452272053e-05,
|
| 3361 |
+
"loss": 0.0603,
|
| 3362 |
+
"step": 5590
|
| 3363 |
+
},
|
| 3364 |
+
{
|
| 3365 |
+
"epoch": 12.5,
|
| 3366 |
+
"learning_rate": 1.609872098614017e-05,
|
| 3367 |
+
"loss": 0.0733,
|
| 3368 |
+
"step": 5600
|
| 3369 |
+
},
|
| 3370 |
+
{
|
| 3371 |
+
"epoch": 12.52,
|
| 3372 |
+
"learning_rate": 1.608438752728616e-05,
|
| 3373 |
+
"loss": 0.062,
|
| 3374 |
+
"step": 5610
|
| 3375 |
+
},
|
| 3376 |
+
{
|
| 3377 |
+
"epoch": 12.54,
|
| 3378 |
+
"learning_rate": 1.6070034192980638e-05,
|
| 3379 |
+
"loss": 0.0846,
|
| 3380 |
+
"step": 5620
|
| 3381 |
+
},
|
| 3382 |
+
{
|
| 3383 |
+
"epoch": 12.57,
|
| 3384 |
+
"learning_rate": 1.6055661030110655e-05,
|
| 3385 |
+
"loss": 0.068,
|
| 3386 |
+
"step": 5630
|
| 3387 |
+
},
|
| 3388 |
+
{
|
| 3389 |
+
"epoch": 12.59,
|
| 3390 |
+
"learning_rate": 1.6041268085628042e-05,
|
| 3391 |
+
"loss": 0.0653,
|
| 3392 |
+
"step": 5640
|
| 3393 |
+
},
|
| 3394 |
+
{
|
| 3395 |
+
"epoch": 12.61,
|
| 3396 |
+
"learning_rate": 1.602685540654924e-05,
|
| 3397 |
+
"loss": 0.0623,
|
| 3398 |
+
"step": 5650
|
| 3399 |
+
},
|
| 3400 |
+
{
|
| 3401 |
+
"epoch": 12.63,
|
| 3402 |
+
"learning_rate": 1.6012423039955153e-05,
|
| 3403 |
+
"loss": 0.0627,
|
| 3404 |
+
"step": 5660
|
| 3405 |
+
},
|
| 3406 |
+
{
|
| 3407 |
+
"epoch": 12.66,
|
| 3408 |
+
"learning_rate": 1.5997971032991007e-05,
|
| 3409 |
+
"loss": 0.0644,
|
| 3410 |
+
"step": 5670
|
| 3411 |
+
},
|
| 3412 |
+
{
|
| 3413 |
+
"epoch": 12.68,
|
| 3414 |
+
"learning_rate": 1.5983499432866187e-05,
|
| 3415 |
+
"loss": 0.0594,
|
| 3416 |
+
"step": 5680
|
| 3417 |
+
},
|
| 3418 |
+
{
|
| 3419 |
+
"epoch": 12.7,
|
| 3420 |
+
"learning_rate": 1.596900828685407e-05,
|
| 3421 |
+
"loss": 0.0666,
|
| 3422 |
+
"step": 5690
|
| 3423 |
+
},
|
| 3424 |
+
{
|
| 3425 |
+
"epoch": 12.72,
|
| 3426 |
+
"learning_rate": 1.5954497642291897e-05,
|
| 3427 |
+
"loss": 0.0626,
|
| 3428 |
+
"step": 5700
|
| 3429 |
+
},
|
| 3430 |
+
{
|
| 3431 |
+
"epoch": 12.75,
|
| 3432 |
+
"learning_rate": 1.593996754658059e-05,
|
| 3433 |
+
"loss": 0.0587,
|
| 3434 |
+
"step": 5710
|
| 3435 |
+
},
|
| 3436 |
+
{
|
| 3437 |
+
"epoch": 12.77,
|
| 3438 |
+
"learning_rate": 1.5925418047184615e-05,
|
| 3439 |
+
"loss": 0.0645,
|
| 3440 |
+
"step": 5720
|
| 3441 |
+
},
|
| 3442 |
+
{
|
| 3443 |
+
"epoch": 12.79,
|
| 3444 |
+
"learning_rate": 1.591084919163183e-05,
|
| 3445 |
+
"loss": 0.0907,
|
| 3446 |
+
"step": 5730
|
| 3447 |
+
},
|
| 3448 |
+
{
|
| 3449 |
+
"epoch": 12.81,
|
| 3450 |
+
"learning_rate": 1.589626102751331e-05,
|
| 3451 |
+
"loss": 0.059,
|
| 3452 |
+
"step": 5740
|
| 3453 |
+
},
|
| 3454 |
+
{
|
| 3455 |
+
"epoch": 12.83,
|
| 3456 |
+
"learning_rate": 1.588165360248321e-05,
|
| 3457 |
+
"loss": 0.0696,
|
| 3458 |
+
"step": 5750
|
| 3459 |
+
},
|
| 3460 |
+
{
|
| 3461 |
+
"epoch": 12.86,
|
| 3462 |
+
"learning_rate": 1.5867026964258614e-05,
|
| 3463 |
+
"loss": 0.083,
|
| 3464 |
+
"step": 5760
|
| 3465 |
+
},
|
| 3466 |
+
{
|
| 3467 |
+
"epoch": 12.88,
|
| 3468 |
+
"learning_rate": 1.5852381160619343e-05,
|
| 3469 |
+
"loss": 0.0683,
|
| 3470 |
+
"step": 5770
|
| 3471 |
+
},
|
| 3472 |
+
{
|
| 3473 |
+
"epoch": 12.9,
|
| 3474 |
+
"learning_rate": 1.5837716239407855e-05,
|
| 3475 |
+
"loss": 0.0665,
|
| 3476 |
+
"step": 5780
|
| 3477 |
+
},
|
| 3478 |
+
{
|
| 3479 |
+
"epoch": 12.92,
|
| 3480 |
+
"learning_rate": 1.582303224852903e-05,
|
| 3481 |
+
"loss": 0.0703,
|
| 3482 |
+
"step": 5790
|
| 3483 |
+
},
|
| 3484 |
+
{
|
| 3485 |
+
"epoch": 12.95,
|
| 3486 |
+
"learning_rate": 1.580832923595006e-05,
|
| 3487 |
+
"loss": 0.0663,
|
| 3488 |
+
"step": 5800
|
| 3489 |
+
},
|
| 3490 |
+
{
|
| 3491 |
+
"epoch": 12.97,
|
| 3492 |
+
"learning_rate": 1.5793607249700268e-05,
|
| 3493 |
+
"loss": 0.0764,
|
| 3494 |
+
"step": 5810
|
| 3495 |
+
},
|
| 3496 |
+
{
|
| 3497 |
+
"epoch": 12.99,
|
| 3498 |
+
"learning_rate": 1.5778866337870952e-05,
|
| 3499 |
+
"loss": 0.0664,
|
| 3500 |
+
"step": 5820
|
| 3501 |
+
},
|
| 3502 |
+
{
|
| 3503 |
+
"epoch": 13.01,
|
| 3504 |
+
"learning_rate": 1.5764106548615244e-05,
|
| 3505 |
+
"loss": 0.065,
|
| 3506 |
+
"step": 5830
|
| 3507 |
+
},
|
| 3508 |
+
{
|
| 3509 |
+
"epoch": 13.04,
|
| 3510 |
+
"learning_rate": 1.5749327930147932e-05,
|
| 3511 |
+
"loss": 0.0622,
|
| 3512 |
+
"step": 5840
|
| 3513 |
+
},
|
| 3514 |
+
{
|
| 3515 |
+
"epoch": 13.06,
|
| 3516 |
+
"learning_rate": 1.573453053074532e-05,
|
| 3517 |
+
"loss": 0.059,
|
| 3518 |
+
"step": 5850
|
| 3519 |
+
},
|
| 3520 |
+
{
|
| 3521 |
+
"epoch": 13.08,
|
| 3522 |
+
"learning_rate": 1.571971439874505e-05,
|
| 3523 |
+
"loss": 0.0547,
|
| 3524 |
+
"step": 5860
|
| 3525 |
+
},
|
| 3526 |
+
{
|
| 3527 |
+
"epoch": 13.1,
|
| 3528 |
+
"learning_rate": 1.570487958254597e-05,
|
| 3529 |
+
"loss": 0.0512,
|
| 3530 |
+
"step": 5870
|
| 3531 |
+
},
|
| 3532 |
+
{
|
| 3533 |
+
"epoch": 13.12,
|
| 3534 |
+
"learning_rate": 1.569002613060796e-05,
|
| 3535 |
+
"loss": 0.0548,
|
| 3536 |
+
"step": 5880
|
| 3537 |
+
},
|
| 3538 |
+
{
|
| 3539 |
+
"epoch": 13.15,
|
| 3540 |
+
"learning_rate": 1.5675154091451765e-05,
|
| 3541 |
+
"loss": 0.0645,
|
| 3542 |
+
"step": 5890
|
| 3543 |
+
},
|
| 3544 |
+
{
|
| 3545 |
+
"epoch": 13.17,
|
| 3546 |
+
"learning_rate": 1.566026351365886e-05,
|
| 3547 |
+
"loss": 0.0667,
|
| 3548 |
+
"step": 5900
|
| 3549 |
+
},
|
| 3550 |
+
{
|
| 3551 |
+
"epoch": 13.19,
|
| 3552 |
+
"learning_rate": 1.5645354445871274e-05,
|
| 3553 |
+
"loss": 0.0612,
|
| 3554 |
+
"step": 5910
|
| 3555 |
+
},
|
| 3556 |
+
{
|
| 3557 |
+
"epoch": 13.21,
|
| 3558 |
+
"learning_rate": 1.5630426936791433e-05,
|
| 3559 |
+
"loss": 0.0558,
|
| 3560 |
+
"step": 5920
|
| 3561 |
+
},
|
| 3562 |
+
{
|
| 3563 |
+
"epoch": 13.24,
|
| 3564 |
+
"learning_rate": 1.5615481035182013e-05,
|
| 3565 |
+
"loss": 0.0833,
|
| 3566 |
+
"step": 5930
|
| 3567 |
+
},
|
| 3568 |
+
{
|
| 3569 |
+
"epoch": 13.26,
|
| 3570 |
+
"learning_rate": 1.5600516789865767e-05,
|
| 3571 |
+
"loss": 0.0526,
|
| 3572 |
+
"step": 5940
|
| 3573 |
+
},
|
| 3574 |
+
{
|
| 3575 |
+
"epoch": 13.28,
|
| 3576 |
+
"learning_rate": 1.5585534249725362e-05,
|
| 3577 |
+
"loss": 0.0816,
|
| 3578 |
+
"step": 5950
|
| 3579 |
+
},
|
| 3580 |
+
{
|
| 3581 |
+
"epoch": 13.3,
|
| 3582 |
+
"learning_rate": 1.5570533463703233e-05,
|
| 3583 |
+
"loss": 0.0648,
|
| 3584 |
+
"step": 5960
|
| 3585 |
+
},
|
| 3586 |
+
{
|
| 3587 |
+
"epoch": 13.33,
|
| 3588 |
+
"learning_rate": 1.555551448080143e-05,
|
| 3589 |
+
"loss": 0.0613,
|
| 3590 |
+
"step": 5970
|
| 3591 |
+
},
|
| 3592 |
+
{
|
| 3593 |
+
"epoch": 13.35,
|
| 3594 |
+
"learning_rate": 1.5540477350081423e-05,
|
| 3595 |
+
"loss": 0.0567,
|
| 3596 |
+
"step": 5980
|
| 3597 |
+
},
|
| 3598 |
+
{
|
| 3599 |
+
"epoch": 13.37,
|
| 3600 |
+
"learning_rate": 1.5525422120663986e-05,
|
| 3601 |
+
"loss": 0.0538,
|
| 3602 |
+
"step": 5990
|
| 3603 |
+
},
|
| 3604 |
+
{
|
| 3605 |
+
"epoch": 13.39,
|
| 3606 |
+
"learning_rate": 1.5510348841728997e-05,
|
| 3607 |
+
"loss": 0.0582,
|
| 3608 |
+
"step": 6000
|
| 3609 |
+
}
|
| 3610 |
+
],
|
| 3611 |
+
"max_steps": 17920,
|
| 3612 |
+
"num_train_epochs": 40,
|
| 3613 |
+
"total_flos": 5.287881617912627e+16,
|
| 3614 |
+
"trial_name": null,
|
| 3615 |
+
"trial_params": null
|
| 3616 |
+
}
|
s2/training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 2 and 3 DeepSpeed checkpoints. It gets
|
| 9 |
+
# copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
|
| 10 |
+
# the future. Once extracted, the weights don't require DeepSpeed and can be used in any
|
| 11 |
+
# application.
|
| 12 |
+
#
|
| 13 |
+
# example: python zero_to_fp32.py . pytorch_model.bin
|
| 14 |
+
|
| 15 |
+
import argparse
|
| 16 |
+
import torch
|
| 17 |
+
import glob
|
| 18 |
+
import math
|
| 19 |
+
import os
|
| 20 |
+
import re
|
| 21 |
+
from collections import OrderedDict
|
| 22 |
+
from dataclasses import dataclass
|
| 23 |
+
|
| 24 |
+
# while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
|
| 25 |
+
# DeepSpeed data structures it has to be available in the current python environment.
|
| 26 |
+
from deepspeed.utils import logger
|
| 27 |
+
from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
|
| 28 |
+
FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
|
| 29 |
+
FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
@dataclass
|
| 33 |
+
class zero_model_state:
|
| 34 |
+
buffers: dict()
|
| 35 |
+
param_shapes: dict()
|
| 36 |
+
shared_params: list
|
| 37 |
+
ds_version: int
|
| 38 |
+
frozen_param_shapes: dict()
|
| 39 |
+
frozen_param_fragments: dict()
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
debug = 0
|
| 43 |
+
|
| 44 |
+
# load to cpu
|
| 45 |
+
device = torch.device('cpu')
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
def atoi(text):
|
| 49 |
+
return int(text) if text.isdigit() else text
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
def natural_keys(text):
|
| 53 |
+
'''
|
| 54 |
+
alist.sort(key=natural_keys) sorts in human order
|
| 55 |
+
http://nedbatchelder.com/blog/200712/human_sorting.html
|
| 56 |
+
(See Toothy's implementation in the comments)
|
| 57 |
+
'''
|
| 58 |
+
return [atoi(c) for c in re.split(r'(\d+)', text)]
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
def get_model_state_file(checkpoint_dir, zero_stage):
|
| 62 |
+
if not os.path.isdir(checkpoint_dir):
|
| 63 |
+
raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
|
| 64 |
+
|
| 65 |
+
# there should be only one file
|
| 66 |
+
if zero_stage == 2:
|
| 67 |
+
file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
|
| 68 |
+
elif zero_stage == 3:
|
| 69 |
+
file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
|
| 70 |
+
|
| 71 |
+
if not os.path.exists(file):
|
| 72 |
+
raise FileNotFoundError(f"can't find model states file at '{file}'")
|
| 73 |
+
|
| 74 |
+
return file
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
def get_checkpoint_files(checkpoint_dir, glob_pattern):
|
| 78 |
+
# XXX: need to test that this simple glob rule works for multi-node setup too
|
| 79 |
+
ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
|
| 80 |
+
|
| 81 |
+
if len(ckpt_files) == 0:
|
| 82 |
+
raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
|
| 83 |
+
|
| 84 |
+
return ckpt_files
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
def get_optim_files(checkpoint_dir):
|
| 88 |
+
return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
def get_model_state_files(checkpoint_dir):
|
| 92 |
+
return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
def parse_model_states(files):
|
| 96 |
+
zero_model_states = []
|
| 97 |
+
for file in files:
|
| 98 |
+
state_dict = torch.load(file, map_location=device)
|
| 99 |
+
|
| 100 |
+
if BUFFER_NAMES not in state_dict:
|
| 101 |
+
raise ValueError(f"{file} is not a model state checkpoint")
|
| 102 |
+
buffer_names = state_dict[BUFFER_NAMES]
|
| 103 |
+
if debug:
|
| 104 |
+
print("Found buffers:", buffer_names)
|
| 105 |
+
|
| 106 |
+
# recover just the buffers while restoring them to fp32 if they were saved in fp16
|
| 107 |
+
buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
|
| 108 |
+
param_shapes = state_dict[PARAM_SHAPES]
|
| 109 |
+
|
| 110 |
+
# collect parameters that are included in param_shapes
|
| 111 |
+
param_names = []
|
| 112 |
+
for s in param_shapes:
|
| 113 |
+
for name in s.keys():
|
| 114 |
+
param_names.append(name)
|
| 115 |
+
|
| 116 |
+
# update with frozen parameters
|
| 117 |
+
frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
|
| 118 |
+
if frozen_param_shapes is not None:
|
| 119 |
+
if debug:
|
| 120 |
+
print(f"Found frozen_param_shapes: {frozen_param_shapes}")
|
| 121 |
+
param_names += list(frozen_param_shapes.keys())
|
| 122 |
+
|
| 123 |
+
# handle shared params
|
| 124 |
+
shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
|
| 125 |
+
|
| 126 |
+
ds_version = state_dict.get(DS_VERSION, None)
|
| 127 |
+
|
| 128 |
+
frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
|
| 129 |
+
|
| 130 |
+
z_model_state = zero_model_state(buffers=buffers,
|
| 131 |
+
param_shapes=param_shapes,
|
| 132 |
+
shared_params=shared_params,
|
| 133 |
+
ds_version=ds_version,
|
| 134 |
+
frozen_param_shapes=frozen_param_shapes,
|
| 135 |
+
frozen_param_fragments=frozen_param_fragments)
|
| 136 |
+
zero_model_states.append(z_model_state)
|
| 137 |
+
|
| 138 |
+
return zero_model_states
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
def parse_optim_states(files, ds_checkpoint_dir):
|
| 142 |
+
|
| 143 |
+
total_files = len(files)
|
| 144 |
+
state_dicts = []
|
| 145 |
+
for f in files:
|
| 146 |
+
state_dicts.append(torch.load(f, map_location=device))
|
| 147 |
+
|
| 148 |
+
if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:
|
| 149 |
+
raise ValueError(f"{files[0]} is not a zero checkpoint")
|
| 150 |
+
zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
|
| 151 |
+
world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
|
| 152 |
+
|
| 153 |
+
# For ZeRO-2 each param group can have different partition_count as data parallelism for expert
|
| 154 |
+
# parameters can be different from data parallelism for non-expert parameters. So we can just
|
| 155 |
+
# use the max of the partition_count to get the dp world_size.
|
| 156 |
+
|
| 157 |
+
if type(world_size) is list:
|
| 158 |
+
world_size = max(world_size)
|
| 159 |
+
|
| 160 |
+
if world_size != total_files:
|
| 161 |
+
raise ValueError(
|
| 162 |
+
f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
|
| 163 |
+
"Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
|
| 164 |
+
)
|
| 165 |
+
|
| 166 |
+
# the groups are named differently in each stage
|
| 167 |
+
if zero_stage == 2:
|
| 168 |
+
fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
|
| 169 |
+
elif zero_stage == 3:
|
| 170 |
+
fp32_groups_key = FP32_FLAT_GROUPS
|
| 171 |
+
else:
|
| 172 |
+
raise ValueError(f"unknown zero stage {zero_stage}")
|
| 173 |
+
|
| 174 |
+
if zero_stage == 2:
|
| 175 |
+
fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
|
| 176 |
+
elif zero_stage == 3:
|
| 177 |
+
# if there is more than one param group, there will be multiple flattened tensors - one
|
| 178 |
+
# flattened tensor per group - for simplicity merge them into a single tensor
|
| 179 |
+
#
|
| 180 |
+
# XXX: could make the script more memory efficient for when there are multiple groups - it
|
| 181 |
+
# will require matching the sub-lists of param_shapes for each param group flattened tensor
|
| 182 |
+
|
| 183 |
+
fp32_flat_groups = [
|
| 184 |
+
torch.cat(state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key], 0) for i in range(len(state_dicts))
|
| 185 |
+
]
|
| 186 |
+
|
| 187 |
+
return zero_stage, world_size, fp32_flat_groups
|
| 188 |
+
|
| 189 |
+
|
| 190 |
+
def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir):
|
| 191 |
+
"""
|
| 192 |
+
Returns fp32 state_dict reconstructed from ds checkpoint
|
| 193 |
+
|
| 194 |
+
Args:
|
| 195 |
+
- ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
|
| 196 |
+
|
| 197 |
+
"""
|
| 198 |
+
print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
|
| 199 |
+
|
| 200 |
+
optim_files = get_optim_files(ds_checkpoint_dir)
|
| 201 |
+
zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
|
| 202 |
+
print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
|
| 203 |
+
|
| 204 |
+
model_files = get_model_state_files(ds_checkpoint_dir)
|
| 205 |
+
|
| 206 |
+
zero_model_states = parse_model_states(model_files)
|
| 207 |
+
print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
|
| 208 |
+
|
| 209 |
+
if zero_stage == 2:
|
| 210 |
+
return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states)
|
| 211 |
+
elif zero_stage == 3:
|
| 212 |
+
return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states)
|
| 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 _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
|
| 248 |
+
param_shapes = zero_model_states[0].param_shapes
|
| 249 |
+
|
| 250 |
+
# Reconstruction protocol:
|
| 251 |
+
#
|
| 252 |
+
# XXX: document this
|
| 253 |
+
|
| 254 |
+
if debug:
|
| 255 |
+
for i in range(world_size):
|
| 256 |
+
for j in range(len(fp32_flat_groups[0])):
|
| 257 |
+
print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
|
| 258 |
+
|
| 259 |
+
# XXX: memory usage doubles here (zero2)
|
| 260 |
+
num_param_groups = len(fp32_flat_groups[0])
|
| 261 |
+
merged_single_partition_of_fp32_groups = []
|
| 262 |
+
for i in range(num_param_groups):
|
| 263 |
+
merged_partitions = [sd[i] for sd in fp32_flat_groups]
|
| 264 |
+
full_single_fp32_vector = torch.cat(merged_partitions, 0)
|
| 265 |
+
merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
|
| 266 |
+
avail_numel = sum(
|
| 267 |
+
[full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
|
| 268 |
+
|
| 269 |
+
if debug:
|
| 270 |
+
wanted_params = sum([len(shapes) for shapes in param_shapes])
|
| 271 |
+
wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
|
| 272 |
+
# not asserting if there is a mismatch due to possible padding
|
| 273 |
+
print(f"Have {avail_numel} numels to process.")
|
| 274 |
+
print(f"Need {wanted_numel} numels in {wanted_params} params.")
|
| 275 |
+
|
| 276 |
+
# params
|
| 277 |
+
# XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
|
| 278 |
+
# out-of-core computing solution
|
| 279 |
+
total_numel = 0
|
| 280 |
+
total_params = 0
|
| 281 |
+
for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
|
| 282 |
+
offset = 0
|
| 283 |
+
avail_numel = full_single_fp32_vector.numel()
|
| 284 |
+
for name, shape in shapes.items():
|
| 285 |
+
|
| 286 |
+
unpartitioned_numel = shape.numel()
|
| 287 |
+
total_numel += unpartitioned_numel
|
| 288 |
+
total_params += 1
|
| 289 |
+
|
| 290 |
+
if debug:
|
| 291 |
+
print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
|
| 292 |
+
state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
|
| 293 |
+
offset += unpartitioned_numel
|
| 294 |
+
|
| 295 |
+
# Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
|
| 296 |
+
# avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
|
| 297 |
+
# paddings performed in the code it's almost impossible to predict the exact numbers w/o the
|
| 298 |
+
# live optimizer object, so we are checking that the numbers are within the right range
|
| 299 |
+
align_to = 2 * world_size
|
| 300 |
+
|
| 301 |
+
def zero2_align(x):
|
| 302 |
+
return align_to * math.ceil(x / align_to)
|
| 303 |
+
|
| 304 |
+
if debug:
|
| 305 |
+
print(f"original offset={offset}, avail_numel={avail_numel}")
|
| 306 |
+
|
| 307 |
+
offset = zero2_align(offset)
|
| 308 |
+
avail_numel = zero2_align(avail_numel)
|
| 309 |
+
|
| 310 |
+
if debug:
|
| 311 |
+
print(f"aligned offset={offset}, avail_numel={avail_numel}")
|
| 312 |
+
|
| 313 |
+
# Sanity check
|
| 314 |
+
if offset != avail_numel:
|
| 315 |
+
raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
|
| 316 |
+
|
| 317 |
+
print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
|
| 318 |
+
|
| 319 |
+
|
| 320 |
+
def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states):
|
| 321 |
+
state_dict = OrderedDict()
|
| 322 |
+
|
| 323 |
+
# buffers
|
| 324 |
+
buffers = zero_model_states[0].buffers
|
| 325 |
+
state_dict.update(buffers)
|
| 326 |
+
if debug:
|
| 327 |
+
print(f"added {len(buffers)} buffers")
|
| 328 |
+
|
| 329 |
+
_zero2_merge_frozen_params(state_dict, zero_model_states)
|
| 330 |
+
|
| 331 |
+
_zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
|
| 332 |
+
|
| 333 |
+
# recover shared parameters
|
| 334 |
+
for pair in zero_model_states[0].shared_params:
|
| 335 |
+
if pair[1] in state_dict:
|
| 336 |
+
state_dict[pair[0]] = state_dict[pair[1]]
|
| 337 |
+
|
| 338 |
+
return state_dict
|
| 339 |
+
|
| 340 |
+
|
| 341 |
+
def zero3_partitioned_param_info(unpartitioned_numel, world_size):
|
| 342 |
+
remainder = unpartitioned_numel % world_size
|
| 343 |
+
padding_numel = (world_size - remainder) if remainder else 0
|
| 344 |
+
partitioned_numel = math.ceil(unpartitioned_numel / world_size)
|
| 345 |
+
return partitioned_numel, padding_numel
|
| 346 |
+
|
| 347 |
+
|
| 348 |
+
def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
|
| 349 |
+
if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
|
| 350 |
+
return
|
| 351 |
+
|
| 352 |
+
if debug:
|
| 353 |
+
for i in range(world_size):
|
| 354 |
+
num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
|
| 355 |
+
print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
|
| 356 |
+
|
| 357 |
+
frozen_param_shapes = zero_model_states[0].frozen_param_shapes
|
| 358 |
+
wanted_params = len(frozen_param_shapes)
|
| 359 |
+
wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
|
| 360 |
+
avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
|
| 361 |
+
print(f'Frozen params: Have {avail_numel} numels to process.')
|
| 362 |
+
print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
|
| 363 |
+
|
| 364 |
+
total_params = 0
|
| 365 |
+
total_numel = 0
|
| 366 |
+
for name, shape in zero_model_states[0].frozen_param_shapes.items():
|
| 367 |
+
total_params += 1
|
| 368 |
+
unpartitioned_numel = shape.numel()
|
| 369 |
+
total_numel += unpartitioned_numel
|
| 370 |
+
|
| 371 |
+
param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
|
| 372 |
+
state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
|
| 373 |
+
|
| 374 |
+
partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
|
| 375 |
+
|
| 376 |
+
if debug:
|
| 377 |
+
print(
|
| 378 |
+
f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
|
| 379 |
+
)
|
| 380 |
+
|
| 381 |
+
print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
|
| 382 |
+
|
| 383 |
+
|
| 384 |
+
def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
|
| 385 |
+
param_shapes = zero_model_states[0].param_shapes
|
| 386 |
+
avail_numel = fp32_flat_groups[0].numel() * world_size
|
| 387 |
+
# Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
|
| 388 |
+
# param, re-consolidating each param, while dealing with padding if any
|
| 389 |
+
|
| 390 |
+
# merge list of dicts, preserving order
|
| 391 |
+
param_shapes = {k: v for d in param_shapes for k, v in d.items()}
|
| 392 |
+
|
| 393 |
+
if debug:
|
| 394 |
+
for i in range(world_size):
|
| 395 |
+
print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
|
| 396 |
+
|
| 397 |
+
wanted_params = len(param_shapes)
|
| 398 |
+
wanted_numel = sum(shape.numel() for shape in param_shapes.values())
|
| 399 |
+
# not asserting if there is a mismatch due to possible padding
|
| 400 |
+
avail_numel = fp32_flat_groups[0].numel() * world_size
|
| 401 |
+
print(f"Trainable params: Have {avail_numel} numels to process.")
|
| 402 |
+
print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
|
| 403 |
+
|
| 404 |
+
# params
|
| 405 |
+
# XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
|
| 406 |
+
# out-of-core computing solution
|
| 407 |
+
offset = 0
|
| 408 |
+
total_numel = 0
|
| 409 |
+
total_params = 0
|
| 410 |
+
for name, shape in param_shapes.items():
|
| 411 |
+
|
| 412 |
+
unpartitioned_numel = shape.numel()
|
| 413 |
+
total_numel += unpartitioned_numel
|
| 414 |
+
total_params += 1
|
| 415 |
+
|
| 416 |
+
partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
|
| 417 |
+
|
| 418 |
+
if debug:
|
| 419 |
+
print(
|
| 420 |
+
f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
|
| 421 |
+
)
|
| 422 |
+
|
| 423 |
+
# XXX: memory usage doubles here
|
| 424 |
+
state_dict[name] = torch.cat(
|
| 425 |
+
tuple(fp32_flat_groups[i].narrow(0, offset, partitioned_numel) for i in range(world_size)),
|
| 426 |
+
0).narrow(0, 0, unpartitioned_numel).view(shape)
|
| 427 |
+
offset += partitioned_numel
|
| 428 |
+
|
| 429 |
+
offset *= world_size
|
| 430 |
+
|
| 431 |
+
# Sanity check
|
| 432 |
+
if offset != avail_numel:
|
| 433 |
+
raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
|
| 434 |
+
|
| 435 |
+
print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
|
| 436 |
+
|
| 437 |
+
|
| 438 |
+
def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states):
|
| 439 |
+
state_dict = OrderedDict()
|
| 440 |
+
|
| 441 |
+
# buffers
|
| 442 |
+
buffers = zero_model_states[0].buffers
|
| 443 |
+
state_dict.update(buffers)
|
| 444 |
+
if debug:
|
| 445 |
+
print(f"added {len(buffers)} buffers")
|
| 446 |
+
|
| 447 |
+
_zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
|
| 448 |
+
|
| 449 |
+
_zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
|
| 450 |
+
|
| 451 |
+
# recover shared parameters
|
| 452 |
+
for pair in zero_model_states[0].shared_params:
|
| 453 |
+
if pair[1] in state_dict:
|
| 454 |
+
state_dict[pair[0]] = state_dict[pair[1]]
|
| 455 |
+
|
| 456 |
+
return state_dict
|
| 457 |
+
|
| 458 |
+
|
| 459 |
+
def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag=None):
|
| 460 |
+
"""
|
| 461 |
+
Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
|
| 462 |
+
``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
|
| 463 |
+
via a model hub.
|
| 464 |
+
|
| 465 |
+
Args:
|
| 466 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder
|
| 467 |
+
- ``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``
|
| 468 |
+
|
| 469 |
+
Returns:
|
| 470 |
+
- pytorch ``state_dict``
|
| 471 |
+
|
| 472 |
+
Note: this approach may not work if your application doesn't have sufficient free CPU memory and
|
| 473 |
+
you may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
|
| 474 |
+
the checkpoint.
|
| 475 |
+
|
| 476 |
+
A typical usage might be ::
|
| 477 |
+
|
| 478 |
+
from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
|
| 479 |
+
# do the training and checkpoint saving
|
| 480 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
|
| 481 |
+
model = model.cpu() # move to cpu
|
| 482 |
+
model.load_state_dict(state_dict)
|
| 483 |
+
# submit to model hub or save the model to share with others
|
| 484 |
+
|
| 485 |
+
In this example the ``model`` will no longer be usable in the deepspeed context of the same
|
| 486 |
+
application. i.e. you will need to re-initialize the deepspeed engine, since
|
| 487 |
+
``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
|
| 488 |
+
|
| 489 |
+
If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
|
| 490 |
+
|
| 491 |
+
"""
|
| 492 |
+
if tag is None:
|
| 493 |
+
latest_path = os.path.join(checkpoint_dir, 'latest')
|
| 494 |
+
if os.path.isfile(latest_path):
|
| 495 |
+
with open(latest_path, 'r') as fd:
|
| 496 |
+
tag = fd.read().strip()
|
| 497 |
+
else:
|
| 498 |
+
raise ValueError(f"Unable to find 'latest' file at {latest_path}")
|
| 499 |
+
|
| 500 |
+
ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
|
| 501 |
+
|
| 502 |
+
if not os.path.isdir(ds_checkpoint_dir):
|
| 503 |
+
raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
|
| 504 |
+
|
| 505 |
+
return _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir)
|
| 506 |
+
|
| 507 |
+
|
| 508 |
+
def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir, output_file, tag=None):
|
| 509 |
+
"""
|
| 510 |
+
Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
|
| 511 |
+
loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
|
| 512 |
+
|
| 513 |
+
Args:
|
| 514 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
|
| 515 |
+
- ``output_file``: path to the pytorch fp32 state_dict output file (e.g. path/pytorch_model.bin)
|
| 516 |
+
- ``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``
|
| 517 |
+
"""
|
| 518 |
+
|
| 519 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
|
| 520 |
+
print(f"Saving fp32 state dict to {output_file}")
|
| 521 |
+
torch.save(state_dict, output_file)
|
| 522 |
+
|
| 523 |
+
|
| 524 |
+
def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
|
| 525 |
+
"""
|
| 526 |
+
1. Put the provided model to cpu
|
| 527 |
+
2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
|
| 528 |
+
3. Load it into the provided model
|
| 529 |
+
|
| 530 |
+
Args:
|
| 531 |
+
- ``model``: the model object to update
|
| 532 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
|
| 533 |
+
- ``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``
|
| 534 |
+
|
| 535 |
+
Returns:
|
| 536 |
+
- ``model`: modified model
|
| 537 |
+
|
| 538 |
+
Make sure you have plenty of CPU memory available before you call this function. If you don't
|
| 539 |
+
have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
|
| 540 |
+
conveniently placed for you in the checkpoint folder.
|
| 541 |
+
|
| 542 |
+
A typical usage might be ::
|
| 543 |
+
|
| 544 |
+
from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
|
| 545 |
+
model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
|
| 546 |
+
# submit to model hub or save the model to share with others
|
| 547 |
+
|
| 548 |
+
Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
|
| 549 |
+
of the same application. i.e. you will need to re-initialize the deepspeed engine, since
|
| 550 |
+
``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
|
| 551 |
+
|
| 552 |
+
"""
|
| 553 |
+
logger.info(f"Extracting fp32 weights")
|
| 554 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
|
| 555 |
+
|
| 556 |
+
logger.info(f"Overwriting model with fp32 weights")
|
| 557 |
+
model = model.cpu()
|
| 558 |
+
model.load_state_dict(state_dict, strict=False)
|
| 559 |
+
|
| 560 |
+
return model
|
| 561 |
+
|
| 562 |
+
|
| 563 |
+
if __name__ == "__main__":
|
| 564 |
+
|
| 565 |
+
parser = argparse.ArgumentParser()
|
| 566 |
+
parser.add_argument("checkpoint_dir",
|
| 567 |
+
type=str,
|
| 568 |
+
help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
|
| 569 |
+
parser.add_argument(
|
| 570 |
+
"output_file",
|
| 571 |
+
type=str,
|
| 572 |
+
help="path to the pytorch fp32 state_dict output file (e.g. path/checkpoint-12/pytorch_model.bin)")
|
| 573 |
+
parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
|
| 574 |
+
args = parser.parse_args()
|
| 575 |
+
|
| 576 |
+
debug = args.debug
|
| 577 |
+
|
| 578 |
+
convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir, args.output_file)
|
s2_en/README.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: peft
|
| 3 |
+
---
|
| 4 |
+
## Training procedure
|
| 5 |
+
|
| 6 |
+
### Framework versions
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
- PEFT 0.4.0
|
s2_en/adapter_config.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"auto_mapping": null,
|
| 3 |
+
"base_model_name_or_path": "liuhaotian/llava-v1.5-7b",
|
| 4 |
+
"bias": "none",
|
| 5 |
+
"fan_in_fan_out": false,
|
| 6 |
+
"inference_mode": true,
|
| 7 |
+
"init_lora_weights": true,
|
| 8 |
+
"layers_pattern": null,
|
| 9 |
+
"layers_to_transform": null,
|
| 10 |
+
"lora_alpha": 256,
|
| 11 |
+
"lora_dropout": 0.05,
|
| 12 |
+
"modules_to_save": null,
|
| 13 |
+
"peft_type": "LORA",
|
| 14 |
+
"r": 128,
|
| 15 |
+
"revision": null,
|
| 16 |
+
"target_modules": [
|
| 17 |
+
"k_proj",
|
| 18 |
+
"up_proj",
|
| 19 |
+
"down_proj",
|
| 20 |
+
"v_proj",
|
| 21 |
+
"o_proj",
|
| 22 |
+
"q_proj",
|
| 23 |
+
"gate_proj"
|
| 24 |
+
],
|
| 25 |
+
"task_type": "CAUSAL_LM"
|
| 26 |
+
}
|
s2_en/adapter_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:422c0b3bfbe12adcec40ae8e0a603d2bea66f01127e811eb210d95159de1bf73
|
| 3 |
+
size 639787082
|
s2_en/config.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "liuhaotian/llava-v1.5-7b",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"LlavaLlamaForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"bos_token_id": 1,
|
| 7 |
+
"eos_token_id": 2,
|
| 8 |
+
"freeze_mm_mlp_adapter": false,
|
| 9 |
+
"freeze_mm_vision_resampler": false,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 4096,
|
| 12 |
+
"image_aspect_ratio": "pad",
|
| 13 |
+
"image_grid_pinpoints": null,
|
| 14 |
+
"initializer_range": 0.02,
|
| 15 |
+
"intermediate_size": 11008,
|
| 16 |
+
"max_length": 4096,
|
| 17 |
+
"max_position_embeddings": 4096,
|
| 18 |
+
"mm_hidden_size": 1024,
|
| 19 |
+
"mm_projector_lr": 2e-05,
|
| 20 |
+
"mm_projector_type": "mlp2x_gelu",
|
| 21 |
+
"mm_resampler_type": null,
|
| 22 |
+
"mm_use_im_patch_token": false,
|
| 23 |
+
"mm_use_im_start_end": false,
|
| 24 |
+
"mm_vision_select_feature": "patch",
|
| 25 |
+
"mm_vision_select_layer": -2,
|
| 26 |
+
"mm_vision_tower": "openai/clip-vit-large-patch14-336",
|
| 27 |
+
"model_type": "llava",
|
| 28 |
+
"num_attention_heads": 32,
|
| 29 |
+
"num_hidden_layers": 32,
|
| 30 |
+
"num_key_value_heads": 32,
|
| 31 |
+
"pad_token_id": 0,
|
| 32 |
+
"pretraining_tp": 1,
|
| 33 |
+
"rms_norm_eps": 1e-05,
|
| 34 |
+
"rope_scaling": null,
|
| 35 |
+
"tie_word_embeddings": false,
|
| 36 |
+
"torch_dtype": "float16",
|
| 37 |
+
"transformers_version": "4.31.0",
|
| 38 |
+
"tune_mm_mlp_adapter": false,
|
| 39 |
+
"tune_mm_vision_resampler": false,
|
| 40 |
+
"unfreeze_mm_vision_tower": false,
|
| 41 |
+
"use_cache": true,
|
| 42 |
+
"use_mm_proj": true,
|
| 43 |
+
"vocab_size": 32000
|
| 44 |
+
}
|
s2_en/global_step11000/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:ed9fd169999c88b798a023cbc5a6bff9c471a528683ee25ba2eb508c9009582e
|
| 3 |
+
size 4089600080
|