File size: 13,244 Bytes
f0712ae |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
[WARNING|2024-11-12 02:01:07] logging.py:162 >> We recommend enable `upcast_layernorm` in quantized training. [INFO|2024-11-12 02:01:07] parser.py:355 >> Process rank: 0, device: cuda:0, n_gpu: 1, distributed training: False, compute dtype: torch.bfloat16 [INFO|2024-11-12 02:01:07] configuration_utils.py:733 >> loading configuration file config.json from cache at /root/.cache/huggingface/hub/models--mistralai--Mistral-7B-Instruct-v0.3/snapshots/e0bc86c23ce5aae1db576c8cca6f06f1f73af2db/config.json [INFO|2024-11-12 02:01:07] configuration_utils.py:800 >> Model config MistralConfig { "_name_or_path": "mistralai/Mistral-7B-Instruct-v0.3", "architectures": [ "MistralForCausalLM" ], "attention_dropout": 0.0, "bos_token_id": 1, "eos_token_id": 2, "head_dim": 128, "hidden_act": "silu", "hidden_size": 4096, "initializer_range": 0.02, "intermediate_size": 14336, "max_position_embeddings": 32768, "model_type": "mistral", "num_attention_heads": 32, "num_hidden_layers": 32, "num_key_value_heads": 8, "rms_norm_eps": 1e-05, "rope_theta": 1000000.0, "sliding_window": null, "tie_word_embeddings": false, "torch_dtype": "bfloat16", "transformers_version": "4.44.2", "use_cache": true, "vocab_size": 32768 } [INFO|2024-11-12 02:01:08] tokenization_utils_base.py:2269 >> loading file tokenizer.model from cache at /root/.cache/huggingface/hub/models--mistralai--Mistral-7B-Instruct-v0.3/snapshots/e0bc86c23ce5aae1db576c8cca6f06f1f73af2db/tokenizer.model [INFO|2024-11-12 02:01:08] tokenization_utils_base.py:2269 >> loading file tokenizer.json from cache at /root/.cache/huggingface/hub/models--mistralai--Mistral-7B-Instruct-v0.3/snapshots/e0bc86c23ce5aae1db576c8cca6f06f1f73af2db/tokenizer.json [INFO|2024-11-12 02:01:08] tokenization_utils_base.py:2269 >> loading file added_tokens.json from cache at None [INFO|2024-11-12 02:01:08] tokenization_utils_base.py:2269 >> loading file special_tokens_map.json from cache at /root/.cache/huggingface/hub/models--mistralai--Mistral-7B-Instruct-v0.3/snapshots/e0bc86c23ce5aae1db576c8cca6f06f1f73af2db/special_tokens_map.json [INFO|2024-11-12 02:01:08] tokenization_utils_base.py:2269 >> loading file tokenizer_config.json from cache at /root/.cache/huggingface/hub/models--mistralai--Mistral-7B-Instruct-v0.3/snapshots/e0bc86c23ce5aae1db576c8cca6f06f1f73af2db/tokenizer_config.json [INFO|2024-11-12 02:01:09] configuration_utils.py:733 >> loading configuration file config.json from cache at /root/.cache/huggingface/hub/models--mistralai--Mistral-7B-Instruct-v0.3/snapshots/e0bc86c23ce5aae1db576c8cca6f06f1f73af2db/config.json [INFO|2024-11-12 02:01:09] configuration_utils.py:800 >> Model config MistralConfig { "_name_or_path": "mistralai/Mistral-7B-Instruct-v0.3", "architectures": [ "MistralForCausalLM" ], "attention_dropout": 0.0, "bos_token_id": 1, "eos_token_id": 2, "head_dim": 128, "hidden_act": "silu", "hidden_size": 4096, "initializer_range": 0.02, "intermediate_size": 14336, "max_position_embeddings": 32768, "model_type": "mistral", "num_attention_heads": 32, "num_hidden_layers": 32, "num_key_value_heads": 8, "rms_norm_eps": 1e-05, "rope_theta": 1000000.0, "sliding_window": null, "tie_word_embeddings": false, "torch_dtype": "bfloat16", "transformers_version": "4.44.2", "use_cache": true, "vocab_size": 32768 } [INFO|2024-11-12 02:01:09] tokenization_utils_base.py:2269 >> loading file tokenizer.model from cache at /root/.cache/huggingface/hub/models--mistralai--Mistral-7B-Instruct-v0.3/snapshots/e0bc86c23ce5aae1db576c8cca6f06f1f73af2db/tokenizer.model [INFO|2024-11-12 02:01:09] tokenization_utils_base.py:2269 >> loading file tokenizer.json from cache at /root/.cache/huggingface/hub/models--mistralai--Mistral-7B-Instruct-v0.3/snapshots/e0bc86c23ce5aae1db576c8cca6f06f1f73af2db/tokenizer.json [INFO|2024-11-12 02:01:09] tokenization_utils_base.py:2269 >> loading file added_tokens.json from cache at None [INFO|2024-11-12 02:01:09] tokenization_utils_base.py:2269 >> loading file special_tokens_map.json from cache at /root/.cache/huggingface/hub/models--mistralai--Mistral-7B-Instruct-v0.3/snapshots/e0bc86c23ce5aae1db576c8cca6f06f1f73af2db/special_tokens_map.json [INFO|2024-11-12 02:01:09] tokenization_utils_base.py:2269 >> loading file tokenizer_config.json from cache at /root/.cache/huggingface/hub/models--mistralai--Mistral-7B-Instruct-v0.3/snapshots/e0bc86c23ce5aae1db576c8cca6f06f1f73af2db/tokenizer_config.json [INFO|2024-11-12 02:01:10] logging.py:157 >> Add pad token: </s> [INFO|2024-11-12 02:01:10] logging.py:157 >> Loading dataset treino_pt_rde.json... [INFO|2024-11-12 02:01:15] configuration_utils.py:733 >> loading configuration file config.json from cache at /root/.cache/huggingface/hub/models--mistralai--Mistral-7B-Instruct-v0.3/snapshots/e0bc86c23ce5aae1db576c8cca6f06f1f73af2db/config.json [INFO|2024-11-12 02:01:15] configuration_utils.py:800 >> Model config MistralConfig { "_name_or_path": "mistralai/Mistral-7B-Instruct-v0.3", "architectures": [ "MistralForCausalLM" ], "attention_dropout": 0.0, "bos_token_id": 1, "eos_token_id": 2, "head_dim": 128, "hidden_act": "silu", "hidden_size": 4096, "initializer_range": 0.02, "intermediate_size": 14336, "max_position_embeddings": 32768, "model_type": "mistral", "num_attention_heads": 32, "num_hidden_layers": 32, "num_key_value_heads": 8, "rms_norm_eps": 1e-05, "rope_theta": 1000000.0, "sliding_window": null, "tie_word_embeddings": false, "torch_dtype": "bfloat16", "transformers_version": "4.44.2", "use_cache": true, "vocab_size": 32768 } [INFO|2024-11-12 02:01:15] logging.py:157 >> Quantizing model to 4 bit with bitsandbytes. [INFO|2024-11-12 02:01:15] modeling_utils.py:3678 >> loading weights file model.safetensors from cache at /root/.cache/huggingface/hub/models--mistralai--Mistral-7B-Instruct-v0.3/snapshots/e0bc86c23ce5aae1db576c8cca6f06f1f73af2db/model.safetensors.index.json [INFO|2024-11-12 02:07:01] modeling_utils.py:1606 >> Instantiating MistralForCausalLM model under default dtype torch.bfloat16. [INFO|2024-11-12 02:07:01] configuration_utils.py:1038 >> Generate config GenerationConfig { "bos_token_id": 1, "eos_token_id": 2 } [INFO|2024-11-12 02:08:04] modeling_utils.py:4507 >> All model checkpoint weights were used when initializing MistralForCausalLM. [INFO|2024-11-12 02:08:04] modeling_utils.py:4515 >> All the weights of MistralForCausalLM were initialized from the model checkpoint at mistralai/Mistral-7B-Instruct-v0.3. If your task is similar to the task the model of the checkpoint was trained on, you can already use MistralForCausalLM for predictions without further training. [INFO|2024-11-12 02:08:05] configuration_utils.py:993 >> loading configuration file generation_config.json from cache at /root/.cache/huggingface/hub/models--mistralai--Mistral-7B-Instruct-v0.3/snapshots/e0bc86c23ce5aae1db576c8cca6f06f1f73af2db/generation_config.json [INFO|2024-11-12 02:08:05] configuration_utils.py:1038 >> Generate config GenerationConfig { "bos_token_id": 1, "eos_token_id": 2 } [INFO|2024-11-12 02:08:05] logging.py:157 >> Gradient checkpointing enabled. [INFO|2024-11-12 02:08:05] logging.py:157 >> Using torch SDPA for faster training and inference. [INFO|2024-11-12 02:08:05] logging.py:157 >> Upcasting trainable params to float32. [INFO|2024-11-12 02:08:05] logging.py:157 >> Fine-tuning method: LoRA [INFO|2024-11-12 02:08:05] logging.py:157 >> Found linear modules: o_proj,q_proj,v_proj,down_proj,gate_proj,k_proj,up_proj [INFO|2024-11-12 02:08:06] logging.py:157 >> trainable params: 20,971,520 || all params: 7,268,995,072 || trainable%: 0.2885 [INFO|2024-11-12 02:08:06] trainer.py:648 >> Using auto half precision backend [INFO|2024-11-12 02:08:06] trainer.py:2134 >> ***** Running training ***** [INFO|2024-11-12 02:08:06] trainer.py:2135 >> Num examples = 300 [INFO|2024-11-12 02:08:06] trainer.py:2136 >> Num Epochs = 3 [INFO|2024-11-12 02:08:06] trainer.py:2137 >> Instantaneous batch size per device = 2 [INFO|2024-11-12 02:08:06] trainer.py:2140 >> Total train batch size (w. parallel, distributed & accumulation) = 8 [INFO|2024-11-12 02:08:06] trainer.py:2141 >> Gradient Accumulation steps = 4 [INFO|2024-11-12 02:08:06] trainer.py:2142 >> Total optimization steps = 111 [INFO|2024-11-12 02:08:06] trainer.py:2143 >> Number of trainable parameters = 20,971,520 [INFO|2024-11-12 02:20:35] logging.py:157 >> {'loss': 0.4778, 'learning_rate': 4.9005e-05, 'epoch': 0.27, 'throughput': 44.35} [INFO|2024-11-12 02:32:47] logging.py:157 >> {'loss': 0.3431, 'learning_rate': 4.6101e-05, 'epoch': 0.53, 'throughput': 44.24} [INFO|2024-11-12 02:44:52] logging.py:157 >> {'loss': 0.3180, 'learning_rate': 4.1517e-05, 'epoch': 0.80, 'throughput': 44.19} [INFO|2024-11-12 02:56:44] logging.py:157 >> {'loss': 0.4028, 'learning_rate': 3.5619e-05, 'epoch': 1.07, 'throughput': 44.18} [INFO|2024-11-12 03:08:54] logging.py:157 >> {'loss': 0.1864, 'learning_rate': 2.8876e-05, 'epoch': 1.33, 'throughput': 44.20} [INFO|2024-11-12 03:21:09] logging.py:157 >> {'loss': 0.2180, 'learning_rate': 2.1825e-05, 'epoch': 1.60, 'throughput': 44.20} [INFO|2024-11-12 03:33:22] logging.py:157 >> {'loss': 0.2257, 'learning_rate': 1.5026e-05, 'epoch': 1.87, 'throughput': 44.18} [INFO|2024-11-12 03:45:39] logging.py:157 >> {'loss': 0.2099, 'learning_rate': 9.0208e-06, 'epoch': 2.13, 'throughput': 44.19} [INFO|2024-11-12 03:57:47] logging.py:157 >> {'loss': 0.1456, 'learning_rate': 4.2873e-06, 'epoch': 2.40, 'throughput': 44.18} [INFO|2024-11-12 04:10:11] logging.py:157 >> {'loss': 0.0777, 'learning_rate': 1.2018e-06, 'epoch': 2.67, 'throughput': 44.18} [INFO|2024-11-12 04:22:13] logging.py:157 >> {'loss': 0.0711, 'learning_rate': 1.0012e-08, 'epoch': 2.93, 'throughput': 44.18} [INFO|2024-11-12 04:23:24] trainer.py:3503 >> Saving model checkpoint to saves/Mistral-7B-Instruct-v0.3/lora/train_mistral/checkpoint-111 [INFO|2024-11-12 04:23:24] configuration_utils.py:733 >> loading configuration file config.json from cache at /root/.cache/huggingface/hub/models--mistralai--Mistral-7B-Instruct-v0.3/snapshots/e0bc86c23ce5aae1db576c8cca6f06f1f73af2db/config.json [INFO|2024-11-12 04:23:24] configuration_utils.py:800 >> Model config MistralConfig { "architectures": [ "MistralForCausalLM" ], "attention_dropout": 0.0, "bos_token_id": 1, "eos_token_id": 2, "head_dim": 128, "hidden_act": "silu", "hidden_size": 4096, "initializer_range": 0.02, "intermediate_size": 14336, "max_position_embeddings": 32768, "model_type": "mistral", "num_attention_heads": 32, "num_hidden_layers": 32, "num_key_value_heads": 8, "rms_norm_eps": 1e-05, "rope_theta": 1000000.0, "sliding_window": null, "tie_word_embeddings": false, "torch_dtype": "bfloat16", "transformers_version": "4.44.2", "use_cache": true, "vocab_size": 32768 } [INFO|2024-11-12 04:23:25] tokenization_utils_base.py:2684 >> tokenizer config file saved in saves/Mistral-7B-Instruct-v0.3/lora/train_mistral/checkpoint-111/tokenizer_config.json [INFO|2024-11-12 04:23:25] tokenization_utils_base.py:2693 >> Special tokens file saved in saves/Mistral-7B-Instruct-v0.3/lora/train_mistral/checkpoint-111/special_tokens_map.json [INFO|2024-11-12 04:23:25] trainer.py:2394 >> Training completed. Do not forget to share your model on huggingface.co/models =) [INFO|2024-11-12 04:23:25] trainer.py:3503 >> Saving model checkpoint to saves/Mistral-7B-Instruct-v0.3/lora/train_mistral [INFO|2024-11-12 04:23:26] configuration_utils.py:733 >> loading configuration file config.json from cache at /root/.cache/huggingface/hub/models--mistralai--Mistral-7B-Instruct-v0.3/snapshots/e0bc86c23ce5aae1db576c8cca6f06f1f73af2db/config.json [INFO|2024-11-12 04:23:26] configuration_utils.py:800 >> Model config MistralConfig { "architectures": [ "MistralForCausalLM" ], "attention_dropout": 0.0, "bos_token_id": 1, "eos_token_id": 2, "head_dim": 128, "hidden_act": "silu", "hidden_size": 4096, "initializer_range": 0.02, "intermediate_size": 14336, "max_position_embeddings": 32768, "model_type": "mistral", "num_attention_heads": 32, "num_hidden_layers": 32, "num_key_value_heads": 8, "rms_norm_eps": 1e-05, "rope_theta": 1000000.0, "sliding_window": null, "tie_word_embeddings": false, "torch_dtype": "bfloat16", "transformers_version": "4.44.2", "use_cache": true, "vocab_size": 32768 } [INFO|2024-11-12 04:23:26] tokenization_utils_base.py:2684 >> tokenizer config file saved in saves/Mistral-7B-Instruct-v0.3/lora/train_mistral/tokenizer_config.json [INFO|2024-11-12 04:23:26] tokenization_utils_base.py:2693 >> Special tokens file saved in saves/Mistral-7B-Instruct-v0.3/lora/train_mistral/special_tokens_map.json [WARNING|2024-11-12 04:23:26] logging.py:162 >> No metric eval_loss to plot. [WARNING|2024-11-12 04:23:26] logging.py:162 >> No metric eval_accuracy to plot. [INFO|2024-11-12 04:23:26] modelcard.py:449 >> Dropping the following result as it does not have all the necessary fields: {'task': {'name': 'Causal Language Modeling', 'type': 'text-generation'}} |