Gemma2-9B-Finetune-RDE / running_log.txt
SamChen888's picture
Upload folder using huggingface_hub
8bdd23a verified
[WARNING|2024-11-12 05:01:57] logging.py:162 >> We recommend enable `upcast_layernorm` in quantized training.
[INFO|2024-11-12 05:01:57] parser.py:355 >> Process rank: 0, device: cuda:0, n_gpu: 1, distributed training: False, compute dtype: torch.bfloat16
[INFO|2024-11-12 05:01:57] configuration_utils.py:733 >> loading configuration file config.json from cache at /root/.cache/huggingface/hub/models--google--gemma-2-9b-it/snapshots/11c9b309abf73637e4b6f9a3fa1e92e615547819/config.json
[INFO|2024-11-12 05:01:57] configuration_utils.py:800 >> Model config Gemma2Config {
"_name_or_path": "google/gemma-2-9b-it",
"architectures": [
"Gemma2ForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"attn_logit_softcapping": 50.0,
"bos_token_id": 2,
"cache_implementation": "hybrid",
"eos_token_id": 1,
"final_logit_softcapping": 30.0,
"head_dim": 256,
"hidden_act": "gelu_pytorch_tanh",
"hidden_activation": "gelu_pytorch_tanh",
"hidden_size": 3584,
"initializer_range": 0.02,
"intermediate_size": 14336,
"max_position_embeddings": 8192,
"model_type": "gemma2",
"num_attention_heads": 16,
"num_hidden_layers": 42,
"num_key_value_heads": 8,
"pad_token_id": 0,
"query_pre_attn_scalar": 256,
"rms_norm_eps": 1e-06,
"rope_theta": 10000.0,
"sliding_window": 4096,
"sliding_window_size": 4096,
"torch_dtype": "bfloat16",
"transformers_version": "4.44.2",
"use_cache": true,
"vocab_size": 256000
}
[INFO|2024-11-12 05:02:00] tokenization_utils_base.py:2269 >> loading file tokenizer.model from cache at /root/.cache/huggingface/hub/models--google--gemma-2-9b-it/snapshots/11c9b309abf73637e4b6f9a3fa1e92e615547819/tokenizer.model
[INFO|2024-11-12 05:02:00] tokenization_utils_base.py:2269 >> loading file tokenizer.json from cache at /root/.cache/huggingface/hub/models--google--gemma-2-9b-it/snapshots/11c9b309abf73637e4b6f9a3fa1e92e615547819/tokenizer.json
[INFO|2024-11-12 05:02:00] tokenization_utils_base.py:2269 >> loading file added_tokens.json from cache at None
[INFO|2024-11-12 05:02:00] tokenization_utils_base.py:2269 >> loading file special_tokens_map.json from cache at /root/.cache/huggingface/hub/models--google--gemma-2-9b-it/snapshots/11c9b309abf73637e4b6f9a3fa1e92e615547819/special_tokens_map.json
[INFO|2024-11-12 05:02:00] tokenization_utils_base.py:2269 >> loading file tokenizer_config.json from cache at /root/.cache/huggingface/hub/models--google--gemma-2-9b-it/snapshots/11c9b309abf73637e4b6f9a3fa1e92e615547819/tokenizer_config.json
[INFO|2024-11-12 05:02:02] configuration_utils.py:733 >> loading configuration file config.json from cache at /root/.cache/huggingface/hub/models--google--gemma-2-9b-it/snapshots/11c9b309abf73637e4b6f9a3fa1e92e615547819/config.json
[INFO|2024-11-12 05:02:02] configuration_utils.py:800 >> Model config Gemma2Config {
"_name_or_path": "google/gemma-2-9b-it",
"architectures": [
"Gemma2ForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"attn_logit_softcapping": 50.0,
"bos_token_id": 2,
"cache_implementation": "hybrid",
"eos_token_id": 1,
"final_logit_softcapping": 30.0,
"head_dim": 256,
"hidden_act": "gelu_pytorch_tanh",
"hidden_activation": "gelu_pytorch_tanh",
"hidden_size": 3584,
"initializer_range": 0.02,
"intermediate_size": 14336,
"max_position_embeddings": 8192,
"model_type": "gemma2",
"num_attention_heads": 16,
"num_hidden_layers": 42,
"num_key_value_heads": 8,
"pad_token_id": 0,
"query_pre_attn_scalar": 256,
"rms_norm_eps": 1e-06,
"rope_theta": 10000.0,
"sliding_window": 4096,
"sliding_window_size": 4096,
"torch_dtype": "bfloat16",
"transformers_version": "4.44.2",
"use_cache": true,
"vocab_size": 256000
}
[INFO|2024-11-12 05:02:02] tokenization_utils_base.py:2269 >> loading file tokenizer.model from cache at /root/.cache/huggingface/hub/models--google--gemma-2-9b-it/snapshots/11c9b309abf73637e4b6f9a3fa1e92e615547819/tokenizer.model
[INFO|2024-11-12 05:02:02] tokenization_utils_base.py:2269 >> loading file tokenizer.json from cache at /root/.cache/huggingface/hub/models--google--gemma-2-9b-it/snapshots/11c9b309abf73637e4b6f9a3fa1e92e615547819/tokenizer.json
[INFO|2024-11-12 05:02:02] tokenization_utils_base.py:2269 >> loading file added_tokens.json from cache at None
[INFO|2024-11-12 05:02:02] tokenization_utils_base.py:2269 >> loading file special_tokens_map.json from cache at /root/.cache/huggingface/hub/models--google--gemma-2-9b-it/snapshots/11c9b309abf73637e4b6f9a3fa1e92e615547819/special_tokens_map.json
[INFO|2024-11-12 05:02:02] tokenization_utils_base.py:2269 >> loading file tokenizer_config.json from cache at /root/.cache/huggingface/hub/models--google--gemma-2-9b-it/snapshots/11c9b309abf73637e4b6f9a3fa1e92e615547819/tokenizer_config.json
[INFO|2024-11-12 05:02:03] logging.py:157 >> Loading dataset treino_pt_rde.json...
[INFO|2024-11-12 05:02:37] configuration_utils.py:733 >> loading configuration file config.json from cache at /root/.cache/huggingface/hub/models--google--gemma-2-9b-it/snapshots/11c9b309abf73637e4b6f9a3fa1e92e615547819/config.json
[INFO|2024-11-12 05:02:37] configuration_utils.py:800 >> Model config Gemma2Config {
"_name_or_path": "google/gemma-2-9b-it",
"architectures": [
"Gemma2ForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"attn_logit_softcapping": 50.0,
"bos_token_id": 2,
"cache_implementation": "hybrid",
"eos_token_id": 1,
"final_logit_softcapping": 30.0,
"head_dim": 256,
"hidden_act": "gelu_pytorch_tanh",
"hidden_activation": "gelu_pytorch_tanh",
"hidden_size": 3584,
"initializer_range": 0.02,
"intermediate_size": 14336,
"max_position_embeddings": 8192,
"model_type": "gemma2",
"num_attention_heads": 16,
"num_hidden_layers": 42,
"num_key_value_heads": 8,
"pad_token_id": 0,
"query_pre_attn_scalar": 256,
"rms_norm_eps": 1e-06,
"rope_theta": 10000.0,
"sliding_window": 4096,
"sliding_window_size": 4096,
"torch_dtype": "bfloat16",
"transformers_version": "4.44.2",
"use_cache": true,
"vocab_size": 256000
}
[WARNING|2024-11-12 05:02:37] logging.py:162 >> FlashAttention-2 is not installed, use eager attention.
[INFO|2024-11-12 05:02:37] logging.py:157 >> Quantizing model to 4 bit with bitsandbytes.
[INFO|2024-11-12 05:02:37] modeling_utils.py:3678 >> loading weights file model.safetensors from cache at /root/.cache/huggingface/hub/models--google--gemma-2-9b-it/snapshots/11c9b309abf73637e4b6f9a3fa1e92e615547819/model.safetensors.index.json
[INFO|2024-11-12 05:09:58] modeling_utils.py:1606 >> Instantiating Gemma2ForCausalLM model under default dtype torch.bfloat16.
[INFO|2024-11-12 05:09:58] configuration_utils.py:1038 >> Generate config GenerationConfig {
"bos_token_id": 2,
"cache_implementation": "hybrid",
"eos_token_id": 1,
"pad_token_id": 0
}
[INFO|2024-11-12 05:11:28] modeling_utils.py:4507 >> All model checkpoint weights were used when initializing Gemma2ForCausalLM.
[INFO|2024-11-12 05:11:28] modeling_utils.py:4515 >> All the weights of Gemma2ForCausalLM were initialized from the model checkpoint at google/gemma-2-9b-it.
If your task is similar to the task the model of the checkpoint was trained on, you can already use Gemma2ForCausalLM for predictions without further training.
[INFO|2024-11-12 05:11:28] configuration_utils.py:993 >> loading configuration file generation_config.json from cache at /root/.cache/huggingface/hub/models--google--gemma-2-9b-it/snapshots/11c9b309abf73637e4b6f9a3fa1e92e615547819/generation_config.json
[INFO|2024-11-12 05:11:28] configuration_utils.py:1038 >> Generate config GenerationConfig {
"bos_token_id": 2,
"cache_implementation": "hybrid",
"eos_token_id": 1,
"pad_token_id": 0
}
[INFO|2024-11-12 05:11:29] logging.py:157 >> Gradient checkpointing enabled.
[INFO|2024-11-12 05:11:29] logging.py:157 >> Using vanilla attention implementation.
[INFO|2024-11-12 05:11:29] logging.py:157 >> Upcasting trainable params to float32.
[INFO|2024-11-12 05:11:29] logging.py:157 >> Fine-tuning method: LoRA
[INFO|2024-11-12 05:11:29] logging.py:157 >> Found linear modules: up_proj,v_proj,k_proj,o_proj,down_proj,q_proj,gate_proj
[INFO|2024-11-12 05:11:29] logging.py:157 >> trainable params: 27,009,024 || all params: 9,268,715,008 || trainable%: 0.2914
[INFO|2024-11-12 05:11:29] trainer.py:648 >> Using auto half precision backend
[INFO|2024-11-12 05:11:30] trainer.py:2134 >> ***** Running training *****
[INFO|2024-11-12 05:11:30] trainer.py:2135 >> Num examples = 300
[INFO|2024-11-12 05:11:30] trainer.py:2136 >> Num Epochs = 3
[INFO|2024-11-12 05:11:30] trainer.py:2137 >> Instantaneous batch size per device = 2
[INFO|2024-11-12 05:11:30] trainer.py:2140 >> Total train batch size (w. parallel, distributed & accumulation) = 8
[INFO|2024-11-12 05:11:30] trainer.py:2141 >> Gradient Accumulation steps = 4
[INFO|2024-11-12 05:11:30] trainer.py:2142 >> Total optimization steps = 111
[INFO|2024-11-12 05:11:30] trainer.py:2143 >> Number of trainable parameters = 27,009,024
[INFO|2024-11-12 05:22:57] logging.py:157 >> {'loss': 1.9494, 'learning_rate': 4.9005e-05, 'epoch': 0.27, 'throughput': 33.83}
[INFO|2024-11-12 05:34:08] logging.py:157 >> {'loss': 0.3681, 'learning_rate': 4.6101e-05, 'epoch': 0.53, 'throughput': 33.79}
[INFO|2024-11-12 05:45:21] logging.py:157 >> {'loss': 0.4155, 'learning_rate': 4.1517e-05, 'epoch': 0.80, 'throughput': 33.72}
[INFO|2024-11-12 05:56:21] logging.py:157 >> {'loss': 0.3174, 'learning_rate': 3.5619e-05, 'epoch': 1.07, 'throughput': 33.71}
[INFO|2024-11-12 06:07:30] logging.py:157 >> {'loss': 0.2294, 'learning_rate': 2.8876e-05, 'epoch': 1.33, 'throughput': 33.75}
[INFO|2024-11-12 06:18:44] logging.py:157 >> {'loss': 0.2442, 'learning_rate': 2.1825e-05, 'epoch': 1.60, 'throughput': 33.76}
[INFO|2024-11-12 06:29:58] logging.py:157 >> {'loss': 0.3141, 'learning_rate': 1.5026e-05, 'epoch': 1.87, 'throughput': 33.77}
[INFO|2024-11-12 06:41:10] logging.py:157 >> {'loss': 0.1918, 'learning_rate': 9.0208e-06, 'epoch': 2.13, 'throughput': 33.79}
[INFO|2024-11-12 06:52:18] logging.py:157 >> {'loss': 0.1719, 'learning_rate': 4.2873e-06, 'epoch': 2.40, 'throughput': 33.78}
[INFO|2024-11-12 07:03:38] logging.py:157 >> {'loss': 0.1387, 'learning_rate': 1.2018e-06, 'epoch': 2.67, 'throughput': 33.80}
[INFO|2024-11-12 07:14:44] logging.py:157 >> {'loss': 0.1394, 'learning_rate': 1.0012e-08, 'epoch': 2.93, 'throughput': 33.79}
[INFO|2024-11-12 07:15:51] trainer.py:3503 >> Saving model checkpoint to saves/Gemma-2-9B-Instruct/lora/train_gemma2/checkpoint-111
[INFO|2024-11-12 07:15:51] configuration_utils.py:733 >> loading configuration file config.json from cache at /root/.cache/huggingface/hub/models--google--gemma-2-9b-it/snapshots/11c9b309abf73637e4b6f9a3fa1e92e615547819/config.json
[INFO|2024-11-12 07:15:51] configuration_utils.py:800 >> Model config Gemma2Config {
"architectures": [
"Gemma2ForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"attn_logit_softcapping": 50.0,
"bos_token_id": 2,
"cache_implementation": "hybrid",
"eos_token_id": 1,
"final_logit_softcapping": 30.0,
"head_dim": 256,
"hidden_act": "gelu_pytorch_tanh",
"hidden_activation": "gelu_pytorch_tanh",
"hidden_size": 3584,
"initializer_range": 0.02,
"intermediate_size": 14336,
"max_position_embeddings": 8192,
"model_type": "gemma2",
"num_attention_heads": 16,
"num_hidden_layers": 42,
"num_key_value_heads": 8,
"pad_token_id": 0,
"query_pre_attn_scalar": 256,
"rms_norm_eps": 1e-06,
"rope_theta": 10000.0,
"sliding_window": 4096,
"sliding_window_size": 4096,
"torch_dtype": "bfloat16",
"transformers_version": "4.44.2",
"use_cache": true,
"vocab_size": 256000
}
[INFO|2024-11-12 07:15:52] tokenization_utils_base.py:2684 >> tokenizer config file saved in saves/Gemma-2-9B-Instruct/lora/train_gemma2/checkpoint-111/tokenizer_config.json
[INFO|2024-11-12 07:15:52] tokenization_utils_base.py:2693 >> Special tokens file saved in saves/Gemma-2-9B-Instruct/lora/train_gemma2/checkpoint-111/special_tokens_map.json
[INFO|2024-11-12 07:15:58] trainer.py:2394 >>
Training completed. Do not forget to share your model on huggingface.co/models =)
[INFO|2024-11-12 07:15:58] trainer.py:3503 >> Saving model checkpoint to saves/Gemma-2-9B-Instruct/lora/train_gemma2
[INFO|2024-11-12 07:15:58] configuration_utils.py:733 >> loading configuration file config.json from cache at /root/.cache/huggingface/hub/models--google--gemma-2-9b-it/snapshots/11c9b309abf73637e4b6f9a3fa1e92e615547819/config.json
[INFO|2024-11-12 07:15:58] configuration_utils.py:800 >> Model config Gemma2Config {
"architectures": [
"Gemma2ForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"attn_logit_softcapping": 50.0,
"bos_token_id": 2,
"cache_implementation": "hybrid",
"eos_token_id": 1,
"final_logit_softcapping": 30.0,
"head_dim": 256,
"hidden_act": "gelu_pytorch_tanh",
"hidden_activation": "gelu_pytorch_tanh",
"hidden_size": 3584,
"initializer_range": 0.02,
"intermediate_size": 14336,
"max_position_embeddings": 8192,
"model_type": "gemma2",
"num_attention_heads": 16,
"num_hidden_layers": 42,
"num_key_value_heads": 8,
"pad_token_id": 0,
"query_pre_attn_scalar": 256,
"rms_norm_eps": 1e-06,
"rope_theta": 10000.0,
"sliding_window": 4096,
"sliding_window_size": 4096,
"torch_dtype": "bfloat16",
"transformers_version": "4.44.2",
"use_cache": true,
"vocab_size": 256000
}
[INFO|2024-11-12 07:15:59] tokenization_utils_base.py:2684 >> tokenizer config file saved in saves/Gemma-2-9B-Instruct/lora/train_gemma2/tokenizer_config.json
[INFO|2024-11-12 07:15:59] tokenization_utils_base.py:2693 >> Special tokens file saved in saves/Gemma-2-9B-Instruct/lora/train_gemma2/special_tokens_map.json
[WARNING|2024-11-12 07:16:00] logging.py:162 >> No metric eval_loss to plot.
[WARNING|2024-11-12 07:16:00] logging.py:162 >> No metric eval_accuracy to plot.
[INFO|2024-11-12 07:16:00] modelcard.py:449 >> Dropping the following result as it does not have all the necessary fields:
{'task': {'name': 'Causal Language Modeling', 'type': 'text-generation'}}