Instructions to use cragtmp/task1add3-100public with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use cragtmp/task1add3-100public 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/task1add3-100public") - 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).*\\.(o_proj|up_proj|v_proj|down_proj|gate_proj|q_proj|k_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:0b0d2afaa4299417b5d4a8e7b0d73e1480363d43bcc04bb7cbcaf42aad04b39a
|
| 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": 1024,
|
| 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 |
+
"task1+3_dpo_absgt10_noidk__pari0.8_0608.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/task1+3_dpo_absgt10_noidk__pari0.8_0608/v0-20250611-010914",
|
| 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": 4,
|
| 95 |
+
"per_device_eval_batch_size": 4,
|
| 96 |
+
"per_gpu_train_batch_size": null,
|
| 97 |
+
"per_gpu_eval_batch_size": null,
|
| 98 |
+
"gradient_accumulation_steps": 16,
|
| 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": 2.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/task1+3_dpo_absgt10_noidk__pari0.8_0608/v0-20250611-010914/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 0x7c1e2174ad40>, 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/task1+3_dpo_absgt10_noidk__pari0.8_0608/v0-20250611-010914', 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=4, per_device_eval_batch_size=4, per_gpu_train_batch_size=None, per_gpu_eval_batch_size=None, gradient_accumulation_steps=16, 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=2.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/task1+3_dpo_absgt10_noidk__pari0.8_0608/v0-20250611-010914/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/task1+3_dpo_absgt10_noidk__pari0.8_0608/v0-20250611-010914', 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=1024, 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:e125aaf48cd59a719074275562479cf9a5dc81e15bc40f8de67a1dfb20c0a76a
|
| 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.44742729306487694,
|
| 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.0044742729306487695,
|
| 14 |
+
"grad_norm": 4.521431922912598,
|
| 15 |
+
"learning_rate": 8.695652173913044e-06,
|
| 16 |
+
"logits/chosen": -0.37893733382225037,
|
| 17 |
+
"logits/rejected": -0.4597730040550232,
|
| 18 |
+
"logps/chosen": -11.001541137695312,
|
| 19 |
+
"logps/rejected": -17.05784034729004,
|
| 20 |
+
"loss": 1.3586950302124023,
|
| 21 |
+
"memory(GiB)": 46.57,
|
| 22 |
+
"nll_loss": 0.6655479669570923,
|
| 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.005374
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"epoch": 0.008948545861297539,
|
| 32 |
+
"grad_norm": 3.470855951309204,
|
| 33 |
+
"learning_rate": 1.739130434782609e-05,
|
| 34 |
+
"logits/chosen": -0.3633067309856415,
|
| 35 |
+
"logits/rejected": -0.4392029941082001,
|
| 36 |
+
"logps/chosen": -7.973292350769043,
|
| 37 |
+
"logps/rejected": -13.90955924987793,
|
| 38 |
+
"loss": 1.2437297105789185,
|
| 39 |
+
"memory(GiB)": 46.57,
|
| 40 |
+
"nll_loss": 0.5505824685096741,
|
| 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.005501
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"epoch": 0.013422818791946308,
|
| 50 |
+
"grad_norm": 5.51271390914917,
|
| 51 |
+
"learning_rate": 2.608695652173913e-05,
|
| 52 |
+
"logits/chosen": -0.26578277349472046,
|
| 53 |
+
"logits/rejected": -0.45589232444763184,
|
| 54 |
+
"logps/chosen": -9.600592613220215,
|
| 55 |
+
"logps/rejected": -22.355058670043945,
|
| 56 |
+
"loss": 1.392338514328003,
|
| 57 |
+
"memory(GiB)": 46.57,
|
| 58 |
+
"nll_loss": 0.6997992396354675,
|
| 59 |
+
"rewards/accuracies": 0.453125,
|
| 60 |
+
"rewards/chosen": 4.354381235316396e-05,
|
| 61 |
+
"rewards/margins": 0.0013819998130202293,
|
| 62 |
+
"rewards/rejected": -0.001338455593213439,
|
| 63 |
+
"step": 3,
|
| 64 |
+
"train_speed(iter/s)": 0.005521
|
| 65 |
+
},
|
| 66 |
+
{
|
| 67 |
+
"epoch": 0.017897091722595078,
|
| 68 |
+
"grad_norm": 6.5741682052612305,
|
| 69 |
+
"learning_rate": 3.478260869565218e-05,
|
| 70 |
+
"logits/chosen": -0.40403854846954346,
|
| 71 |
+
"logits/rejected": -0.5402908325195312,
|
| 72 |
+
"logps/chosen": -6.373080253601074,
|
| 73 |
+
"logps/rejected": -16.791393280029297,
|
| 74 |
+
"loss": 1.222740888595581,
|
| 75 |
+
"memory(GiB)": 46.57,
|
| 76 |
+
"nll_loss": 0.5450983047485352,
|
| 77 |
+
"rewards/accuracies": 0.765625,
|
| 78 |
+
"rewards/chosen": 0.010452846065163612,
|
| 79 |
+
"rewards/margins": 0.031955912709236145,
|
| 80 |
+
"rewards/rejected": -0.021503068506717682,
|
| 81 |
+
"step": 4,
|
| 82 |
+
"train_speed(iter/s)": 0.005551
|
| 83 |
+
},
|
| 84 |
+
{
|
| 85 |
+
"epoch": 0.02237136465324385,
|
| 86 |
+
"grad_norm": 3.046576738357544,
|
| 87 |
+
"learning_rate": 4.347826086956522e-05,
|
| 88 |
+
"logits/chosen": -0.3187038004398346,
|
| 89 |
+
"logits/rejected": -0.4441537857055664,
|
| 90 |
+
"logps/chosen": -9.070188522338867,
|
| 91 |
+
"logps/rejected": -17.255901336669922,
|
| 92 |
+
"loss": 1.2276911735534668,
|
| 93 |
+
"memory(GiB)": 46.57,
|
| 94 |
+
"nll_loss": 0.5655408501625061,
|
| 95 |
+
"rewards/accuracies": 0.625,
|
| 96 |
+
"rewards/chosen": -0.007649715524166822,
|
| 97 |
+
"rewards/margins": 0.07260076701641083,
|
| 98 |
+
"rewards/rejected": -0.08025049418210983,
|
| 99 |
+
"step": 5,
|
| 100 |
+
"train_speed(iter/s)": 0.005557
|
| 101 |
+
},
|
| 102 |
+
{
|
| 103 |
+
"epoch": 0.026845637583892617,
|
| 104 |
+
"grad_norm": 4.846445560455322,
|
| 105 |
+
"learning_rate": 5.217391304347826e-05,
|
| 106 |
+
"logits/chosen": -0.30176016688346863,
|
| 107 |
+
"logits/rejected": -0.45638489723205566,
|
| 108 |
+
"logps/chosen": -8.63841438293457,
|
| 109 |
+
"logps/rejected": -18.97266960144043,
|
| 110 |
+
"loss": 1.1484646797180176,
|
| 111 |
+
"memory(GiB)": 46.57,
|
| 112 |
+
"nll_loss": 0.5371410250663757,
|
| 113 |
+
"rewards/accuracies": 0.6875,
|
| 114 |
+
"rewards/chosen": -0.024880727753043175,
|
| 115 |
+
"rewards/margins": 0.23170879483222961,
|
| 116 |
+
"rewards/rejected": -0.25658950209617615,
|
| 117 |
+
"step": 6,
|
| 118 |
+
"train_speed(iter/s)": 0.005568
|
| 119 |
+
},
|
| 120 |
+
{
|
| 121 |
+
"epoch": 0.03131991051454139,
|
| 122 |
+
"grad_norm": 7.562114715576172,
|
| 123 |
+
"learning_rate": 6.086956521739131e-05,
|
| 124 |
+
"logits/chosen": -0.3937205672264099,
|
| 125 |
+
"logits/rejected": -0.48791196942329407,
|
| 126 |
+
"logps/chosen": -10.315498352050781,
|
| 127 |
+
"logps/rejected": -20.046728134155273,
|
| 128 |
+
"loss": 1.3093780279159546,
|
| 129 |
+
"memory(GiB)": 46.57,
|
| 130 |
+
"nll_loss": 0.6873191595077515,
|
| 131 |
+
"rewards/accuracies": 0.6875,
|
| 132 |
+
"rewards/chosen": -0.14371810853481293,
|
| 133 |
+
"rewards/margins": 0.2797008454799652,
|
| 134 |
+
"rewards/rejected": -0.42341893911361694,
|
| 135 |
+
"step": 7,
|
| 136 |
+
"train_speed(iter/s)": 0.005577
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"epoch": 0.035794183445190156,
|
| 140 |
+
"grad_norm": 7.459152698516846,
|
| 141 |
+
"learning_rate": 6.956521739130436e-05,
|
| 142 |
+
"logits/chosen": -0.3540106415748596,
|
| 143 |
+
"logits/rejected": -0.43836480379104614,
|
| 144 |
+
"logps/chosen": -8.758136749267578,
|
| 145 |
+
"logps/rejected": -18.294340133666992,
|
| 146 |
+
"loss": 1.3215807676315308,
|
| 147 |
+
"memory(GiB)": 46.57,
|
| 148 |
+
"nll_loss": 0.6817622184753418,
|
| 149 |
+
"rewards/accuracies": 0.640625,
|
| 150 |
+
"rewards/chosen": -0.19053705036640167,
|
| 151 |
+
"rewards/margins": 0.2214164435863495,
|
| 152 |
+
"rewards/rejected": -0.41195347905158997,
|
| 153 |
+
"step": 8,
|
| 154 |
+
"train_speed(iter/s)": 0.005585
|
| 155 |
+
},
|
| 156 |
+
{
|
| 157 |
+
"epoch": 0.040268456375838924,
|
| 158 |
+
"grad_norm": 3.0581202507019043,
|
| 159 |
+
"learning_rate": 7.82608695652174e-05,
|
| 160 |
+
"logits/chosen": -0.3466319143772125,
|
| 161 |
+
"logits/rejected": -0.4212740361690521,
|
| 162 |
+
"logps/chosen": -10.387115478515625,
|
| 163 |
+
"logps/rejected": -20.363929748535156,
|
| 164 |
+
"loss": 1.1448516845703125,
|
| 165 |
+
"memory(GiB)": 46.57,
|
| 166 |
+
"nll_loss": 0.5626436471939087,
|
| 167 |
+
"rewards/accuracies": 0.703125,
|
| 168 |
+
"rewards/chosen": -0.06380077451467514,
|
| 169 |
+
"rewards/margins": 0.3404861092567444,
|
| 170 |
+
"rewards/rejected": -0.40428686141967773,
|
| 171 |
+
"step": 9,
|
| 172 |
+
"train_speed(iter/s)": 0.005583
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"epoch": 0.0447427293064877,
|
| 176 |
+
"grad_norm": 3.9353108406066895,
|
| 177 |
+
"learning_rate": 8.695652173913044e-05,
|
| 178 |
+
"logits/chosen": -0.4188399314880371,
|
| 179 |
+
"logits/rejected": -0.5007613301277161,
|
| 180 |
+
"logps/chosen": -9.096799850463867,
|
| 181 |
+
"logps/rejected": -18.05609130859375,
|
| 182 |
+
"loss": 1.2927519083023071,
|
| 183 |
+
"memory(GiB)": 46.57,
|
| 184 |
+
"nll_loss": 0.6729815006256104,
|
| 185 |
+
"rewards/accuracies": 0.625,
|
| 186 |
+
"rewards/chosen": -0.060015156865119934,
|
| 187 |
+
"rewards/margins": 0.20498159527778625,
|
| 188 |
+
"rewards/rejected": -0.264996737241745,
|
| 189 |
+
"step": 10,
|
| 190 |
+
"train_speed(iter/s)": 0.00559
|
| 191 |
+
},
|
| 192 |
+
{
|
| 193 |
+
"epoch": 0.049217002237136466,
|
| 194 |
+
"grad_norm": 2.2350685596466064,
|
| 195 |
+
"learning_rate": 9.565217391304348e-05,
|
| 196 |
+
"logits/chosen": -0.41371461749076843,
|
| 197 |
+
"logits/rejected": -0.4829203188419342,
|
| 198 |
+
"logps/chosen": -7.282920837402344,
|
| 199 |
+
"logps/rejected": -15.015157699584961,
|
| 200 |
+
"loss": 1.167080044746399,
|
| 201 |
+
"memory(GiB)": 46.57,
|
| 202 |
+
"nll_loss": 0.5672391653060913,
|
| 203 |
+
"rewards/accuracies": 0.765625,
|
| 204 |
+
"rewards/chosen": 0.07586651295423508,
|
| 205 |
+
"rewards/margins": 0.2256288230419159,
|
| 206 |
+
"rewards/rejected": -0.14976228773593903,
|
| 207 |
+
"step": 11,
|
| 208 |
+
"train_speed(iter/s)": 0.005596
|
| 209 |
+
},
|
| 210 |
+
{
|
| 211 |
+
"epoch": 0.053691275167785234,
|
| 212 |
+
"grad_norm": 2.6733052730560303,
|
| 213 |
+
"learning_rate": 0.00010434782608695653,
|
| 214 |
+
"logits/chosen": -0.38637417554855347,
|
| 215 |
+
"logits/rejected": -0.45029905438423157,
|
| 216 |
+
"logps/chosen": -11.042367935180664,
|
| 217 |
+
"logps/rejected": -16.67047882080078,
|
| 218 |
+
"loss": 1.2763197422027588,
|
| 219 |
+
"memory(GiB)": 46.57,
|
| 220 |
+
"nll_loss": 0.6531897783279419,
|
| 221 |
+
"rewards/accuracies": 0.671875,
|
| 222 |
+
"rewards/chosen": 0.06360332667827606,
|
| 223 |
+
"rewards/margins": 0.17586028575897217,
|
| 224 |
+
"rewards/rejected": -0.1122569665312767,
|
| 225 |
+
"step": 12,
|
| 226 |
+
"train_speed(iter/s)": 0.005598
|
| 227 |
+
},
|
| 228 |
+
{
|
| 229 |
+
"epoch": 0.058165548098434,
|
| 230 |
+
"grad_norm": 1.9472479820251465,
|
| 231 |
+
"learning_rate": 0.00011304347826086956,
|
| 232 |
+
"logits/chosen": -0.4195230007171631,
|
| 233 |
+
"logits/rejected": -0.4734322428703308,
|
| 234 |
+
"logps/chosen": -7.205465316772461,
|
| 235 |
+
"logps/rejected": -13.222125053405762,
|
| 236 |
+
"loss": 1.1376935243606567,
|
| 237 |
+
"memory(GiB)": 46.57,
|
| 238 |
+
"nll_loss": 0.4900382459163666,
|
| 239 |
+
"rewards/accuracies": 0.6875,
|
| 240 |
+
"rewards/chosen": 0.018632210791110992,
|
| 241 |
+
"rewards/margins": 0.11014734208583832,
|
| 242 |
+
"rewards/rejected": -0.09151513874530792,
|
| 243 |
+
"step": 13,
|
| 244 |
+
"train_speed(iter/s)": 0.005601
|
| 245 |
+
},
|
| 246 |
+
{
|
| 247 |
+
"epoch": 0.06263982102908278,
|
| 248 |
+
"grad_norm": 1.828997015953064,
|
| 249 |
+
"learning_rate": 0.00012173913043478263,
|
| 250 |
+
"logits/chosen": -0.399485319852829,
|
| 251 |
+
"logits/rejected": -0.4682197570800781,
|
| 252 |
+
"logps/chosen": -8.005407333374023,
|
| 253 |
+
"logps/rejected": -16.06272315979004,
|
| 254 |
+
"loss": 1.1697134971618652,
|
| 255 |
+
"memory(GiB)": 46.57,
|
| 256 |
+
"nll_loss": 0.5445835590362549,
|
| 257 |
+
"rewards/accuracies": 0.75,
|
| 258 |
+
"rewards/chosen": 0.0030609495006501675,
|
| 259 |
+
"rewards/margins": 0.16438230872154236,
|
| 260 |
+
"rewards/rejected": -0.16132137179374695,
|
| 261 |
+
"step": 14,
|
| 262 |
+
"train_speed(iter/s)": 0.005604
|
| 263 |
+
},
|
| 264 |
+
{
|
| 265 |
+
"epoch": 0.06711409395973154,
|
| 266 |
+
"grad_norm": 2.1229512691497803,
|
| 267 |
+
"learning_rate": 0.00013043478260869567,
|
| 268 |
+
"logits/chosen": -0.3835911750793457,
|
| 269 |
+
"logits/rejected": -0.4592927396297455,
|
| 270 |
+
"logps/chosen": -6.499156475067139,
|
| 271 |
+
"logps/rejected": -15.707530975341797,
|
| 272 |
+
"loss": 1.0722893476486206,
|
| 273 |
+
"memory(GiB)": 46.57,
|
| 274 |
+
"nll_loss": 0.503006637096405,
|
| 275 |
+
"rewards/accuracies": 0.84375,
|
| 276 |
+
"rewards/chosen": 0.06762155145406723,
|
| 277 |
+
"rewards/margins": 0.31041574478149414,
|
| 278 |
+
"rewards/rejected": -0.24279415607452393,
|
| 279 |
+
"step": 15,
|
| 280 |
+
"train_speed(iter/s)": 0.005608
|
| 281 |
+
},
|
| 282 |
+
{
|
| 283 |
+
"epoch": 0.07158836689038031,
|
| 284 |
+
"grad_norm": 4.802647113800049,
|
| 285 |
+
"learning_rate": 0.0001391304347826087,
|
| 286 |
+
"logits/chosen": -0.3306896388530731,
|
| 287 |
+
"logits/rejected": -0.41153809428215027,
|
| 288 |
+
"logps/chosen": -10.432010650634766,
|
| 289 |
+
"logps/rejected": -21.58324432373047,
|
| 290 |
+
"loss": 1.3572790622711182,
|
| 291 |
+
"memory(GiB)": 46.57,
|
| 292 |
+
"nll_loss": 0.7762681245803833,
|
| 293 |
+
"rewards/accuracies": 0.671875,
|
| 294 |
+
"rewards/chosen": -0.06817664206027985,
|
| 295 |
+
"rewards/margins": 0.363118052482605,
|
| 296 |
+
"rewards/rejected": -0.4312947690486908,
|
| 297 |
+
"step": 16,
|
| 298 |
+
"train_speed(iter/s)": 0.005608
|
| 299 |
+
},
|
| 300 |
+
{
|
| 301 |
+
"epoch": 0.07606263982102908,
|
| 302 |
+
"grad_norm": 4.122814178466797,
|
| 303 |
+
"learning_rate": 0.00014782608695652173,
|
| 304 |
+
"logits/chosen": -0.32593876123428345,
|
| 305 |
+
"logits/rejected": -0.4176383316516876,
|
| 306 |
+
"logps/chosen": -9.068134307861328,
|
| 307 |
+
"logps/rejected": -21.460546493530273,
|
| 308 |
+
"loss": 1.1545155048370361,
|
| 309 |
+
"memory(GiB)": 46.57,
|
| 310 |
+
"nll_loss": 0.5955549478530884,
|
| 311 |
+
"rewards/accuracies": 0.75,
|
| 312 |
+
"rewards/chosen": 0.0028565023094415665,
|
| 313 |
+
"rewards/margins": 0.3992985486984253,
|
| 314 |
+
"rewards/rejected": -0.3964419960975647,
|
| 315 |
+
"step": 17,
|
| 316 |
+
"train_speed(iter/s)": 0.00561
|
| 317 |
+
},
|
| 318 |
+
{
|
| 319 |
+
"epoch": 0.08053691275167785,
|
| 320 |
+
"grad_norm": 1.9508388042449951,
|
| 321 |
+
"learning_rate": 0.0001565217391304348,
|
| 322 |
+
"logits/chosen": -0.3363662660121918,
|
| 323 |
+
"logits/rejected": -0.40299132466316223,
|
| 324 |
+
"logps/chosen": -7.306541919708252,
|
| 325 |
+
"logps/rejected": -15.145895004272461,
|
| 326 |
+
"loss": 1.1673789024353027,
|
| 327 |
+
"memory(GiB)": 46.57,
|
| 328 |
+
"nll_loss": 0.5968848466873169,
|
| 329 |
+
"rewards/accuracies": 0.78125,
|
| 330 |
+
"rewards/chosen": 0.13542409241199493,
|
| 331 |
+
"rewards/margins": 0.3165813684463501,
|
| 332 |
+
"rewards/rejected": -0.18115724623203278,
|
| 333 |
+
"step": 18,
|
| 334 |
+
"train_speed(iter/s)": 0.005611
|
| 335 |
+
},
|
| 336 |
+
{
|
| 337 |
+
"epoch": 0.08501118568232663,
|
| 338 |
+
"grad_norm": 4.076289176940918,
|
| 339 |
+
"learning_rate": 0.00016521739130434784,
|
| 340 |
+
"logits/chosen": -0.33677053451538086,
|
| 341 |
+
"logits/rejected": -0.42119455337524414,
|
| 342 |
+
"logps/chosen": -6.263703346252441,
|
| 343 |
+
"logps/rejected": -17.470884323120117,
|
| 344 |
+
"loss": 0.9588873982429504,
|
| 345 |
+
"memory(GiB)": 46.57,
|
| 346 |
+
"nll_loss": 0.42532750964164734,
|
| 347 |
+
"rewards/accuracies": 0.8125,
|
| 348 |
+
"rewards/chosen": 0.17247594892978668,
|
| 349 |
+
"rewards/margins": 0.41344738006591797,
|
| 350 |
+
"rewards/rejected": -0.24097144603729248,
|
| 351 |
+
"step": 19,
|
| 352 |
+
"train_speed(iter/s)": 0.005613
|
| 353 |
+
},
|
| 354 |
+
{
|
| 355 |
+
"epoch": 0.0894854586129754,
|
| 356 |
+
"grad_norm": 2.8480069637298584,
|
| 357 |
+
"learning_rate": 0.00017391304347826088,
|
| 358 |
+
"logits/chosen": -0.27281832695007324,
|
| 359 |
+
"logits/rejected": -0.3382987976074219,
|
| 360 |
+
"logps/chosen": -8.123124122619629,
|
| 361 |
+
"logps/rejected": -17.66653060913086,
|
| 362 |
+
"loss": 1.1668881177902222,
|
| 363 |
+
"memory(GiB)": 46.57,
|
| 364 |
+
"nll_loss": 0.5924651622772217,
|
| 365 |
+
"rewards/accuracies": 0.71875,
|
| 366 |
+
"rewards/chosen": -0.00576989259570837,
|
| 367 |
+
"rewards/margins": 0.35684970021247864,
|
| 368 |
+
"rewards/rejected": -0.36261963844299316,
|
| 369 |
+
"step": 20,
|
| 370 |
+
"train_speed(iter/s)": 0.005615
|
| 371 |
+
},
|
| 372 |
+
{
|
| 373 |
+
"epoch": 0.09395973154362416,
|
| 374 |
+
"grad_norm": 2.664872646331787,
|
| 375 |
+
"learning_rate": 0.00018260869565217392,
|
| 376 |
+
"logits/chosen": -0.2556913197040558,
|
| 377 |
+
"logits/rejected": -0.3474789261817932,
|
| 378 |
+
"logps/chosen": -5.220917701721191,
|
| 379 |
+
"logps/rejected": -23.547605514526367,
|
| 380 |
+
"loss": 0.9417474865913391,
|
| 381 |
+
"memory(GiB)": 46.57,
|
| 382 |
+
"nll_loss": 0.4541093111038208,
|
| 383 |
+
"rewards/accuracies": 0.796875,
|
| 384 |
+
"rewards/chosen": 0.043988656252622604,
|
| 385 |
+
"rewards/margins": 0.6349199414253235,
|
| 386 |
+
"rewards/rejected": -0.5909312963485718,
|
| 387 |
+
"step": 21,
|
| 388 |
+
"train_speed(iter/s)": 0.005615
|
| 389 |
+
},
|
| 390 |
+
{
|
| 391 |
+
"epoch": 0.09843400447427293,
|
| 392 |
+
"grad_norm": 2.325854539871216,
|
| 393 |
+
"learning_rate": 0.00019130434782608697,
|
| 394 |
+
"logits/chosen": -0.2636699676513672,
|
| 395 |
+
"logits/rejected": -0.33711570501327515,
|
| 396 |
+
"logps/chosen": -8.976820945739746,
|
| 397 |
+
"logps/rejected": -19.829130172729492,
|
| 398 |
+
"loss": 1.0729048252105713,
|
| 399 |
+
"memory(GiB)": 46.57,
|
| 400 |
+
"nll_loss": 0.595395028591156,
|
| 401 |
+
"rewards/accuracies": 0.8125,
|
| 402 |
+
"rewards/chosen": 0.09026271104812622,
|
| 403 |
+
"rewards/margins": 0.623466432094574,
|
| 404 |
+
"rewards/rejected": -0.5332037210464478,
|
| 405 |
+
"step": 22,
|
| 406 |
+
"train_speed(iter/s)": 0.005617
|
| 407 |
+
},
|
| 408 |
+
{
|
| 409 |
+
"epoch": 0.1029082774049217,
|
| 410 |
+
"grad_norm": 2.684507369995117,
|
| 411 |
+
"learning_rate": 0.0002,
|
| 412 |
+
"logits/chosen": -0.24679847061634064,
|
| 413 |
+
"logits/rejected": -0.3378849923610687,
|
| 414 |
+
"logps/chosen": -7.14666223526001,
|
| 415 |
+
"logps/rejected": -23.644922256469727,
|
| 416 |
+
"loss": 0.9377666115760803,
|
| 417 |
+
"memory(GiB)": 46.57,
|
| 418 |
+
"nll_loss": 0.427379846572876,
|
| 419 |
+
"rewards/accuracies": 0.765625,
|
| 420 |
+
"rewards/chosen": -0.0773518830537796,
|
| 421 |
+
"rewards/margins": 0.6581345796585083,
|
| 422 |
+
"rewards/rejected": -0.7354865074157715,
|
| 423 |
+
"step": 23,
|
| 424 |
+
"train_speed(iter/s)": 0.005618
|
| 425 |
+
},
|
| 426 |
+
{
|
| 427 |
+
"epoch": 0.10738255033557047,
|
| 428 |
+
"grad_norm": 2.6381781101226807,
|
| 429 |
+
"learning_rate": 0.00019999724204599747,
|
| 430 |
+
"logits/chosen": -0.246232807636261,
|
| 431 |
+
"logits/rejected": -0.3716464936733246,
|
| 432 |
+
"logps/chosen": -6.111550331115723,
|
| 433 |
+
"logps/rejected": -24.672321319580078,
|
| 434 |
+
"loss": 0.9850844740867615,
|
| 435 |
+
"memory(GiB)": 46.57,
|
| 436 |
+
"nll_loss": 0.5655074119567871,
|
| 437 |
+
"rewards/accuracies": 0.84375,
|
| 438 |
+
"rewards/chosen": 0.027247514575719833,
|
| 439 |
+
"rewards/margins": 0.8617139458656311,
|
| 440 |
+
"rewards/rejected": -0.8344664573669434,
|
| 441 |
+
"step": 24,
|
| 442 |
+
"train_speed(iter/s)": 0.00562
|
| 443 |
+
},
|
| 444 |
+
{
|
| 445 |
+
"epoch": 0.11185682326621924,
|
| 446 |
+
"grad_norm": 2.5178840160369873,
|
| 447 |
+
"learning_rate": 0.00019998896833611603,
|
| 448 |
+
"logits/chosen": -0.23005428910255432,
|
| 449 |
+
"logits/rejected": -0.3447636365890503,
|
| 450 |
+
"logps/chosen": -8.92835807800293,
|
| 451 |
+
"logps/rejected": -25.173357009887695,
|
| 452 |
+
"loss": 1.1135735511779785,
|
| 453 |
+
"memory(GiB)": 46.57,
|
| 454 |
+
"nll_loss": 0.5982357263565063,
|
| 455 |
+
"rewards/accuracies": 0.75,
|
| 456 |
+
"rewards/chosen": -0.07063186913728714,
|
| 457 |
+
"rewards/margins": 0.6180722117424011,
|
| 458 |
+
"rewards/rejected": -0.6887040138244629,
|
| 459 |
+
"step": 25,
|
| 460 |
+
"train_speed(iter/s)": 0.005619
|
| 461 |
+
},
|
| 462 |
+
{
|
| 463 |
+
"epoch": 0.116331096196868,
|
| 464 |
+
"grad_norm": 1.9486284255981445,
|
| 465 |
+
"learning_rate": 0.0001999751793267259,
|
| 466 |
+
"logits/chosen": -0.17476646602153778,
|
| 467 |
+
"logits/rejected": -0.28910771012306213,
|
| 468 |
+
"logps/chosen": -6.982065200805664,
|
| 469 |
+
"logps/rejected": -25.235271453857422,
|
| 470 |
+
"loss": 0.9616149067878723,
|
| 471 |
+
"memory(GiB)": 46.57,
|
| 472 |
+
"nll_loss": 0.4814175069332123,
|
| 473 |
+
"rewards/accuracies": 0.828125,
|
| 474 |
+
"rewards/chosen": 0.017612511292099953,
|
| 475 |
+
"rewards/margins": 0.7644082307815552,
|
| 476 |
+
"rewards/rejected": -0.7467955350875854,
|
| 477 |
+
"step": 26,
|
| 478 |
+
"train_speed(iter/s)": 0.005618
|
| 479 |
+
},
|
| 480 |
+
{
|
| 481 |
+
"epoch": 0.12080536912751678,
|
| 482 |
+
"grad_norm": 2.024102210998535,
|
| 483 |
+
"learning_rate": 0.0001999558757784162,
|
| 484 |
+
"logits/chosen": -0.22182828187942505,
|
| 485 |
+
"logits/rejected": -0.33474183082580566,
|
| 486 |
+
"logps/chosen": -8.283013343811035,
|
| 487 |
+
"logps/rejected": -23.36388397216797,
|
| 488 |
+
"loss": 1.071007251739502,
|
| 489 |
+
"memory(GiB)": 46.57,
|
| 490 |
+
"nll_loss": 0.5651244521141052,
|
| 491 |
+
"rewards/accuracies": 0.8125,
|
| 492 |
+
"rewards/chosen": -0.005644451826810837,
|
| 493 |
+
"rewards/margins": 0.549856424331665,
|
| 494 |
+
"rewards/rejected": -0.5555009245872498,
|
| 495 |
+
"step": 27,
|
| 496 |
+
"train_speed(iter/s)": 0.005618
|
| 497 |
+
},
|
| 498 |
+
{
|
| 499 |
+
"epoch": 0.12527964205816555,
|
| 500 |
+
"grad_norm": 2.334916830062866,
|
| 501 |
+
"learning_rate": 0.0001999310587559529,
|
| 502 |
+
"logits/chosen": -0.1745743602514267,
|
| 503 |
+
"logits/rejected": -0.28861111402511597,
|
| 504 |
+
"logps/chosen": -7.148108959197998,
|
| 505 |
+
"logps/rejected": -22.50945472717285,
|
| 506 |
+
"loss": 1.0254650115966797,
|
| 507 |
+
"memory(GiB)": 46.57,
|
| 508 |
+
"nll_loss": 0.5092177391052246,
|
| 509 |
+
"rewards/accuracies": 0.828125,
|
| 510 |
+
"rewards/chosen": 0.024923313409090042,
|
| 511 |
+
"rewards/margins": 0.6763253211975098,
|
| 512 |
+
"rewards/rejected": -0.6514019966125488,
|
| 513 |
+
"step": 28,
|
| 514 |
+
"train_speed(iter/s)": 0.005618
|
| 515 |
+
},
|
| 516 |
+
{
|
| 517 |
+
"epoch": 0.1297539149888143,
|
| 518 |
+
"grad_norm": 4.392460823059082,
|
| 519 |
+
"learning_rate": 0.00019990072962822007,
|
| 520 |
+
"logits/chosen": -0.1607450246810913,
|
| 521 |
+
"logits/rejected": -0.30258849263191223,
|
| 522 |
+
"logps/chosen": -8.330341339111328,
|
| 523 |
+
"logps/rejected": -23.302955627441406,
|
| 524 |
+
"loss": 1.1018993854522705,
|
| 525 |
+
"memory(GiB)": 46.57,
|
| 526 |
+
"nll_loss": 0.6234543919563293,
|
| 527 |
+
"rewards/accuracies": 0.8125,
|
| 528 |
+
"rewards/chosen": 0.1296255737543106,
|
| 529 |
+
"rewards/margins": 0.7057831883430481,
|
| 530 |
+
"rewards/rejected": -0.5761575102806091,
|
| 531 |
+
"step": 29,
|
| 532 |
+
"train_speed(iter/s)": 0.005618
|
| 533 |
+
},
|
| 534 |
+
{
|
| 535 |
+
"epoch": 0.1342281879194631,
|
| 536 |
+
"grad_norm": 1.9557713270187378,
|
| 537 |
+
"learning_rate": 0.00019986489006814452,
|
| 538 |
+
"logits/chosen": -0.15406475961208344,
|
| 539 |
+
"logits/rejected": -0.32140052318573,
|
| 540 |
+
"logps/chosen": -6.338605880737305,
|
| 541 |
+
"logps/rejected": -27.934860229492188,
|
| 542 |
+
"loss": 0.8741156458854675,
|
| 543 |
+
"memory(GiB)": 46.57,
|
| 544 |
+
"nll_loss": 0.43781277537345886,
|
| 545 |
+
"rewards/accuracies": 0.84375,
|
| 546 |
+
"rewards/chosen": 0.005505967885255814,
|
| 547 |
+
"rewards/margins": 0.9152470827102661,
|
| 548 |
+
"rewards/rejected": -0.9097411632537842,
|
| 549 |
+
"step": 30,
|
| 550 |
+
"train_speed(iter/s)": 0.005618
|
| 551 |
+
},
|
| 552 |
+
{
|
| 553 |
+
"epoch": 0.13870246085011187,
|
| 554 |
+
"grad_norm": 3.570540189743042,
|
| 555 |
+
"learning_rate": 0.00019982354205260347,
|
| 556 |
+
"logits/chosen": -0.13595342636108398,
|
| 557 |
+
"logits/rejected": -0.24140222370624542,
|
| 558 |
+
"logps/chosen": -9.938725471496582,
|
| 559 |
+
"logps/rejected": -26.17535972595215,
|
| 560 |
+
"loss": 1.1157177686691284,
|
| 561 |
+
"memory(GiB)": 46.57,
|
| 562 |
+
"nll_loss": 0.6451507806777954,
|
| 563 |
+
"rewards/accuracies": 0.84375,
|
| 564 |
+
"rewards/chosen": -0.06947211921215057,
|
| 565 |
+
"rewards/margins": 0.9398424029350281,
|
| 566 |
+
"rewards/rejected": -1.0093145370483398,
|
| 567 |
+
"step": 31,
|
| 568 |
+
"train_speed(iter/s)": 0.005618
|
| 569 |
+
},
|
| 570 |
+
{
|
| 571 |
+
"epoch": 0.14317673378076062,
|
| 572 |
+
"grad_norm": 2.263465404510498,
|
| 573 |
+
"learning_rate": 0.00019977668786231534,
|
| 574 |
+
"logits/chosen": -0.13489112257957458,
|
| 575 |
+
"logits/rejected": -0.2546093165874481,
|
| 576 |
+
"logps/chosen": -9.485723495483398,
|
| 577 |
+
"logps/rejected": -30.659465789794922,
|
| 578 |
+
"loss": 1.1024084091186523,
|
| 579 |
+
"memory(GiB)": 46.57,
|
| 580 |
+
"nll_loss": 0.7035719752311707,
|
| 581 |
+
"rewards/accuracies": 0.84375,
|
| 582 |
+
"rewards/chosen": 0.094739630818367,
|
| 583 |
+
"rewards/margins": 1.1513433456420898,
|
| 584 |
+
"rewards/rejected": -1.0566036701202393,
|
| 585 |
+
"step": 32,
|
| 586 |
+
"train_speed(iter/s)": 0.005617
|
| 587 |
+
},
|
| 588 |
+
{
|
| 589 |
+
"epoch": 0.1476510067114094,
|
| 590 |
+
"grad_norm": 4.003927230834961,
|
| 591 |
+
"learning_rate": 0.00019972433008171416,
|
| 592 |
+
"logits/chosen": -0.2770022451877594,
|
| 593 |
+
"logits/rejected": -0.3445180356502533,
|
| 594 |
+
"logps/chosen": -7.854065895080566,
|
| 595 |
+
"logps/rejected": -17.47032356262207,
|
| 596 |
+
"loss": 1.1709215641021729,
|
| 597 |
+
"memory(GiB)": 46.57,
|
| 598 |
+
"nll_loss": 0.635529637336731,
|
| 599 |
+
"rewards/accuracies": 0.765625,
|
| 600 |
+
"rewards/chosen": 0.03749306499958038,
|
| 601 |
+
"rewards/margins": 0.6043045520782471,
|
| 602 |
+
"rewards/rejected": -0.5668113827705383,
|
| 603 |
+
"step": 33,
|
| 604 |
+
"train_speed(iter/s)": 0.005618
|
| 605 |
+
},
|
| 606 |
+
{
|
| 607 |
+
"epoch": 0.15212527964205816,
|
| 608 |
+
"grad_norm": 2.930697202682495,
|
| 609 |
+
"learning_rate": 0.00019966647159880703,
|
| 610 |
+
"logits/chosen": -0.20737791061401367,
|
| 611 |
+
"logits/rejected": -0.3068307638168335,
|
| 612 |
+
"logps/chosen": -5.924644470214844,
|
| 613 |
+
"logps/rejected": -20.47597885131836,
|
| 614 |
+
"loss": 0.9971151947975159,
|
| 615 |
+
"memory(GiB)": 46.57,
|
| 616 |
+
"nll_loss": 0.4416566789150238,
|
| 617 |
+
"rewards/accuracies": 0.78125,
|
| 618 |
+
"rewards/chosen": 0.04966810718178749,
|
| 619 |
+
"rewards/margins": 0.48412013053894043,
|
| 620 |
+
"rewards/rejected": -0.4344520568847656,
|
| 621 |
+
"step": 34,
|
| 622 |
+
"train_speed(iter/s)": 0.005619
|
| 623 |
+
},
|
| 624 |
+
{
|
| 625 |
+
"epoch": 0.15659955257270694,
|
| 626 |
+
"grad_norm": 2.292167901992798,
|
| 627 |
+
"learning_rate": 0.00019960311560501454,
|
| 628 |
+
"logits/chosen": -0.20404092967510223,
|
| 629 |
+
"logits/rejected": -0.2819429636001587,
|
| 630 |
+
"logps/chosen": -9.679859161376953,
|
| 631 |
+
"logps/rejected": -22.75543785095215,
|
| 632 |
+
"loss": 1.1032215356826782,
|
| 633 |
+
"memory(GiB)": 46.57,
|
| 634 |
+
"nll_loss": 0.6184647679328918,
|
| 635 |
+
"rewards/accuracies": 0.78125,
|
| 636 |
+
"rewards/chosen": 0.07092233002185822,
|
| 637 |
+
"rewards/margins": 0.8317320942878723,
|
| 638 |
+
"rewards/rejected": -0.7608097791671753,
|
| 639 |
+
"step": 35,
|
| 640 |
+
"train_speed(iter/s)": 0.005619
|
| 641 |
+
},
|
| 642 |
+
{
|
| 643 |
+
"epoch": 0.1610738255033557,
|
| 644 |
+
"grad_norm": 1.5171147584915161,
|
| 645 |
+
"learning_rate": 0.0001995342655949951,
|
| 646 |
+
"logits/chosen": -0.18677955865859985,
|
| 647 |
+
"logits/rejected": -0.30433592200279236,
|
| 648 |
+
"logps/chosen": -7.317014217376709,
|
| 649 |
+
"logps/rejected": -23.58348274230957,
|
| 650 |
+
"loss": 1.0045303106307983,
|
| 651 |
+
"memory(GiB)": 46.57,
|
| 652 |
+
"nll_loss": 0.5375936031341553,
|
| 653 |
+
"rewards/accuracies": 0.78125,
|
| 654 |
+
"rewards/chosen": 0.13633473217487335,
|
| 655 |
+
"rewards/margins": 0.7853459119796753,
|
| 656 |
+
"rewards/rejected": -0.6490110754966736,
|
| 657 |
+
"step": 36,
|
| 658 |
+
"train_speed(iter/s)": 0.005619
|
| 659 |
+
},
|
| 660 |
+
{
|
| 661 |
+
"epoch": 0.16554809843400448,
|
| 662 |
+
"grad_norm": 1.8760979175567627,
|
| 663 |
+
"learning_rate": 0.00019945992536645187,
|
| 664 |
+
"logits/chosen": -0.17943330109119415,
|
| 665 |
+
"logits/rejected": -0.27492690086364746,
|
| 666 |
+
"logps/chosen": -9.596693992614746,
|
| 667 |
+
"logps/rejected": -25.057254791259766,
|
| 668 |
+
"loss": 1.0518603324890137,
|
| 669 |
+
"memory(GiB)": 46.57,
|
| 670 |
+
"nll_loss": 0.5895128846168518,
|
| 671 |
+
"rewards/accuracies": 0.859375,
|
| 672 |
+
"rewards/chosen": 4.468485713005066e-06,
|
| 673 |
+
"rewards/margins": 0.8271102905273438,
|
| 674 |
+
"rewards/rejected": -0.827105700969696,
|
| 675 |
+
"step": 37,
|
| 676 |
+
"train_speed(iter/s)": 0.00562
|
| 677 |
+
},
|
| 678 |
+
{
|
| 679 |
+
"epoch": 0.17002237136465326,
|
| 680 |
+
"grad_norm": 2.1765875816345215,
|
| 681 |
+
"learning_rate": 0.0001993800990199235,
|
| 682 |
+
"logits/chosen": -0.17796888947486877,
|
| 683 |
+
"logits/rejected": -0.27494707703590393,
|
| 684 |
+
"logps/chosen": -8.854700088500977,
|
| 685 |
+
"logps/rejected": -22.589916229248047,
|
| 686 |
+
"loss": 1.1736024618148804,
|
| 687 |
+
"memory(GiB)": 46.57,
|
| 688 |
+
"nll_loss": 0.6680553555488586,
|
| 689 |
+
"rewards/accuracies": 0.796875,
|
| 690 |
+
"rewards/chosen": 0.027395736426115036,
|
| 691 |
+
"rewards/margins": 0.702995777130127,
|
| 692 |
+
"rewards/rejected": -0.6756000518798828,
|
| 693 |
+
"step": 38,
|
| 694 |
+
"train_speed(iter/s)": 0.00562
|
| 695 |
+
},
|
| 696 |
+
{
|
| 697 |
+
"epoch": 0.174496644295302,
|
| 698 |
+
"grad_norm": 2.0398788452148438,
|
| 699 |
+
"learning_rate": 0.0001992947909585578,
|
| 700 |
+
"logits/chosen": -0.15950845181941986,
|
| 701 |
+
"logits/rejected": -0.285598486661911,
|
| 702 |
+
"logps/chosen": -7.358231544494629,
|
| 703 |
+
"logps/rejected": -23.962072372436523,
|
| 704 |
+
"loss": 0.9235795736312866,
|
| 705 |
+
"memory(GiB)": 46.57,
|
| 706 |
+
"nll_loss": 0.5008021593093872,
|
| 707 |
+
"rewards/accuracies": 0.890625,
|
| 708 |
+
"rewards/chosen": 0.1876223385334015,
|
| 709 |
+
"rewards/margins": 0.9989414215087891,
|
| 710 |
+
"rewards/rejected": -0.8113190531730652,
|
| 711 |
+
"step": 39,
|
| 712 |
+
"train_speed(iter/s)": 0.005621
|
| 713 |
+
},
|
| 714 |
+
{
|
| 715 |
+
"epoch": 0.1789709172259508,
|
| 716 |
+
"grad_norm": 2.137016773223877,
|
| 717 |
+
"learning_rate": 0.000199204005887869,
|
| 718 |
+
"logits/chosen": -0.18114963173866272,
|
| 719 |
+
"logits/rejected": -0.23074296116828918,
|
| 720 |
+
"logps/chosen": -9.713254928588867,
|
| 721 |
+
"logps/rejected": -15.0142822265625,
|
| 722 |
+
"loss": 1.1612474918365479,
|
| 723 |
+
"memory(GiB)": 46.57,
|
| 724 |
+
"nll_loss": 0.5743556618690491,
|
| 725 |
+
"rewards/accuracies": 0.6875,
|
| 726 |
+
"rewards/chosen": 0.08143825083971024,
|
| 727 |
+
"rewards/margins": 0.3889071047306061,
|
| 728 |
+
"rewards/rejected": -0.30746886134147644,
|
| 729 |
+
"step": 40,
|
| 730 |
+
"train_speed(iter/s)": 0.005621
|
| 731 |
+
},
|
| 732 |
+
{
|
| 733 |
+
"epoch": 0.18344519015659955,
|
| 734 |
+
"grad_norm": 2.5089111328125,
|
| 735 |
+
"learning_rate": 0.000199107748815478,
|
| 736 |
+
"logits/chosen": -0.17036814987659454,
|
| 737 |
+
"logits/rejected": -0.25284841656684875,
|
| 738 |
+
"logps/chosen": -7.5790181159973145,
|
| 739 |
+
"logps/rejected": -22.757585525512695,
|
| 740 |
+
"loss": 0.9598883986473083,
|
| 741 |
+
"memory(GiB)": 46.57,
|
| 742 |
+
"nll_loss": 0.5350608229637146,
|
| 743 |
+
"rewards/accuracies": 0.875,
|
| 744 |
+
"rewards/chosen": 0.10258667171001434,
|
| 745 |
+
"rewards/margins": 0.982707679271698,
|
| 746 |
+
"rewards/rejected": -0.8801209926605225,
|
| 747 |
+
"step": 41,
|
| 748 |
+
"train_speed(iter/s)": 0.005622
|
| 749 |
+
},
|
| 750 |
+
{
|
| 751 |
+
"epoch": 0.18791946308724833,
|
| 752 |
+
"grad_norm": 2.425978660583496,
|
| 753 |
+
"learning_rate": 0.00019900602505083648,
|
| 754 |
+
"logits/chosen": -0.17056672275066376,
|
| 755 |
+
"logits/rejected": -0.24402382969856262,
|
| 756 |
+
"logps/chosen": -9.11720085144043,
|
| 757 |
+
"logps/rejected": -26.321962356567383,
|
| 758 |
+
"loss": 0.9588575959205627,
|
| 759 |
+
"memory(GiB)": 46.57,
|
| 760 |
+
"nll_loss": 0.5199980735778809,
|
| 761 |
+
"rewards/accuracies": 0.796875,
|
| 762 |
+
"rewards/chosen": -0.02633209154009819,
|
| 763 |
+
"rewards/margins": 1.148821234703064,
|
| 764 |
+
"rewards/rejected": -1.1751532554626465,
|
| 765 |
+
"step": 42,
|
| 766 |
+
"train_speed(iter/s)": 0.005622
|
| 767 |
+
},
|
| 768 |
+
{
|
| 769 |
+
"epoch": 0.19239373601789708,
|
| 770 |
+
"grad_norm": 4.055136203765869,
|
| 771 |
+
"learning_rate": 0.0001988988402049336,
|
| 772 |
+
"logits/chosen": -0.06654427945613861,
|
| 773 |
+
"logits/rejected": -0.19404850900173187,
|
| 774 |
+
"logps/chosen": -10.976348876953125,
|
| 775 |
+
"logps/rejected": -35.80363464355469,
|
| 776 |
+
"loss": 1.205069661140442,
|
| 777 |
+
"memory(GiB)": 46.57,
|
| 778 |
+
"nll_loss": 0.7504922151565552,
|
| 779 |
+
"rewards/accuracies": 0.78125,
|
| 780 |
+
"rewards/chosen": -0.11243688315153122,
|
| 781 |
+
"rewards/margins": 1.5014084577560425,
|
| 782 |
+
"rewards/rejected": -1.6138453483581543,
|
| 783 |
+
"step": 43,
|
| 784 |
+
"train_speed(iter/s)": 0.005621
|
| 785 |
+
},
|
| 786 |
+
{
|
| 787 |
+
"epoch": 0.19686800894854586,
|
| 788 |
+
"grad_norm": 2.9351325035095215,
|
| 789 |
+
"learning_rate": 0.00019878620018998696,
|
| 790 |
+
"logits/chosen": -0.21978600323200226,
|
| 791 |
+
"logits/rejected": -0.32882797718048096,
|
| 792 |
+
"logps/chosen": -6.976373195648193,
|
| 793 |
+
"logps/rejected": -30.215131759643555,
|
| 794 |
+
"loss": 0.9490640759468079,
|
| 795 |
+
"memory(GiB)": 46.57,
|
| 796 |
+
"nll_loss": 0.5300356149673462,
|
| 797 |
+
"rewards/accuracies": 0.828125,
|
| 798 |
+
"rewards/chosen": -0.11029693484306335,
|
| 799 |
+
"rewards/margins": 1.1996657848358154,
|
| 800 |
+
"rewards/rejected": -1.3099626302719116,
|
| 801 |
+
"step": 44,
|
| 802 |
+
"train_speed(iter/s)": 0.005621
|
| 803 |
+
},
|
| 804 |
+
{
|
| 805 |
+
"epoch": 0.20134228187919462,
|
| 806 |
+
"grad_norm": 2.6874403953552246,
|
| 807 |
+
"learning_rate": 0.00019866811121911607,
|
| 808 |
+
"logits/chosen": -0.1936551034450531,
|
| 809 |
+
"logits/rejected": -0.284149706363678,
|
| 810 |
+
"logps/chosen": -6.9035515785217285,
|
| 811 |
+
"logps/rejected": -22.284351348876953,
|
| 812 |
+
"loss": 0.8805959820747375,
|
| 813 |
+
"memory(GiB)": 46.57,
|
| 814 |
+
"nll_loss": 0.4068413972854614,
|
| 815 |
+
"rewards/accuracies": 0.78125,
|
| 816 |
+
"rewards/chosen": 0.07986758649349213,
|
| 817 |
+
"rewards/margins": 0.8386067152023315,
|
| 818 |
+
"rewards/rejected": -0.7587391138076782,
|
| 819 |
+
"step": 45,
|
| 820 |
+
"train_speed(iter/s)": 0.005621
|
| 821 |
+
},
|
| 822 |
+
{
|
| 823 |
+
"epoch": 0.2058165548098434,
|
| 824 |
+
"grad_norm": 1.7893315553665161,
|
| 825 |
+
"learning_rate": 0.000198544579806,
|
| 826 |
+
"logits/chosen": -0.20961534976959229,
|
| 827 |
+
"logits/rejected": -0.33521464467048645,
|
| 828 |
+
"logps/chosen": -7.002056121826172,
|
| 829 |
+
"logps/rejected": -25.93248748779297,
|
| 830 |
+
"loss": 0.9666993618011475,
|
| 831 |
+
"memory(GiB)": 46.57,
|
| 832 |
+
"nll_loss": 0.4805544912815094,
|
| 833 |
+
"rewards/accuracies": 0.796875,
|
| 834 |
+
"rewards/chosen": 0.07972076535224915,
|
| 835 |
+
"rewards/margins": 0.8979825377464294,
|
| 836 |
+
"rewards/rejected": -0.8182618021965027,
|
| 837 |
+
"step": 46,
|
| 838 |
+
"train_speed(iter/s)": 0.005621
|
| 839 |
+
},
|
| 840 |
+
{
|
| 841 |
+
"epoch": 0.21029082774049218,
|
| 842 |
+
"grad_norm": 2.2033731937408447,
|
| 843 |
+
"learning_rate": 0.0001984156127645178,
|
| 844 |
+
"logits/chosen": -0.21569889783859253,
|
| 845 |
+
"logits/rejected": -0.38949355483055115,
|
| 846 |
+
"logps/chosen": -5.476630687713623,
|
| 847 |
+
"logps/rejected": -27.572505950927734,
|
| 848 |
+
"loss": 0.8785698413848877,
|
| 849 |
+
"memory(GiB)": 46.57,
|
| 850 |
+
"nll_loss": 0.42979833483695984,
|
| 851 |
+
"rewards/accuracies": 0.8125,
|
| 852 |
+
"rewards/chosen": 0.17229261994361877,
|
| 853 |
+
"rewards/margins": 1.044838547706604,
|
| 854 |
+
"rewards/rejected": -0.8725459575653076,
|
| 855 |
+
"step": 47,
|
| 856 |
+
"train_speed(iter/s)": 0.005621
|
| 857 |
+
},
|
| 858 |
+
{
|
| 859 |
+
"epoch": 0.21476510067114093,
|
| 860 |
+
"grad_norm": 2.1163032054901123,
|
| 861 |
+
"learning_rate": 0.00019828121720837286,
|
| 862 |
+
"logits/chosen": -0.34833359718322754,
|
| 863 |
+
"logits/rejected": -0.41568437218666077,
|
| 864 |
+
"logps/chosen": -7.711272239685059,
|
| 865 |
+
"logps/rejected": -25.60678482055664,
|
| 866 |
+
"loss": 0.9890228509902954,
|
| 867 |
+
"memory(GiB)": 46.57,
|
| 868 |
+
"nll_loss": 0.548301100730896,
|
| 869 |
+
"rewards/accuracies": 0.75,
|
| 870 |
+
"rewards/chosen": 0.07654333114624023,
|
| 871 |
+
"rewards/margins": 1.2576009035110474,
|
| 872 |
+
"rewards/rejected": -1.1810575723648071,
|
| 873 |
+
"step": 48,
|
| 874 |
+
"train_speed(iter/s)": 0.005621
|
| 875 |
+
},
|
| 876 |
+
{
|
| 877 |
+
"epoch": 0.21923937360178972,
|
| 878 |
+
"grad_norm": 1.987210988998413,
|
| 879 |
+
"learning_rate": 0.00019814140055070042,
|
| 880 |
+
"logits/chosen": -0.2835751473903656,
|
| 881 |
+
"logits/rejected": -0.38263481855392456,
|
| 882 |
+
"logps/chosen": -8.624626159667969,
|
| 883 |
+
"logps/rejected": -25.244403839111328,
|
| 884 |
+
"loss": 0.9971789121627808,
|
| 885 |
+
"memory(GiB)": 46.57,
|
| 886 |
+
"nll_loss": 0.5687417387962341,
|
| 887 |
+
"rewards/accuracies": 0.859375,
|
| 888 |
+
"rewards/chosen": 0.09697108715772629,
|
| 889 |
+
"rewards/margins": 1.0362679958343506,
|
| 890 |
+
"rewards/rejected": -0.9392969608306885,
|
| 891 |
+
"step": 49,
|
| 892 |
+
"train_speed(iter/s)": 0.005621
|
| 893 |
+
},
|
| 894 |
+
{
|
| 895 |
+
"epoch": 0.22371364653243847,
|
| 896 |
+
"grad_norm": 1.9501866102218628,
|
| 897 |
+
"learning_rate": 0.0001979961705036587,
|
| 898 |
+
"logits/chosen": -0.38833191990852356,
|
| 899 |
+
"logits/rejected": -0.4256289303302765,
|
| 900 |
+
"logps/chosen": -8.22580623626709,
|
| 901 |
+
"logps/rejected": -23.093332290649414,
|
| 902 |
+
"loss": 0.9298551082611084,
|
| 903 |
+
"memory(GiB)": 46.57,
|
| 904 |
+
"nll_loss": 0.4849992096424103,
|
| 905 |
+
"rewards/accuracies": 0.8125,
|
| 906 |
+
"rewards/chosen": 0.04563959687948227,
|
| 907 |
+
"rewards/margins": 1.0999000072479248,
|
| 908 |
+
"rewards/rejected": -1.054260492324829,
|
| 909 |
+
"step": 50,
|
| 910 |
+
"train_speed(iter/s)": 0.005622
|
| 911 |
+
},
|
| 912 |
+
{
|
| 913 |
+
"epoch": 0.22818791946308725,
|
| 914 |
+
"grad_norm": 2.496234893798828,
|
| 915 |
+
"learning_rate": 0.00019784553507800349,
|
| 916 |
+
"logits/chosen": -0.2710403501987457,
|
| 917 |
+
"logits/rejected": -0.41735631227493286,
|
| 918 |
+
"logps/chosen": -8.894371032714844,
|
| 919 |
+
"logps/rejected": -28.586936950683594,
|
| 920 |
+
"loss": 1.1125377416610718,
|
| 921 |
+
"memory(GiB)": 46.57,
|
| 922 |
+
"nll_loss": 0.6875916719436646,
|
| 923 |
+
"rewards/accuracies": 0.796875,
|
| 924 |
+
"rewards/chosen": 0.10749680548906326,
|
| 925 |
+
"rewards/margins": 1.2817683219909668,
|
| 926 |
+
"rewards/rejected": -1.174271583557129,
|
| 927 |
+
"step": 51,
|
| 928 |
+
"train_speed(iter/s)": 0.005611
|
| 929 |
+
},
|
| 930 |
+
{
|
| 931 |
+
"epoch": 0.232662192393736,
|
| 932 |
+
"grad_norm": 3.274833917617798,
|
| 933 |
+
"learning_rate": 0.00019768950258264623,
|
| 934 |
+
"logits/chosen": -0.39167118072509766,
|
| 935 |
+
"logits/rejected": -0.4531523883342743,
|
| 936 |
+
"logps/chosen": -9.231929779052734,
|
| 937 |
+
"logps/rejected": -22.90334701538086,
|
| 938 |
+
"loss": 1.1200237274169922,
|
| 939 |
+
"memory(GiB)": 46.57,
|
| 940 |
+
"nll_loss": 0.6103911399841309,
|
| 941 |
+
"rewards/accuracies": 0.6875,
|
| 942 |
+
"rewards/chosen": -0.16369852423667908,
|
| 943 |
+
"rewards/margins": 0.9332659244537354,
|
| 944 |
+
"rewards/rejected": -1.0969644784927368,
|
| 945 |
+
"step": 52,
|
| 946 |
+
"train_speed(iter/s)": 0.005612
|
| 947 |
+
},
|
| 948 |
+
{
|
| 949 |
+
"epoch": 0.2371364653243848,
|
| 950 |
+
"grad_norm": 2.9111413955688477,
|
| 951 |
+
"learning_rate": 0.0001975280816241959,
|
| 952 |
+
"logits/chosen": -0.3340080976486206,
|
| 953 |
+
"logits/rejected": -0.3975221514701843,
|
| 954 |
+
"logps/chosen": -11.631303787231445,
|
| 955 |
+
"logps/rejected": -26.26183319091797,
|
| 956 |
+
"loss": 1.1326872110366821,
|
| 957 |
+
"memory(GiB)": 46.57,
|
| 958 |
+
"nll_loss": 0.6245000958442688,
|
| 959 |
+
"rewards/accuracies": 0.75,
|
| 960 |
+
"rewards/chosen": -0.032076627016067505,
|
| 961 |
+
"rewards/margins": 0.9003015160560608,
|
| 962 |
+
"rewards/rejected": -0.9323781132698059,
|
| 963 |
+
"step": 53,
|
| 964 |
+
"train_speed(iter/s)": 0.005612
|
| 965 |
+
},
|
| 966 |
+
{
|
| 967 |
+
"epoch": 0.24161073825503357,
|
| 968 |
+
"grad_norm": 2.7828478813171387,
|
| 969 |
+
"learning_rate": 0.00019736128110648407,
|
| 970 |
+
"logits/chosen": -0.345708429813385,
|
| 971 |
+
"logits/rejected": -0.447677880525589,
|
| 972 |
+
"logps/chosen": -8.686080932617188,
|
| 973 |
+
"logps/rejected": -23.45962142944336,
|
| 974 |
+
"loss": 0.9978072047233582,
|
| 975 |
+
"memory(GiB)": 46.57,
|
| 976 |
+
"nll_loss": 0.5644747018814087,
|
| 977 |
+
"rewards/accuracies": 0.84375,
|
| 978 |
+
"rewards/chosen": 0.18989036977291107,
|
| 979 |
+
"rewards/margins": 1.1108869314193726,
|
| 980 |
+
"rewards/rejected": -0.9209966659545898,
|
| 981 |
+
"step": 54,
|
| 982 |
+
"train_speed(iter/s)": 0.005613
|
| 983 |
+
},
|
| 984 |
+
{
|
| 985 |
+
"epoch": 0.24608501118568232,
|
| 986 |
+
"grad_norm": 2.1220943927764893,
|
| 987 |
+
"learning_rate": 0.0001971891102300738,
|
| 988 |
+
"logits/chosen": -0.3758760690689087,
|
| 989 |
+
"logits/rejected": -0.4768344461917877,
|
| 990 |
+
"logps/chosen": -7.041341304779053,
|
| 991 |
+
"logps/rejected": -22.334056854248047,
|
| 992 |
+
"loss": 1.0144665241241455,
|
| 993 |
+
"memory(GiB)": 46.57,
|
| 994 |
+
"nll_loss": 0.5401796698570251,
|
| 995 |
+
"rewards/accuracies": 0.8125,
|
| 996 |
+
"rewards/chosen": 0.1189827248454094,
|
| 997 |
+
"rewards/margins": 0.939737856388092,
|
| 998 |
+
"rewards/rejected": -0.820755124092102,
|
| 999 |
+
"step": 55,
|
| 1000 |
+
"train_speed(iter/s)": 0.005613
|
| 1001 |
+
},
|
| 1002 |
+
{
|
| 1003 |
+
"epoch": 0.2505592841163311,
|
| 1004 |
+
"grad_norm": 1.843038558959961,
|
| 1005 |
+
"learning_rate": 0.00019701157849175228,
|
| 1006 |
+
"logits/chosen": -0.37703099846839905,
|
| 1007 |
+
"logits/rejected": -0.46533748507499695,
|
| 1008 |
+
"logps/chosen": -8.012426376342773,
|
| 1009 |
+
"logps/rejected": -22.621742248535156,
|
| 1010 |
+
"loss": 1.0123478174209595,
|
| 1011 |
+
"memory(GiB)": 46.57,
|
| 1012 |
+
"nll_loss": 0.5707098245620728,
|
| 1013 |
+
"rewards/accuracies": 0.84375,
|
| 1014 |
+
"rewards/chosen": 0.15585632622241974,
|
| 1015 |
+
"rewards/margins": 0.9487887620925903,
|
| 1016 |
+
"rewards/rejected": -0.792932391166687,
|
| 1017 |
+
"step": 56,
|
| 1018 |
+
"train_speed(iter/s)": 0.005614
|
| 1019 |
+
},
|
| 1020 |
+
{
|
| 1021 |
+
"epoch": 0.2550335570469799,
|
| 1022 |
+
"grad_norm": 2.230550527572632,
|
| 1023 |
+
"learning_rate": 0.00019682869568400684,
|
| 1024 |
+
"logits/chosen": -0.27077603340148926,
|
| 1025 |
+
"logits/rejected": -0.43189266324043274,
|
| 1026 |
+
"logps/chosen": -6.5583930015563965,
|
| 1027 |
+
"logps/rejected": -29.555484771728516,
|
| 1028 |
+
"loss": 0.9619537591934204,
|
| 1029 |
+
"memory(GiB)": 46.57,
|
| 1030 |
+
"nll_loss": 0.5382556915283203,
|
| 1031 |
+
"rewards/accuracies": 0.8125,
|
| 1032 |
+
"rewards/chosen": 0.012836463749408722,
|
| 1033 |
+
"rewards/margins": 1.0998661518096924,
|
| 1034 |
+
"rewards/rejected": -1.0870296955108643,
|
| 1035 |
+
"step": 57,
|
| 1036 |
+
"train_speed(iter/s)": 0.005614
|
| 1037 |
+
},
|
| 1038 |
+
{
|
| 1039 |
+
"epoch": 0.2595078299776286,
|
| 1040 |
+
"grad_norm": 2.252734661102295,
|
| 1041 |
+
"learning_rate": 0.00019664047189448493,
|
| 1042 |
+
"logits/chosen": -0.30061304569244385,
|
| 1043 |
+
"logits/rejected": -0.4390646517276764,
|
| 1044 |
+
"logps/chosen": -5.5507659912109375,
|
| 1045 |
+
"logps/rejected": -26.51093292236328,
|
| 1046 |
+
"loss": 0.9082356095314026,
|
| 1047 |
+
"memory(GiB)": 46.57,
|
| 1048 |
+
"nll_loss": 0.41620010137557983,
|
| 1049 |
+
"rewards/accuracies": 0.78125,
|
| 1050 |
+
"rewards/chosen": -0.027434132993221283,
|
| 1051 |
+
"rewards/margins": 0.9383218288421631,
|
| 1052 |
+
"rewards/rejected": -0.9657559394836426,
|
| 1053 |
+
"step": 58,
|
| 1054 |
+
"train_speed(iter/s)": 0.005615
|
| 1055 |
+
},
|
| 1056 |
+
{
|
| 1057 |
+
"epoch": 0.2639821029082774,
|
| 1058 |
+
"grad_norm": 2.943512201309204,
|
| 1059 |
+
"learning_rate": 0.00019644691750543767,
|
| 1060 |
+
"logits/chosen": -0.2617231011390686,
|
| 1061 |
+
"logits/rejected": -0.38011983036994934,
|
| 1062 |
+
"logps/chosen": -10.003762245178223,
|
| 1063 |
+
"logps/rejected": -27.785303115844727,
|
| 1064 |
+
"loss": 1.1763017177581787,
|
| 1065 |
+
"memory(GiB)": 46.57,
|
| 1066 |
+
"nll_loss": 0.6572035551071167,
|
| 1067 |
+
"rewards/accuracies": 0.671875,
|
| 1068 |
+
"rewards/chosen": -0.07653994858264923,
|
| 1069 |
+
"rewards/margins": 0.9367327690124512,
|
| 1070 |
+
"rewards/rejected": -1.0132726430892944,
|
| 1071 |
+
"step": 59,
|
| 1072 |
+
"train_speed(iter/s)": 0.005615
|
| 1073 |
+
},
|
| 1074 |
+
{
|
| 1075 |
+
"epoch": 0.2684563758389262,
|
| 1076 |
+
"grad_norm": 1.736883521080017,
|
| 1077 |
+
"learning_rate": 0.00019624804319314705,
|
| 1078 |
+
"logits/chosen": -0.3555205464363098,
|
| 1079 |
+
"logits/rejected": -0.4549139738082886,
|
| 1080 |
+
"logps/chosen": -7.022237300872803,
|
| 1081 |
+
"logps/rejected": -28.04250717163086,
|
| 1082 |
+
"loss": 0.9159735441207886,
|
| 1083 |
+
"memory(GiB)": 46.57,
|
| 1084 |
+
"nll_loss": 0.47989311814308167,
|
| 1085 |
+
"rewards/accuracies": 0.78125,
|
| 1086 |
+
"rewards/chosen": 0.060450125485658646,
|
| 1087 |
+
"rewards/margins": 1.1664522886276245,
|
| 1088 |
+
"rewards/rejected": -1.1060020923614502,
|
| 1089 |
+
"step": 60,
|
| 1090 |
+
"train_speed(iter/s)": 0.005616
|
| 1091 |
+
},
|
| 1092 |
+
{
|
| 1093 |
+
"epoch": 0.27293064876957496,
|
| 1094 |
+
"grad_norm": 1.8152859210968018,
|
| 1095 |
+
"learning_rate": 0.00019604385992733715,
|
| 1096 |
+
"logits/chosen": -0.2845993638038635,
|
| 1097 |
+
"logits/rejected": -0.3513396680355072,
|
| 1098 |
+
"logps/chosen": -9.077548027038574,
|
| 1099 |
+
"logps/rejected": -22.780668258666992,
|
| 1100 |
+
"loss": 0.9680572748184204,
|
| 1101 |
+
"memory(GiB)": 46.57,
|
| 1102 |
+
"nll_loss": 0.4960174560546875,
|
| 1103 |
+
"rewards/accuracies": 0.734375,
|
| 1104 |
+
"rewards/chosen": 0.06926427036523819,
|
| 1105 |
+
"rewards/margins": 0.9312706589698792,
|
| 1106 |
+
"rewards/rejected": -0.862006425857544,
|
| 1107 |
+
"step": 61,
|
| 1108 |
+
"train_speed(iter/s)": 0.005616
|
| 1109 |
+
},
|
| 1110 |
+
{
|
| 1111 |
+
"epoch": 0.27740492170022374,
|
| 1112 |
+
"grad_norm": 2.46378755569458,
|
| 1113 |
+
"learning_rate": 0.00019583437897056915,
|
| 1114 |
+
"logits/chosen": -0.3284386098384857,
|
| 1115 |
+
"logits/rejected": -0.4009109139442444,
|
| 1116 |
+
"logps/chosen": -8.893238067626953,
|
| 1117 |
+
"logps/rejected": -21.27986717224121,
|
| 1118 |
+
"loss": 1.128482699394226,
|
| 1119 |
+
"memory(GiB)": 46.57,
|
| 1120 |
+
"nll_loss": 0.5518131256103516,
|
| 1121 |
+
"rewards/accuracies": 0.609375,
|
| 1122 |
+
"rewards/chosen": 0.010286218486726284,
|
| 1123 |
+
"rewards/margins": 0.5274713635444641,
|
| 1124 |
+
"rewards/rejected": -0.5171850919723511,
|
| 1125 |
+
"step": 62,
|
| 1126 |
+
"train_speed(iter/s)": 0.005617
|
| 1127 |
+
},
|
| 1128 |
+
{
|
| 1129 |
+
"epoch": 0.28187919463087246,
|
| 1130 |
+
"grad_norm": 2.1732046604156494,
|
| 1131 |
+
"learning_rate": 0.00019561961187761985,
|
| 1132 |
+
"logits/chosen": -0.24422433972358704,
|
| 1133 |
+
"logits/rejected": -0.375420480966568,
|
| 1134 |
+
"logps/chosen": -6.340362071990967,
|
| 1135 |
+
"logps/rejected": -20.184795379638672,
|
| 1136 |
+
"loss": 0.987078070640564,
|
| 1137 |
+
"memory(GiB)": 46.57,
|
| 1138 |
+
"nll_loss": 0.4728015065193176,
|
| 1139 |
+
"rewards/accuracies": 0.75,
|
| 1140 |
+
"rewards/chosen": 0.168831467628479,
|
| 1141 |
+
"rewards/margins": 0.6444362998008728,
|
| 1142 |
+
"rewards/rejected": -0.4756048321723938,
|
| 1143 |
+
"step": 63,
|
| 1144 |
+
"train_speed(iter/s)": 0.005617
|
| 1145 |
+
},
|
| 1146 |
+
{
|
| 1147 |
+
"epoch": 0.28635346756152125,
|
| 1148 |
+
"grad_norm": 2.231933355331421,
|
| 1149 |
+
"learning_rate": 0.00019539957049484458,
|
| 1150 |
+
"logits/chosen": -0.22632239758968353,
|
| 1151 |
+
"logits/rejected": -0.3298073410987854,
|
| 1152 |
+
"logps/chosen": -5.790369987487793,
|
| 1153 |
+
"logps/rejected": -21.647865295410156,
|
| 1154 |
+
"loss": 0.9348481893539429,
|
| 1155 |
+
"memory(GiB)": 46.57,
|
| 1156 |
+
"nll_loss": 0.4110260307788849,
|
| 1157 |
+
"rewards/accuracies": 0.765625,
|
| 1158 |
+
"rewards/chosen": 0.11635202169418335,
|
| 1159 |
+
"rewards/margins": 0.6466613411903381,
|
| 1160 |
+
"rewards/rejected": -0.5303093194961548,
|
| 1161 |
+
"step": 64,
|
| 1162 |
+
"train_speed(iter/s)": 0.005617
|
| 1163 |
+
},
|
| 1164 |
+
{
|
| 1165 |
+
"epoch": 0.29082774049217003,
|
| 1166 |
+
"grad_norm": 2.592883825302124,
|
| 1167 |
+
"learning_rate": 0.00019517426695952358,
|
| 1168 |
+
"logits/chosen": -0.2631714344024658,
|
| 1169 |
+
"logits/rejected": -0.3835735321044922,
|
| 1170 |
+
"logps/chosen": -8.772464752197266,
|
| 1171 |
+
"logps/rejected": -23.13977813720703,
|
| 1172 |
+
"loss": 1.0820575952529907,
|
| 1173 |
+
"memory(GiB)": 46.57,
|
| 1174 |
+
"nll_loss": 0.6241056323051453,
|
| 1175 |
+
"rewards/accuracies": 0.828125,
|
| 1176 |
+
"rewards/chosen": 0.1670496016740799,
|
| 1177 |
+
"rewards/margins": 0.9779586791992188,
|
| 1178 |
+
"rewards/rejected": -0.8109091520309448,
|
| 1179 |
+
"step": 65,
|
| 1180 |
+
"train_speed(iter/s)": 0.005617
|
| 1181 |
+
},
|
| 1182 |
+
{
|
| 1183 |
+
"epoch": 0.2953020134228188,
|
| 1184 |
+
"grad_norm": 2.1508402824401855,
|
| 1185 |
+
"learning_rate": 0.0001949437136991925,
|
| 1186 |
+
"logits/chosen": -0.28555068373680115,
|
| 1187 |
+
"logits/rejected": -0.42386704683303833,
|
| 1188 |
+
"logps/chosen": -4.788064002990723,
|
| 1189 |
+
"logps/rejected": -26.989431381225586,
|
| 1190 |
+
"loss": 0.7586299777030945,
|
| 1191 |
+
"memory(GiB)": 46.57,
|
| 1192 |
+
"nll_loss": 0.3784462809562683,
|
| 1193 |
+
"rewards/accuracies": 0.84375,
|
| 1194 |
+
"rewards/chosen": 0.09788702428340912,
|
| 1195 |
+
"rewards/margins": 1.3373408317565918,
|
| 1196 |
+
"rewards/rejected": -1.239453673362732,
|
| 1197 |
+
"step": 66,
|
| 1198 |
+
"train_speed(iter/s)": 0.005618
|
| 1199 |
+
},
|
| 1200 |
+
{
|
| 1201 |
+
"epoch": 0.29977628635346754,
|
| 1202 |
+
"grad_norm": 4.065814971923828,
|
| 1203 |
+
"learning_rate": 0.00019470792343095718,
|
| 1204 |
+
"logits/chosen": -0.3336545526981354,
|
| 1205 |
+
"logits/rejected": -0.3990672826766968,
|
| 1206 |
+
"logps/chosen": -8.33244514465332,
|
| 1207 |
+
"logps/rejected": -29.013874053955078,
|
| 1208 |
+
"loss": 1.0058256387710571,
|
| 1209 |
+
"memory(GiB)": 46.57,
|
| 1210 |
+
"nll_loss": 0.6062498092651367,
|
| 1211 |
+
"rewards/accuracies": 0.78125,
|
| 1212 |
+
"rewards/chosen": -0.020362887531518936,
|
| 1213 |
+
"rewards/margins": 1.5735464096069336,
|
| 1214 |
+
"rewards/rejected": -1.5939093828201294,
|
| 1215 |
+
"step": 67,
|
| 1216 |
+
"train_speed(iter/s)": 0.005618
|
| 1217 |
+
},
|
| 1218 |
+
{
|
| 1219 |
+
"epoch": 0.3042505592841163,
|
| 1220 |
+
"grad_norm": 2.998826265335083,
|
| 1221 |
+
"learning_rate": 0.0001944669091607919,
|
| 1222 |
+
"logits/chosen": -0.17095105350017548,
|
| 1223 |
+
"logits/rejected": -0.33402499556541443,
|
| 1224 |
+
"logps/chosen": -7.172041893005371,
|
| 1225 |
+
"logps/rejected": -36.20872497558594,
|
| 1226 |
+
"loss": 0.8435176610946655,
|
| 1227 |
+
"memory(GiB)": 46.57,
|
| 1228 |
+
"nll_loss": 0.5263906121253967,
|
| 1229 |
+
"rewards/accuracies": 0.90625,
|
| 1230 |
+
"rewards/chosen": 0.01939973793923855,
|
| 1231 |
+
"rewards/margins": 2.0239157676696777,
|
| 1232 |
+
"rewards/rejected": -2.004516124725342,
|
| 1233 |
+
"step": 68,
|
| 1234 |
+
"train_speed(iter/s)": 0.005618
|
| 1235 |
+
},
|
| 1236 |
+
{
|
| 1237 |
+
"epoch": 0.3087248322147651,
|
| 1238 |
+
"grad_norm": 2.8316242694854736,
|
| 1239 |
+
"learning_rate": 0.00019422068418282202,
|
| 1240 |
+
"logits/chosen": -0.23822994530200958,
|
| 1241 |
+
"logits/rejected": -0.3510916531085968,
|
| 1242 |
+
"logps/chosen": -8.204334259033203,
|
| 1243 |
+
"logps/rejected": -26.101930618286133,
|
| 1244 |
+
"loss": 0.9929779171943665,
|
| 1245 |
+
"memory(GiB)": 46.57,
|
| 1246 |
+
"nll_loss": 0.592566967010498,
|
| 1247 |
+
"rewards/accuracies": 0.765625,
|
| 1248 |
+
"rewards/chosen": 0.07919630408287048,
|
| 1249 |
+
"rewards/margins": 1.4216609001159668,
|
| 1250 |
+
"rewards/rejected": -1.3424646854400635,
|
| 1251 |
+
"step": 69,
|
| 1252 |
+
"train_speed(iter/s)": 0.005618
|
| 1253 |
+
},
|
| 1254 |
+
{
|
| 1255 |
+
"epoch": 0.3131991051454139,
|
| 1256 |
+
"grad_norm": 2.1727654933929443,
|
| 1257 |
+
"learning_rate": 0.00019396926207859084,
|
| 1258 |
+
"logits/chosen": -0.19429409503936768,
|
| 1259 |
+
"logits/rejected": -0.33817699551582336,
|
| 1260 |
+
"logps/chosen": -7.17151403427124,
|
| 1261 |
+
"logps/rejected": -29.4168701171875,
|
| 1262 |
+
"loss": 0.8446124196052551,
|
| 1263 |
+
"memory(GiB)": 46.57,
|
| 1264 |
+
"nll_loss": 0.4697123169898987,
|
| 1265 |
+
"rewards/accuracies": 0.859375,
|
| 1266 |
+
"rewards/chosen": 0.09260577708482742,
|
| 1267 |
+
"rewards/margins": 1.373153567314148,
|
| 1268 |
+
"rewards/rejected": -1.280547857284546,
|
| 1269 |
+
"step": 70,
|
| 1270 |
+
"train_speed(iter/s)": 0.005618
|
| 1271 |
+
},
|
| 1272 |
+
{
|
| 1273 |
+
"epoch": 0.31767337807606266,
|
| 1274 |
+
"grad_norm": 2.131971597671509,
|
| 1275 |
+
"learning_rate": 0.00019371265671631037,
|
| 1276 |
+
"logits/chosen": -0.2500344514846802,
|
| 1277 |
+
"logits/rejected": -0.391252338886261,
|
| 1278 |
+
"logps/chosen": -6.454396724700928,
|
| 1279 |
+
"logps/rejected": -31.325042724609375,
|
| 1280 |
+
"loss": 0.857275128364563,
|
| 1281 |
+
"memory(GiB)": 46.57,
|
| 1282 |
+
"nll_loss": 0.45489931106567383,
|
| 1283 |
+
"rewards/accuracies": 0.8125,
|
| 1284 |
+
"rewards/chosen": 0.12299442291259766,
|
| 1285 |
+
"rewards/margins": 1.4080641269683838,
|
| 1286 |
+
"rewards/rejected": -1.2850697040557861,
|
| 1287 |
+
"step": 71,
|
| 1288 |
+
"train_speed(iter/s)": 0.005618
|
| 1289 |
+
},
|
| 1290 |
+
{
|
| 1291 |
+
"epoch": 0.3221476510067114,
|
| 1292 |
+
"grad_norm": 2.6743502616882324,
|
| 1293 |
+
"learning_rate": 0.00019345088225009626,
|
| 1294 |
+
"logits/chosen": -0.20935188233852386,
|
| 1295 |
+
"logits/rejected": -0.3504689633846283,
|
| 1296 |
+
"logps/chosen": -8.028803825378418,
|
| 1297 |
+
"logps/rejected": -33.473976135253906,
|
| 1298 |
+
"loss": 0.951294481754303,
|
| 1299 |
+
"memory(GiB)": 46.57,
|
| 1300 |
+
"nll_loss": 0.5516812205314636,
|
| 1301 |
+
"rewards/accuracies": 0.8125,
|
| 1302 |
+
"rewards/chosen": 0.002318259794265032,
|
| 1303 |
+
"rewards/margins": 1.4767383337020874,
|
| 1304 |
+
"rewards/rejected": -1.4744200706481934,
|
| 1305 |
+
"step": 72,
|
| 1306 |
+
"train_speed(iter/s)": 0.005618
|
| 1307 |
+
},
|
| 1308 |
+
{
|
| 1309 |
+
"epoch": 0.32662192393736017,
|
| 1310 |
+
"grad_norm": 2.1057374477386475,
|
| 1311 |
+
"learning_rate": 0.0001931839531191873,
|
| 1312 |
+
"logits/chosen": -0.21616998314857483,
|
| 1313 |
+
"logits/rejected": -0.3215841054916382,
|
| 1314 |
+
"logps/chosen": -6.386109352111816,
|
| 1315 |
+
"logps/rejected": -26.058643341064453,
|
| 1316 |
+
"loss": 0.9168461561203003,
|
| 1317 |
+
"memory(GiB)": 46.57,
|
| 1318 |
+
"nll_loss": 0.5115207433700562,
|
| 1319 |
+
"rewards/accuracies": 0.859375,
|
| 1320 |
+
"rewards/chosen": 0.16049177944660187,
|
| 1321 |
+
"rewards/margins": 1.1623506546020508,
|
| 1322 |
+
"rewards/rejected": -1.0018587112426758,
|
| 1323 |
+
"step": 73,
|
| 1324 |
+
"train_speed(iter/s)": 0.005618
|
| 1325 |
+
},
|
| 1326 |
+
{
|
| 1327 |
+
"epoch": 0.33109619686800895,
|
| 1328 |
+
"grad_norm": 1.8313034772872925,
|
| 1329 |
+
"learning_rate": 0.00019291188404714878,
|
| 1330 |
+
"logits/chosen": -0.2762296795845032,
|
| 1331 |
+
"logits/rejected": -0.3759133815765381,
|
| 1332 |
+
"logps/chosen": -7.998234748840332,
|
| 1333 |
+
"logps/rejected": -29.753068923950195,
|
| 1334 |
+
"loss": 0.9865212440490723,
|
| 1335 |
+
"memory(GiB)": 46.57,
|
| 1336 |
+
"nll_loss": 0.5828378796577454,
|
| 1337 |
+
"rewards/accuracies": 0.828125,
|
| 1338 |
+
"rewards/chosen": 0.04827752709388733,
|
| 1339 |
+
"rewards/margins": 1.679243564605713,
|
| 1340 |
+
"rewards/rejected": -1.6309659481048584,
|
| 1341 |
+
"step": 74,
|
| 1342 |
+
"train_speed(iter/s)": 0.005619
|
| 1343 |
+
},
|
| 1344 |
+
{
|
| 1345 |
+
"epoch": 0.33557046979865773,
|
| 1346 |
+
"grad_norm": 2.7458698749542236,
|
| 1347 |
+
"learning_rate": 0.0001926346900410604,
|
| 1348 |
+
"logits/chosen": -0.26945143938064575,
|
| 1349 |
+
"logits/rejected": -0.319683313369751,
|
| 1350 |
+
"logps/chosen": -9.152531623840332,
|
| 1351 |
+
"logps/rejected": -22.447328567504883,
|
| 1352 |
+
"loss": 1.118042230606079,
|
| 1353 |
+
"memory(GiB)": 46.57,
|
| 1354 |
+
"nll_loss": 0.6387289762496948,
|
| 1355 |
+
"rewards/accuracies": 0.765625,
|
| 1356 |
+
"rewards/chosen": 0.012468192726373672,
|
| 1357 |
+
"rewards/margins": 0.904109537601471,
|
| 1358 |
+
"rewards/rejected": -0.8916412591934204,
|
| 1359 |
+
"step": 75,
|
| 1360 |
+
"train_speed(iter/s)": 0.005619
|
| 1361 |
+
},
|
| 1362 |
+
{
|
| 1363 |
+
"epoch": 0.3400447427293065,
|
| 1364 |
+
"grad_norm": 2.5607635974884033,
|
| 1365 |
+
"learning_rate": 0.00019235238639068856,
|
| 1366 |
+
"logits/chosen": -0.19932252168655396,
|
| 1367 |
+
"logits/rejected": -0.37197503447532654,
|
| 1368 |
+
"logps/chosen": -7.51588773727417,
|
| 1369 |
+
"logps/rejected": -33.714637756347656,
|
| 1370 |
+
"loss": 0.9608560800552368,
|
| 1371 |
+
"memory(GiB)": 46.57,
|
| 1372 |
+
"nll_loss": 0.5613290667533875,
|
| 1373 |
+
"rewards/accuracies": 0.84375,
|
| 1374 |
+
"rewards/chosen": 0.0078031644225120544,
|
| 1375 |
+
"rewards/margins": 1.3550933599472046,
|
| 1376 |
+
"rewards/rejected": -1.347290277481079,
|
| 1377 |
+
"step": 76,
|
| 1378 |
+
"train_speed(iter/s)": 0.005619
|
| 1379 |
+
},
|
| 1380 |
+
{
|
| 1381 |
+
"epoch": 0.34451901565995524,
|
| 1382 |
+
"grad_norm": 2.152766227722168,
|
| 1383 |
+
"learning_rate": 0.00019206498866764288,
|
| 1384 |
+
"logits/chosen": -0.18406139314174652,
|
| 1385 |
+
"logits/rejected": -0.36746495962142944,
|
| 1386 |
+
"logps/chosen": -4.768266677856445,
|
| 1387 |
+
"logps/rejected": -35.82173156738281,
|
| 1388 |
+
"loss": 0.8752678632736206,
|
| 1389 |
+
"memory(GiB)": 46.57,
|
| 1390 |
+
"nll_loss": 0.5213672518730164,
|
| 1391 |
+
"rewards/accuracies": 0.859375,
|
| 1392 |
+
"rewards/chosen": -0.024980902671813965,
|
| 1393 |
+
"rewards/margins": 1.6603260040283203,
|
| 1394 |
+
"rewards/rejected": -1.6853069067001343,
|
| 1395 |
+
"step": 77,
|
| 1396 |
+
"train_speed(iter/s)": 0.005619
|
| 1397 |
+
},
|
| 1398 |
+
{
|
| 1399 |
+
"epoch": 0.348993288590604,
|
| 1400 |
+
"grad_norm": 1.957088589668274,
|
| 1401 |
+
"learning_rate": 0.0001917725127245174,
|
| 1402 |
+
"logits/chosen": -0.2368219494819641,
|
| 1403 |
+
"logits/rejected": -0.31324779987335205,
|
| 1404 |
+
"logps/chosen": -7.644411087036133,
|
| 1405 |
+
"logps/rejected": -25.68874740600586,
|
| 1406 |
+
"loss": 0.9143100380897522,
|
| 1407 |
+
"memory(GiB)": 46.57,
|
| 1408 |
+
"nll_loss": 0.47288480401039124,
|
| 1409 |
+
"rewards/accuracies": 0.796875,
|
| 1410 |
+
"rewards/chosen": 0.04239855334162712,
|
| 1411 |
+
"rewards/margins": 0.925534188747406,
|
| 1412 |
+
"rewards/rejected": -0.8831356167793274,
|
| 1413 |
+
"step": 78,
|
| 1414 |
+
"train_speed(iter/s)": 0.005618
|
| 1415 |
+
},
|
| 1416 |
+
{
|
| 1417 |
+
"epoch": 0.3534675615212528,
|
| 1418 |
+
"grad_norm": 2.0980629920959473,
|
| 1419 |
+
"learning_rate": 0.0001914749746940161,
|
| 1420 |
+
"logits/chosen": -0.3016536831855774,
|
| 1421 |
+
"logits/rejected": -0.3982566297054291,
|
| 1422 |
+
"logps/chosen": -7.566556930541992,
|
| 1423 |
+
"logps/rejected": -26.53971290588379,
|
| 1424 |
+
"loss": 0.9413108825683594,
|
| 1425 |
+
"memory(GiB)": 46.57,
|
| 1426 |
+
"nll_loss": 0.5161536931991577,
|
| 1427 |
+
"rewards/accuracies": 0.765625,
|
| 1428 |
+
"rewards/chosen": 0.1749323159456253,
|
| 1429 |
+
"rewards/margins": 1.1360664367675781,
|
| 1430 |
+
"rewards/rejected": -0.9611341953277588,
|
| 1431 |
+
"step": 79,
|
| 1432 |
+
"train_speed(iter/s)": 0.005619
|
| 1433 |
+
},
|
| 1434 |
+
{
|
| 1435 |
+
"epoch": 0.3579418344519016,
|
| 1436 |
+
"grad_norm": 2.1753523349761963,
|
| 1437 |
+
"learning_rate": 0.00019117239098806295,
|
| 1438 |
+
"logits/chosen": -0.25202423334121704,
|
| 1439 |
+
"logits/rejected": -0.3296201527118683,
|
| 1440 |
+
"logps/chosen": -8.623554229736328,
|
| 1441 |
+
"logps/rejected": -24.96216583251953,
|
| 1442 |
+
"loss": 0.9156360626220703,
|
| 1443 |
+
"memory(GiB)": 46.57,
|
| 1444 |
+
"nll_loss": 0.521922767162323,
|
| 1445 |
+
"rewards/accuracies": 0.875,
|
| 1446 |
+
"rewards/chosen": 0.17782656848430634,
|
| 1447 |
+
"rewards/margins": 1.1749255657196045,
|
| 1448 |
+
"rewards/rejected": -0.997098982334137,
|
| 1449 |
+
"step": 80,
|
| 1450 |
+
"train_speed(iter/s)": 0.005619
|
| 1451 |
+
},
|
| 1452 |
+
{
|
| 1453 |
+
"epoch": 0.3624161073825503,
|
| 1454 |
+
"grad_norm": 3.2816970348358154,
|
| 1455 |
+
"learning_rate": 0.00019086477829689685,
|
| 1456 |
+
"logits/chosen": -0.22371181845664978,
|
| 1457 |
+
"logits/rejected": -0.3009035885334015,
|
| 1458 |
+
"logps/chosen": -10.19958782196045,
|
| 1459 |
+
"logps/rejected": -26.129743576049805,
|
| 1460 |
+
"loss": 1.161747932434082,
|
| 1461 |
+
"memory(GiB)": 46.57,
|
| 1462 |
+
"nll_loss": 0.7456332445144653,
|
| 1463 |
+
"rewards/accuracies": 0.84375,
|
| 1464 |
+
"rewards/chosen": 0.06418374180793762,
|
| 1465 |
+
"rewards/margins": 1.1640924215316772,
|
| 1466 |
+
"rewards/rejected": -1.099908709526062,
|
| 1467 |
+
"step": 81,
|
| 1468 |
+
"train_speed(iter/s)": 0.005619
|
| 1469 |
+
},
|
| 1470 |
+
{
|
| 1471 |
+
"epoch": 0.3668903803131991,
|
| 1472 |
+
"grad_norm": 4.27427339553833,
|
| 1473 |
+
"learning_rate": 0.0001905521535881509,
|
| 1474 |
+
"logits/chosen": -0.15121029317378998,
|
| 1475 |
+
"logits/rejected": -0.3036370873451233,
|
| 1476 |
+
"logps/chosen": -7.66187858581543,
|
| 1477 |
+
"logps/rejected": -30.927831649780273,
|
| 1478 |
+
"loss": 1.1210309267044067,
|
| 1479 |
+
"memory(GiB)": 46.57,
|
| 1480 |
+
"nll_loss": 0.6641408205032349,
|
| 1481 |
+
"rewards/accuracies": 0.765625,
|
| 1482 |
+
"rewards/chosen": -0.00867693591862917,
|
| 1483 |
+
"rewards/margins": 1.272807002067566,
|
| 1484 |
+
"rewards/rejected": -1.2814840078353882,
|
| 1485 |
+
"step": 82,
|
| 1486 |
+
"train_speed(iter/s)": 0.005619
|
| 1487 |
+
},
|
| 1488 |
+
{
|
| 1489 |
+
"epoch": 0.3713646532438479,
|
| 1490 |
+
"grad_norm": 2.29978084564209,
|
| 1491 |
+
"learning_rate": 0.00019023453410591635,
|
| 1492 |
+
"logits/chosen": -0.21486631035804749,
|
| 1493 |
+
"logits/rejected": -0.3746005892753601,
|
| 1494 |
+
"logps/chosen": -9.569436073303223,
|
| 1495 |
+
"logps/rejected": -32.21381378173828,
|
| 1496 |
+
"loss": 1.1229475736618042,
|
| 1497 |
+
"memory(GiB)": 46.57,
|
| 1498 |
+
"nll_loss": 0.6794871687889099,
|
| 1499 |
+
"rewards/accuracies": 0.90625,
|
| 1500 |
+
"rewards/chosen": 0.0131741464138031,
|
| 1501 |
+
"rewards/margins": 1.4518442153930664,
|
| 1502 |
+
"rewards/rejected": -1.4386701583862305,
|
| 1503 |
+
"step": 83,
|
| 1504 |
+
"train_speed(iter/s)": 0.005619
|
| 1505 |
+
},
|
| 1506 |
+
{
|
| 1507 |
+
"epoch": 0.37583892617449666,
|
| 1508 |
+
"grad_norm": 2.6593234539031982,
|
| 1509 |
+
"learning_rate": 0.00018991193736979175,
|
| 1510 |
+
"logits/chosen": -0.12227392941713333,
|
| 1511 |
+
"logits/rejected": -0.2726154327392578,
|
| 1512 |
+
"logps/chosen": -7.078165054321289,
|
| 1513 |
+
"logps/rejected": -30.666397094726562,
|
| 1514 |
+
"loss": 0.7911984920501709,
|
| 1515 |
+
"memory(GiB)": 46.57,
|
| 1516 |
+
"nll_loss": 0.4572717845439911,
|
| 1517 |
+
"rewards/accuracies": 0.9375,
|
| 1518 |
+
"rewards/chosen": 0.06052548438310623,
|
| 1519 |
+
"rewards/margins": 1.428847074508667,
|
| 1520 |
+
"rewards/rejected": -1.3683216571807861,
|
| 1521 |
+
"step": 84,
|
| 1522 |
+
"train_speed(iter/s)": 0.00562
|
| 1523 |
+
},
|
| 1524 |
+
{
|
| 1525 |
+
"epoch": 0.38031319910514544,
|
| 1526 |
+
"grad_norm": 2.8958120346069336,
|
| 1527 |
+
"learning_rate": 0.00018958438117391618,
|
| 1528 |
+
"logits/chosen": -0.0972181037068367,
|
| 1529 |
+
"logits/rejected": -0.2590752840042114,
|
| 1530 |
+
"logps/chosen": -8.193891525268555,
|
| 1531 |
+
"logps/rejected": -35.56235885620117,
|
| 1532 |
+
"loss": 1.0837842226028442,
|
| 1533 |
+
"memory(GiB)": 46.57,
|
| 1534 |
+
"nll_loss": 0.6906030774116516,
|
| 1535 |
+
"rewards/accuracies": 0.84375,
|
| 1536 |
+
"rewards/chosen": -0.06835082173347473,
|
| 1537 |
+
"rewards/margins": 1.79606294631958,
|
| 1538 |
+
"rewards/rejected": -1.8644137382507324,
|
| 1539 |
+
"step": 85,
|
| 1540 |
+
"train_speed(iter/s)": 0.00562
|
| 1541 |
+
},
|
| 1542 |
+
{
|
| 1543 |
+
"epoch": 0.38478747203579416,
|
| 1544 |
+
"grad_norm": 3.5083513259887695,
|
| 1545 |
+
"learning_rate": 0.00018925188358598813,
|
| 1546 |
+
"logits/chosen": -0.17531399428844452,
|
| 1547 |
+
"logits/rejected": -0.25995591282844543,
|
| 1548 |
+
"logps/chosen": -8.639050483703613,
|
| 1549 |
+
"logps/rejected": -29.226892471313477,
|
| 1550 |
+
"loss": 1.0494576692581177,
|
| 1551 |
+
"memory(GiB)": 46.57,
|
| 1552 |
+
"nll_loss": 0.6720495820045471,
|
| 1553 |
+
"rewards/accuracies": 0.84375,
|
| 1554 |
+
"rewards/chosen": -0.03724604845046997,
|
| 1555 |
+
"rewards/margins": 1.4595208168029785,
|
| 1556 |
+
"rewards/rejected": -1.4967668056488037,
|
| 1557 |
+
"step": 86,
|
| 1558 |
+
"train_speed(iter/s)": 0.00562
|
| 1559 |
+
},
|
| 1560 |
+
{
|
| 1561 |
+
"epoch": 0.38926174496644295,
|
| 1562 |
+
"grad_norm": 2.0132222175598145,
|
| 1563 |
+
"learning_rate": 0.00018891446294626866,
|
| 1564 |
+
"logits/chosen": -0.05051232874393463,
|
| 1565 |
+
"logits/rejected": -0.25516456365585327,
|
| 1566 |
+
"logps/chosen": -4.587294578552246,
|
| 1567 |
+
"logps/rejected": -36.072322845458984,
|
| 1568 |
+
"loss": 0.602871298789978,
|
| 1569 |
+
"memory(GiB)": 46.57,
|
| 1570 |
+
"nll_loss": 0.32869917154312134,
|
| 1571 |
+
"rewards/accuracies": 0.875,
|
| 1572 |
+
"rewards/chosen": 0.17169487476348877,
|
| 1573 |
+
"rewards/margins": 2.032069444656372,
|
| 1574 |
+
"rewards/rejected": -1.8603744506835938,
|
| 1575 |
+
"step": 87,
|
| 1576 |
+
"train_speed(iter/s)": 0.00562
|
| 1577 |
+
},
|
| 1578 |
+
{
|
| 1579 |
+
"epoch": 0.39373601789709173,
|
| 1580 |
+
"grad_norm": 3.1251611709594727,
|
| 1581 |
+
"learning_rate": 0.00018857213786656985,
|
| 1582 |
+
"logits/chosen": -0.16258063912391663,
|
| 1583 |
+
"logits/rejected": -0.2599830627441406,
|
| 1584 |
+
"logps/chosen": -9.219761848449707,
|
| 1585 |
+
"logps/rejected": -27.451026916503906,
|
| 1586 |
+
"loss": 1.0880504846572876,
|
| 1587 |
+
"memory(GiB)": 46.57,
|
| 1588 |
+
"nll_loss": 0.6885117292404175,
|
| 1589 |
+
"rewards/accuracies": 0.859375,
|
| 1590 |
+
"rewards/chosen": 0.04242437332868576,
|
| 1591 |
+
"rewards/margins": 1.207942247390747,
|
| 1592 |
+
"rewards/rejected": -1.1655179262161255,
|
| 1593 |
+
"step": 88,
|
| 1594 |
+
"train_speed(iter/s)": 0.00562
|
| 1595 |
+
},
|
| 1596 |
+
{
|
| 1597 |
+
"epoch": 0.3982102908277405,
|
| 1598 |
+
"grad_norm": 2.0855207443237305,
|
| 1599 |
+
"learning_rate": 0.0001882249272292282,
|
| 1600 |
+
"logits/chosen": -0.1683093011379242,
|
| 1601 |
+
"logits/rejected": -0.3001120686531067,
|
| 1602 |
+
"logps/chosen": -7.336337089538574,
|
| 1603 |
+
"logps/rejected": -24.294296264648438,
|
| 1604 |
+
"loss": 0.9775981903076172,
|
| 1605 |
+
"memory(GiB)": 46.57,
|
| 1606 |
+
"nll_loss": 0.515565812587738,
|
| 1607 |
+
"rewards/accuracies": 0.8125,
|
| 1608 |
+
"rewards/chosen": 0.09023457765579224,
|
| 1609 |
+
"rewards/margins": 0.9091135859489441,
|
| 1610 |
+
"rewards/rejected": -0.8188790082931519,
|
| 1611 |
+
"step": 89,
|
| 1612 |
+
"train_speed(iter/s)": 0.00562
|
| 1613 |
+
},
|
| 1614 |
+
{
|
| 1615 |
+
"epoch": 0.40268456375838924,
|
| 1616 |
+
"grad_norm": 1.8228232860565186,
|
| 1617 |
+
"learning_rate": 0.00018787285018606297,
|
| 1618 |
+
"logits/chosen": -0.1059221625328064,
|
| 1619 |
+
"logits/rejected": -0.30855828523635864,
|
| 1620 |
+
"logps/chosen": -3.3506364822387695,
|
| 1621 |
+
"logps/rejected": -32.792762756347656,
|
| 1622 |
+
"loss": 0.6121629476547241,
|
| 1623 |
+
"memory(GiB)": 46.57,
|
| 1624 |
+
"nll_loss": 0.2924441993236542,
|
| 1625 |
+
"rewards/accuracies": 0.90625,
|
| 1626 |
+
"rewards/chosen": 0.11779851466417313,
|
| 1627 |
+
"rewards/margins": 1.558281660079956,
|
| 1628 |
+
"rewards/rejected": -1.4404832124710083,
|
| 1629 |
+
"step": 90,
|
| 1630 |
+
"train_speed(iter/s)": 0.00562
|
| 1631 |
+
},
|
| 1632 |
+
{
|
| 1633 |
+
"epoch": 0.407158836689038,
|
| 1634 |
+
"grad_norm": 2.038564443588257,
|
| 1635 |
+
"learning_rate": 0.00018751592615732005,
|
| 1636 |
+
"logits/chosen": -0.23549917340278625,
|
| 1637 |
+
"logits/rejected": -0.28893160820007324,
|
| 1638 |
+
"logps/chosen": -7.049911975860596,
|
| 1639 |
+
"logps/rejected": -23.307397842407227,
|
| 1640 |
+
"loss": 0.8128443956375122,
|
| 1641 |
+
"memory(GiB)": 46.57,
|
| 1642 |
+
"nll_loss": 0.42805472016334534,
|
| 1643 |
+
"rewards/accuracies": 0.84375,
|
| 1644 |
+
"rewards/chosen": 0.235755056142807,
|
| 1645 |
+
"rewards/margins": 1.322766900062561,
|
| 1646 |
+
"rewards/rejected": -1.0870119333267212,
|
| 1647 |
+
"step": 91,
|
| 1648 |
+
"train_speed(iter/s)": 0.005621
|
| 1649 |
+
},
|
| 1650 |
+
{
|
| 1651 |
+
"epoch": 0.4116331096196868,
|
| 1652 |
+
"grad_norm": 3.0157337188720703,
|
| 1653 |
+
"learning_rate": 0.0001871541748306005,
|
| 1654 |
+
"logits/chosen": -0.16576483845710754,
|
| 1655 |
+
"logits/rejected": -0.3216527998447418,
|
| 1656 |
+
"logps/chosen": -3.5259528160095215,
|
| 1657 |
+
"logps/rejected": -34.49477005004883,
|
| 1658 |
+
"loss": 0.6575559377670288,
|
| 1659 |
+
"memory(GiB)": 46.57,
|
| 1660 |
+
"nll_loss": 0.324476957321167,
|
| 1661 |
+
"rewards/accuracies": 0.796875,
|
| 1662 |
+
"rewards/chosen": 0.0956890657544136,
|
| 1663 |
+
"rewards/margins": 2.1255316734313965,
|
| 1664 |
+
"rewards/rejected": -2.0298423767089844,
|
| 1665 |
+
"step": 92,
|
| 1666 |
+
"train_speed(iter/s)": 0.005621
|
| 1667 |
+
},
|
| 1668 |
+
{
|
| 1669 |
+
"epoch": 0.4161073825503356,
|
| 1670 |
+
"grad_norm": 4.184682846069336,
|
| 1671 |
+
"learning_rate": 0.00018678761615977468,
|
| 1672 |
+
"logits/chosen": -0.08753462135791779,
|
| 1673 |
+
"logits/rejected": -0.2798512876033783,
|
| 1674 |
+
"logps/chosen": -9.157657623291016,
|
| 1675 |
+
"logps/rejected": -36.74687576293945,
|
| 1676 |
+
"loss": 1.0873180627822876,
|
| 1677 |
+
"memory(GiB)": 46.57,
|
| 1678 |
+
"nll_loss": 0.7294520139694214,
|
| 1679 |
+
"rewards/accuracies": 0.8125,
|
| 1680 |
+
"rewards/chosen": 0.07273296266794205,
|
| 1681 |
+
"rewards/margins": 1.809075117111206,
|
| 1682 |
+
"rewards/rejected": -1.736342430114746,
|
| 1683 |
+
"step": 93,
|
| 1684 |
+
"train_speed(iter/s)": 0.00562
|
| 1685 |
+
},
|
| 1686 |
+
{
|
| 1687 |
+
"epoch": 0.42058165548098436,
|
| 1688 |
+
"grad_norm": 3.6453614234924316,
|
| 1689 |
+
"learning_rate": 0.00018641627036388169,
|
| 1690 |
+
"logits/chosen": -0.26587241888046265,
|
| 1691 |
+
"logits/rejected": -0.35532236099243164,
|
| 1692 |
+
"logps/chosen": -6.705877780914307,
|
| 1693 |
+
"logps/rejected": -34.05841827392578,
|
| 1694 |
+
"loss": 0.8682178258895874,
|
| 1695 |
+
"memory(GiB)": 46.57,
|
| 1696 |
+
"nll_loss": 0.5556175112724304,
|
| 1697 |
+
"rewards/accuracies": 0.84375,
|
| 1698 |
+
"rewards/chosen": 0.0699356198310852,
|
| 1699 |
+
"rewards/margins": 2.082659959793091,
|
| 1700 |
+
"rewards/rejected": -2.0127243995666504,
|
| 1701 |
+
"step": 94,
|
| 1702 |
+
"train_speed(iter/s)": 0.005621
|
| 1703 |
+
},
|
| 1704 |
+
{
|
| 1705 |
+
"epoch": 0.4250559284116331,
|
| 1706 |
+
"grad_norm": 3.926342725753784,
|
| 1707 |
+
"learning_rate": 0.00018604015792601396,
|
| 1708 |
+
"logits/chosen": -0.18198826909065247,
|
| 1709 |
+
"logits/rejected": -0.28424450755119324,
|
| 1710 |
+
"logps/chosen": -9.228765487670898,
|
| 1711 |
+
"logps/rejected": -28.494712829589844,
|
| 1712 |
+
"loss": 1.100342869758606,
|
| 1713 |
+
"memory(GiB)": 46.57,
|
| 1714 |
+
"nll_loss": 0.6449709534645081,
|
| 1715 |
+
"rewards/accuracies": 0.75,
|
| 1716 |
+
"rewards/chosen": 0.0022647292353212833,
|
| 1717 |
+
"rewards/margins": 1.3801387548446655,
|
| 1718 |
+
"rewards/rejected": -1.3778741359710693,
|
| 1719 |
+
"step": 95,
|
| 1720 |
+
"train_speed(iter/s)": 0.005621
|
| 1721 |
+
},
|
| 1722 |
+
{
|
| 1723 |
+
"epoch": 0.42953020134228187,
|
| 1724 |
+
"grad_norm": 6.2491960525512695,
|
| 1725 |
+
"learning_rate": 0.00018565929959218758,
|
| 1726 |
+
"logits/chosen": -0.162868469953537,
|
| 1727 |
+
"logits/rejected": -0.35664084553718567,
|
| 1728 |
+
"logps/chosen": -5.505702495574951,
|
| 1729 |
+
"logps/rejected": -40.82157516479492,
|
| 1730 |
+
"loss": 0.8373050689697266,
|
| 1731 |
+
"memory(GiB)": 46.57,
|
| 1732 |
+
"nll_loss": 0.48504531383514404,
|
| 1733 |
+
"rewards/accuracies": 0.828125,
|
| 1734 |
+
"rewards/chosen": 0.03489302098751068,
|
| 1735 |
+
"rewards/margins": 1.9277093410491943,
|
| 1736 |
+
"rewards/rejected": -1.892816424369812,
|
| 1737 |
+
"step": 96,
|
| 1738 |
+
"train_speed(iter/s)": 0.005621
|
| 1739 |
+
},
|
| 1740 |
+
{
|
| 1741 |
+
"epoch": 0.43400447427293065,
|
| 1742 |
+
"grad_norm": 3.155294895172119,
|
| 1743 |
+
"learning_rate": 0.0001852737163701979,
|
| 1744 |
+
"logits/chosen": -0.14200377464294434,
|
| 1745 |
+
"logits/rejected": -0.3238810896873474,
|
| 1746 |
+
"logps/chosen": -6.1366353034973145,
|
| 1747 |
+
"logps/rejected": -36.68225860595703,
|
| 1748 |
+
"loss": 0.7804915904998779,
|
| 1749 |
+
"memory(GiB)": 46.57,
|
| 1750 |
+
"nll_loss": 0.47483596205711365,
|
| 1751 |
+
"rewards/accuracies": 0.875,
|
| 1752 |
+
"rewards/chosen": 0.05882677063345909,
|
| 1753 |
+
"rewards/margins": 1.9737701416015625,
|
| 1754 |
+
"rewards/rejected": -1.9149433374404907,
|
| 1755 |
+
"step": 97,
|
| 1756 |
+
"train_speed(iter/s)": 0.005621
|
| 1757 |
+
},
|
| 1758 |
+
{
|
| 1759 |
+
"epoch": 0.43847874720357943,
|
| 1760 |
+
"grad_norm": 2.6832268238067627,
|
| 1761 |
+
"learning_rate": 0.00018488342952846073,
|
| 1762 |
+
"logits/chosen": -0.12941551208496094,
|
| 1763 |
+
"logits/rejected": -0.2959509789943695,
|
| 1764 |
+
"logps/chosen": -12.032288551330566,
|
| 1765 |
+
"logps/rejected": -35.381710052490234,
|
| 1766 |
+
"loss": 0.838473916053772,
|
| 1767 |
+
"memory(GiB)": 46.57,
|
| 1768 |
+
"nll_loss": 0.49494707584381104,
|
| 1769 |
+
"rewards/accuracies": 0.875,
|
| 1770 |
+
"rewards/chosen": 0.032307837158441544,
|
| 1771 |
+
"rewards/margins": 1.5512968301773071,
|
| 1772 |
+
"rewards/rejected": -1.5189889669418335,
|
| 1773 |
+
"step": 98,
|
| 1774 |
+
"train_speed(iter/s)": 0.005621
|
| 1775 |
+
},
|
| 1776 |
+
{
|
| 1777 |
+
"epoch": 0.4429530201342282,
|
| 1778 |
+
"grad_norm": 2.0462474822998047,
|
| 1779 |
+
"learning_rate": 0.0001844884605948392,
|
| 1780 |
+
"logits/chosen": -0.23558180034160614,
|
| 1781 |
+
"logits/rejected": -0.3692886531352997,
|
| 1782 |
+
"logps/chosen": -9.6895112991333,
|
| 1783 |
+
"logps/rejected": -26.33759117126465,
|
| 1784 |
+
"loss": 1.0117727518081665,
|
| 1785 |
+
"memory(GiB)": 46.57,
|
| 1786 |
+
"nll_loss": 0.6607507467269897,
|
| 1787 |
+
"rewards/accuracies": 0.90625,
|
| 1788 |
+
"rewards/chosen": 0.148264542222023,
|
| 1789 |
+
"rewards/margins": 1.4499516487121582,
|
| 1790 |
+
"rewards/rejected": -1.3016871213912964,
|
| 1791 |
+
"step": 99,
|
| 1792 |
+
"train_speed(iter/s)": 0.005621
|
| 1793 |
+
},
|
| 1794 |
+
{
|
| 1795 |
+
"epoch": 0.44742729306487694,
|
| 1796 |
+
"grad_norm": 2.056586503982544,
|
| 1797 |
+
"learning_rate": 0.00018408883135545632,
|
| 1798 |
+
"logits/chosen": -0.20895381271839142,
|
| 1799 |
+
"logits/rejected": -0.350538432598114,
|
| 1800 |
+
"logps/chosen": -7.372556209564209,
|
| 1801 |
+
"logps/rejected": -30.752912521362305,
|
| 1802 |
+
"loss": 0.8857133388519287,
|
| 1803 |
+
"memory(GiB)": 46.57,
|
| 1804 |
+
"nll_loss": 0.49547722935676575,
|
| 1805 |
+
"rewards/accuracies": 0.84375,
|
| 1806 |
+
"rewards/chosen": 0.0997147411108017,
|
| 1807 |
+
"rewards/margins": 1.3622983694076538,
|
| 1808 |
+
"rewards/rejected": -1.262583613395691,
|
| 1809 |
+
"step": 100,
|
| 1810 |
+
"train_speed(iter/s)": 0.005621
|
| 1811 |
+
}
|
| 1812 |
+
],
|
| 1813 |
+
"logging_steps": 1,
|
| 1814 |
+
"max_steps": 446,
|
| 1815 |
+
"num_input_tokens_seen": 0,
|
| 1816 |
+
"num_train_epochs": 2,
|
| 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": 1.1766177885008691e+17,
|
| 1831 |
+
"train_batch_size": 4,
|
| 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:7d5483f64f7f357da1c2d3fe8ff0dfc77973d5acbab5df294bd2df9dcf5b9b7d
|
| 3 |
+
size 8696
|
zero_to_fp32.py
ADDED
|
@@ -0,0 +1,760 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python
|
| 2 |
+
|
| 3 |
+
# Copyright (c) Microsoft Corporation.
|
| 4 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 5 |
+
|
| 6 |
+
# DeepSpeed Team
|
| 7 |
+
|
| 8 |
+
# This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets
|
| 9 |
+
# copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
|
| 10 |
+
# the future. Once extracted, the weights don't require DeepSpeed and can be used in any
|
| 11 |
+
# application.
|
| 12 |
+
#
|
| 13 |
+
# example:
|
| 14 |
+
# python zero_to_fp32.py . output_dir/
|
| 15 |
+
# or
|
| 16 |
+
# python zero_to_fp32.py . output_dir/ --safe_serialization
|
| 17 |
+
|
| 18 |
+
import argparse
|
| 19 |
+
import torch
|
| 20 |
+
import glob
|
| 21 |
+
import math
|
| 22 |
+
import os
|
| 23 |
+
import re
|
| 24 |
+
import gc
|
| 25 |
+
import json
|
| 26 |
+
import numpy as np
|
| 27 |
+
from tqdm import tqdm
|
| 28 |
+
from collections import OrderedDict
|
| 29 |
+
from dataclasses import dataclass
|
| 30 |
+
|
| 31 |
+
# while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
|
| 32 |
+
# DeepSpeed data structures it has to be available in the current python environment.
|
| 33 |
+
from deepspeed.utils import logger
|
| 34 |
+
from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
|
| 35 |
+
FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
|
| 36 |
+
FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
@dataclass
|
| 40 |
+
class zero_model_state:
|
| 41 |
+
buffers: dict()
|
| 42 |
+
param_shapes: dict()
|
| 43 |
+
shared_params: list
|
| 44 |
+
ds_version: int
|
| 45 |
+
frozen_param_shapes: dict()
|
| 46 |
+
frozen_param_fragments: dict()
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
debug = 0
|
| 50 |
+
|
| 51 |
+
# load to cpu
|
| 52 |
+
device = torch.device('cpu')
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
def atoi(text):
|
| 56 |
+
return int(text) if text.isdigit() else text
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
def natural_keys(text):
|
| 60 |
+
'''
|
| 61 |
+
alist.sort(key=natural_keys) sorts in human order
|
| 62 |
+
http://nedbatchelder.com/blog/200712/human_sorting.html
|
| 63 |
+
(See Toothy's implementation in the comments)
|
| 64 |
+
'''
|
| 65 |
+
return [atoi(c) for c in re.split(r'(\d+)', text)]
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
def get_model_state_file(checkpoint_dir, zero_stage):
|
| 69 |
+
if not os.path.isdir(checkpoint_dir):
|
| 70 |
+
raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
|
| 71 |
+
|
| 72 |
+
# there should be only one file
|
| 73 |
+
if zero_stage <= 2:
|
| 74 |
+
file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
|
| 75 |
+
elif zero_stage == 3:
|
| 76 |
+
file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
|
| 77 |
+
|
| 78 |
+
if not os.path.exists(file):
|
| 79 |
+
raise FileNotFoundError(f"can't find model states file at '{file}'")
|
| 80 |
+
|
| 81 |
+
return file
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
def get_checkpoint_files(checkpoint_dir, glob_pattern):
|
| 85 |
+
# XXX: need to test that this simple glob rule works for multi-node setup too
|
| 86 |
+
ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
|
| 87 |
+
|
| 88 |
+
if len(ckpt_files) == 0:
|
| 89 |
+
raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
|
| 90 |
+
|
| 91 |
+
return ckpt_files
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def get_optim_files(checkpoint_dir):
|
| 95 |
+
return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
def get_model_state_files(checkpoint_dir):
|
| 99 |
+
return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
def parse_model_states(files):
|
| 103 |
+
zero_model_states = []
|
| 104 |
+
for file in files:
|
| 105 |
+
state_dict = torch.load(file, map_location=device, weights_only=False)
|
| 106 |
+
|
| 107 |
+
if BUFFER_NAMES not in state_dict:
|
| 108 |
+
raise ValueError(f"{file} is not a model state checkpoint")
|
| 109 |
+
buffer_names = state_dict[BUFFER_NAMES]
|
| 110 |
+
if debug:
|
| 111 |
+
print("Found buffers:", buffer_names)
|
| 112 |
+
|
| 113 |
+
# recover just the buffers while restoring them to fp32 if they were saved in fp16
|
| 114 |
+
buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
|
| 115 |
+
param_shapes = state_dict[PARAM_SHAPES]
|
| 116 |
+
|
| 117 |
+
# collect parameters that are included in param_shapes
|
| 118 |
+
param_names = []
|
| 119 |
+
for s in param_shapes:
|
| 120 |
+
for name in s.keys():
|
| 121 |
+
param_names.append(name)
|
| 122 |
+
|
| 123 |
+
# update with frozen parameters
|
| 124 |
+
frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
|
| 125 |
+
if frozen_param_shapes is not None:
|
| 126 |
+
if debug:
|
| 127 |
+
print(f"Found frozen_param_shapes: {frozen_param_shapes}")
|
| 128 |
+
param_names += list(frozen_param_shapes.keys())
|
| 129 |
+
|
| 130 |
+
# handle shared params
|
| 131 |
+
shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
|
| 132 |
+
|
| 133 |
+
ds_version = state_dict.get(DS_VERSION, None)
|
| 134 |
+
|
| 135 |
+
frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
|
| 136 |
+
|
| 137 |
+
z_model_state = zero_model_state(buffers=buffers,
|
| 138 |
+
param_shapes=param_shapes,
|
| 139 |
+
shared_params=shared_params,
|
| 140 |
+
ds_version=ds_version,
|
| 141 |
+
frozen_param_shapes=frozen_param_shapes,
|
| 142 |
+
frozen_param_fragments=frozen_param_fragments)
|
| 143 |
+
zero_model_states.append(z_model_state)
|
| 144 |
+
|
| 145 |
+
return zero_model_states
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
def parse_optim_states(files, ds_checkpoint_dir):
|
| 149 |
+
total_files = len(files)
|
| 150 |
+
state_dicts = []
|
| 151 |
+
for f in tqdm(files, desc='Loading checkpoint shards'):
|
| 152 |
+
state_dict = torch.load(f, map_location=device, mmap=True, weights_only=False)
|
| 153 |
+
# immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
|
| 154 |
+
# and also handle the case where it was already removed by another helper script
|
| 155 |
+
state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
|
| 156 |
+
state_dicts.append(state_dict)
|
| 157 |
+
|
| 158 |
+
if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:
|
| 159 |
+
raise ValueError(f"{files[0]} is not a zero checkpoint")
|
| 160 |
+
zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
|
| 161 |
+
world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
|
| 162 |
+
|
| 163 |
+
# For ZeRO-2 each param group can have different partition_count as data parallelism for expert
|
| 164 |
+
# parameters can be different from data parallelism for non-expert parameters. So we can just
|
| 165 |
+
# use the max of the partition_count to get the dp world_size.
|
| 166 |
+
|
| 167 |
+
if type(world_size) is list:
|
| 168 |
+
world_size = max(world_size)
|
| 169 |
+
|
| 170 |
+
if world_size != total_files:
|
| 171 |
+
raise ValueError(
|
| 172 |
+
f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
|
| 173 |
+
"Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
|
| 174 |
+
)
|
| 175 |
+
|
| 176 |
+
# the groups are named differently in each stage
|
| 177 |
+
if zero_stage <= 2:
|
| 178 |
+
fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
|
| 179 |
+
elif zero_stage == 3:
|
| 180 |
+
fp32_groups_key = FP32_FLAT_GROUPS
|
| 181 |
+
else:
|
| 182 |
+
raise ValueError(f"unknown zero stage {zero_stage}")
|
| 183 |
+
|
| 184 |
+
fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
|
| 185 |
+
return zero_stage, world_size, fp32_flat_groups
|
| 186 |
+
|
| 187 |
+
|
| 188 |
+
def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters):
|
| 189 |
+
"""
|
| 190 |
+
Returns fp32 state_dict reconstructed from ds checkpoint
|
| 191 |
+
|
| 192 |
+
Args:
|
| 193 |
+
- ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
|
| 194 |
+
|
| 195 |
+
"""
|
| 196 |
+
print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
|
| 197 |
+
|
| 198 |
+
optim_files = get_optim_files(ds_checkpoint_dir)
|
| 199 |
+
zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
|
| 200 |
+
print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
|
| 201 |
+
|
| 202 |
+
model_files = get_model_state_files(ds_checkpoint_dir)
|
| 203 |
+
|
| 204 |
+
zero_model_states = parse_model_states(model_files)
|
| 205 |
+
print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
|
| 206 |
+
|
| 207 |
+
if zero_stage <= 2:
|
| 208 |
+
return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
| 209 |
+
exclude_frozen_parameters)
|
| 210 |
+
elif zero_stage == 3:
|
| 211 |
+
return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
| 212 |
+
exclude_frozen_parameters)
|
| 213 |
+
|
| 214 |
+
|
| 215 |
+
def _zero2_merge_frozen_params(state_dict, zero_model_states):
|
| 216 |
+
if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
|
| 217 |
+
return
|
| 218 |
+
|
| 219 |
+
frozen_param_shapes = zero_model_states[0].frozen_param_shapes
|
| 220 |
+
frozen_param_fragments = zero_model_states[0].frozen_param_fragments
|
| 221 |
+
|
| 222 |
+
if debug:
|
| 223 |
+
num_elem = sum(s.numel() for s in frozen_param_shapes.values())
|
| 224 |
+
print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
|
| 225 |
+
|
| 226 |
+
wanted_params = len(frozen_param_shapes)
|
| 227 |
+
wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
|
| 228 |
+
avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
|
| 229 |
+
print(f'Frozen params: Have {avail_numel} numels to process.')
|
| 230 |
+
print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
|
| 231 |
+
|
| 232 |
+
total_params = 0
|
| 233 |
+
total_numel = 0
|
| 234 |
+
for name, shape in frozen_param_shapes.items():
|
| 235 |
+
total_params += 1
|
| 236 |
+
unpartitioned_numel = shape.numel()
|
| 237 |
+
total_numel += unpartitioned_numel
|
| 238 |
+
|
| 239 |
+
state_dict[name] = frozen_param_fragments[name]
|
| 240 |
+
|
| 241 |
+
if debug:
|
| 242 |
+
print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
|
| 243 |
+
|
| 244 |
+
print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
def _has_callable(obj, fn):
|
| 248 |
+
attr = getattr(obj, fn, None)
|
| 249 |
+
return callable(attr)
|
| 250 |
+
|
| 251 |
+
|
| 252 |
+
def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
|
| 253 |
+
param_shapes = zero_model_states[0].param_shapes
|
| 254 |
+
|
| 255 |
+
# Reconstruction protocol:
|
| 256 |
+
#
|
| 257 |
+
# XXX: document this
|
| 258 |
+
|
| 259 |
+
if debug:
|
| 260 |
+
for i in range(world_size):
|
| 261 |
+
for j in range(len(fp32_flat_groups[0])):
|
| 262 |
+
print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
|
| 263 |
+
|
| 264 |
+
# XXX: memory usage doubles here (zero2)
|
| 265 |
+
num_param_groups = len(fp32_flat_groups[0])
|
| 266 |
+
merged_single_partition_of_fp32_groups = []
|
| 267 |
+
for i in range(num_param_groups):
|
| 268 |
+
merged_partitions = [sd[i] for sd in fp32_flat_groups]
|
| 269 |
+
full_single_fp32_vector = torch.cat(merged_partitions, 0)
|
| 270 |
+
merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
|
| 271 |
+
avail_numel = sum(
|
| 272 |
+
[full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
|
| 273 |
+
|
| 274 |
+
if debug:
|
| 275 |
+
wanted_params = sum([len(shapes) for shapes in param_shapes])
|
| 276 |
+
wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
|
| 277 |
+
# not asserting if there is a mismatch due to possible padding
|
| 278 |
+
print(f"Have {avail_numel} numels to process.")
|
| 279 |
+
print(f"Need {wanted_numel} numels in {wanted_params} params.")
|
| 280 |
+
|
| 281 |
+
# params
|
| 282 |
+
# XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
|
| 283 |
+
# out-of-core computing solution
|
| 284 |
+
total_numel = 0
|
| 285 |
+
total_params = 0
|
| 286 |
+
for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
|
| 287 |
+
offset = 0
|
| 288 |
+
avail_numel = full_single_fp32_vector.numel()
|
| 289 |
+
for name, shape in shapes.items():
|
| 290 |
+
|
| 291 |
+
unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
|
| 292 |
+
total_numel += unpartitioned_numel
|
| 293 |
+
total_params += 1
|
| 294 |
+
|
| 295 |
+
if debug:
|
| 296 |
+
print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
|
| 297 |
+
state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
|
| 298 |
+
offset += unpartitioned_numel
|
| 299 |
+
|
| 300 |
+
# Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
|
| 301 |
+
# avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
|
| 302 |
+
# paddings performed in the code it's almost impossible to predict the exact numbers w/o the
|
| 303 |
+
# live optimizer object, so we are checking that the numbers are within the right range
|
| 304 |
+
align_to = 2 * world_size
|
| 305 |
+
|
| 306 |
+
def zero2_align(x):
|
| 307 |
+
return align_to * math.ceil(x / align_to)
|
| 308 |
+
|
| 309 |
+
if debug:
|
| 310 |
+
print(f"original offset={offset}, avail_numel={avail_numel}")
|
| 311 |
+
|
| 312 |
+
offset = zero2_align(offset)
|
| 313 |
+
avail_numel = zero2_align(avail_numel)
|
| 314 |
+
|
| 315 |
+
if debug:
|
| 316 |
+
print(f"aligned offset={offset}, avail_numel={avail_numel}")
|
| 317 |
+
|
| 318 |
+
# Sanity check
|
| 319 |
+
if offset != avail_numel:
|
| 320 |
+
raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
|
| 321 |
+
|
| 322 |
+
print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
|
| 323 |
+
|
| 324 |
+
|
| 325 |
+
def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
| 326 |
+
exclude_frozen_parameters):
|
| 327 |
+
state_dict = OrderedDict()
|
| 328 |
+
|
| 329 |
+
# buffers
|
| 330 |
+
buffers = zero_model_states[0].buffers
|
| 331 |
+
state_dict.update(buffers)
|
| 332 |
+
if debug:
|
| 333 |
+
print(f"added {len(buffers)} buffers")
|
| 334 |
+
|
| 335 |
+
if not exclude_frozen_parameters:
|
| 336 |
+
_zero2_merge_frozen_params(state_dict, zero_model_states)
|
| 337 |
+
|
| 338 |
+
_zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
|
| 339 |
+
|
| 340 |
+
# recover shared parameters
|
| 341 |
+
for pair in zero_model_states[0].shared_params:
|
| 342 |
+
if pair[1] in state_dict:
|
| 343 |
+
state_dict[pair[0]] = state_dict[pair[1]]
|
| 344 |
+
|
| 345 |
+
return state_dict
|
| 346 |
+
|
| 347 |
+
|
| 348 |
+
def zero3_partitioned_param_info(unpartitioned_numel, world_size):
|
| 349 |
+
remainder = unpartitioned_numel % world_size
|
| 350 |
+
padding_numel = (world_size - remainder) if remainder else 0
|
| 351 |
+
partitioned_numel = math.ceil(unpartitioned_numel / world_size)
|
| 352 |
+
return partitioned_numel, padding_numel
|
| 353 |
+
|
| 354 |
+
|
| 355 |
+
def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
|
| 356 |
+
if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
|
| 357 |
+
return
|
| 358 |
+
|
| 359 |
+
if debug:
|
| 360 |
+
for i in range(world_size):
|
| 361 |
+
num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
|
| 362 |
+
print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
|
| 363 |
+
|
| 364 |
+
frozen_param_shapes = zero_model_states[0].frozen_param_shapes
|
| 365 |
+
wanted_params = len(frozen_param_shapes)
|
| 366 |
+
wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
|
| 367 |
+
avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
|
| 368 |
+
print(f'Frozen params: Have {avail_numel} numels to process.')
|
| 369 |
+
print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
|
| 370 |
+
|
| 371 |
+
total_params = 0
|
| 372 |
+
total_numel = 0
|
| 373 |
+
for name, shape in zero_model_states[0].frozen_param_shapes.items():
|
| 374 |
+
total_params += 1
|
| 375 |
+
unpartitioned_numel = shape.numel()
|
| 376 |
+
total_numel += unpartitioned_numel
|
| 377 |
+
|
| 378 |
+
param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
|
| 379 |
+
state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
|
| 380 |
+
|
| 381 |
+
partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
|
| 382 |
+
|
| 383 |
+
if debug:
|
| 384 |
+
print(
|
| 385 |
+
f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
|
| 386 |
+
)
|
| 387 |
+
|
| 388 |
+
print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
class GatheredTensor:
|
| 392 |
+
"""
|
| 393 |
+
A pseudo tensor that collects partitioned weights.
|
| 394 |
+
It is more memory efficient when there are multiple groups.
|
| 395 |
+
"""
|
| 396 |
+
|
| 397 |
+
def __init__(self, flat_groups, flat_groups_offset, offset, partitioned_numel, shape):
|
| 398 |
+
self.flat_groups = flat_groups
|
| 399 |
+
self.flat_groups_offset = flat_groups_offset
|
| 400 |
+
self.offset = offset
|
| 401 |
+
self.partitioned_numel = partitioned_numel
|
| 402 |
+
self.shape = shape
|
| 403 |
+
self.dtype = self.flat_groups[0][0].dtype
|
| 404 |
+
|
| 405 |
+
def contiguous(self):
|
| 406 |
+
"""
|
| 407 |
+
Merge partitioned weights from flat_groups into a single tensor.
|
| 408 |
+
"""
|
| 409 |
+
end_idx = self.offset + self.partitioned_numel
|
| 410 |
+
world_size = len(self.flat_groups)
|
| 411 |
+
pad_flat_param_chunks = []
|
| 412 |
+
|
| 413 |
+
for rank_i in range(world_size):
|
| 414 |
+
# for each rank, we need to collect weights from related group/groups
|
| 415 |
+
flat_groups_at_rank_i = self.flat_groups[rank_i]
|
| 416 |
+
start_group_id = None
|
| 417 |
+
end_group_id = None
|
| 418 |
+
for group_id in range(len(self.flat_groups_offset)):
|
| 419 |
+
if self.flat_groups_offset[group_id] <= self.offset < self.flat_groups_offset[group_id + 1]:
|
| 420 |
+
start_group_id = group_id
|
| 421 |
+
if self.flat_groups_offset[group_id] < end_idx <= self.flat_groups_offset[group_id + 1]:
|
| 422 |
+
end_group_id = group_id
|
| 423 |
+
break
|
| 424 |
+
# collect weights from related group/groups
|
| 425 |
+
for group_id in range(start_group_id, end_group_id + 1):
|
| 426 |
+
flat_tensor = flat_groups_at_rank_i[group_id]
|
| 427 |
+
start_offset = self.offset - self.flat_groups_offset[group_id]
|
| 428 |
+
end_offset = min(end_idx, self.flat_groups_offset[group_id + 1]) - self.flat_groups_offset[group_id]
|
| 429 |
+
pad_flat_param_chunks.append(flat_tensor[start_offset:end_offset])
|
| 430 |
+
|
| 431 |
+
# collect weights from all ranks
|
| 432 |
+
pad_flat_param = torch.cat(pad_flat_param_chunks, dim=0)
|
| 433 |
+
param = pad_flat_param[:self.shape.numel()].view(self.shape).contiguous()
|
| 434 |
+
return param
|
| 435 |
+
|
| 436 |
+
|
| 437 |
+
def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
|
| 438 |
+
param_shapes = zero_model_states[0].param_shapes
|
| 439 |
+
avail_numel = sum([flat_group.numel() for flat_group in fp32_flat_groups[0]]) * world_size
|
| 440 |
+
|
| 441 |
+
# Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
|
| 442 |
+
# param, re-consolidating each param, while dealing with padding if any
|
| 443 |
+
|
| 444 |
+
# merge list of dicts, preserving order
|
| 445 |
+
param_shapes = {k: v for d in param_shapes for k, v in d.items()}
|
| 446 |
+
|
| 447 |
+
if debug:
|
| 448 |
+
for i in range(world_size):
|
| 449 |
+
print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
|
| 450 |
+
|
| 451 |
+
wanted_params = len(param_shapes)
|
| 452 |
+
wanted_numel = sum(shape.numel() for shape in param_shapes.values())
|
| 453 |
+
# not asserting if there is a mismatch due to possible padding
|
| 454 |
+
avail_numel = fp32_flat_groups[0].numel() * world_size
|
| 455 |
+
print(f"Trainable params: Have {avail_numel} numels to process.")
|
| 456 |
+
print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
|
| 457 |
+
|
| 458 |
+
# params
|
| 459 |
+
# XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
|
| 460 |
+
# out-of-core computing solution
|
| 461 |
+
offset = 0
|
| 462 |
+
total_numel = 0
|
| 463 |
+
total_params = 0
|
| 464 |
+
flat_groups_offset = [0] + list(np.cumsum([flat_tensor.numel() for flat_tensor in fp32_flat_groups[0]]))
|
| 465 |
+
for name, shape in tqdm(param_shapes.items(), desc='Gathering sharded weights'):
|
| 466 |
+
unpartitioned_numel = shape.numel()
|
| 467 |
+
total_numel += unpartitioned_numel
|
| 468 |
+
total_params += 1
|
| 469 |
+
partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
|
| 470 |
+
|
| 471 |
+
if debug:
|
| 472 |
+
print(
|
| 473 |
+
f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
|
| 474 |
+
)
|
| 475 |
+
|
| 476 |
+
# memory efficient tensor
|
| 477 |
+
tensor = GatheredTensor(fp32_flat_groups, flat_groups_offset, offset, partitioned_numel, shape)
|
| 478 |
+
state_dict[name] = tensor
|
| 479 |
+
offset += partitioned_numel
|
| 480 |
+
|
| 481 |
+
offset *= world_size
|
| 482 |
+
|
| 483 |
+
# Sanity check
|
| 484 |
+
if offset != avail_numel:
|
| 485 |
+
raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
|
| 486 |
+
|
| 487 |
+
print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
|
| 488 |
+
|
| 489 |
+
|
| 490 |
+
def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
| 491 |
+
exclude_frozen_parameters):
|
| 492 |
+
state_dict = OrderedDict()
|
| 493 |
+
|
| 494 |
+
# buffers
|
| 495 |
+
buffers = zero_model_states[0].buffers
|
| 496 |
+
state_dict.update(buffers)
|
| 497 |
+
if debug:
|
| 498 |
+
print(f"added {len(buffers)} buffers")
|
| 499 |
+
|
| 500 |
+
if not exclude_frozen_parameters:
|
| 501 |
+
_zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
|
| 502 |
+
|
| 503 |
+
_zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
|
| 504 |
+
|
| 505 |
+
# recover shared parameters
|
| 506 |
+
for pair in zero_model_states[0].shared_params:
|
| 507 |
+
if pair[1] in state_dict:
|
| 508 |
+
state_dict[pair[0]] = state_dict[pair[1]]
|
| 509 |
+
|
| 510 |
+
return state_dict
|
| 511 |
+
|
| 512 |
+
|
| 513 |
+
def to_torch_tensor(state_dict, return_empty_tensor=False):
|
| 514 |
+
"""
|
| 515 |
+
Convert state_dict of GatheredTensor to torch tensor
|
| 516 |
+
"""
|
| 517 |
+
torch_state_dict = {}
|
| 518 |
+
converted_tensors = {}
|
| 519 |
+
for name, tensor in state_dict.items():
|
| 520 |
+
tensor_id = id(tensor)
|
| 521 |
+
if tensor_id in converted_tensors: # shared tensors
|
| 522 |
+
shared_tensor = torch_state_dict[converted_tensors[tensor_id]]
|
| 523 |
+
torch_state_dict[name] = shared_tensor
|
| 524 |
+
else:
|
| 525 |
+
converted_tensors[tensor_id] = name
|
| 526 |
+
if return_empty_tensor:
|
| 527 |
+
torch_state_dict[name] = torch.empty(tensor.shape, dtype=tensor.dtype)
|
| 528 |
+
else:
|
| 529 |
+
torch_state_dict[name] = tensor.contiguous()
|
| 530 |
+
return torch_state_dict
|
| 531 |
+
|
| 532 |
+
|
| 533 |
+
def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
|
| 534 |
+
tag=None,
|
| 535 |
+
exclude_frozen_parameters=False,
|
| 536 |
+
lazy_mode=False):
|
| 537 |
+
"""
|
| 538 |
+
Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
|
| 539 |
+
``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
|
| 540 |
+
via a model hub.
|
| 541 |
+
|
| 542 |
+
Args:
|
| 543 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder
|
| 544 |
+
- ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``
|
| 545 |
+
- ``exclude_frozen_parameters``: exclude frozen parameters
|
| 546 |
+
- ``lazy_mode``: get state_dict in lazy mode. It returns a dict of pesduo tensor instead of torch tensor, which is more memory efficient.
|
| 547 |
+
Convert the pesduo tensor to torch tensor by ``.contiguous()``
|
| 548 |
+
|
| 549 |
+
Returns:
|
| 550 |
+
- pytorch ``state_dict``
|
| 551 |
+
|
| 552 |
+
A typical usage might be ::
|
| 553 |
+
|
| 554 |
+
from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
|
| 555 |
+
# do the training and checkpoint saving
|
| 556 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
|
| 557 |
+
model = model.cpu() # move to cpu
|
| 558 |
+
model.load_state_dict(state_dict)
|
| 559 |
+
# submit to model hub or save the model to share with others
|
| 560 |
+
|
| 561 |
+
In this example the ``model`` will no longer be usable in the deepspeed context of the same
|
| 562 |
+
application. i.e. you will need to re-initialize the deepspeed engine, since
|
| 563 |
+
``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
|
| 564 |
+
|
| 565 |
+
If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
|
| 566 |
+
|
| 567 |
+
Note: the above usage may not work if your application doesn't have sufficient free CPU memory.
|
| 568 |
+
You may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
|
| 569 |
+
the checkpoint. Or you can load state_dict in lazy mode ::
|
| 570 |
+
|
| 571 |
+
from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
|
| 572 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, lazy_mode=True) # not on cpu
|
| 573 |
+
for name, lazy_tensor in state_dict.item():
|
| 574 |
+
tensor = lazy_tensor.contiguous() # to cpu
|
| 575 |
+
print(name, tensor)
|
| 576 |
+
# del tensor to release memory if it no longer in use
|
| 577 |
+
"""
|
| 578 |
+
if tag is None:
|
| 579 |
+
latest_path = os.path.join(checkpoint_dir, 'latest')
|
| 580 |
+
if os.path.isfile(latest_path):
|
| 581 |
+
with open(latest_path, 'r') as fd:
|
| 582 |
+
tag = fd.read().strip()
|
| 583 |
+
else:
|
| 584 |
+
raise ValueError(f"Unable to find 'latest' file at {latest_path}")
|
| 585 |
+
|
| 586 |
+
ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
|
| 587 |
+
|
| 588 |
+
if not os.path.isdir(ds_checkpoint_dir):
|
| 589 |
+
raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
|
| 590 |
+
|
| 591 |
+
state_dict = _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
|
| 592 |
+
if lazy_mode:
|
| 593 |
+
return state_dict
|
| 594 |
+
else:
|
| 595 |
+
return to_torch_tensor(state_dict)
|
| 596 |
+
|
| 597 |
+
|
| 598 |
+
def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir,
|
| 599 |
+
output_dir,
|
| 600 |
+
max_shard_size="5GB",
|
| 601 |
+
safe_serialization=False,
|
| 602 |
+
tag=None,
|
| 603 |
+
exclude_frozen_parameters=False):
|
| 604 |
+
"""
|
| 605 |
+
Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
|
| 606 |
+
loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
|
| 607 |
+
|
| 608 |
+
Args:
|
| 609 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
|
| 610 |
+
- ``output_dir``: directory to the pytorch fp32 state_dict output files
|
| 611 |
+
- ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB
|
| 612 |
+
- ``safe_serialization``: whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).
|
| 613 |
+
- ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
|
| 614 |
+
- ``exclude_frozen_parameters``: exclude frozen parameters
|
| 615 |
+
"""
|
| 616 |
+
|
| 617 |
+
# Dependency pre-check
|
| 618 |
+
if safe_serialization:
|
| 619 |
+
try:
|
| 620 |
+
from safetensors.torch import save_file
|
| 621 |
+
except ImportError:
|
| 622 |
+
print('If you want to use `safe_serialization`, please `pip install safetensors`')
|
| 623 |
+
raise
|
| 624 |
+
if max_shard_size is not None:
|
| 625 |
+
try:
|
| 626 |
+
from huggingface_hub import split_torch_state_dict_into_shards
|
| 627 |
+
except ImportError:
|
| 628 |
+
print('If you want to use `max_shard_size`, please `pip install huggingface_hub`')
|
| 629 |
+
raise
|
| 630 |
+
|
| 631 |
+
# Convert zero checkpoint to state_dict
|
| 632 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
|
| 633 |
+
tag,
|
| 634 |
+
exclude_frozen_parameters,
|
| 635 |
+
lazy_mode=True)
|
| 636 |
+
|
| 637 |
+
# Shard the model if it is too big.
|
| 638 |
+
weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin"
|
| 639 |
+
if max_shard_size is not None:
|
| 640 |
+
filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors")
|
| 641 |
+
# an memory-efficient approach for sharding
|
| 642 |
+
empty_state_dict = to_torch_tensor(state_dict, return_empty_tensor=True)
|
| 643 |
+
state_dict_split = split_torch_state_dict_into_shards(empty_state_dict,
|
| 644 |
+
filename_pattern=filename_pattern,
|
| 645 |
+
max_shard_size=max_shard_size)
|
| 646 |
+
else:
|
| 647 |
+
from collections import namedtuple
|
| 648 |
+
StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"])
|
| 649 |
+
state_dict_split = StateDictSplit(is_sharded=False,
|
| 650 |
+
filename_to_tensors={weights_name: list(state_dict.keys())})
|
| 651 |
+
|
| 652 |
+
# Save the model by shard
|
| 653 |
+
os.makedirs(output_dir, exist_ok=True)
|
| 654 |
+
filename_to_tensors = state_dict_split.filename_to_tensors.items()
|
| 655 |
+
for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"):
|
| 656 |
+
shard_state_dict = {tensor_name: state_dict[tensor_name] for tensor_name in tensors}
|
| 657 |
+
shard_state_dict = to_torch_tensor(shard_state_dict)
|
| 658 |
+
output_path = os.path.join(output_dir, shard_file)
|
| 659 |
+
if safe_serialization:
|
| 660 |
+
save_file(shard_state_dict, output_path, metadata={"format": "pt"})
|
| 661 |
+
else:
|
| 662 |
+
torch.save(shard_state_dict, output_path)
|
| 663 |
+
# release the memory of current shard
|
| 664 |
+
for tensor_name in list(shard_state_dict.keys()):
|
| 665 |
+
del state_dict[tensor_name]
|
| 666 |
+
del shard_state_dict[tensor_name]
|
| 667 |
+
del shard_state_dict
|
| 668 |
+
gc.collect()
|
| 669 |
+
|
| 670 |
+
# Save index if sharded
|
| 671 |
+
if state_dict_split.is_sharded:
|
| 672 |
+
index = {
|
| 673 |
+
"metadata": state_dict_split.metadata,
|
| 674 |
+
"weight_map": state_dict_split.tensor_to_filename,
|
| 675 |
+
}
|
| 676 |
+
save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json"
|
| 677 |
+
save_index_file = os.path.join(output_dir, save_index_file)
|
| 678 |
+
with open(save_index_file, "w", encoding="utf-8") as f:
|
| 679 |
+
content = json.dumps(index, indent=2, sort_keys=True) + "\n"
|
| 680 |
+
f.write(content)
|
| 681 |
+
|
| 682 |
+
|
| 683 |
+
def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
|
| 684 |
+
"""
|
| 685 |
+
1. Put the provided model to cpu
|
| 686 |
+
2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
|
| 687 |
+
3. Load it into the provided model
|
| 688 |
+
|
| 689 |
+
Args:
|
| 690 |
+
- ``model``: the model object to update
|
| 691 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
|
| 692 |
+
- ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
|
| 693 |
+
|
| 694 |
+
Returns:
|
| 695 |
+
- ``model`: modified model
|
| 696 |
+
|
| 697 |
+
Make sure you have plenty of CPU memory available before you call this function. If you don't
|
| 698 |
+
have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
|
| 699 |
+
conveniently placed for you in the checkpoint folder.
|
| 700 |
+
|
| 701 |
+
A typical usage might be ::
|
| 702 |
+
|
| 703 |
+
from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
|
| 704 |
+
model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
|
| 705 |
+
# submit to model hub or save the model to share with others
|
| 706 |
+
|
| 707 |
+
Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
|
| 708 |
+
of the same application. i.e. you will need to re-initialize the deepspeed engine, since
|
| 709 |
+
``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
|
| 710 |
+
|
| 711 |
+
"""
|
| 712 |
+
logger.info(f"Extracting fp32 weights")
|
| 713 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
|
| 714 |
+
|
| 715 |
+
logger.info(f"Overwriting model with fp32 weights")
|
| 716 |
+
model = model.cpu()
|
| 717 |
+
model.load_state_dict(state_dict, strict=False)
|
| 718 |
+
|
| 719 |
+
return model
|
| 720 |
+
|
| 721 |
+
|
| 722 |
+
if __name__ == "__main__":
|
| 723 |
+
parser = argparse.ArgumentParser()
|
| 724 |
+
parser.add_argument("checkpoint_dir",
|
| 725 |
+
type=str,
|
| 726 |
+
help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
|
| 727 |
+
parser.add_argument("output_dir",
|
| 728 |
+
type=str,
|
| 729 |
+
help="directory to the pytorch fp32 state_dict output files"
|
| 730 |
+
"(e.g. path/checkpoint-12-output/)")
|
| 731 |
+
parser.add_argument(
|
| 732 |
+
"--max_shard_size",
|
| 733 |
+
type=str,
|
| 734 |
+
default="5GB",
|
| 735 |
+
help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size"
|
| 736 |
+
"lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`"
|
| 737 |
+
"We default it to 5GB in order for models to be able to run easily on free-tier google colab instances"
|
| 738 |
+
"without CPU OOM issues.")
|
| 739 |
+
parser.add_argument(
|
| 740 |
+
"--safe_serialization",
|
| 741 |
+
default=False,
|
| 742 |
+
action='store_true',
|
| 743 |
+
help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).")
|
| 744 |
+
parser.add_argument("-t",
|
| 745 |
+
"--tag",
|
| 746 |
+
type=str,
|
| 747 |
+
default=None,
|
| 748 |
+
help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
|
| 749 |
+
parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
|
| 750 |
+
parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
|
| 751 |
+
args = parser.parse_args()
|
| 752 |
+
|
| 753 |
+
debug = args.debug
|
| 754 |
+
|
| 755 |
+
convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
|
| 756 |
+
args.output_dir,
|
| 757 |
+
max_shard_size=args.max_shard_size,
|
| 758 |
+
safe_serialization=args.safe_serialization,
|
| 759 |
+
tag=args.tag,
|
| 760 |
+
exclude_frozen_parameters=args.exclude_frozen_parameters)
|