Instructions to use cragtmp/2gt5-100 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use cragtmp/2gt5-100 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/data1/chenjiazun/LLM/Llama-3.2-11B-Vision-Instruct") model = PeftModel.from_pretrained(base_model, "cragtmp/2gt5-100") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- README.md +202 -0
- adapter_config.json +31 -0
- adapter_model.safetensors +3 -0
- additional_config.json +1 -0
- args.json +438 -0
- latest +1 -0
- rng_state.pth +3 -0
- scheduler.pt +3 -0
- trainer_state.json +1834 -0
- training_args.bin +3 -0
- zero_to_fp32.py +760 -0
README.md
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: meta-llama/Llama-3.2-11B-Vision-Instruct
|
| 3 |
+
library_name: peft
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# Model Card for Model ID
|
| 7 |
+
|
| 8 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
## Model Details
|
| 13 |
+
|
| 14 |
+
### Model Description
|
| 15 |
+
|
| 16 |
+
<!-- Provide a longer summary of what this model is. -->
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
- **Developed by:** [More Information Needed]
|
| 21 |
+
- **Funded by [optional]:** [More Information Needed]
|
| 22 |
+
- **Shared by [optional]:** [More Information Needed]
|
| 23 |
+
- **Model type:** [More Information Needed]
|
| 24 |
+
- **Language(s) (NLP):** [More Information Needed]
|
| 25 |
+
- **License:** [More Information Needed]
|
| 26 |
+
- **Finetuned from model [optional]:** [More Information Needed]
|
| 27 |
+
|
| 28 |
+
### Model Sources [optional]
|
| 29 |
+
|
| 30 |
+
<!-- Provide the basic links for the model. -->
|
| 31 |
+
|
| 32 |
+
- **Repository:** [More Information Needed]
|
| 33 |
+
- **Paper [optional]:** [More Information Needed]
|
| 34 |
+
- **Demo [optional]:** [More Information Needed]
|
| 35 |
+
|
| 36 |
+
## Uses
|
| 37 |
+
|
| 38 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 39 |
+
|
| 40 |
+
### Direct Use
|
| 41 |
+
|
| 42 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
| 43 |
+
|
| 44 |
+
[More Information Needed]
|
| 45 |
+
|
| 46 |
+
### Downstream Use [optional]
|
| 47 |
+
|
| 48 |
+
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
| 49 |
+
|
| 50 |
+
[More Information Needed]
|
| 51 |
+
|
| 52 |
+
### Out-of-Scope Use
|
| 53 |
+
|
| 54 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 55 |
+
|
| 56 |
+
[More Information Needed]
|
| 57 |
+
|
| 58 |
+
## Bias, Risks, and Limitations
|
| 59 |
+
|
| 60 |
+
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 61 |
+
|
| 62 |
+
[More Information Needed]
|
| 63 |
+
|
| 64 |
+
### Recommendations
|
| 65 |
+
|
| 66 |
+
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 67 |
+
|
| 68 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 69 |
+
|
| 70 |
+
## How to Get Started with the Model
|
| 71 |
+
|
| 72 |
+
Use the code below to get started with the model.
|
| 73 |
+
|
| 74 |
+
[More Information Needed]
|
| 75 |
+
|
| 76 |
+
## Training Details
|
| 77 |
+
|
| 78 |
+
### Training Data
|
| 79 |
+
|
| 80 |
+
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
| 81 |
+
|
| 82 |
+
[More Information Needed]
|
| 83 |
+
|
| 84 |
+
### Training Procedure
|
| 85 |
+
|
| 86 |
+
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 87 |
+
|
| 88 |
+
#### Preprocessing [optional]
|
| 89 |
+
|
| 90 |
+
[More Information Needed]
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
#### Training Hyperparameters
|
| 94 |
+
|
| 95 |
+
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
| 96 |
+
|
| 97 |
+
#### Speeds, Sizes, Times [optional]
|
| 98 |
+
|
| 99 |
+
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
| 100 |
+
|
| 101 |
+
[More Information Needed]
|
| 102 |
+
|
| 103 |
+
## Evaluation
|
| 104 |
+
|
| 105 |
+
<!-- This section describes the evaluation protocols and provides the results. -->
|
| 106 |
+
|
| 107 |
+
### Testing Data, Factors & Metrics
|
| 108 |
+
|
| 109 |
+
#### Testing Data
|
| 110 |
+
|
| 111 |
+
<!-- This should link to a Dataset Card if possible. -->
|
| 112 |
+
|
| 113 |
+
[More Information Needed]
|
| 114 |
+
|
| 115 |
+
#### Factors
|
| 116 |
+
|
| 117 |
+
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 118 |
+
|
| 119 |
+
[More Information Needed]
|
| 120 |
+
|
| 121 |
+
#### Metrics
|
| 122 |
+
|
| 123 |
+
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 124 |
+
|
| 125 |
+
[More Information Needed]
|
| 126 |
+
|
| 127 |
+
### Results
|
| 128 |
+
|
| 129 |
+
[More Information Needed]
|
| 130 |
+
|
| 131 |
+
#### Summary
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
## Model Examination [optional]
|
| 136 |
+
|
| 137 |
+
<!-- Relevant interpretability work for the model goes here -->
|
| 138 |
+
|
| 139 |
+
[More Information Needed]
|
| 140 |
+
|
| 141 |
+
## Environmental Impact
|
| 142 |
+
|
| 143 |
+
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 144 |
+
|
| 145 |
+
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 146 |
+
|
| 147 |
+
- **Hardware Type:** [More Information Needed]
|
| 148 |
+
- **Hours used:** [More Information Needed]
|
| 149 |
+
- **Cloud Provider:** [More Information Needed]
|
| 150 |
+
- **Compute Region:** [More Information Needed]
|
| 151 |
+
- **Carbon Emitted:** [More Information Needed]
|
| 152 |
+
|
| 153 |
+
## Technical Specifications [optional]
|
| 154 |
+
|
| 155 |
+
### Model Architecture and Objective
|
| 156 |
+
|
| 157 |
+
[More Information Needed]
|
| 158 |
+
|
| 159 |
+
### Compute Infrastructure
|
| 160 |
+
|
| 161 |
+
[More Information Needed]
|
| 162 |
+
|
| 163 |
+
#### Hardware
|
| 164 |
+
|
| 165 |
+
[More Information Needed]
|
| 166 |
+
|
| 167 |
+
#### Software
|
| 168 |
+
|
| 169 |
+
[More Information Needed]
|
| 170 |
+
|
| 171 |
+
## Citation [optional]
|
| 172 |
+
|
| 173 |
+
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 174 |
+
|
| 175 |
+
**BibTeX:**
|
| 176 |
+
|
| 177 |
+
[More Information Needed]
|
| 178 |
+
|
| 179 |
+
**APA:**
|
| 180 |
+
|
| 181 |
+
[More Information Needed]
|
| 182 |
+
|
| 183 |
+
## Glossary [optional]
|
| 184 |
+
|
| 185 |
+
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 186 |
+
|
| 187 |
+
[More Information Needed]
|
| 188 |
+
|
| 189 |
+
## More Information [optional]
|
| 190 |
+
|
| 191 |
+
[More Information Needed]
|
| 192 |
+
|
| 193 |
+
## Model Card Authors [optional]
|
| 194 |
+
|
| 195 |
+
[More Information Needed]
|
| 196 |
+
|
| 197 |
+
## Model Card Contact
|
| 198 |
+
|
| 199 |
+
[More Information Needed]
|
| 200 |
+
### Framework versions
|
| 201 |
+
|
| 202 |
+
- PEFT 0.15.2
|
adapter_config.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "/data1/chenjiazun/LLM/Llama-3.2-11B-Vision-Instruct",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"corda_config": null,
|
| 7 |
+
"eva_config": null,
|
| 8 |
+
"exclude_modules": null,
|
| 9 |
+
"fan_in_fan_out": false,
|
| 10 |
+
"inference_mode": true,
|
| 11 |
+
"init_lora_weights": true,
|
| 12 |
+
"layer_replication": null,
|
| 13 |
+
"layers_pattern": null,
|
| 14 |
+
"layers_to_transform": null,
|
| 15 |
+
"loftq_config": {},
|
| 16 |
+
"lora_alpha": 32,
|
| 17 |
+
"lora_bias": false,
|
| 18 |
+
"lora_dropout": 0.05,
|
| 19 |
+
"megatron_config": null,
|
| 20 |
+
"megatron_core": "megatron.core",
|
| 21 |
+
"modules_to_save": [],
|
| 22 |
+
"peft_type": "LORA",
|
| 23 |
+
"r": 8,
|
| 24 |
+
"rank_pattern": {},
|
| 25 |
+
"revision": null,
|
| 26 |
+
"target_modules": "^(language_model).*\\.(v_proj|up_proj|gate_proj|down_proj|k_proj|o_proj|q_proj)$",
|
| 27 |
+
"task_type": "CAUSAL_LM",
|
| 28 |
+
"trainable_token_indices": null,
|
| 29 |
+
"use_dora": false,
|
| 30 |
+
"use_rslora": false
|
| 31 |
+
}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:652639b307d22d81937293d313fc940a4fe6f7a67c8dbbe98662e9812f766b49
|
| 3 |
+
size 52511776
|
additional_config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"lora_dtype": null, "lorap_lr_ratio": null, "lorap_emb_lr": 1e-06}
|
args.json
ADDED
|
@@ -0,0 +1,438 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "/data1/chenjiazun/LLM/Llama-3.2-11B-Vision-Instruct",
|
| 3 |
+
"model_type": "llama3_2_vision",
|
| 4 |
+
"model_revision": null,
|
| 5 |
+
"task_type": "causal_lm",
|
| 6 |
+
"torch_dtype": "bfloat16",
|
| 7 |
+
"attn_impl": null,
|
| 8 |
+
"num_labels": null,
|
| 9 |
+
"problem_type": null,
|
| 10 |
+
"rope_scaling": null,
|
| 11 |
+
"device_map": null,
|
| 12 |
+
"max_memory": {},
|
| 13 |
+
"local_repo_path": null,
|
| 14 |
+
"template": "llama3_2_vision",
|
| 15 |
+
"system": "You are a helpful assistant that truthfully answers user questions about the provided image.",
|
| 16 |
+
"max_length": 4096,
|
| 17 |
+
"truncation_strategy": "delete",
|
| 18 |
+
"max_pixels": null,
|
| 19 |
+
"agent_template": null,
|
| 20 |
+
"norm_bbox": null,
|
| 21 |
+
"response_prefix": null,
|
| 22 |
+
"padding_side": "right",
|
| 23 |
+
"loss_scale": "last_round",
|
| 24 |
+
"sequence_parallel_size": 1,
|
| 25 |
+
"use_chat_template": true,
|
| 26 |
+
"template_backend": "swift",
|
| 27 |
+
"dataset": [
|
| 28 |
+
"task2_dpo_absgt0_taskgt5__pari0.3_no_cheat.json"
|
| 29 |
+
],
|
| 30 |
+
"val_dataset": [],
|
| 31 |
+
"split_dataset_ratio": 0.01,
|
| 32 |
+
"data_seed": 42,
|
| 33 |
+
"dataset_num_proc": 4,
|
| 34 |
+
"dataset_shuffle": true,
|
| 35 |
+
"val_dataset_shuffle": false,
|
| 36 |
+
"streaming": false,
|
| 37 |
+
"interleave_prob": null,
|
| 38 |
+
"stopping_strategy": "first_exhausted",
|
| 39 |
+
"shuffle_buffer_size": 1000,
|
| 40 |
+
"enable_cache": false,
|
| 41 |
+
"download_mode": "reuse_dataset_if_exists",
|
| 42 |
+
"columns": {},
|
| 43 |
+
"strict": false,
|
| 44 |
+
"remove_unused_columns": true,
|
| 45 |
+
"model_name": [
|
| 46 |
+
null,
|
| 47 |
+
null
|
| 48 |
+
],
|
| 49 |
+
"model_author": [
|
| 50 |
+
null,
|
| 51 |
+
null
|
| 52 |
+
],
|
| 53 |
+
"custom_dataset_info": [],
|
| 54 |
+
"quant_method": null,
|
| 55 |
+
"quant_bits": null,
|
| 56 |
+
"hqq_axis": null,
|
| 57 |
+
"bnb_4bit_compute_dtype": "bfloat16",
|
| 58 |
+
"bnb_4bit_quant_type": "nf4",
|
| 59 |
+
"bnb_4bit_use_double_quant": true,
|
| 60 |
+
"bnb_4bit_quant_storage": null,
|
| 61 |
+
"max_new_tokens": 64,
|
| 62 |
+
"temperature": 0.9,
|
| 63 |
+
"top_k": 50,
|
| 64 |
+
"top_p": 0.9,
|
| 65 |
+
"repetition_penalty": 1.0,
|
| 66 |
+
"num_beams": 1,
|
| 67 |
+
"stream": false,
|
| 68 |
+
"stop_words": [],
|
| 69 |
+
"logprobs": false,
|
| 70 |
+
"top_logprobs": null,
|
| 71 |
+
"ckpt_dir": null,
|
| 72 |
+
"load_dataset_config": null,
|
| 73 |
+
"lora_modules": [],
|
| 74 |
+
"tuner_backend": "peft",
|
| 75 |
+
"train_type": "lora",
|
| 76 |
+
"adapters": [],
|
| 77 |
+
"external_plugins": [],
|
| 78 |
+
"seed": 42,
|
| 79 |
+
"model_kwargs": {},
|
| 80 |
+
"load_args": false,
|
| 81 |
+
"load_data_args": false,
|
| 82 |
+
"use_hf": false,
|
| 83 |
+
"hub_token": null,
|
| 84 |
+
"custom_register_path": [],
|
| 85 |
+
"ignore_args_error": false,
|
| 86 |
+
"use_swift_lora": false,
|
| 87 |
+
"output_dir": "/data2/kdd/crag/cjz/output/task2_dpo_absgt0_taskgt5__pari0.3_no_cheat/v0-20250606-011515",
|
| 88 |
+
"overwrite_output_dir": false,
|
| 89 |
+
"do_train": false,
|
| 90 |
+
"do_eval": false,
|
| 91 |
+
"do_predict": false,
|
| 92 |
+
"eval_strategy": "steps",
|
| 93 |
+
"prediction_loss_only": false,
|
| 94 |
+
"per_device_train_batch_size": 1,
|
| 95 |
+
"per_device_eval_batch_size": 1,
|
| 96 |
+
"per_gpu_train_batch_size": null,
|
| 97 |
+
"per_gpu_eval_batch_size": null,
|
| 98 |
+
"gradient_accumulation_steps": 32,
|
| 99 |
+
"eval_accumulation_steps": null,
|
| 100 |
+
"eval_delay": 0,
|
| 101 |
+
"torch_empty_cache_steps": null,
|
| 102 |
+
"learning_rate": 0.0002,
|
| 103 |
+
"weight_decay": 0.1,
|
| 104 |
+
"adam_beta1": 0.9,
|
| 105 |
+
"adam_beta2": 0.95,
|
| 106 |
+
"adam_epsilon": 1e-08,
|
| 107 |
+
"max_grad_norm": 1.0,
|
| 108 |
+
"num_train_epochs": 3.0,
|
| 109 |
+
"max_steps": -1,
|
| 110 |
+
"lr_scheduler_type": "cosine",
|
| 111 |
+
"lr_scheduler_kwargs": null,
|
| 112 |
+
"warmup_ratio": 0.05,
|
| 113 |
+
"warmup_steps": 0,
|
| 114 |
+
"log_level": "passive",
|
| 115 |
+
"log_level_replica": "warning",
|
| 116 |
+
"log_on_each_node": true,
|
| 117 |
+
"logging_dir": "/data2/kdd/crag/cjz/output/task2_dpo_absgt0_taskgt5__pari0.3_no_cheat/v0-20250606-011515/runs",
|
| 118 |
+
"logging_strategy": "steps",
|
| 119 |
+
"logging_first_step": true,
|
| 120 |
+
"logging_steps": 1,
|
| 121 |
+
"logging_nan_inf_filter": true,
|
| 122 |
+
"save_strategy": "steps",
|
| 123 |
+
"save_steps": 50.0,
|
| 124 |
+
"save_total_limit": null,
|
| 125 |
+
"save_safetensors": true,
|
| 126 |
+
"save_on_each_node": false,
|
| 127 |
+
"save_only_model": false,
|
| 128 |
+
"restore_callback_states_from_checkpoint": false,
|
| 129 |
+
"no_cuda": false,
|
| 130 |
+
"use_cpu": false,
|
| 131 |
+
"use_mps_device": false,
|
| 132 |
+
"jit_mode_eval": false,
|
| 133 |
+
"use_ipex": false,
|
| 134 |
+
"bf16": true,
|
| 135 |
+
"fp16": false,
|
| 136 |
+
"fp16_opt_level": "O1",
|
| 137 |
+
"half_precision_backend": "auto",
|
| 138 |
+
"bf16_full_eval": false,
|
| 139 |
+
"fp16_full_eval": false,
|
| 140 |
+
"tf32": null,
|
| 141 |
+
"local_rank": 0,
|
| 142 |
+
"ddp_backend": null,
|
| 143 |
+
"tpu_num_cores": null,
|
| 144 |
+
"tpu_metrics_debug": false,
|
| 145 |
+
"debug": null,
|
| 146 |
+
"dataloader_drop_last": false,
|
| 147 |
+
"eval_steps": 300.0,
|
| 148 |
+
"dataloader_num_workers": 4,
|
| 149 |
+
"dataloader_prefetch_factor": null,
|
| 150 |
+
"past_index": -1,
|
| 151 |
+
"run_name": null,
|
| 152 |
+
"disable_tqdm": null,
|
| 153 |
+
"label_names": null,
|
| 154 |
+
"load_best_model_at_end": false,
|
| 155 |
+
"metric_for_best_model": "loss",
|
| 156 |
+
"greater_is_better": false,
|
| 157 |
+
"ignore_data_skip": false,
|
| 158 |
+
"fsdp": "",
|
| 159 |
+
"fsdp_min_num_params": 0,
|
| 160 |
+
"fsdp_config": null,
|
| 161 |
+
"tp_size": 0,
|
| 162 |
+
"fsdp_transformer_layer_cls_to_wrap": null,
|
| 163 |
+
"accelerator_config": {
|
| 164 |
+
"dispatch_batches": false
|
| 165 |
+
},
|
| 166 |
+
"deepspeed": {
|
| 167 |
+
"fp16": {
|
| 168 |
+
"enabled": "auto",
|
| 169 |
+
"loss_scale": 0,
|
| 170 |
+
"loss_scale_window": 1000,
|
| 171 |
+
"initial_scale_power": 16,
|
| 172 |
+
"hysteresis": 2,
|
| 173 |
+
"min_loss_scale": 1
|
| 174 |
+
},
|
| 175 |
+
"bf16": {
|
| 176 |
+
"enabled": "auto"
|
| 177 |
+
},
|
| 178 |
+
"zero_optimization": {
|
| 179 |
+
"stage": 2,
|
| 180 |
+
"offload_optimizer": {
|
| 181 |
+
"device": "none",
|
| 182 |
+
"pin_memory": true
|
| 183 |
+
},
|
| 184 |
+
"allgather_partitions": true,
|
| 185 |
+
"allgather_bucket_size": 200000000.0,
|
| 186 |
+
"overlap_comm": false,
|
| 187 |
+
"reduce_scatter": true,
|
| 188 |
+
"reduce_bucket_size": 200000000.0,
|
| 189 |
+
"contiguous_gradients": true
|
| 190 |
+
},
|
| 191 |
+
"gradient_accumulation_steps": "auto",
|
| 192 |
+
"gradient_clipping": "auto",
|
| 193 |
+
"steps_per_print": 2000,
|
| 194 |
+
"train_batch_size": "auto",
|
| 195 |
+
"train_micro_batch_size_per_gpu": "auto",
|
| 196 |
+
"wall_clock_breakdown": false
|
| 197 |
+
},
|
| 198 |
+
"label_smoothing_factor": 0.0,
|
| 199 |
+
"optim": "adamw_torch",
|
| 200 |
+
"optim_args": null,
|
| 201 |
+
"adafactor": false,
|
| 202 |
+
"group_by_length": false,
|
| 203 |
+
"length_column_name": "length",
|
| 204 |
+
"report_to": [
|
| 205 |
+
"tensorboard"
|
| 206 |
+
],
|
| 207 |
+
"ddp_find_unused_parameters": null,
|
| 208 |
+
"ddp_bucket_cap_mb": null,
|
| 209 |
+
"ddp_broadcast_buffers": null,
|
| 210 |
+
"dataloader_pin_memory": true,
|
| 211 |
+
"dataloader_persistent_workers": false,
|
| 212 |
+
"skip_memory_metrics": true,
|
| 213 |
+
"use_legacy_prediction_loop": false,
|
| 214 |
+
"push_to_hub": false,
|
| 215 |
+
"resume_from_checkpoint": null,
|
| 216 |
+
"hub_model_id": null,
|
| 217 |
+
"hub_strategy": "every_save",
|
| 218 |
+
"hub_private_repo": null,
|
| 219 |
+
"hub_always_push": false,
|
| 220 |
+
"gradient_checkpointing": true,
|
| 221 |
+
"gradient_checkpointing_kwargs": null,
|
| 222 |
+
"include_inputs_for_metrics": false,
|
| 223 |
+
"include_for_metrics": [],
|
| 224 |
+
"eval_do_concat_batches": true,
|
| 225 |
+
"fp16_backend": "auto",
|
| 226 |
+
"push_to_hub_model_id": null,
|
| 227 |
+
"push_to_hub_organization": null,
|
| 228 |
+
"push_to_hub_token": null,
|
| 229 |
+
"mp_parameters": "",
|
| 230 |
+
"auto_find_batch_size": false,
|
| 231 |
+
"full_determinism": false,
|
| 232 |
+
"torchdynamo": null,
|
| 233 |
+
"ray_scope": "last",
|
| 234 |
+
"ddp_timeout": 1800,
|
| 235 |
+
"torch_compile": false,
|
| 236 |
+
"torch_compile_backend": null,
|
| 237 |
+
"torch_compile_mode": null,
|
| 238 |
+
"include_tokens_per_second": false,
|
| 239 |
+
"include_num_input_tokens_seen": false,
|
| 240 |
+
"neftune_noise_alpha": null,
|
| 241 |
+
"optim_target_modules": null,
|
| 242 |
+
"batch_eval_metrics": false,
|
| 243 |
+
"eval_on_start": false,
|
| 244 |
+
"use_liger_kernel": false,
|
| 245 |
+
"eval_use_gather_object": false,
|
| 246 |
+
"average_tokens_across_devices": false,
|
| 247 |
+
"sortish_sampler": false,
|
| 248 |
+
"predict_with_generate": false,
|
| 249 |
+
"generation_max_length": null,
|
| 250 |
+
"generation_num_beams": null,
|
| 251 |
+
"generation_config": null,
|
| 252 |
+
"check_model": true,
|
| 253 |
+
"acc_strategy": "token",
|
| 254 |
+
"train_dataloader_shuffle": true,
|
| 255 |
+
"metric_warmup_step": 0,
|
| 256 |
+
"fsdp_num": 1,
|
| 257 |
+
"acc_steps": 1,
|
| 258 |
+
"eval_use_evalscope": false,
|
| 259 |
+
"eval_datasets": [],
|
| 260 |
+
"eval_limit": null,
|
| 261 |
+
"eval_datasets_args": null,
|
| 262 |
+
"eval_generation_config": null,
|
| 263 |
+
"freeze_parameters": [
|
| 264 |
+
"vision_model",
|
| 265 |
+
"multi_modal_projector"
|
| 266 |
+
],
|
| 267 |
+
"freeze_parameters_ratio": 0.0,
|
| 268 |
+
"trainable_parameters": [],
|
| 269 |
+
"freeze_llm": false,
|
| 270 |
+
"freeze_vit": true,
|
| 271 |
+
"freeze_aligner": true,
|
| 272 |
+
"target_modules": [
|
| 273 |
+
"all-linear"
|
| 274 |
+
],
|
| 275 |
+
"target_regex": null,
|
| 276 |
+
"modules_to_save": [],
|
| 277 |
+
"lora_rank": 8,
|
| 278 |
+
"lora_alpha": 32,
|
| 279 |
+
"lora_dropout": 0.05,
|
| 280 |
+
"lora_bias": "none",
|
| 281 |
+
"lora_dtype": null,
|
| 282 |
+
"lorap_lr_ratio": null,
|
| 283 |
+
"use_rslora": false,
|
| 284 |
+
"use_dora": false,
|
| 285 |
+
"lora_ga_batch_size": 2,
|
| 286 |
+
"lora_ga_iters": 2,
|
| 287 |
+
"lora_ga_max_length": 1024,
|
| 288 |
+
"lora_ga_direction": "ArB2r",
|
| 289 |
+
"lora_ga_scale": "stable",
|
| 290 |
+
"lora_ga_stable_gamma": 16,
|
| 291 |
+
"init_weights": true,
|
| 292 |
+
"fourier_n_frequency": 2000,
|
| 293 |
+
"fourier_scaling": 300.0,
|
| 294 |
+
"boft_block_size": 4,
|
| 295 |
+
"boft_block_num": 0,
|
| 296 |
+
"boft_n_butterfly_factor": 1,
|
| 297 |
+
"boft_dropout": 0.0,
|
| 298 |
+
"vera_rank": 256,
|
| 299 |
+
"vera_projection_prng_key": 0,
|
| 300 |
+
"vera_dropout": 0.0,
|
| 301 |
+
"vera_d_initial": 0.1,
|
| 302 |
+
"adapter_act": "gelu",
|
| 303 |
+
"adapter_length": 128,
|
| 304 |
+
"use_galore": false,
|
| 305 |
+
"galore_target_modules": null,
|
| 306 |
+
"galore_rank": 128,
|
| 307 |
+
"galore_update_proj_gap": 50,
|
| 308 |
+
"galore_scale": 1.0,
|
| 309 |
+
"galore_proj_type": "std",
|
| 310 |
+
"galore_optim_per_parameter": false,
|
| 311 |
+
"galore_with_embedding": false,
|
| 312 |
+
"galore_quantization": false,
|
| 313 |
+
"galore_proj_quant": false,
|
| 314 |
+
"galore_proj_bits": 4,
|
| 315 |
+
"galore_proj_group_size": 256,
|
| 316 |
+
"galore_cos_threshold": 0.4,
|
| 317 |
+
"galore_gamma_proj": 2,
|
| 318 |
+
"galore_queue_size": 5,
|
| 319 |
+
"adalora_target_r": 8,
|
| 320 |
+
"adalora_init_r": 12,
|
| 321 |
+
"adalora_tinit": 0,
|
| 322 |
+
"adalora_tfinal": 0,
|
| 323 |
+
"adalora_deltaT": 1,
|
| 324 |
+
"adalora_beta1": 0.85,
|
| 325 |
+
"adalora_beta2": 0.85,
|
| 326 |
+
"adalora_orth_reg_weight": 0.5,
|
| 327 |
+
"llamapro_num_new_blocks": 4,
|
| 328 |
+
"llamapro_num_groups": null,
|
| 329 |
+
"lisa_activated_layers": 0,
|
| 330 |
+
"lisa_step_interval": 20,
|
| 331 |
+
"reft_layer_key": null,
|
| 332 |
+
"reft_layers": null,
|
| 333 |
+
"reft_rank": 4,
|
| 334 |
+
"reft_intervention_type": "LoreftIntervention",
|
| 335 |
+
"reft_args": null,
|
| 336 |
+
"swanlab_token": null,
|
| 337 |
+
"swanlab_project": null,
|
| 338 |
+
"swanlab_workspace": null,
|
| 339 |
+
"swanlab_exp_name": null,
|
| 340 |
+
"swanlab_mode": "cloud",
|
| 341 |
+
"add_version": true,
|
| 342 |
+
"resume_only_model": false,
|
| 343 |
+
"create_checkpoint_symlink": false,
|
| 344 |
+
"packing": false,
|
| 345 |
+
"lazy_tokenize": true,
|
| 346 |
+
"loss_type": "sigmoid",
|
| 347 |
+
"optimizer": null,
|
| 348 |
+
"metric": null,
|
| 349 |
+
"zero_hpz_partition_size": null,
|
| 350 |
+
"reward_model": null,
|
| 351 |
+
"reward_adapters": [],
|
| 352 |
+
"reward_model_type": null,
|
| 353 |
+
"reward_model_revision": null,
|
| 354 |
+
"num_ppo_epochs": 4,
|
| 355 |
+
"whiten_rewards": false,
|
| 356 |
+
"kl_coef": 0.05,
|
| 357 |
+
"cliprange": 0.2,
|
| 358 |
+
"vf_coef": 0.1,
|
| 359 |
+
"cliprange_value": 0.2,
|
| 360 |
+
"gamma": 1.0,
|
| 361 |
+
"lam": 0.95,
|
| 362 |
+
"num_mini_batches": 1,
|
| 363 |
+
"local_rollout_forward_batch_size": 64,
|
| 364 |
+
"num_sample_generations": 10,
|
| 365 |
+
"response_length": 512,
|
| 366 |
+
"missing_eos_penalty": null,
|
| 367 |
+
"epsilon": 0.2,
|
| 368 |
+
"epsilon_high": null,
|
| 369 |
+
"num_infer_workers": 1,
|
| 370 |
+
"vllm_device": [
|
| 371 |
+
"auto"
|
| 372 |
+
],
|
| 373 |
+
"vllm_gpu_memory_utilization": 0.9,
|
| 374 |
+
"vllm_max_model_len": null,
|
| 375 |
+
"vllm_max_num_seqs": 256,
|
| 376 |
+
"vllm_enforce_eager": false,
|
| 377 |
+
"vllm_limit_mm_per_prompt": null,
|
| 378 |
+
"vllm_enable_prefix_caching": true,
|
| 379 |
+
"cosine_min_len_value_wrong": -0.5,
|
| 380 |
+
"cosine_max_len_value_wrong": 0.0,
|
| 381 |
+
"cosine_min_len_value_correct": 1.0,
|
| 382 |
+
"cosine_max_len_value_correct": 0.5,
|
| 383 |
+
"cosine_max_len": null,
|
| 384 |
+
"repetition_n_grams": 3,
|
| 385 |
+
"repetition_max_penalty": -1.0,
|
| 386 |
+
"use_lmdeploy": false,
|
| 387 |
+
"lmdeploy_device": "auto",
|
| 388 |
+
"lmdeploy_session_len": null,
|
| 389 |
+
"lmdeploy_cache_max_entry_count": 0.8,
|
| 390 |
+
"async_generate": false,
|
| 391 |
+
"tensor_parallel_size": 1,
|
| 392 |
+
"sleep_level": 0,
|
| 393 |
+
"move_model_batches": null,
|
| 394 |
+
"offload_optimizer": false,
|
| 395 |
+
"offload_model": false,
|
| 396 |
+
"gc_collect_after_offload": false,
|
| 397 |
+
"multi_turn_func": null,
|
| 398 |
+
"dynamic_sample": false,
|
| 399 |
+
"max_resample_times": 3,
|
| 400 |
+
"overlong_filter": false,
|
| 401 |
+
"soft_max_length": null,
|
| 402 |
+
"soft_cache_length": null,
|
| 403 |
+
"scale_rewards": true,
|
| 404 |
+
"wandb_log_unique_prompts": null,
|
| 405 |
+
"vllm_server_host": null,
|
| 406 |
+
"vllm_server_port": 8000,
|
| 407 |
+
"vllm_server_timeout": 240.0,
|
| 408 |
+
"num_generations": 8,
|
| 409 |
+
"max_completion_length": 512,
|
| 410 |
+
"ds3_gather_for_generation": true,
|
| 411 |
+
"reward_funcs": [],
|
| 412 |
+
"reward_weights": null,
|
| 413 |
+
"log_completions": false,
|
| 414 |
+
"use_vllm": false,
|
| 415 |
+
"num_iterations": 1,
|
| 416 |
+
"rlhf_type": "dpo",
|
| 417 |
+
"ref_model": null,
|
| 418 |
+
"ref_model_type": null,
|
| 419 |
+
"ref_model_revision": null,
|
| 420 |
+
"beta": 0.1,
|
| 421 |
+
"label_smoothing": 0,
|
| 422 |
+
"rpo_alpha": 1.0,
|
| 423 |
+
"cpo_alpha": 1.0,
|
| 424 |
+
"simpo_gamma": 1,
|
| 425 |
+
"desirable_weight": 1.0,
|
| 426 |
+
"undesirable_weight": 1.0,
|
| 427 |
+
"center_rewards_coefficient": null,
|
| 428 |
+
"rank": 0,
|
| 429 |
+
"global_world_size": 1,
|
| 430 |
+
"local_world_size": 1,
|
| 431 |
+
"model_suffix": "Llama-3.2-11B-Vision-Instruct",
|
| 432 |
+
"model_info": "ModelInfo(model_type='llama3_2_vision', model_dir='/data1/chenjiazun/LLM/Llama-3.2-11B-Vision-Instruct', torch_dtype=torch.bfloat16, max_model_len=131072, quant_method=None, quant_bits=None, rope_scaling={'factor': 8.0, 'high_freq_factor': 4.0, 'low_freq_factor': 1.0, 'original_max_position_embeddings': 8192, 'rope_type': 'llama3'}, config=None, task_type='causal_lm', num_labels=None)",
|
| 433 |
+
"model_meta": "ModelMeta(model_type='llama3_2_vision', model_groups=[ModelGroup(models=[Model(ms_model_id='LLM-Research/Llama-3.2-11B-Vision-Instruct', hf_model_id='meta-llama/Llama-3.2-11B-Vision-Instruct', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='LLM-Research/Llama-3.2-90B-Vision-Instruct', hf_model_id='meta-llama/Llama-3.2-90B-Vision-Instruct', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='LLM-Research/Llama-3.2-11B-Vision', hf_model_id='meta-llama/Llama-3.2-11B-Vision', model_path=None, ms_revision=None, hf_revision=None), Model(ms_model_id='LLM-Research/Llama-3.2-90B-Vision', hf_model_id='meta-llama/Llama-3.2-90B-Vision', model_path=None, ms_revision=None, hf_revision=None)], ignore_patterns=None, requires=None, tags=[])], template='llama3_2_vision', get_function=<function get_model_tokenizer_llama3_2_vision at 0x71ffcd83ad40>, model_arch='llama3_2_vision', architectures=['MllamaForConditionalGeneration'], additional_saved_files=[], torch_dtype=None, is_multimodal=True, is_reward=False, task_type=None, ignore_patterns=None, requires=['transformers>=4.45'], tags=[])",
|
| 434 |
+
"model_dir": "/data1/chenjiazun/LLM/Llama-3.2-11B-Vision-Instruct",
|
| 435 |
+
"hub": "<class 'swift.hub.hub.MSHub'>",
|
| 436 |
+
"evaluation_strategy": "steps",
|
| 437 |
+
"training_args": "DPOConfig(output_dir='/data2/kdd/crag/cjz/output/task2_dpo_absgt0_taskgt5__pari0.3_no_cheat/v0-20250606-011515', overwrite_output_dir=False, do_train=False, do_eval=True, do_predict=False, eval_strategy=<IntervalStrategy.STEPS: 'steps'>, prediction_loss_only=False, per_device_train_batch_size=1, per_device_eval_batch_size=1, per_gpu_train_batch_size=None, per_gpu_eval_batch_size=None, gradient_accumulation_steps=32, eval_accumulation_steps=None, eval_delay=0, torch_empty_cache_steps=None, learning_rate=0.0002, weight_decay=0.1, adam_beta1=0.9, adam_beta2=0.95, adam_epsilon=1e-08, max_grad_norm=1.0, num_train_epochs=3.0, max_steps=-1, lr_scheduler_type=<SchedulerType.COSINE: 'cosine'>, lr_scheduler_kwargs=None, warmup_ratio=0.05, warmup_steps=0, log_level='passive', log_level_replica='warning', log_on_each_node=True, logging_dir='/data2/kdd/crag/cjz/output/task2_dpo_absgt0_taskgt5__pari0.3_no_cheat/v0-20250606-011515/runs', logging_strategy=<IntervalStrategy.STEPS: 'steps'>, logging_first_step=True, logging_steps=1, logging_nan_inf_filter=True, save_strategy=<SaveStrategy.STEPS: 'steps'>, save_steps=50, save_total_limit=None, save_safetensors=True, save_on_each_node=False, save_only_model=False, restore_callback_states_from_checkpoint=False, no_cuda=False, use_cpu=False, use_mps_device=False, seed=42, data_seed=42, jit_mode_eval=False, use_ipex=False, bf16=True, fp16=False, fp16_opt_level='O1', half_precision_backend='auto', bf16_full_eval=False, fp16_full_eval=False, tf32=None, local_rank=0, ddp_backend=None, tpu_num_cores=None, tpu_metrics_debug=False, debug=[], dataloader_drop_last=False, eval_steps=300, dataloader_num_workers=4, dataloader_prefetch_factor=10, past_index=-1, run_name='/data2/kdd/crag/cjz/output/task2_dpo_absgt0_taskgt5__pari0.3_no_cheat/v0-20250606-011515', disable_tqdm=False, remove_unused_columns=False, label_names=None, load_best_model_at_end=False, metric_for_best_model='loss', greater_is_better=False, ignore_data_skip=False, fsdp=[], fsdp_min_num_params=0, fsdp_config={'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}, tp_size=0, fsdp_transformer_layer_cls_to_wrap=None, accelerator_config=AcceleratorConfig(split_batches=False, dispatch_batches=False, even_batches=True, use_seedable_sampler=True, non_blocking=False, gradient_accumulation_kwargs=None, use_configured_state=False), deepspeed={'fp16': {'enabled': 'auto', 'loss_scale': 0, 'loss_scale_window': 1000, 'initial_scale_power': 16, 'hysteresis': 2, 'min_loss_scale': 1}, 'bf16': {'enabled': 'auto'}, 'zero_optimization': {'stage': 2, 'offload_optimizer': {'device': 'none', 'pin_memory': True}, 'allgather_partitions': True, 'allgather_bucket_size': 200000000.0, 'overlap_comm': False, 'reduce_scatter': True, 'reduce_bucket_size': 200000000.0, 'contiguous_gradients': True}, 'gradient_accumulation_steps': 'auto', 'gradient_clipping': 'auto', 'steps_per_print': 2000, 'train_batch_size': 'auto', 'train_micro_batch_size_per_gpu': 'auto', 'wall_clock_breakdown': False}, label_smoothing_factor=0.0, optim=<OptimizerNames.ADAMW_TORCH: 'adamw_torch'>, optim_args=None, adafactor=False, group_by_length=False, length_column_name='length', report_to=['tensorboard'], ddp_find_unused_parameters=None, ddp_bucket_cap_mb=None, ddp_broadcast_buffers=None, dataloader_pin_memory=True, dataloader_persistent_workers=False, skip_memory_metrics=True, use_legacy_prediction_loop=False, push_to_hub=False, resume_from_checkpoint=None, hub_model_id=None, hub_strategy=<HubStrategy.EVERY_SAVE: 'every_save'>, hub_token=None, hub_private_repo=None, hub_always_push=False, gradient_checkpointing=True, gradient_checkpointing_kwargs=None, include_inputs_for_metrics=False, include_for_metrics=[], eval_do_concat_batches=True, fp16_backend='auto', push_to_hub_model_id=None, push_to_hub_organization=None, push_to_hub_token=None, mp_parameters='', auto_find_batch_size=False, full_determinism=False, torchdynamo=None, ray_scope='last', ddp_timeout=1800, torch_compile=False, torch_compile_backend=None, torch_compile_mode=None, include_tokens_per_second=None, include_num_input_tokens_seen=None, neftune_noise_alpha=None, optim_target_modules=None, batch_eval_metrics=False, eval_on_start=False, use_liger_kernel=False, eval_use_gather_object=False, average_tokens_across_devices=None, model_init_kwargs=None, ref_model_init_kwargs=None, model_adapter_name=None, ref_adapter_name=None, force_use_ref_model=False, disable_dropout=True, use_logits_to_keep=False, dataset_num_proc=4, padding_value=None, label_pad_token_id=None, max_prompt_length=512, max_completion_length=512, max_length=4096, truncation_mode='keep_end', padding_free=False, precompute_ref_log_probs=False, precompute_ref_batch_size=None, tools=None, loss_type='sigmoid', beta=0.1, f_divergence_type=<FDivergenceType.REVERSE_KL: 'reverse_kl'>, f_alpha_divergence_coef=1.0, reference_free=False, label_smoothing=0, use_weighting=False, rpo_alpha=1.0, discopop_tau=0.05, sync_ref_model=False, ref_model_mixup_alpha=0.6, ref_model_sync_steps=512, generate_during_eval=False, check_model=True, acc_strategy='token', train_dataloader_shuffle=True, metric_warmup_step=0, fsdp_num=1, acc_steps=1, eval_use_evalscope=False, eval_datasets=[], eval_limit=None, eval_datasets_args=None, eval_generation_config=None, train_type='lora', optimizer=None, local_repo_path=None, galore_config=None)"
|
| 438 |
+
}
|
latest
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
global_step100
|
rng_state.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:835f869ea325fd6edf27b48b589309fb66641cb92b45f2fc13d1bb6e8814106c
|
| 3 |
+
size 14244
|
scheduler.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3800f8cb60e3138dc014e92632209d15ab5d7b362f8d6bb61f825288eb2ec7a0
|
| 3 |
+
size 1064
|
trainer_state.json
ADDED
|
@@ -0,0 +1,1834 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_global_step": null,
|
| 3 |
+
"best_metric": null,
|
| 4 |
+
"best_model_checkpoint": null,
|
| 5 |
+
"epoch": 0.18933790899946748,
|
| 6 |
+
"eval_steps": 300,
|
| 7 |
+
"global_step": 100,
|
| 8 |
+
"is_hyper_param_search": false,
|
| 9 |
+
"is_local_process_zero": true,
|
| 10 |
+
"is_world_process_zero": true,
|
| 11 |
+
"log_history": [
|
| 12 |
+
{
|
| 13 |
+
"epoch": 0.0018933790899946748,
|
| 14 |
+
"grad_norm": 12.48285961151123,
|
| 15 |
+
"learning_rate": 2.5e-06,
|
| 16 |
+
"logits/chosen": -0.600911557674408,
|
| 17 |
+
"logits/rejected": -0.6057144403457642,
|
| 18 |
+
"logps/chosen": -8.623997688293457,
|
| 19 |
+
"logps/rejected": -21.27922248840332,
|
| 20 |
+
"loss": 1.5083240270614624,
|
| 21 |
+
"memory(GiB)": 45.96,
|
| 22 |
+
"nll_loss": 0.8151768445968628,
|
| 23 |
+
"rewards/accuracies": 0.0,
|
| 24 |
+
"rewards/chosen": 0.0,
|
| 25 |
+
"rewards/margins": 0.0,
|
| 26 |
+
"rewards/rejected": 0.0,
|
| 27 |
+
"step": 1,
|
| 28 |
+
"train_speed(iter/s)": 0.005677
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"epoch": 0.0037867581799893497,
|
| 32 |
+
"grad_norm": 12.232138633728027,
|
| 33 |
+
"learning_rate": 5e-06,
|
| 34 |
+
"logits/chosen": -0.6421620845794678,
|
| 35 |
+
"logits/rejected": -0.6454498767852783,
|
| 36 |
+
"logps/chosen": -10.60006046295166,
|
| 37 |
+
"logps/rejected": -13.605328559875488,
|
| 38 |
+
"loss": 1.547582983970642,
|
| 39 |
+
"memory(GiB)": 45.96,
|
| 40 |
+
"nll_loss": 0.8544361591339111,
|
| 41 |
+
"rewards/accuracies": 0.0,
|
| 42 |
+
"rewards/chosen": 0.0,
|
| 43 |
+
"rewards/margins": 0.0,
|
| 44 |
+
"rewards/rejected": 0.0,
|
| 45 |
+
"step": 2,
|
| 46 |
+
"train_speed(iter/s)": 0.005654
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"epoch": 0.005680137269984025,
|
| 50 |
+
"grad_norm": 14.417566299438477,
|
| 51 |
+
"learning_rate": 7.5e-06,
|
| 52 |
+
"logits/chosen": -0.664191484451294,
|
| 53 |
+
"logits/rejected": -0.6654082536697388,
|
| 54 |
+
"logps/chosen": -11.958788871765137,
|
| 55 |
+
"logps/rejected": -13.785713195800781,
|
| 56 |
+
"loss": 1.6179333925247192,
|
| 57 |
+
"memory(GiB)": 45.96,
|
| 58 |
+
"nll_loss": 0.9271513819694519,
|
| 59 |
+
"rewards/accuracies": 0.59375,
|
| 60 |
+
"rewards/chosen": 0.003109893761575222,
|
| 61 |
+
"rewards/margins": 0.0048811971209943295,
|
| 62 |
+
"rewards/rejected": -0.0017713033594191074,
|
| 63 |
+
"step": 3,
|
| 64 |
+
"train_speed(iter/s)": 0.005618
|
| 65 |
+
},
|
| 66 |
+
{
|
| 67 |
+
"epoch": 0.007573516359978699,
|
| 68 |
+
"grad_norm": 8.840044975280762,
|
| 69 |
+
"learning_rate": 1e-05,
|
| 70 |
+
"logits/chosen": -0.6362882256507874,
|
| 71 |
+
"logits/rejected": -0.6385632753372192,
|
| 72 |
+
"logps/chosen": -9.689570426940918,
|
| 73 |
+
"logps/rejected": -18.226909637451172,
|
| 74 |
+
"loss": 1.4001612663269043,
|
| 75 |
+
"memory(GiB)": 45.96,
|
| 76 |
+
"nll_loss": 0.7101836204528809,
|
| 77 |
+
"rewards/accuracies": 0.59375,
|
| 78 |
+
"rewards/chosen": 0.005959533154964447,
|
| 79 |
+
"rewards/margins": 0.00653040548786521,
|
| 80 |
+
"rewards/rejected": -0.0005708730313926935,
|
| 81 |
+
"step": 4,
|
| 82 |
+
"train_speed(iter/s)": 0.005654
|
| 83 |
+
},
|
| 84 |
+
{
|
| 85 |
+
"epoch": 0.009466895449973374,
|
| 86 |
+
"grad_norm": 12.643730163574219,
|
| 87 |
+
"learning_rate": 1.25e-05,
|
| 88 |
+
"logits/chosen": -0.6108935475349426,
|
| 89 |
+
"logits/rejected": -0.6125737428665161,
|
| 90 |
+
"logps/chosen": -10.900370597839355,
|
| 91 |
+
"logps/rejected": -16.267436981201172,
|
| 92 |
+
"loss": 1.5408352613449097,
|
| 93 |
+
"memory(GiB)": 45.96,
|
| 94 |
+
"nll_loss": 0.853638768196106,
|
| 95 |
+
"rewards/accuracies": 0.6875,
|
| 96 |
+
"rewards/chosen": 0.018230972811579704,
|
| 97 |
+
"rewards/margins": 0.01212537381798029,
|
| 98 |
+
"rewards/rejected": 0.006105600390583277,
|
| 99 |
+
"step": 5,
|
| 100 |
+
"train_speed(iter/s)": 0.005633
|
| 101 |
+
},
|
| 102 |
+
{
|
| 103 |
+
"epoch": 0.01136027453996805,
|
| 104 |
+
"grad_norm": 13.595820426940918,
|
| 105 |
+
"learning_rate": 1.5e-05,
|
| 106 |
+
"logits/chosen": -0.6641858220100403,
|
| 107 |
+
"logits/rejected": -0.6705058217048645,
|
| 108 |
+
"logps/chosen": -7.528585910797119,
|
| 109 |
+
"logps/rejected": -18.073911666870117,
|
| 110 |
+
"loss": 1.4404857158660889,
|
| 111 |
+
"memory(GiB)": 45.96,
|
| 112 |
+
"nll_loss": 0.7598920464515686,
|
| 113 |
+
"rewards/accuracies": 0.71875,
|
| 114 |
+
"rewards/chosen": 0.034823305904865265,
|
| 115 |
+
"rewards/margins": 0.026311496272683144,
|
| 116 |
+
"rewards/rejected": 0.008511810563504696,
|
| 117 |
+
"step": 6,
|
| 118 |
+
"train_speed(iter/s)": 0.005634
|
| 119 |
+
},
|
| 120 |
+
{
|
| 121 |
+
"epoch": 0.013253653629962723,
|
| 122 |
+
"grad_norm": 13.2615385055542,
|
| 123 |
+
"learning_rate": 1.75e-05,
|
| 124 |
+
"logits/chosen": -0.6327687501907349,
|
| 125 |
+
"logits/rejected": -0.637922465801239,
|
| 126 |
+
"logps/chosen": -8.100177764892578,
|
| 127 |
+
"logps/rejected": -22.4697322845459,
|
| 128 |
+
"loss": 1.310943603515625,
|
| 129 |
+
"memory(GiB)": 45.96,
|
| 130 |
+
"nll_loss": 0.6429428458213806,
|
| 131 |
+
"rewards/accuracies": 0.6875,
|
| 132 |
+
"rewards/chosen": 0.07164613902568817,
|
| 133 |
+
"rewards/margins": 0.053715869784355164,
|
| 134 |
+
"rewards/rejected": 0.017930276691913605,
|
| 135 |
+
"step": 7,
|
| 136 |
+
"train_speed(iter/s)": 0.005641
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"epoch": 0.015147032719957399,
|
| 140 |
+
"grad_norm": 9.518823623657227,
|
| 141 |
+
"learning_rate": 2e-05,
|
| 142 |
+
"logits/chosen": -0.6458379626274109,
|
| 143 |
+
"logits/rejected": -0.6480465531349182,
|
| 144 |
+
"logps/chosen": -8.227258682250977,
|
| 145 |
+
"logps/rejected": -15.074575424194336,
|
| 146 |
+
"loss": 1.2895722389221191,
|
| 147 |
+
"memory(GiB)": 45.96,
|
| 148 |
+
"nll_loss": 0.6121883392333984,
|
| 149 |
+
"rewards/accuracies": 0.5625,
|
| 150 |
+
"rewards/chosen": 0.11458335816860199,
|
| 151 |
+
"rewards/margins": 0.04461951553821564,
|
| 152 |
+
"rewards/rejected": 0.06996384263038635,
|
| 153 |
+
"step": 8,
|
| 154 |
+
"train_speed(iter/s)": 0.005657
|
| 155 |
+
},
|
| 156 |
+
{
|
| 157 |
+
"epoch": 0.017040411809952073,
|
| 158 |
+
"grad_norm": 5.971006393432617,
|
| 159 |
+
"learning_rate": 2.25e-05,
|
| 160 |
+
"logits/chosen": -0.6322387456893921,
|
| 161 |
+
"logits/rejected": -0.6355814933776855,
|
| 162 |
+
"logps/chosen": -6.8561859130859375,
|
| 163 |
+
"logps/rejected": -16.394319534301758,
|
| 164 |
+
"loss": 1.1358637809753418,
|
| 165 |
+
"memory(GiB)": 45.96,
|
| 166 |
+
"nll_loss": 0.4396786093711853,
|
| 167 |
+
"rewards/accuracies": 0.5,
|
| 168 |
+
"rewards/chosen": 0.126601442694664,
|
| 169 |
+
"rewards/margins": 0.027468431740999222,
|
| 170 |
+
"rewards/rejected": 0.09913301467895508,
|
| 171 |
+
"step": 9,
|
| 172 |
+
"train_speed(iter/s)": 0.005656
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"epoch": 0.018933790899946748,
|
| 176 |
+
"grad_norm": 4.615151405334473,
|
| 177 |
+
"learning_rate": 2.5e-05,
|
| 178 |
+
"logits/chosen": -0.6353996992111206,
|
| 179 |
+
"logits/rejected": -0.6420772075653076,
|
| 180 |
+
"logps/chosen": -4.39181661605835,
|
| 181 |
+
"logps/rejected": -19.73300552368164,
|
| 182 |
+
"loss": 0.98687344789505,
|
| 183 |
+
"memory(GiB)": 45.96,
|
| 184 |
+
"nll_loss": 0.38576164841651917,
|
| 185 |
+
"rewards/accuracies": 0.6875,
|
| 186 |
+
"rewards/chosen": 0.196926087141037,
|
| 187 |
+
"rewards/margins": 0.274502158164978,
|
| 188 |
+
"rewards/rejected": -0.07757607102394104,
|
| 189 |
+
"step": 10,
|
| 190 |
+
"train_speed(iter/s)": 0.005651
|
| 191 |
+
},
|
| 192 |
+
{
|
| 193 |
+
"epoch": 0.020827169989941424,
|
| 194 |
+
"grad_norm": 3.6985604763031006,
|
| 195 |
+
"learning_rate": 2.7500000000000004e-05,
|
| 196 |
+
"logits/chosen": -0.6321280002593994,
|
| 197 |
+
"logits/rejected": -0.6365548968315125,
|
| 198 |
+
"logps/chosen": -7.2246904373168945,
|
| 199 |
+
"logps/rejected": -19.404216766357422,
|
| 200 |
+
"loss": 0.9879567623138428,
|
| 201 |
+
"memory(GiB)": 45.96,
|
| 202 |
+
"nll_loss": 0.36671119928359985,
|
| 203 |
+
"rewards/accuracies": 0.625,
|
| 204 |
+
"rewards/chosen": 0.12358222156763077,
|
| 205 |
+
"rewards/margins": 0.28244268894195557,
|
| 206 |
+
"rewards/rejected": -0.1588604599237442,
|
| 207 |
+
"step": 11,
|
| 208 |
+
"train_speed(iter/s)": 0.005662
|
| 209 |
+
},
|
| 210 |
+
{
|
| 211 |
+
"epoch": 0.0227205490799361,
|
| 212 |
+
"grad_norm": 7.83486270904541,
|
| 213 |
+
"learning_rate": 3e-05,
|
| 214 |
+
"logits/chosen": -0.6391905546188354,
|
| 215 |
+
"logits/rejected": -0.6451292634010315,
|
| 216 |
+
"logps/chosen": -8.3941011428833,
|
| 217 |
+
"logps/rejected": -24.687467575073242,
|
| 218 |
+
"loss": 1.1386761665344238,
|
| 219 |
+
"memory(GiB)": 45.96,
|
| 220 |
+
"nll_loss": 0.3862188458442688,
|
| 221 |
+
"rewards/accuracies": 0.59375,
|
| 222 |
+
"rewards/chosen": -0.004531089216470718,
|
| 223 |
+
"rewards/margins": 0.17587248980998993,
|
| 224 |
+
"rewards/rejected": -0.18040357530117035,
|
| 225 |
+
"step": 12,
|
| 226 |
+
"train_speed(iter/s)": 0.005646
|
| 227 |
+
},
|
| 228 |
+
{
|
| 229 |
+
"epoch": 0.024613928169930775,
|
| 230 |
+
"grad_norm": 5.917618274688721,
|
| 231 |
+
"learning_rate": 3.2500000000000004e-05,
|
| 232 |
+
"logits/chosen": -0.6517987251281738,
|
| 233 |
+
"logits/rejected": -0.658316969871521,
|
| 234 |
+
"logps/chosen": -6.573670387268066,
|
| 235 |
+
"logps/rejected": -19.874000549316406,
|
| 236 |
+
"loss": 1.050663948059082,
|
| 237 |
+
"memory(GiB)": 45.96,
|
| 238 |
+
"nll_loss": 0.40407559275627136,
|
| 239 |
+
"rewards/accuracies": 0.59375,
|
| 240 |
+
"rewards/chosen": 0.10255793482065201,
|
| 241 |
+
"rewards/margins": 0.36497071385383606,
|
| 242 |
+
"rewards/rejected": -0.26241275668144226,
|
| 243 |
+
"step": 13,
|
| 244 |
+
"train_speed(iter/s)": 0.00565
|
| 245 |
+
},
|
| 246 |
+
{
|
| 247 |
+
"epoch": 0.026507307259925447,
|
| 248 |
+
"grad_norm": 4.1237287521362305,
|
| 249 |
+
"learning_rate": 3.5e-05,
|
| 250 |
+
"logits/chosen": -0.61805260181427,
|
| 251 |
+
"logits/rejected": -0.6224305033683777,
|
| 252 |
+
"logps/chosen": -5.8840789794921875,
|
| 253 |
+
"logps/rejected": -29.290557861328125,
|
| 254 |
+
"loss": 0.9034114480018616,
|
| 255 |
+
"memory(GiB)": 45.96,
|
| 256 |
+
"nll_loss": 0.33107179403305054,
|
| 257 |
+
"rewards/accuracies": 0.6875,
|
| 258 |
+
"rewards/chosen": 0.13439905643463135,
|
| 259 |
+
"rewards/margins": 0.5032773017883301,
|
| 260 |
+
"rewards/rejected": -0.36887818574905396,
|
| 261 |
+
"step": 14,
|
| 262 |
+
"train_speed(iter/s)": 0.005633
|
| 263 |
+
},
|
| 264 |
+
{
|
| 265 |
+
"epoch": 0.028400686349920122,
|
| 266 |
+
"grad_norm": 2.141984701156616,
|
| 267 |
+
"learning_rate": 3.7500000000000003e-05,
|
| 268 |
+
"logits/chosen": -0.6251233816146851,
|
| 269 |
+
"logits/rejected": -0.6291872262954712,
|
| 270 |
+
"logps/chosen": -5.3556623458862305,
|
| 271 |
+
"logps/rejected": -22.30205535888672,
|
| 272 |
+
"loss": 0.7756511569023132,
|
| 273 |
+
"memory(GiB)": 45.96,
|
| 274 |
+
"nll_loss": 0.22363990545272827,
|
| 275 |
+
"rewards/accuracies": 0.78125,
|
| 276 |
+
"rewards/chosen": 0.21060410141944885,
|
| 277 |
+
"rewards/margins": 0.5203964710235596,
|
| 278 |
+
"rewards/rejected": -0.30979233980178833,
|
| 279 |
+
"step": 15,
|
| 280 |
+
"train_speed(iter/s)": 0.005622
|
| 281 |
+
},
|
| 282 |
+
{
|
| 283 |
+
"epoch": 0.030294065439914798,
|
| 284 |
+
"grad_norm": 6.157620906829834,
|
| 285 |
+
"learning_rate": 4e-05,
|
| 286 |
+
"logits/chosen": -0.6184762716293335,
|
| 287 |
+
"logits/rejected": -0.6184364557266235,
|
| 288 |
+
"logps/chosen": -10.368714332580566,
|
| 289 |
+
"logps/rejected": -12.033210754394531,
|
| 290 |
+
"loss": 1.4029701948165894,
|
| 291 |
+
"memory(GiB)": 45.96,
|
| 292 |
+
"nll_loss": 0.6103286743164062,
|
| 293 |
+
"rewards/accuracies": 0.40625,
|
| 294 |
+
"rewards/chosen": -0.020060203969478607,
|
| 295 |
+
"rewards/margins": -0.03359239548444748,
|
| 296 |
+
"rewards/rejected": 0.013532169163227081,
|
| 297 |
+
"step": 16,
|
| 298 |
+
"train_speed(iter/s)": 0.005624
|
| 299 |
+
},
|
| 300 |
+
{
|
| 301 |
+
"epoch": 0.03218744452990947,
|
| 302 |
+
"grad_norm": 2.690070152282715,
|
| 303 |
+
"learning_rate": 4.25e-05,
|
| 304 |
+
"logits/chosen": -0.6329092383384705,
|
| 305 |
+
"logits/rejected": -0.6367439031600952,
|
| 306 |
+
"logps/chosen": -6.010343551635742,
|
| 307 |
+
"logps/rejected": -17.85470199584961,
|
| 308 |
+
"loss": 0.8949607610702515,
|
| 309 |
+
"memory(GiB)": 45.96,
|
| 310 |
+
"nll_loss": 0.3054018020629883,
|
| 311 |
+
"rewards/accuracies": 0.65625,
|
| 312 |
+
"rewards/chosen": 0.25051170587539673,
|
| 313 |
+
"rewards/margins": 0.37515202164649963,
|
| 314 |
+
"rewards/rejected": -0.12464030832052231,
|
| 315 |
+
"step": 17,
|
| 316 |
+
"train_speed(iter/s)": 0.00562
|
| 317 |
+
},
|
| 318 |
+
{
|
| 319 |
+
"epoch": 0.034080823619904145,
|
| 320 |
+
"grad_norm": 2.8276467323303223,
|
| 321 |
+
"learning_rate": 4.5e-05,
|
| 322 |
+
"logits/chosen": -0.6264123320579529,
|
| 323 |
+
"logits/rejected": -0.6279273629188538,
|
| 324 |
+
"logps/chosen": -9.41238021850586,
|
| 325 |
+
"logps/rejected": -18.639442443847656,
|
| 326 |
+
"loss": 1.0180559158325195,
|
| 327 |
+
"memory(GiB)": 45.96,
|
| 328 |
+
"nll_loss": 0.3220836818218231,
|
| 329 |
+
"rewards/accuracies": 0.59375,
|
| 330 |
+
"rewards/chosen": 0.1841900646686554,
|
| 331 |
+
"rewards/margins": 0.13813874125480652,
|
| 332 |
+
"rewards/rejected": 0.04605132341384888,
|
| 333 |
+
"step": 18,
|
| 334 |
+
"train_speed(iter/s)": 0.005619
|
| 335 |
+
},
|
| 336 |
+
{
|
| 337 |
+
"epoch": 0.035974202709898824,
|
| 338 |
+
"grad_norm": 2.10530161857605,
|
| 339 |
+
"learning_rate": 4.75e-05,
|
| 340 |
+
"logits/chosen": -0.6376557946205139,
|
| 341 |
+
"logits/rejected": -0.6416239738464355,
|
| 342 |
+
"logps/chosen": -5.7143964767456055,
|
| 343 |
+
"logps/rejected": -16.784849166870117,
|
| 344 |
+
"loss": 0.9154303669929504,
|
| 345 |
+
"memory(GiB)": 45.96,
|
| 346 |
+
"nll_loss": 0.2545720934867859,
|
| 347 |
+
"rewards/accuracies": 0.59375,
|
| 348 |
+
"rewards/chosen": 0.24181872606277466,
|
| 349 |
+
"rewards/margins": 0.18784700334072113,
|
| 350 |
+
"rewards/rejected": 0.05397173762321472,
|
| 351 |
+
"step": 19,
|
| 352 |
+
"train_speed(iter/s)": 0.00562
|
| 353 |
+
},
|
| 354 |
+
{
|
| 355 |
+
"epoch": 0.037867581799893496,
|
| 356 |
+
"grad_norm": 2.357306480407715,
|
| 357 |
+
"learning_rate": 5e-05,
|
| 358 |
+
"logits/chosen": -0.6326904296875,
|
| 359 |
+
"logits/rejected": -0.6354666352272034,
|
| 360 |
+
"logps/chosen": -5.867492198944092,
|
| 361 |
+
"logps/rejected": -13.818038940429688,
|
| 362 |
+
"loss": 0.9468417167663574,
|
| 363 |
+
"memory(GiB)": 45.96,
|
| 364 |
+
"nll_loss": 0.3124926686286926,
|
| 365 |
+
"rewards/accuracies": 0.59375,
|
| 366 |
+
"rewards/chosen": 0.3217320740222931,
|
| 367 |
+
"rewards/margins": 0.22124268114566803,
|
| 368 |
+
"rewards/rejected": 0.10048942267894745,
|
| 369 |
+
"step": 20,
|
| 370 |
+
"train_speed(iter/s)": 0.005628
|
| 371 |
+
},
|
| 372 |
+
{
|
| 373 |
+
"epoch": 0.039760960889888175,
|
| 374 |
+
"grad_norm": 2.5859196186065674,
|
| 375 |
+
"learning_rate": 5.25e-05,
|
| 376 |
+
"logits/chosen": -0.6597320437431335,
|
| 377 |
+
"logits/rejected": -0.6610896587371826,
|
| 378 |
+
"logps/chosen": -7.943680286407471,
|
| 379 |
+
"logps/rejected": -11.634421348571777,
|
| 380 |
+
"loss": 1.0064345598220825,
|
| 381 |
+
"memory(GiB)": 45.96,
|
| 382 |
+
"nll_loss": 0.3732220232486725,
|
| 383 |
+
"rewards/accuracies": 0.6875,
|
| 384 |
+
"rewards/chosen": 0.3646732270717621,
|
| 385 |
+
"rewards/margins": 0.21462492644786835,
|
| 386 |
+
"rewards/rejected": 0.15004827082157135,
|
| 387 |
+
"step": 21,
|
| 388 |
+
"train_speed(iter/s)": 0.005624
|
| 389 |
+
},
|
| 390 |
+
{
|
| 391 |
+
"epoch": 0.04165433997988285,
|
| 392 |
+
"grad_norm": 2.20487642288208,
|
| 393 |
+
"learning_rate": 5.500000000000001e-05,
|
| 394 |
+
"logits/chosen": -0.6439244151115417,
|
| 395 |
+
"logits/rejected": -0.6464219093322754,
|
| 396 |
+
"logps/chosen": -4.180229187011719,
|
| 397 |
+
"logps/rejected": -19.56499481201172,
|
| 398 |
+
"loss": 0.9136227369308472,
|
| 399 |
+
"memory(GiB)": 45.96,
|
| 400 |
+
"nll_loss": 0.22558730840682983,
|
| 401 |
+
"rewards/accuracies": 0.5625,
|
| 402 |
+
"rewards/chosen": 0.25369688868522644,
|
| 403 |
+
"rewards/margins": 0.14792592823505402,
|
| 404 |
+
"rewards/rejected": 0.10577096790075302,
|
| 405 |
+
"step": 22,
|
| 406 |
+
"train_speed(iter/s)": 0.00562
|
| 407 |
+
},
|
| 408 |
+
{
|
| 409 |
+
"epoch": 0.04354771906987752,
|
| 410 |
+
"grad_norm": 2.80965518951416,
|
| 411 |
+
"learning_rate": 5.7499999999999995e-05,
|
| 412 |
+
"logits/chosen": -0.5748096108436584,
|
| 413 |
+
"logits/rejected": -0.5799225568771362,
|
| 414 |
+
"logps/chosen": -5.921882629394531,
|
| 415 |
+
"logps/rejected": -22.432538986206055,
|
| 416 |
+
"loss": 0.9860997796058655,
|
| 417 |
+
"memory(GiB)": 45.96,
|
| 418 |
+
"nll_loss": 0.3462521731853485,
|
| 419 |
+
"rewards/accuracies": 0.625,
|
| 420 |
+
"rewards/chosen": 0.24639810621738434,
|
| 421 |
+
"rewards/margins": 0.1898707151412964,
|
| 422 |
+
"rewards/rejected": 0.05652741342782974,
|
| 423 |
+
"step": 23,
|
| 424 |
+
"train_speed(iter/s)": 0.005621
|
| 425 |
+
},
|
| 426 |
+
{
|
| 427 |
+
"epoch": 0.0454410981598722,
|
| 428 |
+
"grad_norm": 2.9503355026245117,
|
| 429 |
+
"learning_rate": 6e-05,
|
| 430 |
+
"logits/chosen": -0.6007645726203918,
|
| 431 |
+
"logits/rejected": -0.6086101531982422,
|
| 432 |
+
"logps/chosen": -5.338952541351318,
|
| 433 |
+
"logps/rejected": -26.883895874023438,
|
| 434 |
+
"loss": 0.9453619122505188,
|
| 435 |
+
"memory(GiB)": 45.96,
|
| 436 |
+
"nll_loss": 0.3667706847190857,
|
| 437 |
+
"rewards/accuracies": 0.6875,
|
| 438 |
+
"rewards/chosen": 0.392182856798172,
|
| 439 |
+
"rewards/margins": 0.36902523040771484,
|
| 440 |
+
"rewards/rejected": 0.02315761335194111,
|
| 441 |
+
"step": 24,
|
| 442 |
+
"train_speed(iter/s)": 0.005624
|
| 443 |
+
},
|
| 444 |
+
{
|
| 445 |
+
"epoch": 0.04733447724986687,
|
| 446 |
+
"grad_norm": 2.2843515872955322,
|
| 447 |
+
"learning_rate": 6.25e-05,
|
| 448 |
+
"logits/chosen": -0.6047165393829346,
|
| 449 |
+
"logits/rejected": -0.608917772769928,
|
| 450 |
+
"logps/chosen": -6.276377201080322,
|
| 451 |
+
"logps/rejected": -21.095470428466797,
|
| 452 |
+
"loss": 0.914051353931427,
|
| 453 |
+
"memory(GiB)": 45.96,
|
| 454 |
+
"nll_loss": 0.3292374610900879,
|
| 455 |
+
"rewards/accuracies": 0.6875,
|
| 456 |
+
"rewards/chosen": 0.3036147356033325,
|
| 457 |
+
"rewards/margins": 0.32923099398612976,
|
| 458 |
+
"rewards/rejected": -0.025616232305765152,
|
| 459 |
+
"step": 25,
|
| 460 |
+
"train_speed(iter/s)": 0.005617
|
| 461 |
+
},
|
| 462 |
+
{
|
| 463 |
+
"epoch": 0.04922785633986155,
|
| 464 |
+
"grad_norm": 2.7294957637786865,
|
| 465 |
+
"learning_rate": 6.500000000000001e-05,
|
| 466 |
+
"logits/chosen": -0.6337023377418518,
|
| 467 |
+
"logits/rejected": -0.6374361515045166,
|
| 468 |
+
"logps/chosen": -7.032902240753174,
|
| 469 |
+
"logps/rejected": -24.937816619873047,
|
| 470 |
+
"loss": 0.8451516032218933,
|
| 471 |
+
"memory(GiB)": 45.96,
|
| 472 |
+
"nll_loss": 0.25359871983528137,
|
| 473 |
+
"rewards/accuracies": 0.65625,
|
| 474 |
+
"rewards/chosen": 0.24989479780197144,
|
| 475 |
+
"rewards/margins": 0.3727536201477051,
|
| 476 |
+
"rewards/rejected": -0.12285882234573364,
|
| 477 |
+
"step": 26,
|
| 478 |
+
"train_speed(iter/s)": 0.005618
|
| 479 |
+
},
|
| 480 |
+
{
|
| 481 |
+
"epoch": 0.05112123542985622,
|
| 482 |
+
"grad_norm": 1.9816867113113403,
|
| 483 |
+
"learning_rate": 6.750000000000001e-05,
|
| 484 |
+
"logits/chosen": -0.6674913167953491,
|
| 485 |
+
"logits/rejected": -0.6716790795326233,
|
| 486 |
+
"logps/chosen": -3.894029378890991,
|
| 487 |
+
"logps/rejected": -19.461292266845703,
|
| 488 |
+
"loss": 0.720669686794281,
|
| 489 |
+
"memory(GiB)": 45.96,
|
| 490 |
+
"nll_loss": 0.1943943053483963,
|
| 491 |
+
"rewards/accuracies": 0.78125,
|
| 492 |
+
"rewards/chosen": 0.40334552526474,
|
| 493 |
+
"rewards/margins": 0.5223954319953918,
|
| 494 |
+
"rewards/rejected": -0.11904986202716827,
|
| 495 |
+
"step": 27,
|
| 496 |
+
"train_speed(iter/s)": 0.005612
|
| 497 |
+
},
|
| 498 |
+
{
|
| 499 |
+
"epoch": 0.05301461451985089,
|
| 500 |
+
"grad_norm": 1.9561638832092285,
|
| 501 |
+
"learning_rate": 7e-05,
|
| 502 |
+
"logits/chosen": -0.6560395359992981,
|
| 503 |
+
"logits/rejected": -0.6615370512008667,
|
| 504 |
+
"logps/chosen": -3.828300952911377,
|
| 505 |
+
"logps/rejected": -27.646583557128906,
|
| 506 |
+
"loss": 0.7324035167694092,
|
| 507 |
+
"memory(GiB)": 45.96,
|
| 508 |
+
"nll_loss": 0.18986308574676514,
|
| 509 |
+
"rewards/accuracies": 0.78125,
|
| 510 |
+
"rewards/chosen": 0.2855417728424072,
|
| 511 |
+
"rewards/margins": 0.5658388733863831,
|
| 512 |
+
"rewards/rejected": -0.28029707074165344,
|
| 513 |
+
"step": 28,
|
| 514 |
+
"train_speed(iter/s)": 0.005609
|
| 515 |
+
},
|
| 516 |
+
{
|
| 517 |
+
"epoch": 0.05490799360984557,
|
| 518 |
+
"grad_norm": 2.197960376739502,
|
| 519 |
+
"learning_rate": 7.25e-05,
|
| 520 |
+
"logits/chosen": -0.6013461351394653,
|
| 521 |
+
"logits/rejected": -0.6078683733940125,
|
| 522 |
+
"logps/chosen": -5.841001987457275,
|
| 523 |
+
"logps/rejected": -28.59882926940918,
|
| 524 |
+
"loss": 0.763361930847168,
|
| 525 |
+
"memory(GiB)": 45.96,
|
| 526 |
+
"nll_loss": 0.29682645201683044,
|
| 527 |
+
"rewards/accuracies": 0.75,
|
| 528 |
+
"rewards/chosen": 0.33854252099990845,
|
| 529 |
+
"rewards/margins": 0.7552333474159241,
|
| 530 |
+
"rewards/rejected": -0.416690856218338,
|
| 531 |
+
"step": 29,
|
| 532 |
+
"train_speed(iter/s)": 0.005603
|
| 533 |
+
},
|
| 534 |
+
{
|
| 535 |
+
"epoch": 0.056801372699840244,
|
| 536 |
+
"grad_norm": 4.102924823760986,
|
| 537 |
+
"learning_rate": 7.500000000000001e-05,
|
| 538 |
+
"logits/chosen": -0.6362655758857727,
|
| 539 |
+
"logits/rejected": -0.6371059417724609,
|
| 540 |
+
"logps/chosen": -6.047646522521973,
|
| 541 |
+
"logps/rejected": -16.402286529541016,
|
| 542 |
+
"loss": 0.930861234664917,
|
| 543 |
+
"memory(GiB)": 45.96,
|
| 544 |
+
"nll_loss": 0.33219844102859497,
|
| 545 |
+
"rewards/accuracies": 0.71875,
|
| 546 |
+
"rewards/chosen": 0.2280413955450058,
|
| 547 |
+
"rewards/margins": 0.48401153087615967,
|
| 548 |
+
"rewards/rejected": -0.25597015023231506,
|
| 549 |
+
"step": 30,
|
| 550 |
+
"train_speed(iter/s)": 0.005604
|
| 551 |
+
},
|
| 552 |
+
{
|
| 553 |
+
"epoch": 0.05869475178983492,
|
| 554 |
+
"grad_norm": 2.643806219100952,
|
| 555 |
+
"learning_rate": 7.75e-05,
|
| 556 |
+
"logits/chosen": -0.6917952299118042,
|
| 557 |
+
"logits/rejected": -0.6954830884933472,
|
| 558 |
+
"logps/chosen": -4.5008368492126465,
|
| 559 |
+
"logps/rejected": -25.313228607177734,
|
| 560 |
+
"loss": 0.7698233127593994,
|
| 561 |
+
"memory(GiB)": 45.96,
|
| 562 |
+
"nll_loss": 0.21702390909194946,
|
| 563 |
+
"rewards/accuracies": 0.65625,
|
| 564 |
+
"rewards/chosen": 0.2267376184463501,
|
| 565 |
+
"rewards/margins": 0.6824056506156921,
|
| 566 |
+
"rewards/rejected": -0.4556680917739868,
|
| 567 |
+
"step": 31,
|
| 568 |
+
"train_speed(iter/s)": 0.005603
|
| 569 |
+
},
|
| 570 |
+
{
|
| 571 |
+
"epoch": 0.060588130879829595,
|
| 572 |
+
"grad_norm": 3.9089903831481934,
|
| 573 |
+
"learning_rate": 8e-05,
|
| 574 |
+
"logits/chosen": -0.6848002672195435,
|
| 575 |
+
"logits/rejected": -0.6877056360244751,
|
| 576 |
+
"logps/chosen": -9.047338485717773,
|
| 577 |
+
"logps/rejected": -25.891061782836914,
|
| 578 |
+
"loss": 0.9844011068344116,
|
| 579 |
+
"memory(GiB)": 45.96,
|
| 580 |
+
"nll_loss": 0.3213033378124237,
|
| 581 |
+
"rewards/accuracies": 0.59375,
|
| 582 |
+
"rewards/chosen": 0.13390681147575378,
|
| 583 |
+
"rewards/margins": 0.6111294031143188,
|
| 584 |
+
"rewards/rejected": -0.4772225618362427,
|
| 585 |
+
"step": 32,
|
| 586 |
+
"train_speed(iter/s)": 0.005603
|
| 587 |
+
},
|
| 588 |
+
{
|
| 589 |
+
"epoch": 0.062481509969824274,
|
| 590 |
+
"grad_norm": 3.631053924560547,
|
| 591 |
+
"learning_rate": 8.25e-05,
|
| 592 |
+
"logits/chosen": -0.6787916421890259,
|
| 593 |
+
"logits/rejected": -0.681725025177002,
|
| 594 |
+
"logps/chosen": -11.23558521270752,
|
| 595 |
+
"logps/rejected": -24.226280212402344,
|
| 596 |
+
"loss": 1.1201726198196411,
|
| 597 |
+
"memory(GiB)": 45.96,
|
| 598 |
+
"nll_loss": 0.5571246147155762,
|
| 599 |
+
"rewards/accuracies": 0.65625,
|
| 600 |
+
"rewards/chosen": 0.2192046195268631,
|
| 601 |
+
"rewards/margins": 0.6016167402267456,
|
| 602 |
+
"rewards/rejected": -0.3824121356010437,
|
| 603 |
+
"step": 33,
|
| 604 |
+
"train_speed(iter/s)": 0.00561
|
| 605 |
+
},
|
| 606 |
+
{
|
| 607 |
+
"epoch": 0.06437488905981895,
|
| 608 |
+
"grad_norm": 2.667919158935547,
|
| 609 |
+
"learning_rate": 8.5e-05,
|
| 610 |
+
"logits/chosen": -0.7005462646484375,
|
| 611 |
+
"logits/rejected": -0.7055037021636963,
|
| 612 |
+
"logps/chosen": -3.1784541606903076,
|
| 613 |
+
"logps/rejected": -23.535545349121094,
|
| 614 |
+
"loss": 0.638558566570282,
|
| 615 |
+
"memory(GiB)": 45.96,
|
| 616 |
+
"nll_loss": 0.23515944182872772,
|
| 617 |
+
"rewards/accuracies": 0.8125,
|
| 618 |
+
"rewards/chosen": 0.27606871724128723,
|
| 619 |
+
"rewards/margins": 1.0784178972244263,
|
| 620 |
+
"rewards/rejected": -0.8023491501808167,
|
| 621 |
+
"step": 34,
|
| 622 |
+
"train_speed(iter/s)": 0.005611
|
| 623 |
+
},
|
| 624 |
+
{
|
| 625 |
+
"epoch": 0.06626826814981363,
|
| 626 |
+
"grad_norm": 4.037520408630371,
|
| 627 |
+
"learning_rate": 8.75e-05,
|
| 628 |
+
"logits/chosen": -0.7001099586486816,
|
| 629 |
+
"logits/rejected": -0.7051636576652527,
|
| 630 |
+
"logps/chosen": -6.665594577789307,
|
| 631 |
+
"logps/rejected": -30.973716735839844,
|
| 632 |
+
"loss": 0.848934531211853,
|
| 633 |
+
"memory(GiB)": 45.96,
|
| 634 |
+
"nll_loss": 0.38612014055252075,
|
| 635 |
+
"rewards/accuracies": 0.75,
|
| 636 |
+
"rewards/chosen": 0.15037909150123596,
|
| 637 |
+
"rewards/margins": 1.0571930408477783,
|
| 638 |
+
"rewards/rejected": -0.9068138599395752,
|
| 639 |
+
"step": 35,
|
| 640 |
+
"train_speed(iter/s)": 0.005618
|
| 641 |
+
},
|
| 642 |
+
{
|
| 643 |
+
"epoch": 0.06816164723980829,
|
| 644 |
+
"grad_norm": 3.6542232036590576,
|
| 645 |
+
"learning_rate": 9e-05,
|
| 646 |
+
"logits/chosen": -0.7070563435554504,
|
| 647 |
+
"logits/rejected": -0.7053466439247131,
|
| 648 |
+
"logps/chosen": -5.064585208892822,
|
| 649 |
+
"logps/rejected": -19.19178581237793,
|
| 650 |
+
"loss": 0.7724434733390808,
|
| 651 |
+
"memory(GiB)": 45.96,
|
| 652 |
+
"nll_loss": 0.26881077885627747,
|
| 653 |
+
"rewards/accuracies": 0.71875,
|
| 654 |
+
"rewards/chosen": 0.2176203727722168,
|
| 655 |
+
"rewards/margins": 0.7342812418937683,
|
| 656 |
+
"rewards/rejected": -0.5166608095169067,
|
| 657 |
+
"step": 36,
|
| 658 |
+
"train_speed(iter/s)": 0.005617
|
| 659 |
+
},
|
| 660 |
+
{
|
| 661 |
+
"epoch": 0.07005502632980297,
|
| 662 |
+
"grad_norm": 3.4213714599609375,
|
| 663 |
+
"learning_rate": 9.250000000000001e-05,
|
| 664 |
+
"logits/chosen": -0.7090893387794495,
|
| 665 |
+
"logits/rejected": -0.7106159329414368,
|
| 666 |
+
"logps/chosen": -10.25515365600586,
|
| 667 |
+
"logps/rejected": -24.033281326293945,
|
| 668 |
+
"loss": 0.9920384883880615,
|
| 669 |
+
"memory(GiB)": 45.96,
|
| 670 |
+
"nll_loss": 0.46471139788627625,
|
| 671 |
+
"rewards/accuracies": 0.71875,
|
| 672 |
+
"rewards/chosen": 0.0965394526720047,
|
| 673 |
+
"rewards/margins": 0.8922154307365417,
|
| 674 |
+
"rewards/rejected": -0.7956759929656982,
|
| 675 |
+
"step": 37,
|
| 676 |
+
"train_speed(iter/s)": 0.005619
|
| 677 |
+
},
|
| 678 |
+
{
|
| 679 |
+
"epoch": 0.07194840541979765,
|
| 680 |
+
"grad_norm": 5.325904846191406,
|
| 681 |
+
"learning_rate": 9.5e-05,
|
| 682 |
+
"logits/chosen": -0.657074511051178,
|
| 683 |
+
"logits/rejected": -0.6611977815628052,
|
| 684 |
+
"logps/chosen": -11.612046241760254,
|
| 685 |
+
"logps/rejected": -27.249744415283203,
|
| 686 |
+
"loss": 0.8334037065505981,
|
| 687 |
+
"memory(GiB)": 45.96,
|
| 688 |
+
"nll_loss": 0.3489510715007782,
|
| 689 |
+
"rewards/accuracies": 0.75,
|
| 690 |
+
"rewards/chosen": 0.12560953199863434,
|
| 691 |
+
"rewards/margins": 0.9447187781333923,
|
| 692 |
+
"rewards/rejected": -0.819109320640564,
|
| 693 |
+
"step": 38,
|
| 694 |
+
"train_speed(iter/s)": 0.005622
|
| 695 |
+
},
|
| 696 |
+
{
|
| 697 |
+
"epoch": 0.07384178450979231,
|
| 698 |
+
"grad_norm": 2.9407873153686523,
|
| 699 |
+
"learning_rate": 9.75e-05,
|
| 700 |
+
"logits/chosen": -0.7148993611335754,
|
| 701 |
+
"logits/rejected": -0.7166731357574463,
|
| 702 |
+
"logps/chosen": -7.349883079528809,
|
| 703 |
+
"logps/rejected": -25.866724014282227,
|
| 704 |
+
"loss": 0.7971550822257996,
|
| 705 |
+
"memory(GiB)": 45.96,
|
| 706 |
+
"nll_loss": 0.3317265808582306,
|
| 707 |
+
"rewards/accuracies": 0.75,
|
| 708 |
+
"rewards/chosen": 0.1786963939666748,
|
| 709 |
+
"rewards/margins": 0.9361187815666199,
|
| 710 |
+
"rewards/rejected": -0.7574224472045898,
|
| 711 |
+
"step": 39,
|
| 712 |
+
"train_speed(iter/s)": 0.005621
|
| 713 |
+
},
|
| 714 |
+
{
|
| 715 |
+
"epoch": 0.07573516359978699,
|
| 716 |
+
"grad_norm": 7.271725654602051,
|
| 717 |
+
"learning_rate": 0.0001,
|
| 718 |
+
"logits/chosen": -0.6494594216346741,
|
| 719 |
+
"logits/rejected": -0.6519922018051147,
|
| 720 |
+
"logps/chosen": -10.921842575073242,
|
| 721 |
+
"logps/rejected": -26.213640213012695,
|
| 722 |
+
"loss": 1.3029272556304932,
|
| 723 |
+
"memory(GiB)": 45.96,
|
| 724 |
+
"nll_loss": 0.7071102261543274,
|
| 725 |
+
"rewards/accuracies": 0.6875,
|
| 726 |
+
"rewards/chosen": 0.04726380109786987,
|
| 727 |
+
"rewards/margins": 0.7260035276412964,
|
| 728 |
+
"rewards/rejected": -0.6787396669387817,
|
| 729 |
+
"step": 40,
|
| 730 |
+
"train_speed(iter/s)": 0.005622
|
| 731 |
+
},
|
| 732 |
+
{
|
| 733 |
+
"epoch": 0.07762854268978167,
|
| 734 |
+
"grad_norm": 2.3149876594543457,
|
| 735 |
+
"learning_rate": 0.0001025,
|
| 736 |
+
"logits/chosen": -0.6998907327651978,
|
| 737 |
+
"logits/rejected": -0.7039870023727417,
|
| 738 |
+
"logps/chosen": -4.173505783081055,
|
| 739 |
+
"logps/rejected": -23.617250442504883,
|
| 740 |
+
"loss": 0.5567827224731445,
|
| 741 |
+
"memory(GiB)": 45.96,
|
| 742 |
+
"nll_loss": 0.22731299698352814,
|
| 743 |
+
"rewards/accuracies": 0.84375,
|
| 744 |
+
"rewards/chosen": 0.3785739839076996,
|
| 745 |
+
"rewards/margins": 1.2282123565673828,
|
| 746 |
+
"rewards/rejected": -0.8496384620666504,
|
| 747 |
+
"step": 41,
|
| 748 |
+
"train_speed(iter/s)": 0.005623
|
| 749 |
+
},
|
| 750 |
+
{
|
| 751 |
+
"epoch": 0.07952192177977635,
|
| 752 |
+
"grad_norm": 2.81628155708313,
|
| 753 |
+
"learning_rate": 0.000105,
|
| 754 |
+
"logits/chosen": -0.7065268754959106,
|
| 755 |
+
"logits/rejected": -0.7109476923942566,
|
| 756 |
+
"logps/chosen": -7.945868492126465,
|
| 757 |
+
"logps/rejected": -28.209381103515625,
|
| 758 |
+
"loss": 0.9143926501274109,
|
| 759 |
+
"memory(GiB)": 45.96,
|
| 760 |
+
"nll_loss": 0.45929795503616333,
|
| 761 |
+
"rewards/accuracies": 0.78125,
|
| 762 |
+
"rewards/chosen": 0.14874038100242615,
|
| 763 |
+
"rewards/margins": 0.9704731702804565,
|
| 764 |
+
"rewards/rejected": -0.8217328786849976,
|
| 765 |
+
"step": 42,
|
| 766 |
+
"train_speed(iter/s)": 0.005624
|
| 767 |
+
},
|
| 768 |
+
{
|
| 769 |
+
"epoch": 0.08141530086977102,
|
| 770 |
+
"grad_norm": 5.763336658477783,
|
| 771 |
+
"learning_rate": 0.0001075,
|
| 772 |
+
"logits/chosen": -0.6870285868644714,
|
| 773 |
+
"logits/rejected": -0.6968757510185242,
|
| 774 |
+
"logps/chosen": -5.37760066986084,
|
| 775 |
+
"logps/rejected": -30.209644317626953,
|
| 776 |
+
"loss": 1.0033479928970337,
|
| 777 |
+
"memory(GiB)": 45.96,
|
| 778 |
+
"nll_loss": 0.5952383279800415,
|
| 779 |
+
"rewards/accuracies": 0.8125,
|
| 780 |
+
"rewards/chosen": 0.25675737857818604,
|
| 781 |
+
"rewards/margins": 1.0465596914291382,
|
| 782 |
+
"rewards/rejected": -0.7898023128509521,
|
| 783 |
+
"step": 43,
|
| 784 |
+
"train_speed(iter/s)": 0.005627
|
| 785 |
+
},
|
| 786 |
+
{
|
| 787 |
+
"epoch": 0.0833086799597657,
|
| 788 |
+
"grad_norm": 5.945868015289307,
|
| 789 |
+
"learning_rate": 0.00011000000000000002,
|
| 790 |
+
"logits/chosen": -0.6680281758308411,
|
| 791 |
+
"logits/rejected": -0.6685014963150024,
|
| 792 |
+
"logps/chosen": -11.777937889099121,
|
| 793 |
+
"logps/rejected": -14.195478439331055,
|
| 794 |
+
"loss": 1.2500255107879639,
|
| 795 |
+
"memory(GiB)": 45.96,
|
| 796 |
+
"nll_loss": 0.6744679808616638,
|
| 797 |
+
"rewards/accuracies": 0.75,
|
| 798 |
+
"rewards/chosen": 0.2654823362827301,
|
| 799 |
+
"rewards/margins": 0.44828659296035767,
|
| 800 |
+
"rewards/rejected": -0.18280424177646637,
|
| 801 |
+
"step": 44,
|
| 802 |
+
"train_speed(iter/s)": 0.005626
|
| 803 |
+
},
|
| 804 |
+
{
|
| 805 |
+
"epoch": 0.08520205904976037,
|
| 806 |
+
"grad_norm": 3.6887738704681396,
|
| 807 |
+
"learning_rate": 0.00011250000000000001,
|
| 808 |
+
"logits/chosen": -0.6420993804931641,
|
| 809 |
+
"logits/rejected": -0.649295449256897,
|
| 810 |
+
"logps/chosen": -5.845967769622803,
|
| 811 |
+
"logps/rejected": -29.958538055419922,
|
| 812 |
+
"loss": 0.8367453217506409,
|
| 813 |
+
"memory(GiB)": 45.96,
|
| 814 |
+
"nll_loss": 0.40336742997169495,
|
| 815 |
+
"rewards/accuracies": 0.8125,
|
| 816 |
+
"rewards/chosen": 0.25286757946014404,
|
| 817 |
+
"rewards/margins": 0.9195659160614014,
|
| 818 |
+
"rewards/rejected": -0.6666983962059021,
|
| 819 |
+
"step": 45,
|
| 820 |
+
"train_speed(iter/s)": 0.005627
|
| 821 |
+
},
|
| 822 |
+
{
|
| 823 |
+
"epoch": 0.08709543813975504,
|
| 824 |
+
"grad_norm": 2.1550676822662354,
|
| 825 |
+
"learning_rate": 0.00011499999999999999,
|
| 826 |
+
"logits/chosen": -0.6583084464073181,
|
| 827 |
+
"logits/rejected": -0.6640565395355225,
|
| 828 |
+
"logps/chosen": -2.7918519973754883,
|
| 829 |
+
"logps/rejected": -30.053329467773438,
|
| 830 |
+
"loss": 0.6384420394897461,
|
| 831 |
+
"memory(GiB)": 45.96,
|
| 832 |
+
"nll_loss": 0.16433243453502655,
|
| 833 |
+
"rewards/accuracies": 0.75,
|
| 834 |
+
"rewards/chosen": 0.33078277111053467,
|
| 835 |
+
"rewards/margins": 0.8035537004470825,
|
| 836 |
+
"rewards/rejected": -0.4727708697319031,
|
| 837 |
+
"step": 46,
|
| 838 |
+
"train_speed(iter/s)": 0.005628
|
| 839 |
+
},
|
| 840 |
+
{
|
| 841 |
+
"epoch": 0.08898881722974972,
|
| 842 |
+
"grad_norm": 1.9267369508743286,
|
| 843 |
+
"learning_rate": 0.00011750000000000001,
|
| 844 |
+
"logits/chosen": -0.6443086266517639,
|
| 845 |
+
"logits/rejected": -0.6484851837158203,
|
| 846 |
+
"logps/chosen": -6.4907331466674805,
|
| 847 |
+
"logps/rejected": -26.10548973083496,
|
| 848 |
+
"loss": 0.8166890740394592,
|
| 849 |
+
"memory(GiB)": 45.96,
|
| 850 |
+
"nll_loss": 0.2826446294784546,
|
| 851 |
+
"rewards/accuracies": 0.75,
|
| 852 |
+
"rewards/chosen": 0.33410829305648804,
|
| 853 |
+
"rewards/margins": 0.7130259275436401,
|
| 854 |
+
"rewards/rejected": -0.3789176642894745,
|
| 855 |
+
"step": 47,
|
| 856 |
+
"train_speed(iter/s)": 0.005627
|
| 857 |
+
},
|
| 858 |
+
{
|
| 859 |
+
"epoch": 0.0908821963197444,
|
| 860 |
+
"grad_norm": 2.238929510116577,
|
| 861 |
+
"learning_rate": 0.00012,
|
| 862 |
+
"logits/chosen": -0.6500992774963379,
|
| 863 |
+
"logits/rejected": -0.6550747156143188,
|
| 864 |
+
"logps/chosen": -6.974908351898193,
|
| 865 |
+
"logps/rejected": -25.759687423706055,
|
| 866 |
+
"loss": 0.8363897800445557,
|
| 867 |
+
"memory(GiB)": 45.96,
|
| 868 |
+
"nll_loss": 0.26740241050720215,
|
| 869 |
+
"rewards/accuracies": 0.625,
|
| 870 |
+
"rewards/chosen": 0.2779407501220703,
|
| 871 |
+
"rewards/margins": 0.71395343542099,
|
| 872 |
+
"rewards/rejected": -0.43601274490356445,
|
| 873 |
+
"step": 48,
|
| 874 |
+
"train_speed(iter/s)": 0.005623
|
| 875 |
+
},
|
| 876 |
+
{
|
| 877 |
+
"epoch": 0.09277557540973908,
|
| 878 |
+
"grad_norm": 2.5497782230377197,
|
| 879 |
+
"learning_rate": 0.00012250000000000002,
|
| 880 |
+
"logits/chosen": -0.676102876663208,
|
| 881 |
+
"logits/rejected": -0.676883339881897,
|
| 882 |
+
"logps/chosen": -6.410519599914551,
|
| 883 |
+
"logps/rejected": -17.417396545410156,
|
| 884 |
+
"loss": 0.9155470728874207,
|
| 885 |
+
"memory(GiB)": 45.96,
|
| 886 |
+
"nll_loss": 0.3170667886734009,
|
| 887 |
+
"rewards/accuracies": 0.5625,
|
| 888 |
+
"rewards/chosen": 0.24874374270439148,
|
| 889 |
+
"rewards/margins": 0.6556647419929504,
|
| 890 |
+
"rewards/rejected": -0.40692102909088135,
|
| 891 |
+
"step": 49,
|
| 892 |
+
"train_speed(iter/s)": 0.005623
|
| 893 |
+
},
|
| 894 |
+
{
|
| 895 |
+
"epoch": 0.09466895449973374,
|
| 896 |
+
"grad_norm": 2.275879144668579,
|
| 897 |
+
"learning_rate": 0.000125,
|
| 898 |
+
"logits/chosen": -0.6682412028312683,
|
| 899 |
+
"logits/rejected": -0.6694232225418091,
|
| 900 |
+
"logps/chosen": -7.84281587600708,
|
| 901 |
+
"logps/rejected": -18.11672019958496,
|
| 902 |
+
"loss": 0.8602735996246338,
|
| 903 |
+
"memory(GiB)": 45.96,
|
| 904 |
+
"nll_loss": 0.342671662569046,
|
| 905 |
+
"rewards/accuracies": 0.6875,
|
| 906 |
+
"rewards/chosen": 0.16426895558834076,
|
| 907 |
+
"rewards/margins": 0.6373977065086365,
|
| 908 |
+
"rewards/rejected": -0.47312870621681213,
|
| 909 |
+
"step": 50,
|
| 910 |
+
"train_speed(iter/s)": 0.005623
|
| 911 |
+
},
|
| 912 |
+
{
|
| 913 |
+
"epoch": 0.09656233358972842,
|
| 914 |
+
"grad_norm": 2.448835611343384,
|
| 915 |
+
"learning_rate": 0.0001275,
|
| 916 |
+
"logits/chosen": -0.7030003070831299,
|
| 917 |
+
"logits/rejected": -0.702628493309021,
|
| 918 |
+
"logps/chosen": -7.209776401519775,
|
| 919 |
+
"logps/rejected": -24.76384162902832,
|
| 920 |
+
"loss": 0.7324039340019226,
|
| 921 |
+
"memory(GiB)": 45.96,
|
| 922 |
+
"nll_loss": 0.22679060697555542,
|
| 923 |
+
"rewards/accuracies": 0.6875,
|
| 924 |
+
"rewards/chosen": 0.2451048642396927,
|
| 925 |
+
"rewards/margins": 0.9410224556922913,
|
| 926 |
+
"rewards/rejected": -0.695917546749115,
|
| 927 |
+
"step": 51,
|
| 928 |
+
"train_speed(iter/s)": 0.005612
|
| 929 |
+
},
|
| 930 |
+
{
|
| 931 |
+
"epoch": 0.0984557126797231,
|
| 932 |
+
"grad_norm": 2.4740657806396484,
|
| 933 |
+
"learning_rate": 0.00013000000000000002,
|
| 934 |
+
"logits/chosen": -0.7383002042770386,
|
| 935 |
+
"logits/rejected": -0.7460674047470093,
|
| 936 |
+
"logps/chosen": -4.4354424476623535,
|
| 937 |
+
"logps/rejected": -26.271957397460938,
|
| 938 |
+
"loss": 0.738042414188385,
|
| 939 |
+
"memory(GiB)": 45.96,
|
| 940 |
+
"nll_loss": 0.30589190125465393,
|
| 941 |
+
"rewards/accuracies": 0.71875,
|
| 942 |
+
"rewards/chosen": 0.35504794120788574,
|
| 943 |
+
"rewards/margins": 1.1514215469360352,
|
| 944 |
+
"rewards/rejected": -0.7963736057281494,
|
| 945 |
+
"step": 52,
|
| 946 |
+
"train_speed(iter/s)": 0.005612
|
| 947 |
+
},
|
| 948 |
+
{
|
| 949 |
+
"epoch": 0.10034909176971776,
|
| 950 |
+
"grad_norm": 3.1427273750305176,
|
| 951 |
+
"learning_rate": 0.0001325,
|
| 952 |
+
"logits/chosen": -0.7910199165344238,
|
| 953 |
+
"logits/rejected": -0.7956037521362305,
|
| 954 |
+
"logps/chosen": -5.2786359786987305,
|
| 955 |
+
"logps/rejected": -27.01905632019043,
|
| 956 |
+
"loss": 0.7005700469017029,
|
| 957 |
+
"memory(GiB)": 45.96,
|
| 958 |
+
"nll_loss": 0.2977657616138458,
|
| 959 |
+
"rewards/accuracies": 0.8125,
|
| 960 |
+
"rewards/chosen": 0.32858696579933167,
|
| 961 |
+
"rewards/margins": 1.1505931615829468,
|
| 962 |
+
"rewards/rejected": -0.8220062255859375,
|
| 963 |
+
"step": 53,
|
| 964 |
+
"train_speed(iter/s)": 0.005612
|
| 965 |
+
},
|
| 966 |
+
{
|
| 967 |
+
"epoch": 0.10224247085971244,
|
| 968 |
+
"grad_norm": 2.710829973220825,
|
| 969 |
+
"learning_rate": 0.00013500000000000003,
|
| 970 |
+
"logits/chosen": -0.7300952672958374,
|
| 971 |
+
"logits/rejected": -0.7392382621765137,
|
| 972 |
+
"logps/chosen": -4.204522132873535,
|
| 973 |
+
"logps/rejected": -35.52387237548828,
|
| 974 |
+
"loss": 0.5068414211273193,
|
| 975 |
+
"memory(GiB)": 45.96,
|
| 976 |
+
"nll_loss": 0.18188302218914032,
|
| 977 |
+
"rewards/accuracies": 0.84375,
|
| 978 |
+
"rewards/chosen": 0.3228433430194855,
|
| 979 |
+
"rewards/margins": 1.5467703342437744,
|
| 980 |
+
"rewards/rejected": -1.2239267826080322,
|
| 981 |
+
"step": 54,
|
| 982 |
+
"train_speed(iter/s)": 0.005612
|
| 983 |
+
},
|
| 984 |
+
{
|
| 985 |
+
"epoch": 0.10413584994970712,
|
| 986 |
+
"grad_norm": 2.6672115325927734,
|
| 987 |
+
"learning_rate": 0.0001375,
|
| 988 |
+
"logits/chosen": -0.7622752785682678,
|
| 989 |
+
"logits/rejected": -0.7692346572875977,
|
| 990 |
+
"logps/chosen": -5.656646728515625,
|
| 991 |
+
"logps/rejected": -36.99287033081055,
|
| 992 |
+
"loss": 0.6165193319320679,
|
| 993 |
+
"memory(GiB)": 45.96,
|
| 994 |
+
"nll_loss": 0.2455344796180725,
|
| 995 |
+
"rewards/accuracies": 0.78125,
|
| 996 |
+
"rewards/chosen": 0.21251262724399567,
|
| 997 |
+
"rewards/margins": 1.7865149974822998,
|
| 998 |
+
"rewards/rejected": -1.5740022659301758,
|
| 999 |
+
"step": 55,
|
| 1000 |
+
"train_speed(iter/s)": 0.00561
|
| 1001 |
+
},
|
| 1002 |
+
{
|
| 1003 |
+
"epoch": 0.10602922903970179,
|
| 1004 |
+
"grad_norm": 7.261322975158691,
|
| 1005 |
+
"learning_rate": 0.00014,
|
| 1006 |
+
"logits/chosen": -0.8227823376655579,
|
| 1007 |
+
"logits/rejected": -0.8353255391120911,
|
| 1008 |
+
"logps/chosen": -7.420350551605225,
|
| 1009 |
+
"logps/rejected": -42.59074401855469,
|
| 1010 |
+
"loss": 0.8744301199913025,
|
| 1011 |
+
"memory(GiB)": 45.96,
|
| 1012 |
+
"nll_loss": 0.49042099714279175,
|
| 1013 |
+
"rewards/accuracies": 0.71875,
|
| 1014 |
+
"rewards/chosen": 0.23873600363731384,
|
| 1015 |
+
"rewards/margins": 2.152242422103882,
|
| 1016 |
+
"rewards/rejected": -1.9135063886642456,
|
| 1017 |
+
"step": 56,
|
| 1018 |
+
"train_speed(iter/s)": 0.00561
|
| 1019 |
+
},
|
| 1020 |
+
{
|
| 1021 |
+
"epoch": 0.10792260812969647,
|
| 1022 |
+
"grad_norm": 3.6271088123321533,
|
| 1023 |
+
"learning_rate": 0.00014250000000000002,
|
| 1024 |
+
"logits/chosen": -0.8145865201950073,
|
| 1025 |
+
"logits/rejected": -0.8213882446289062,
|
| 1026 |
+
"logps/chosen": -4.568179130554199,
|
| 1027 |
+
"logps/rejected": -37.50999450683594,
|
| 1028 |
+
"loss": 0.6209616661071777,
|
| 1029 |
+
"memory(GiB)": 45.96,
|
| 1030 |
+
"nll_loss": 0.29730865359306335,
|
| 1031 |
+
"rewards/accuracies": 0.875,
|
| 1032 |
+
"rewards/chosen": 0.26820147037506104,
|
| 1033 |
+
"rewards/margins": 2.114492893218994,
|
| 1034 |
+
"rewards/rejected": -1.8462913036346436,
|
| 1035 |
+
"step": 57,
|
| 1036 |
+
"train_speed(iter/s)": 0.005611
|
| 1037 |
+
},
|
| 1038 |
+
{
|
| 1039 |
+
"epoch": 0.10981598721969114,
|
| 1040 |
+
"grad_norm": 3.6261045932769775,
|
| 1041 |
+
"learning_rate": 0.000145,
|
| 1042 |
+
"logits/chosen": -0.7670393586158752,
|
| 1043 |
+
"logits/rejected": -0.7794223427772522,
|
| 1044 |
+
"logps/chosen": -8.460503578186035,
|
| 1045 |
+
"logps/rejected": -43.186954498291016,
|
| 1046 |
+
"loss": 0.6528911590576172,
|
| 1047 |
+
"memory(GiB)": 45.96,
|
| 1048 |
+
"nll_loss": 0.30593881011009216,
|
| 1049 |
+
"rewards/accuracies": 0.84375,
|
| 1050 |
+
"rewards/chosen": 0.28572511672973633,
|
| 1051 |
+
"rewards/margins": 2.0398354530334473,
|
| 1052 |
+
"rewards/rejected": -1.75411057472229,
|
| 1053 |
+
"step": 58,
|
| 1054 |
+
"train_speed(iter/s)": 0.005609
|
| 1055 |
+
},
|
| 1056 |
+
{
|
| 1057 |
+
"epoch": 0.11170936630968582,
|
| 1058 |
+
"grad_norm": 2.79728364944458,
|
| 1059 |
+
"learning_rate": 0.0001475,
|
| 1060 |
+
"logits/chosen": -0.8239770531654358,
|
| 1061 |
+
"logits/rejected": -0.8207590579986572,
|
| 1062 |
+
"logps/chosen": -12.058256149291992,
|
| 1063 |
+
"logps/rejected": -25.070674896240234,
|
| 1064 |
+
"loss": 0.8349239230155945,
|
| 1065 |
+
"memory(GiB)": 45.96,
|
| 1066 |
+
"nll_loss": 0.4342367947101593,
|
| 1067 |
+
"rewards/accuracies": 0.8125,
|
| 1068 |
+
"rewards/chosen": 0.2961112856864929,
|
| 1069 |
+
"rewards/margins": 1.2313449382781982,
|
| 1070 |
+
"rewards/rejected": -0.9352336525917053,
|
| 1071 |
+
"step": 59,
|
| 1072 |
+
"train_speed(iter/s)": 0.005609
|
| 1073 |
+
},
|
| 1074 |
+
{
|
| 1075 |
+
"epoch": 0.11360274539968049,
|
| 1076 |
+
"grad_norm": 3.0574796199798584,
|
| 1077 |
+
"learning_rate": 0.00015000000000000001,
|
| 1078 |
+
"logits/chosen": -0.810753345489502,
|
| 1079 |
+
"logits/rejected": -0.8193599581718445,
|
| 1080 |
+
"logps/chosen": -5.105385780334473,
|
| 1081 |
+
"logps/rejected": -29.203344345092773,
|
| 1082 |
+
"loss": 0.6070073843002319,
|
| 1083 |
+
"memory(GiB)": 45.96,
|
| 1084 |
+
"nll_loss": 0.24924401938915253,
|
| 1085 |
+
"rewards/accuracies": 0.75,
|
| 1086 |
+
"rewards/chosen": 0.5035626292228699,
|
| 1087 |
+
"rewards/margins": 1.4562283754348755,
|
| 1088 |
+
"rewards/rejected": -0.9526655077934265,
|
| 1089 |
+
"step": 60,
|
| 1090 |
+
"train_speed(iter/s)": 0.005609
|
| 1091 |
+
},
|
| 1092 |
+
{
|
| 1093 |
+
"epoch": 0.11549612448967517,
|
| 1094 |
+
"grad_norm": 5.350250720977783,
|
| 1095 |
+
"learning_rate": 0.0001525,
|
| 1096 |
+
"logits/chosen": -0.815939724445343,
|
| 1097 |
+
"logits/rejected": -0.826446533203125,
|
| 1098 |
+
"logps/chosen": -2.3785085678100586,
|
| 1099 |
+
"logps/rejected": -34.224422454833984,
|
| 1100 |
+
"loss": 0.7174049019813538,
|
| 1101 |
+
"memory(GiB)": 45.96,
|
| 1102 |
+
"nll_loss": 0.38427019119262695,
|
| 1103 |
+
"rewards/accuracies": 0.8125,
|
| 1104 |
+
"rewards/chosen": 0.4009089469909668,
|
| 1105 |
+
"rewards/margins": 1.891708254814148,
|
| 1106 |
+
"rewards/rejected": -1.4907994270324707,
|
| 1107 |
+
"step": 61,
|
| 1108 |
+
"train_speed(iter/s)": 0.005608
|
| 1109 |
+
},
|
| 1110 |
+
{
|
| 1111 |
+
"epoch": 0.11738950357966985,
|
| 1112 |
+
"grad_norm": 2.239091157913208,
|
| 1113 |
+
"learning_rate": 0.000155,
|
| 1114 |
+
"logits/chosen": -0.8229139447212219,
|
| 1115 |
+
"logits/rejected": -0.8320141434669495,
|
| 1116 |
+
"logps/chosen": -4.586618900299072,
|
| 1117 |
+
"logps/rejected": -32.01433181762695,
|
| 1118 |
+
"loss": 0.6079644560813904,
|
| 1119 |
+
"memory(GiB)": 45.96,
|
| 1120 |
+
"nll_loss": 0.20739667117595673,
|
| 1121 |
+
"rewards/accuracies": 0.78125,
|
| 1122 |
+
"rewards/chosen": 0.26031073927879333,
|
| 1123 |
+
"rewards/margins": 1.4821346998214722,
|
| 1124 |
+
"rewards/rejected": -1.2218239307403564,
|
| 1125 |
+
"step": 62,
|
| 1126 |
+
"train_speed(iter/s)": 0.00561
|
| 1127 |
+
},
|
| 1128 |
+
{
|
| 1129 |
+
"epoch": 0.11928288266966451,
|
| 1130 |
+
"grad_norm": 4.1209940910339355,
|
| 1131 |
+
"learning_rate": 0.0001575,
|
| 1132 |
+
"logits/chosen": -0.8513484597206116,
|
| 1133 |
+
"logits/rejected": -0.8552687168121338,
|
| 1134 |
+
"logps/chosen": -9.33289909362793,
|
| 1135 |
+
"logps/rejected": -29.56768226623535,
|
| 1136 |
+
"loss": 1.0120337009429932,
|
| 1137 |
+
"memory(GiB)": 45.96,
|
| 1138 |
+
"nll_loss": 0.4378553628921509,
|
| 1139 |
+
"rewards/accuracies": 0.625,
|
| 1140 |
+
"rewards/chosen": 0.14417365193367004,
|
| 1141 |
+
"rewards/margins": 1.3170634508132935,
|
| 1142 |
+
"rewards/rejected": -1.1728898286819458,
|
| 1143 |
+
"step": 63,
|
| 1144 |
+
"train_speed(iter/s)": 0.005611
|
| 1145 |
+
},
|
| 1146 |
+
{
|
| 1147 |
+
"epoch": 0.12117626175965919,
|
| 1148 |
+
"grad_norm": 4.230152606964111,
|
| 1149 |
+
"learning_rate": 0.00016,
|
| 1150 |
+
"logits/chosen": -0.7943696975708008,
|
| 1151 |
+
"logits/rejected": -0.8050058484077454,
|
| 1152 |
+
"logps/chosen": -6.4711594581604,
|
| 1153 |
+
"logps/rejected": -42.82871627807617,
|
| 1154 |
+
"loss": 0.5924439430236816,
|
| 1155 |
+
"memory(GiB)": 45.96,
|
| 1156 |
+
"nll_loss": 0.23330256342887878,
|
| 1157 |
+
"rewards/accuracies": 0.84375,
|
| 1158 |
+
"rewards/chosen": 0.16898760199546814,
|
| 1159 |
+
"rewards/margins": 1.992952585220337,
|
| 1160 |
+
"rewards/rejected": -1.823965072631836,
|
| 1161 |
+
"step": 64,
|
| 1162 |
+
"train_speed(iter/s)": 0.00561
|
| 1163 |
+
},
|
| 1164 |
+
{
|
| 1165 |
+
"epoch": 0.12306964084965387,
|
| 1166 |
+
"grad_norm": 2.351702928543091,
|
| 1167 |
+
"learning_rate": 0.00016250000000000002,
|
| 1168 |
+
"logits/chosen": -0.8158823251724243,
|
| 1169 |
+
"logits/rejected": -0.8219522833824158,
|
| 1170 |
+
"logps/chosen": -4.3665313720703125,
|
| 1171 |
+
"logps/rejected": -28.09051513671875,
|
| 1172 |
+
"loss": 0.7134827375411987,
|
| 1173 |
+
"memory(GiB)": 45.96,
|
| 1174 |
+
"nll_loss": 0.22144050896167755,
|
| 1175 |
+
"rewards/accuracies": 0.65625,
|
| 1176 |
+
"rewards/chosen": 0.3041003942489624,
|
| 1177 |
+
"rewards/margins": 1.2433838844299316,
|
| 1178 |
+
"rewards/rejected": -0.9392834305763245,
|
| 1179 |
+
"step": 65,
|
| 1180 |
+
"train_speed(iter/s)": 0.005611
|
| 1181 |
+
},
|
| 1182 |
+
{
|
| 1183 |
+
"epoch": 0.12496301993964855,
|
| 1184 |
+
"grad_norm": 3.1737756729125977,
|
| 1185 |
+
"learning_rate": 0.000165,
|
| 1186 |
+
"logits/chosen": -0.8072597980499268,
|
| 1187 |
+
"logits/rejected": -0.8171340823173523,
|
| 1188 |
+
"logps/chosen": -5.0343122482299805,
|
| 1189 |
+
"logps/rejected": -32.46968460083008,
|
| 1190 |
+
"loss": 0.63325434923172,
|
| 1191 |
+
"memory(GiB)": 45.96,
|
| 1192 |
+
"nll_loss": 0.29483139514923096,
|
| 1193 |
+
"rewards/accuracies": 0.84375,
|
| 1194 |
+
"rewards/chosen": 0.29814648628234863,
|
| 1195 |
+
"rewards/margins": 1.4677376747131348,
|
| 1196 |
+
"rewards/rejected": -1.1695910692214966,
|
| 1197 |
+
"step": 66,
|
| 1198 |
+
"train_speed(iter/s)": 0.005611
|
| 1199 |
+
},
|
| 1200 |
+
{
|
| 1201 |
+
"epoch": 0.1268563990296432,
|
| 1202 |
+
"grad_norm": 2.5199668407440186,
|
| 1203 |
+
"learning_rate": 0.0001675,
|
| 1204 |
+
"logits/chosen": -0.8106119632720947,
|
| 1205 |
+
"logits/rejected": -0.8191246390342712,
|
| 1206 |
+
"logps/chosen": -8.389342308044434,
|
| 1207 |
+
"logps/rejected": -36.18731689453125,
|
| 1208 |
+
"loss": 0.7148120403289795,
|
| 1209 |
+
"memory(GiB)": 45.96,
|
| 1210 |
+
"nll_loss": 0.31000831723213196,
|
| 1211 |
+
"rewards/accuracies": 0.78125,
|
| 1212 |
+
"rewards/chosen": 0.2828730642795563,
|
| 1213 |
+
"rewards/margins": 1.7046067714691162,
|
| 1214 |
+
"rewards/rejected": -1.4217336177825928,
|
| 1215 |
+
"step": 67,
|
| 1216 |
+
"train_speed(iter/s)": 0.005612
|
| 1217 |
+
},
|
| 1218 |
+
{
|
| 1219 |
+
"epoch": 0.1287497781196379,
|
| 1220 |
+
"grad_norm": 3.428029775619507,
|
| 1221 |
+
"learning_rate": 0.00017,
|
| 1222 |
+
"logits/chosen": -0.8391574621200562,
|
| 1223 |
+
"logits/rejected": -0.8546858429908752,
|
| 1224 |
+
"logps/chosen": -8.799811363220215,
|
| 1225 |
+
"logps/rejected": -37.64997863769531,
|
| 1226 |
+
"loss": 0.7224959135055542,
|
| 1227 |
+
"memory(GiB)": 45.96,
|
| 1228 |
+
"nll_loss": 0.4090877175331116,
|
| 1229 |
+
"rewards/accuracies": 0.84375,
|
| 1230 |
+
"rewards/chosen": 0.3909546434879303,
|
| 1231 |
+
"rewards/margins": 1.7023922204971313,
|
| 1232 |
+
"rewards/rejected": -1.3114374876022339,
|
| 1233 |
+
"step": 68,
|
| 1234 |
+
"train_speed(iter/s)": 0.005613
|
| 1235 |
+
},
|
| 1236 |
+
{
|
| 1237 |
+
"epoch": 0.13064315720963257,
|
| 1238 |
+
"grad_norm": 3.7791826725006104,
|
| 1239 |
+
"learning_rate": 0.00017250000000000002,
|
| 1240 |
+
"logits/chosen": -0.8618558049201965,
|
| 1241 |
+
"logits/rejected": -0.86772221326828,
|
| 1242 |
+
"logps/chosen": -8.02017879486084,
|
| 1243 |
+
"logps/rejected": -28.318117141723633,
|
| 1244 |
+
"loss": 0.8481130003929138,
|
| 1245 |
+
"memory(GiB)": 45.96,
|
| 1246 |
+
"nll_loss": 0.32193318009376526,
|
| 1247 |
+
"rewards/accuracies": 0.625,
|
| 1248 |
+
"rewards/chosen": 0.07287055253982544,
|
| 1249 |
+
"rewards/margins": 1.3111273050308228,
|
| 1250 |
+
"rewards/rejected": -1.2382566928863525,
|
| 1251 |
+
"step": 69,
|
| 1252 |
+
"train_speed(iter/s)": 0.005613
|
| 1253 |
+
},
|
| 1254 |
+
{
|
| 1255 |
+
"epoch": 0.13253653629962725,
|
| 1256 |
+
"grad_norm": 3.5219051837921143,
|
| 1257 |
+
"learning_rate": 0.000175,
|
| 1258 |
+
"logits/chosen": -0.8731855154037476,
|
| 1259 |
+
"logits/rejected": -0.8781698346138,
|
| 1260 |
+
"logps/chosen": -8.205753326416016,
|
| 1261 |
+
"logps/rejected": -23.05510902404785,
|
| 1262 |
+
"loss": 0.9284813404083252,
|
| 1263 |
+
"memory(GiB)": 45.96,
|
| 1264 |
+
"nll_loss": 0.4099024832248688,
|
| 1265 |
+
"rewards/accuracies": 0.59375,
|
| 1266 |
+
"rewards/chosen": 0.26493778824806213,
|
| 1267 |
+
"rewards/margins": 1.1318817138671875,
|
| 1268 |
+
"rewards/rejected": -0.866943895816803,
|
| 1269 |
+
"step": 70,
|
| 1270 |
+
"train_speed(iter/s)": 0.005615
|
| 1271 |
+
},
|
| 1272 |
+
{
|
| 1273 |
+
"epoch": 0.13442991538962193,
|
| 1274 |
+
"grad_norm": 2.412374973297119,
|
| 1275 |
+
"learning_rate": 0.0001775,
|
| 1276 |
+
"logits/chosen": -0.8586634993553162,
|
| 1277 |
+
"logits/rejected": -0.8701040744781494,
|
| 1278 |
+
"logps/chosen": -3.7027158737182617,
|
| 1279 |
+
"logps/rejected": -42.672996520996094,
|
| 1280 |
+
"loss": 0.5218284130096436,
|
| 1281 |
+
"memory(GiB)": 45.96,
|
| 1282 |
+
"nll_loss": 0.2169719785451889,
|
| 1283 |
+
"rewards/accuracies": 0.8125,
|
| 1284 |
+
"rewards/chosen": 0.371543824672699,
|
| 1285 |
+
"rewards/margins": 2.3614425659179688,
|
| 1286 |
+
"rewards/rejected": -1.989898920059204,
|
| 1287 |
+
"step": 71,
|
| 1288 |
+
"train_speed(iter/s)": 0.005617
|
| 1289 |
+
},
|
| 1290 |
+
{
|
| 1291 |
+
"epoch": 0.13632329447961658,
|
| 1292 |
+
"grad_norm": 1.723345160484314,
|
| 1293 |
+
"learning_rate": 0.00018,
|
| 1294 |
+
"logits/chosen": -0.8107991814613342,
|
| 1295 |
+
"logits/rejected": -0.8227972388267517,
|
| 1296 |
+
"logps/chosen": -4.743021488189697,
|
| 1297 |
+
"logps/rejected": -38.795711517333984,
|
| 1298 |
+
"loss": 0.4607815742492676,
|
| 1299 |
+
"memory(GiB)": 45.96,
|
| 1300 |
+
"nll_loss": 0.18950311839580536,
|
| 1301 |
+
"rewards/accuracies": 0.90625,
|
| 1302 |
+
"rewards/chosen": 0.36083462834358215,
|
| 1303 |
+
"rewards/margins": 2.311211585998535,
|
| 1304 |
+
"rewards/rejected": -1.9503768682479858,
|
| 1305 |
+
"step": 72,
|
| 1306 |
+
"train_speed(iter/s)": 0.005619
|
| 1307 |
+
},
|
| 1308 |
+
{
|
| 1309 |
+
"epoch": 0.13821667356961126,
|
| 1310 |
+
"grad_norm": 4.164133548736572,
|
| 1311 |
+
"learning_rate": 0.0001825,
|
| 1312 |
+
"logits/chosen": -0.9086084365844727,
|
| 1313 |
+
"logits/rejected": -0.9208739995956421,
|
| 1314 |
+
"logps/chosen": -13.34437084197998,
|
| 1315 |
+
"logps/rejected": -53.04572296142578,
|
| 1316 |
+
"loss": 0.6920671463012695,
|
| 1317 |
+
"memory(GiB)": 45.96,
|
| 1318 |
+
"nll_loss": 0.43207526206970215,
|
| 1319 |
+
"rewards/accuracies": 0.84375,
|
| 1320 |
+
"rewards/chosen": 0.031513512134552,
|
| 1321 |
+
"rewards/margins": 3.146587371826172,
|
| 1322 |
+
"rewards/rejected": -3.1150739192962646,
|
| 1323 |
+
"step": 73,
|
| 1324 |
+
"train_speed(iter/s)": 0.005618
|
| 1325 |
+
},
|
| 1326 |
+
{
|
| 1327 |
+
"epoch": 0.14011005265960594,
|
| 1328 |
+
"grad_norm": 6.1999382972717285,
|
| 1329 |
+
"learning_rate": 0.00018500000000000002,
|
| 1330 |
+
"logits/chosen": -0.8234269618988037,
|
| 1331 |
+
"logits/rejected": -0.8303597569465637,
|
| 1332 |
+
"logps/chosen": -8.394856452941895,
|
| 1333 |
+
"logps/rejected": -41.975399017333984,
|
| 1334 |
+
"loss": 1.1737077236175537,
|
| 1335 |
+
"memory(GiB)": 45.96,
|
| 1336 |
+
"nll_loss": 0.7135495543479919,
|
| 1337 |
+
"rewards/accuracies": 0.75,
|
| 1338 |
+
"rewards/chosen": 0.14376360177993774,
|
| 1339 |
+
"rewards/margins": 2.6206157207489014,
|
| 1340 |
+
"rewards/rejected": -2.4768521785736084,
|
| 1341 |
+
"step": 74,
|
| 1342 |
+
"train_speed(iter/s)": 0.005618
|
| 1343 |
+
},
|
| 1344 |
+
{
|
| 1345 |
+
"epoch": 0.14200343174960062,
|
| 1346 |
+
"grad_norm": 6.218433856964111,
|
| 1347 |
+
"learning_rate": 0.0001875,
|
| 1348 |
+
"logits/chosen": -0.8009334802627563,
|
| 1349 |
+
"logits/rejected": -0.8051450848579407,
|
| 1350 |
+
"logps/chosen": -12.022541046142578,
|
| 1351 |
+
"logps/rejected": -38.48487091064453,
|
| 1352 |
+
"loss": 0.9869168400764465,
|
| 1353 |
+
"memory(GiB)": 45.96,
|
| 1354 |
+
"nll_loss": 0.45167890191078186,
|
| 1355 |
+
"rewards/accuracies": 0.6875,
|
| 1356 |
+
"rewards/chosen": -0.010723039507865906,
|
| 1357 |
+
"rewards/margins": 1.8775376081466675,
|
| 1358 |
+
"rewards/rejected": -1.8882607221603394,
|
| 1359 |
+
"step": 75,
|
| 1360 |
+
"train_speed(iter/s)": 0.005619
|
| 1361 |
+
},
|
| 1362 |
+
{
|
| 1363 |
+
"epoch": 0.1438968108395953,
|
| 1364 |
+
"grad_norm": 1.9325371980667114,
|
| 1365 |
+
"learning_rate": 0.00019,
|
| 1366 |
+
"logits/chosen": -0.7815489768981934,
|
| 1367 |
+
"logits/rejected": -0.7896750569343567,
|
| 1368 |
+
"logps/chosen": -6.42656946182251,
|
| 1369 |
+
"logps/rejected": -33.38284683227539,
|
| 1370 |
+
"loss": 0.6605334281921387,
|
| 1371 |
+
"memory(GiB)": 45.96,
|
| 1372 |
+
"nll_loss": 0.30029603838920593,
|
| 1373 |
+
"rewards/accuracies": 0.875,
|
| 1374 |
+
"rewards/chosen": 0.31539270281791687,
|
| 1375 |
+
"rewards/margins": 1.6843116283416748,
|
| 1376 |
+
"rewards/rejected": -1.368919014930725,
|
| 1377 |
+
"step": 76,
|
| 1378 |
+
"train_speed(iter/s)": 0.005619
|
| 1379 |
+
},
|
| 1380 |
+
{
|
| 1381 |
+
"epoch": 0.14579018992958998,
|
| 1382 |
+
"grad_norm": 5.768399238586426,
|
| 1383 |
+
"learning_rate": 0.00019250000000000002,
|
| 1384 |
+
"logits/chosen": -0.7157012820243835,
|
| 1385 |
+
"logits/rejected": -0.7218092679977417,
|
| 1386 |
+
"logps/chosen": -5.720545291900635,
|
| 1387 |
+
"logps/rejected": -32.14387512207031,
|
| 1388 |
+
"loss": 0.9388673901557922,
|
| 1389 |
+
"memory(GiB)": 45.96,
|
| 1390 |
+
"nll_loss": 0.49579885601997375,
|
| 1391 |
+
"rewards/accuracies": 0.78125,
|
| 1392 |
+
"rewards/chosen": 0.2496451437473297,
|
| 1393 |
+
"rewards/margins": 1.3803541660308838,
|
| 1394 |
+
"rewards/rejected": -1.130708932876587,
|
| 1395 |
+
"step": 77,
|
| 1396 |
+
"train_speed(iter/s)": 0.005618
|
| 1397 |
+
},
|
| 1398 |
+
{
|
| 1399 |
+
"epoch": 0.14768356901958463,
|
| 1400 |
+
"grad_norm": 2.978989601135254,
|
| 1401 |
+
"learning_rate": 0.000195,
|
| 1402 |
+
"logits/chosen": -0.7398240566253662,
|
| 1403 |
+
"logits/rejected": -0.74552983045578,
|
| 1404 |
+
"logps/chosen": -6.459310054779053,
|
| 1405 |
+
"logps/rejected": -28.873746871948242,
|
| 1406 |
+
"loss": 0.6721470952033997,
|
| 1407 |
+
"memory(GiB)": 45.96,
|
| 1408 |
+
"nll_loss": 0.2696229815483093,
|
| 1409 |
+
"rewards/accuracies": 0.8125,
|
| 1410 |
+
"rewards/chosen": 0.28077179193496704,
|
| 1411 |
+
"rewards/margins": 1.547407865524292,
|
| 1412 |
+
"rewards/rejected": -1.2666360139846802,
|
| 1413 |
+
"step": 78,
|
| 1414 |
+
"train_speed(iter/s)": 0.005617
|
| 1415 |
+
},
|
| 1416 |
+
{
|
| 1417 |
+
"epoch": 0.1495769481095793,
|
| 1418 |
+
"grad_norm": 2.109548568725586,
|
| 1419 |
+
"learning_rate": 0.00019750000000000003,
|
| 1420 |
+
"logits/chosen": -0.7017478942871094,
|
| 1421 |
+
"logits/rejected": -0.7096887826919556,
|
| 1422 |
+
"logps/chosen": -4.097768783569336,
|
| 1423 |
+
"logps/rejected": -31.799213409423828,
|
| 1424 |
+
"loss": 0.5941745042800903,
|
| 1425 |
+
"memory(GiB)": 45.96,
|
| 1426 |
+
"nll_loss": 0.19475214183330536,
|
| 1427 |
+
"rewards/accuracies": 0.75,
|
| 1428 |
+
"rewards/chosen": 0.4046904742717743,
|
| 1429 |
+
"rewards/margins": 1.6549233198165894,
|
| 1430 |
+
"rewards/rejected": -1.2502328157424927,
|
| 1431 |
+
"step": 79,
|
| 1432 |
+
"train_speed(iter/s)": 0.005616
|
| 1433 |
+
},
|
| 1434 |
+
{
|
| 1435 |
+
"epoch": 0.15147032719957398,
|
| 1436 |
+
"grad_norm": 3.9734411239624023,
|
| 1437 |
+
"learning_rate": 0.0002,
|
| 1438 |
+
"logits/chosen": -0.6862869262695312,
|
| 1439 |
+
"logits/rejected": -0.6942235827445984,
|
| 1440 |
+
"logps/chosen": -8.900280952453613,
|
| 1441 |
+
"logps/rejected": -41.978641510009766,
|
| 1442 |
+
"loss": 0.7803151607513428,
|
| 1443 |
+
"memory(GiB)": 45.96,
|
| 1444 |
+
"nll_loss": 0.3115917146205902,
|
| 1445 |
+
"rewards/accuracies": 0.75,
|
| 1446 |
+
"rewards/chosen": 0.1415846347808838,
|
| 1447 |
+
"rewards/margins": 2.006580352783203,
|
| 1448 |
+
"rewards/rejected": -1.8649954795837402,
|
| 1449 |
+
"step": 80,
|
| 1450 |
+
"train_speed(iter/s)": 0.005615
|
| 1451 |
+
},
|
| 1452 |
+
{
|
| 1453 |
+
"epoch": 0.15336370628956866,
|
| 1454 |
+
"grad_norm": 6.735928535461426,
|
| 1455 |
+
"learning_rate": 0.00019999978184060562,
|
| 1456 |
+
"logits/chosen": -0.7448083162307739,
|
| 1457 |
+
"logits/rejected": -0.7499798536300659,
|
| 1458 |
+
"logps/chosen": -5.58134126663208,
|
| 1459 |
+
"logps/rejected": -42.04484939575195,
|
| 1460 |
+
"loss": 0.9395004510879517,
|
| 1461 |
+
"memory(GiB)": 45.96,
|
| 1462 |
+
"nll_loss": 0.515042245388031,
|
| 1463 |
+
"rewards/accuracies": 0.75,
|
| 1464 |
+
"rewards/chosen": 0.24552975594997406,
|
| 1465 |
+
"rewards/margins": 2.421520233154297,
|
| 1466 |
+
"rewards/rejected": -2.175990343093872,
|
| 1467 |
+
"step": 81,
|
| 1468 |
+
"train_speed(iter/s)": 0.005613
|
| 1469 |
+
},
|
| 1470 |
+
{
|
| 1471 |
+
"epoch": 0.15525708537956334,
|
| 1472 |
+
"grad_norm": 4.143361568450928,
|
| 1473 |
+
"learning_rate": 0.00019999912736337437,
|
| 1474 |
+
"logits/chosen": -0.7276468873023987,
|
| 1475 |
+
"logits/rejected": -0.741879940032959,
|
| 1476 |
+
"logps/chosen": -3.295543670654297,
|
| 1477 |
+
"logps/rejected": -54.32012939453125,
|
| 1478 |
+
"loss": 0.660046398639679,
|
| 1479 |
+
"memory(GiB)": 45.96,
|
| 1480 |
+
"nll_loss": 0.42805707454681396,
|
| 1481 |
+
"rewards/accuracies": 0.875,
|
| 1482 |
+
"rewards/chosen": 0.2942177951335907,
|
| 1483 |
+
"rewards/margins": 3.302980661392212,
|
| 1484 |
+
"rewards/rejected": -3.008762836456299,
|
| 1485 |
+
"step": 82,
|
| 1486 |
+
"train_speed(iter/s)": 0.005614
|
| 1487 |
+
},
|
| 1488 |
+
{
|
| 1489 |
+
"epoch": 0.15715046446955802,
|
| 1490 |
+
"grad_norm": 4.713730812072754,
|
| 1491 |
+
"learning_rate": 0.00019999803657116188,
|
| 1492 |
+
"logits/chosen": -0.7310099601745605,
|
| 1493 |
+
"logits/rejected": -0.7400019764900208,
|
| 1494 |
+
"logps/chosen": -6.529958248138428,
|
| 1495 |
+
"logps/rejected": -39.906105041503906,
|
| 1496 |
+
"loss": 0.7617413997650146,
|
| 1497 |
+
"memory(GiB)": 45.96,
|
| 1498 |
+
"nll_loss": 0.422638475894928,
|
| 1499 |
+
"rewards/accuracies": 0.84375,
|
| 1500 |
+
"rewards/chosen": 0.2212720513343811,
|
| 1501 |
+
"rewards/margins": 2.413503885269165,
|
| 1502 |
+
"rewards/rejected": -2.1922316551208496,
|
| 1503 |
+
"step": 83,
|
| 1504 |
+
"train_speed(iter/s)": 0.005613
|
| 1505 |
+
},
|
| 1506 |
+
{
|
| 1507 |
+
"epoch": 0.1590438435595527,
|
| 1508 |
+
"grad_norm": 4.658056735992432,
|
| 1509 |
+
"learning_rate": 0.00019999650946872738,
|
| 1510 |
+
"logits/chosen": -0.7134297490119934,
|
| 1511 |
+
"logits/rejected": -0.7193505764007568,
|
| 1512 |
+
"logps/chosen": -5.202678680419922,
|
| 1513 |
+
"logps/rejected": -33.255706787109375,
|
| 1514 |
+
"loss": 0.6914293766021729,
|
| 1515 |
+
"memory(GiB)": 45.96,
|
| 1516 |
+
"nll_loss": 0.2725370526313782,
|
| 1517 |
+
"rewards/accuracies": 0.75,
|
| 1518 |
+
"rewards/chosen": 0.29689377546310425,
|
| 1519 |
+
"rewards/margins": 1.9401971101760864,
|
| 1520 |
+
"rewards/rejected": -1.6433032751083374,
|
| 1521 |
+
"step": 84,
|
| 1522 |
+
"train_speed(iter/s)": 0.005613
|
| 1523 |
+
},
|
| 1524 |
+
{
|
| 1525 |
+
"epoch": 0.16093722264954735,
|
| 1526 |
+
"grad_norm": 2.288125991821289,
|
| 1527 |
+
"learning_rate": 0.00019999454606273404,
|
| 1528 |
+
"logits/chosen": -0.6521891951560974,
|
| 1529 |
+
"logits/rejected": -0.6597902774810791,
|
| 1530 |
+
"logps/chosen": -6.535229206085205,
|
| 1531 |
+
"logps/rejected": -33.92669677734375,
|
| 1532 |
+
"loss": 0.5946552157402039,
|
| 1533 |
+
"memory(GiB)": 45.96,
|
| 1534 |
+
"nll_loss": 0.29953494668006897,
|
| 1535 |
+
"rewards/accuracies": 0.8125,
|
| 1536 |
+
"rewards/chosen": 0.3503923714160919,
|
| 1537 |
+
"rewards/margins": 1.96759831905365,
|
| 1538 |
+
"rewards/rejected": -1.61720609664917,
|
| 1539 |
+
"step": 85,
|
| 1540 |
+
"train_speed(iter/s)": 0.005612
|
| 1541 |
+
},
|
| 1542 |
+
{
|
| 1543 |
+
"epoch": 0.16283060173954203,
|
| 1544 |
+
"grad_norm": 6.193369388580322,
|
| 1545 |
+
"learning_rate": 0.00019999214636174845,
|
| 1546 |
+
"logits/chosen": -0.7137624025344849,
|
| 1547 |
+
"logits/rejected": -0.7180912494659424,
|
| 1548 |
+
"logps/chosen": -6.647699356079102,
|
| 1549 |
+
"logps/rejected": -31.25023078918457,
|
| 1550 |
+
"loss": 0.9301581382751465,
|
| 1551 |
+
"memory(GiB)": 45.96,
|
| 1552 |
+
"nll_loss": 0.46883538365364075,
|
| 1553 |
+
"rewards/accuracies": 0.78125,
|
| 1554 |
+
"rewards/chosen": 0.29692143201828003,
|
| 1555 |
+
"rewards/margins": 1.745566964149475,
|
| 1556 |
+
"rewards/rejected": -1.4486457109451294,
|
| 1557 |
+
"step": 86,
|
| 1558 |
+
"train_speed(iter/s)": 0.005613
|
| 1559 |
+
},
|
| 1560 |
+
{
|
| 1561 |
+
"epoch": 0.1647239808295367,
|
| 1562 |
+
"grad_norm": 3.9115772247314453,
|
| 1563 |
+
"learning_rate": 0.00019998931037624104,
|
| 1564 |
+
"logits/chosen": -0.6435313820838928,
|
| 1565 |
+
"logits/rejected": -0.6480632424354553,
|
| 1566 |
+
"logps/chosen": -6.559725284576416,
|
| 1567 |
+
"logps/rejected": -34.3360481262207,
|
| 1568 |
+
"loss": 0.7339984178543091,
|
| 1569 |
+
"memory(GiB)": 45.96,
|
| 1570 |
+
"nll_loss": 0.3988235890865326,
|
| 1571 |
+
"rewards/accuracies": 0.84375,
|
| 1572 |
+
"rewards/chosen": 0.2545357048511505,
|
| 1573 |
+
"rewards/margins": 1.8583070039749146,
|
| 1574 |
+
"rewards/rejected": -1.603771448135376,
|
| 1575 |
+
"step": 87,
|
| 1576 |
+
"train_speed(iter/s)": 0.005614
|
| 1577 |
+
},
|
| 1578 |
+
{
|
| 1579 |
+
"epoch": 0.1666173599195314,
|
| 1580 |
+
"grad_norm": 2.725975751876831,
|
| 1581 |
+
"learning_rate": 0.00019998603811858571,
|
| 1582 |
+
"logits/chosen": -0.6484612822532654,
|
| 1583 |
+
"logits/rejected": -0.6513442993164062,
|
| 1584 |
+
"logps/chosen": -5.939992427825928,
|
| 1585 |
+
"logps/rejected": -30.691526412963867,
|
| 1586 |
+
"loss": 0.6261233687400818,
|
| 1587 |
+
"memory(GiB)": 45.96,
|
| 1588 |
+
"nll_loss": 0.30717653036117554,
|
| 1589 |
+
"rewards/accuracies": 0.875,
|
| 1590 |
+
"rewards/chosen": 0.3799961507320404,
|
| 1591 |
+
"rewards/margins": 1.8060214519500732,
|
| 1592 |
+
"rewards/rejected": -1.426025390625,
|
| 1593 |
+
"step": 88,
|
| 1594 |
+
"train_speed(iter/s)": 0.005614
|
| 1595 |
+
},
|
| 1596 |
+
{
|
| 1597 |
+
"epoch": 0.16851073900952607,
|
| 1598 |
+
"grad_norm": 3.1483325958251953,
|
| 1599 |
+
"learning_rate": 0.00019998232960305993,
|
| 1600 |
+
"logits/chosen": -0.640424907207489,
|
| 1601 |
+
"logits/rejected": -0.6445133090019226,
|
| 1602 |
+
"logps/chosen": -10.158927917480469,
|
| 1603 |
+
"logps/rejected": -31.649131774902344,
|
| 1604 |
+
"loss": 0.7713112235069275,
|
| 1605 |
+
"memory(GiB)": 45.96,
|
| 1606 |
+
"nll_loss": 0.4013857841491699,
|
| 1607 |
+
"rewards/accuracies": 0.8125,
|
| 1608 |
+
"rewards/chosen": 0.2583284080028534,
|
| 1609 |
+
"rewards/margins": 1.7178279161453247,
|
| 1610 |
+
"rewards/rejected": -1.4594995975494385,
|
| 1611 |
+
"step": 89,
|
| 1612 |
+
"train_speed(iter/s)": 0.005615
|
| 1613 |
+
},
|
| 1614 |
+
{
|
| 1615 |
+
"epoch": 0.17040411809952075,
|
| 1616 |
+
"grad_norm": 9.671393394470215,
|
| 1617 |
+
"learning_rate": 0.0001999781848458447,
|
| 1618 |
+
"logits/chosen": -0.6384307146072388,
|
| 1619 |
+
"logits/rejected": -0.6467083692550659,
|
| 1620 |
+
"logps/chosen": -5.6327433586120605,
|
| 1621 |
+
"logps/rejected": -33.724124908447266,
|
| 1622 |
+
"loss": 1.136250615119934,
|
| 1623 |
+
"memory(GiB)": 45.96,
|
| 1624 |
+
"nll_loss": 0.6182616353034973,
|
| 1625 |
+
"rewards/accuracies": 0.8125,
|
| 1626 |
+
"rewards/chosen": 0.12717147171497345,
|
| 1627 |
+
"rewards/margins": 1.5072848796844482,
|
| 1628 |
+
"rewards/rejected": -1.3801133632659912,
|
| 1629 |
+
"step": 90,
|
| 1630 |
+
"train_speed(iter/s)": 0.005613
|
| 1631 |
+
},
|
| 1632 |
+
{
|
| 1633 |
+
"epoch": 0.17229749718951543,
|
| 1634 |
+
"grad_norm": 3.9667158126831055,
|
| 1635 |
+
"learning_rate": 0.0001999736038650243,
|
| 1636 |
+
"logits/chosen": -0.6727519035339355,
|
| 1637 |
+
"logits/rejected": -0.678146243095398,
|
| 1638 |
+
"logps/chosen": -3.9062070846557617,
|
| 1639 |
+
"logps/rejected": -40.605716705322266,
|
| 1640 |
+
"loss": 0.5808683633804321,
|
| 1641 |
+
"memory(GiB)": 45.96,
|
| 1642 |
+
"nll_loss": 0.29070931673049927,
|
| 1643 |
+
"rewards/accuracies": 0.84375,
|
| 1644 |
+
"rewards/chosen": 0.3750736713409424,
|
| 1645 |
+
"rewards/margins": 2.2590668201446533,
|
| 1646 |
+
"rewards/rejected": -1.883993148803711,
|
| 1647 |
+
"step": 91,
|
| 1648 |
+
"train_speed(iter/s)": 0.005612
|
| 1649 |
+
},
|
| 1650 |
+
{
|
| 1651 |
+
"epoch": 0.17419087627951008,
|
| 1652 |
+
"grad_norm": 2.966646909713745,
|
| 1653 |
+
"learning_rate": 0.00019996858668058646,
|
| 1654 |
+
"logits/chosen": -0.6560570597648621,
|
| 1655 |
+
"logits/rejected": -0.6633113622665405,
|
| 1656 |
+
"logps/chosen": -6.821100234985352,
|
| 1657 |
+
"logps/rejected": -35.842308044433594,
|
| 1658 |
+
"loss": 0.5389344096183777,
|
| 1659 |
+
"memory(GiB)": 45.96,
|
| 1660 |
+
"nll_loss": 0.22853048145771027,
|
| 1661 |
+
"rewards/accuracies": 0.78125,
|
| 1662 |
+
"rewards/chosen": 0.33146628737449646,
|
| 1663 |
+
"rewards/margins": 2.221740484237671,
|
| 1664 |
+
"rewards/rejected": -1.8902742862701416,
|
| 1665 |
+
"step": 92,
|
| 1666 |
+
"train_speed(iter/s)": 0.005613
|
| 1667 |
+
},
|
| 1668 |
+
{
|
| 1669 |
+
"epoch": 0.17608425536950476,
|
| 1670 |
+
"grad_norm": 4.352930068969727,
|
| 1671 |
+
"learning_rate": 0.0001999631333144221,
|
| 1672 |
+
"logits/chosen": -0.6744297742843628,
|
| 1673 |
+
"logits/rejected": -0.6817238926887512,
|
| 1674 |
+
"logps/chosen": -10.121214866638184,
|
| 1675 |
+
"logps/rejected": -45.07015609741211,
|
| 1676 |
+
"loss": 0.7165765166282654,
|
| 1677 |
+
"memory(GiB)": 45.96,
|
| 1678 |
+
"nll_loss": 0.36157098412513733,
|
| 1679 |
+
"rewards/accuracies": 0.71875,
|
| 1680 |
+
"rewards/chosen": 0.3100533187389374,
|
| 1681 |
+
"rewards/margins": 2.3896117210388184,
|
| 1682 |
+
"rewards/rejected": -2.0795583724975586,
|
| 1683 |
+
"step": 93,
|
| 1684 |
+
"train_speed(iter/s)": 0.005611
|
| 1685 |
+
},
|
| 1686 |
+
{
|
| 1687 |
+
"epoch": 0.17797763445949943,
|
| 1688 |
+
"grad_norm": 3.650033473968506,
|
| 1689 |
+
"learning_rate": 0.00019995724379032526,
|
| 1690 |
+
"logits/chosen": -0.6463199257850647,
|
| 1691 |
+
"logits/rejected": -0.6561610102653503,
|
| 1692 |
+
"logps/chosen": -5.5554704666137695,
|
| 1693 |
+
"logps/rejected": -39.192264556884766,
|
| 1694 |
+
"loss": 0.7099438309669495,
|
| 1695 |
+
"memory(GiB)": 45.96,
|
| 1696 |
+
"nll_loss": 0.3186087906360626,
|
| 1697 |
+
"rewards/accuracies": 0.875,
|
| 1698 |
+
"rewards/chosen": 0.28469714522361755,
|
| 1699 |
+
"rewards/margins": 2.1725757122039795,
|
| 1700 |
+
"rewards/rejected": -1.887878656387329,
|
| 1701 |
+
"step": 94,
|
| 1702 |
+
"train_speed(iter/s)": 0.005612
|
| 1703 |
+
},
|
| 1704 |
+
{
|
| 1705 |
+
"epoch": 0.1798710135494941,
|
| 1706 |
+
"grad_norm": 3.6392762660980225,
|
| 1707 |
+
"learning_rate": 0.00019995091813399305,
|
| 1708 |
+
"logits/chosen": -0.6218971014022827,
|
| 1709 |
+
"logits/rejected": -0.6236589550971985,
|
| 1710 |
+
"logps/chosen": -9.031105041503906,
|
| 1711 |
+
"logps/rejected": -29.54071044921875,
|
| 1712 |
+
"loss": 0.7348965406417847,
|
| 1713 |
+
"memory(GiB)": 45.96,
|
| 1714 |
+
"nll_loss": 0.35691019892692566,
|
| 1715 |
+
"rewards/accuracies": 0.84375,
|
| 1716 |
+
"rewards/chosen": 0.3281153440475464,
|
| 1717 |
+
"rewards/margins": 1.6330987215042114,
|
| 1718 |
+
"rewards/rejected": -1.3049836158752441,
|
| 1719 |
+
"step": 95,
|
| 1720 |
+
"train_speed(iter/s)": 0.005611
|
| 1721 |
+
},
|
| 1722 |
+
{
|
| 1723 |
+
"epoch": 0.1817643926394888,
|
| 1724 |
+
"grad_norm": 4.513101100921631,
|
| 1725 |
+
"learning_rate": 0.00019994415637302547,
|
| 1726 |
+
"logits/chosen": -0.6518260836601257,
|
| 1727 |
+
"logits/rejected": -0.6591805815696716,
|
| 1728 |
+
"logps/chosen": -3.454824447631836,
|
| 1729 |
+
"logps/rejected": -40.539100646972656,
|
| 1730 |
+
"loss": 0.4428410232067108,
|
| 1731 |
+
"memory(GiB)": 45.96,
|
| 1732 |
+
"nll_loss": 0.16427120566368103,
|
| 1733 |
+
"rewards/accuracies": 0.90625,
|
| 1734 |
+
"rewards/chosen": 0.29650911688804626,
|
| 1735 |
+
"rewards/margins": 1.9197403192520142,
|
| 1736 |
+
"rewards/rejected": -1.623231053352356,
|
| 1737 |
+
"step": 96,
|
| 1738 |
+
"train_speed(iter/s)": 0.005612
|
| 1739 |
+
},
|
| 1740 |
+
{
|
| 1741 |
+
"epoch": 0.18365777172948347,
|
| 1742 |
+
"grad_norm": 3.081139087677002,
|
| 1743 |
+
"learning_rate": 0.00019993695853692537,
|
| 1744 |
+
"logits/chosen": -0.6301771402359009,
|
| 1745 |
+
"logits/rejected": -0.6361221671104431,
|
| 1746 |
+
"logps/chosen": -5.919186592102051,
|
| 1747 |
+
"logps/rejected": -33.726078033447266,
|
| 1748 |
+
"loss": 0.6770766377449036,
|
| 1749 |
+
"memory(GiB)": 45.96,
|
| 1750 |
+
"nll_loss": 0.3173068165779114,
|
| 1751 |
+
"rewards/accuracies": 0.8125,
|
| 1752 |
+
"rewards/chosen": 0.288848340511322,
|
| 1753 |
+
"rewards/margins": 1.7297114133834839,
|
| 1754 |
+
"rewards/rejected": -1.4408631324768066,
|
| 1755 |
+
"step": 97,
|
| 1756 |
+
"train_speed(iter/s)": 0.005613
|
| 1757 |
+
},
|
| 1758 |
+
{
|
| 1759 |
+
"epoch": 0.18555115081947815,
|
| 1760 |
+
"grad_norm": 5.967331409454346,
|
| 1761 |
+
"learning_rate": 0.0001999293246570983,
|
| 1762 |
+
"logits/chosen": -0.6614546179771423,
|
| 1763 |
+
"logits/rejected": -0.6638529300689697,
|
| 1764 |
+
"logps/chosen": -6.57697057723999,
|
| 1765 |
+
"logps/rejected": -30.82279396057129,
|
| 1766 |
+
"loss": 0.6938097476959229,
|
| 1767 |
+
"memory(GiB)": 45.96,
|
| 1768 |
+
"nll_loss": 0.23730693757534027,
|
| 1769 |
+
"rewards/accuracies": 0.71875,
|
| 1770 |
+
"rewards/chosen": 0.24900805950164795,
|
| 1771 |
+
"rewards/margins": 1.5996767282485962,
|
| 1772 |
+
"rewards/rejected": -1.3506686687469482,
|
| 1773 |
+
"step": 98,
|
| 1774 |
+
"train_speed(iter/s)": 0.005614
|
| 1775 |
+
},
|
| 1776 |
+
{
|
| 1777 |
+
"epoch": 0.1874445299094728,
|
| 1778 |
+
"grad_norm": 2.659550428390503,
|
| 1779 |
+
"learning_rate": 0.0001999212547668523,
|
| 1780 |
+
"logits/chosen": -0.6610513925552368,
|
| 1781 |
+
"logits/rejected": -0.6650281548500061,
|
| 1782 |
+
"logps/chosen": -7.570089817047119,
|
| 1783 |
+
"logps/rejected": -41.5615348815918,
|
| 1784 |
+
"loss": 0.521258533000946,
|
| 1785 |
+
"memory(GiB)": 45.96,
|
| 1786 |
+
"nll_loss": 0.34517771005630493,
|
| 1787 |
+
"rewards/accuracies": 0.96875,
|
| 1788 |
+
"rewards/chosen": 0.28127947449684143,
|
| 1789 |
+
"rewards/margins": 2.645756244659424,
|
| 1790 |
+
"rewards/rejected": -2.3644769191741943,
|
| 1791 |
+
"step": 99,
|
| 1792 |
+
"train_speed(iter/s)": 0.005614
|
| 1793 |
+
},
|
| 1794 |
+
{
|
| 1795 |
+
"epoch": 0.18933790899946748,
|
| 1796 |
+
"grad_norm": 12.499390602111816,
|
| 1797 |
+
"learning_rate": 0.00019991274890139774,
|
| 1798 |
+
"logits/chosen": -0.5981582403182983,
|
| 1799 |
+
"logits/rejected": -0.5984249114990234,
|
| 1800 |
+
"logps/chosen": -5.772880554199219,
|
| 1801 |
+
"logps/rejected": -36.335723876953125,
|
| 1802 |
+
"loss": 0.5674217939376831,
|
| 1803 |
+
"memory(GiB)": 45.96,
|
| 1804 |
+
"nll_loss": 0.3134133517742157,
|
| 1805 |
+
"rewards/accuracies": 0.9375,
|
| 1806 |
+
"rewards/chosen": 0.3456924557685852,
|
| 1807 |
+
"rewards/margins": 2.240718364715576,
|
| 1808 |
+
"rewards/rejected": -1.8950259685516357,
|
| 1809 |
+
"step": 100,
|
| 1810 |
+
"train_speed(iter/s)": 0.005613
|
| 1811 |
+
}
|
| 1812 |
+
],
|
| 1813 |
+
"logging_steps": 1,
|
| 1814 |
+
"max_steps": 1584,
|
| 1815 |
+
"num_input_tokens_seen": 0,
|
| 1816 |
+
"num_train_epochs": 3,
|
| 1817 |
+
"save_steps": 50,
|
| 1818 |
+
"stateful_callbacks": {
|
| 1819 |
+
"TrainerControl": {
|
| 1820 |
+
"args": {
|
| 1821 |
+
"should_epoch_stop": false,
|
| 1822 |
+
"should_evaluate": false,
|
| 1823 |
+
"should_log": false,
|
| 1824 |
+
"should_save": true,
|
| 1825 |
+
"should_training_stop": false
|
| 1826 |
+
},
|
| 1827 |
+
"attributes": {}
|
| 1828 |
+
}
|
| 1829 |
+
},
|
| 1830 |
+
"total_flos": 7.025223996853453e+17,
|
| 1831 |
+
"train_batch_size": 1,
|
| 1832 |
+
"trial_name": null,
|
| 1833 |
+
"trial_params": null
|
| 1834 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1a70319256da723f2ab23c082e5e1ecffba4c42af4a54dc21b9d15e6da1240f6
|
| 3 |
+
size 8696
|
zero_to_fp32.py
ADDED
|
@@ -0,0 +1,760 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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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)
|