[WARNING|2024-12-09 14:11:23] logging.py:162 >> `ddp_find_unused_parameters` needs to be set as False for LoRA in DDP training. [INFO|2024-12-09 14:11:23] parser.py:355 >> Process rank: 0, device: cuda:0, n_gpu: 1, distributed training: True, compute dtype: torch.bfloat16 [INFO|2024-12-09 14:11:23] configuration_utils.py:679 >> loading configuration file config.json from cache at /home/ubuntu/.cache/huggingface/hub/models--meta-llama--Llama-3.2-1B/snapshots/4e20de362430cd3b72f300e6b0f18e50e7166e08/config.json [INFO|2024-12-09 14:11:23] configuration_utils.py:746 >> Model config LlamaConfig { "_name_or_path": "meta-llama/Llama-3.2-1B", "architectures": [ "LlamaForCausalLM" ], "attention_bias": false, "attention_dropout": 0.0, "bos_token_id": 128000, "eos_token_id": 128001, "head_dim": 64, "hidden_act": "silu", "hidden_size": 2048, "initializer_range": 0.02, "intermediate_size": 8192, "max_position_embeddings": 131072, "mlp_bias": false, "model_type": "llama", "num_attention_heads": 32, "num_hidden_layers": 16, "num_key_value_heads": 8, "pretraining_tp": 1, "rms_norm_eps": 1e-05, "rope_scaling": { "factor": 32.0, "high_freq_factor": 4.0, "low_freq_factor": 1.0, "original_max_position_embeddings": 8192, "rope_type": "llama3" }, "rope_theta": 500000.0, "tie_word_embeddings": true, "torch_dtype": "bfloat16", "transformers_version": "4.46.1", "use_cache": true, "vocab_size": 128256 } [INFO|2024-12-09 14:11:23] parser.py:355 >> Process rank: 1, device: cuda:1, n_gpu: 1, distributed training: True, compute dtype: torch.bfloat16 [INFO|2024-12-09 14:11:23] tokenization_utils_base.py:2211 >> loading file tokenizer.json from cache at /home/ubuntu/.cache/huggingface/hub/models--meta-llama--Llama-3.2-1B/snapshots/4e20de362430cd3b72f300e6b0f18e50e7166e08/tokenizer.json [INFO|2024-12-09 14:11:23] tokenization_utils_base.py:2211 >> loading file tokenizer.model from cache at None [INFO|2024-12-09 14:11:23] tokenization_utils_base.py:2211 >> loading file added_tokens.json from cache at None [INFO|2024-12-09 14:11:23] tokenization_utils_base.py:2211 >> loading file special_tokens_map.json from cache at /home/ubuntu/.cache/huggingface/hub/models--meta-llama--Llama-3.2-1B/snapshots/4e20de362430cd3b72f300e6b0f18e50e7166e08/special_tokens_map.json [INFO|2024-12-09 14:11:23] tokenization_utils_base.py:2211 >> loading file tokenizer_config.json from cache at /home/ubuntu/.cache/huggingface/hub/models--meta-llama--Llama-3.2-1B/snapshots/4e20de362430cd3b72f300e6b0f18e50e7166e08/tokenizer_config.json [INFO|2024-12-09 14:11:23] tokenization_utils_base.py:2475 >> Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained. [INFO|2024-12-09 14:11:24] configuration_utils.py:679 >> loading configuration file config.json from cache at /home/ubuntu/.cache/huggingface/hub/models--meta-llama--Llama-3.2-1B/snapshots/4e20de362430cd3b72f300e6b0f18e50e7166e08/config.json [INFO|2024-12-09 14:11:24] configuration_utils.py:746 >> Model config LlamaConfig { "_name_or_path": "meta-llama/Llama-3.2-1B", "architectures": [ "LlamaForCausalLM" ], "attention_bias": false, "attention_dropout": 0.0, "bos_token_id": 128000, "eos_token_id": 128001, "head_dim": 64, "hidden_act": "silu", "hidden_size": 2048, "initializer_range": 0.02, "intermediate_size": 8192, "max_position_embeddings": 131072, "mlp_bias": false, "model_type": "llama", "num_attention_heads": 32, "num_hidden_layers": 16, "num_key_value_heads": 8, "pretraining_tp": 1, "rms_norm_eps": 1e-05, "rope_scaling": { "factor": 32.0, "high_freq_factor": 4.0, "low_freq_factor": 1.0, "original_max_position_embeddings": 8192, "rope_type": "llama3" }, "rope_theta": 500000.0, "tie_word_embeddings": true, "torch_dtype": "bfloat16", "transformers_version": "4.46.1", "use_cache": true, "vocab_size": 128256 } [INFO|2024-12-09 14:11:24] tokenization_utils_base.py:2211 >> loading file tokenizer.json from cache at /home/ubuntu/.cache/huggingface/hub/models--meta-llama--Llama-3.2-1B/snapshots/4e20de362430cd3b72f300e6b0f18e50e7166e08/tokenizer.json [INFO|2024-12-09 14:11:24] tokenization_utils_base.py:2211 >> loading file tokenizer.model from cache at None [INFO|2024-12-09 14:11:24] tokenization_utils_base.py:2211 >> loading file added_tokens.json from cache at None [INFO|2024-12-09 14:11:24] tokenization_utils_base.py:2211 >> loading file special_tokens_map.json from cache at /home/ubuntu/.cache/huggingface/hub/models--meta-llama--Llama-3.2-1B/snapshots/4e20de362430cd3b72f300e6b0f18e50e7166e08/special_tokens_map.json [INFO|2024-12-09 14:11:24] tokenization_utils_base.py:2211 >> loading file tokenizer_config.json from cache at /home/ubuntu/.cache/huggingface/hub/models--meta-llama--Llama-3.2-1B/snapshots/4e20de362430cd3b72f300e6b0f18e50e7166e08/tokenizer_config.json [INFO|2024-12-09 14:11:25] tokenization_utils_base.py:2475 >> Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained. [INFO|2024-12-09 14:11:25] logging.py:157 >> Add pad token: <|end_of_text|> [INFO|2024-12-09 14:11:25] logging.py:157 >> Loading dataset suolyer/webqa... [INFO|2024-12-09 14:11:28] configuration_utils.py:679 >> loading configuration file config.json from cache at /home/ubuntu/.cache/huggingface/hub/models--meta-llama--Llama-3.2-1B/snapshots/4e20de362430cd3b72f300e6b0f18e50e7166e08/config.json [INFO|2024-12-09 14:11:28] configuration_utils.py:746 >> Model config LlamaConfig { "_name_or_path": "meta-llama/Llama-3.2-1B", "architectures": [ "LlamaForCausalLM" ], "attention_bias": false, "attention_dropout": 0.0, "bos_token_id": 128000, "eos_token_id": 128001, "head_dim": 64, "hidden_act": "silu", "hidden_size": 2048, "initializer_range": 0.02, "intermediate_size": 8192, "max_position_embeddings": 131072, "mlp_bias": false, "model_type": "llama", "num_attention_heads": 32, "num_hidden_layers": 16, "num_key_value_heads": 8, "pretraining_tp": 1, "rms_norm_eps": 1e-05, "rope_scaling": { "factor": 32.0, "high_freq_factor": 4.0, "low_freq_factor": 1.0, "original_max_position_embeddings": 8192, "rope_type": "llama3" }, "rope_theta": 500000.0, "tie_word_embeddings": true, "torch_dtype": "bfloat16", "transformers_version": "4.46.1", "use_cache": true, "vocab_size": 128256 } [INFO|2024-12-09 14:11:28] modeling_utils.py:3937 >> loading weights file model.safetensors from cache at /home/ubuntu/.cache/huggingface/hub/models--meta-llama--Llama-3.2-1B/snapshots/4e20de362430cd3b72f300e6b0f18e50e7166e08/model.safetensors [INFO|2024-12-09 14:11:28] modeling_utils.py:1670 >> Instantiating LlamaForCausalLM model under default dtype torch.bfloat16. [INFO|2024-12-09 14:11:28] configuration_utils.py:1096 >> Generate config GenerationConfig { "bos_token_id": 128000, "eos_token_id": 128001 } [INFO|2024-12-09 14:11:29] modeling_utils.py:4800 >> All model checkpoint weights were used when initializing LlamaForCausalLM. [INFO|2024-12-09 14:11:29] modeling_utils.py:4808 >> All the weights of LlamaForCausalLM were initialized from the model checkpoint at meta-llama/Llama-3.2-1B. If your task is similar to the task the model of the checkpoint was trained on, you can already use LlamaForCausalLM for predictions without further training. [INFO|2024-12-09 14:11:29] configuration_utils.py:1051 >> loading configuration file generation_config.json from cache at /home/ubuntu/.cache/huggingface/hub/models--meta-llama--Llama-3.2-1B/snapshots/4e20de362430cd3b72f300e6b0f18e50e7166e08/generation_config.json [INFO|2024-12-09 14:11:29] configuration_utils.py:1096 >> Generate config GenerationConfig { "bos_token_id": 128000, "do_sample": true, "eos_token_id": 128001, "temperature": 0.6, "top_p": 0.9 } [INFO|2024-12-09 14:11:29] logging.py:157 >> Gradient checkpointing enabled. [INFO|2024-12-09 14:11:29] logging.py:157 >> Using torch SDPA for faster training and inference. [INFO|2024-12-09 14:11:29] logging.py:157 >> Upcasting trainable params to float32. [INFO|2024-12-09 14:11:29] logging.py:157 >> Fine-tuning method: LoRA [INFO|2024-12-09 14:11:29] logging.py:157 >> Found linear modules: o_proj,v_proj,up_proj,gate_proj,k_proj,down_proj,q_proj [INFO|2024-12-09 14:11:30] logging.py:157 >> trainable params: 5,636,096 || all params: 1,241,450,496 || trainable%: 0.4540 [INFO|2024-12-09 14:11:30] trainer.py:698 >> Using auto half precision backend [INFO|2024-12-09 14:11:30] trainer.py:2313 >> ***** Running training ***** [INFO|2024-12-09 14:11:30] trainer.py:2314 >> Num examples = 1,000 [INFO|2024-12-09 14:11:30] trainer.py:2315 >> Num Epochs = 5 [INFO|2024-12-09 14:11:30] trainer.py:2316 >> Instantaneous batch size per device = 2 [INFO|2024-12-09 14:11:30] trainer.py:2319 >> Total train batch size (w. parallel, distributed & accumulation) = 32 [INFO|2024-12-09 14:11:30] trainer.py:2320 >> Gradient Accumulation steps = 8 [INFO|2024-12-09 14:11:30] trainer.py:2321 >> Total optimization steps = 155 [INFO|2024-12-09 14:11:30] trainer.py:2322 >> Number of trainable parameters = 5,636,096 [INFO|2024-12-09 14:11:39] logging.py:157 >> {'loss': 2.9250, 'learning_rate': 9.9743e-05, 'epoch': 0.16} [INFO|2024-12-09 14:11:46] logging.py:157 >> {'loss': 2.7462, 'learning_rate': 9.8976e-05, 'epoch': 0.32} [INFO|2024-12-09 14:11:54] logging.py:157 >> {'loss': 2.9067, 'learning_rate': 9.7707e-05, 'epoch': 0.48} [INFO|2024-12-09 14:12:01] logging.py:157 >> {'loss': 2.8049, 'learning_rate': 9.5948e-05, 'epoch': 0.64} [INFO|2024-12-09 14:12:09] logging.py:157 >> {'loss': 2.6850, 'learning_rate': 9.3717e-05, 'epoch': 0.80} [INFO|2024-12-09 14:12:16] logging.py:157 >> {'loss': 2.7778, 'learning_rate': 9.1038e-05, 'epoch': 0.96} [INFO|2024-12-09 14:12:24] logging.py:157 >> {'loss': 3.1392, 'learning_rate': 8.7938e-05, 'epoch': 1.12} [INFO|2024-12-09 14:12:31] logging.py:157 >> {'loss': 2.6608, 'learning_rate': 8.4448e-05, 'epoch': 1.28} [INFO|2024-12-09 14:12:39] logging.py:157 >> {'loss': 2.5628, 'learning_rate': 8.0605e-05, 'epoch': 1.44} [INFO|2024-12-09 14:12:46] logging.py:157 >> {'loss': 2.6419, 'learning_rate': 7.6448e-05, 'epoch': 1.60} [INFO|2024-12-09 14:12:53] logging.py:157 >> {'loss': 2.6576, 'learning_rate': 7.2020e-05, 'epoch': 1.76} [INFO|2024-12-09 14:13:01] logging.py:157 >> {'loss': 2.5430, 'learning_rate': 6.7365e-05, 'epoch': 1.92} [INFO|2024-12-09 14:13:08] logging.py:157 >> {'loss': 2.8679, 'learning_rate': 6.2533e-05, 'epoch': 2.08} [INFO|2024-12-09 14:13:16] logging.py:157 >> {'loss': 2.7203, 'learning_rate': 5.7571e-05, 'epoch': 2.24} [INFO|2024-12-09 14:13:23] logging.py:157 >> {'loss': 2.4599, 'learning_rate': 5.2532e-05, 'epoch': 2.40} [INFO|2024-12-09 14:13:31] logging.py:157 >> {'loss': 2.5374, 'learning_rate': 4.7468e-05, 'epoch': 2.56} [INFO|2024-12-09 14:13:38] logging.py:157 >> {'loss': 2.4875, 'learning_rate': 4.2429e-05, 'epoch': 2.72} [INFO|2024-12-09 14:13:46] logging.py:157 >> {'loss': 2.4783, 'learning_rate': 3.7467e-05, 'epoch': 2.88} [INFO|2024-12-09 14:13:53] logging.py:157 >> {'loss': 3.0474, 'learning_rate': 3.2635e-05, 'epoch': 3.04} [INFO|2024-12-09 14:14:00] logging.py:157 >> {'loss': 2.4936, 'learning_rate': 2.7980e-05, 'epoch': 3.20} [INFO|2024-12-09 14:14:00] trainer.py:3801 >> Saving model checkpoint to saves/Llama-3.2-1B/lora/train_2024-12-09-14-10-7722/checkpoint-100 [INFO|2024-12-09 14:14:01] tokenization_utils_base.py:2646 >> tokenizer config file saved in saves/Llama-3.2-1B/lora/train_2024-12-09-14-10-7722/checkpoint-100/tokenizer_config.json [INFO|2024-12-09 14:14:01] tokenization_utils_base.py:2655 >> Special tokens file saved in saves/Llama-3.2-1B/lora/train_2024-12-09-14-10-7722/checkpoint-100/special_tokens_map.json [INFO|2024-12-09 14:14:08] logging.py:157 >> {'loss': 2.4349, 'learning_rate': 2.3552e-05, 'epoch': 3.36} [INFO|2024-12-09 14:14:16] logging.py:157 >> {'loss': 2.4273, 'learning_rate': 1.9395e-05, 'epoch': 3.52} [INFO|2024-12-09 14:14:23] logging.py:157 >> {'loss': 2.4853, 'learning_rate': 1.5552e-05, 'epoch': 3.68} [INFO|2024-12-09 14:14:31] logging.py:157 >> {'loss': 2.5172, 'learning_rate': 1.2062e-05, 'epoch': 3.84} [INFO|2024-12-09 14:14:38] logging.py:157 >> {'loss': 2.7762, 'learning_rate': 8.9618e-06, 'epoch': 4.00} [INFO|2024-12-09 14:14:46] logging.py:157 >> {'loss': 2.4752, 'learning_rate': 6.2827e-06, 'epoch': 4.16} [INFO|2024-12-09 14:14:53] logging.py:157 >> {'loss': 2.3714, 'learning_rate': 4.0521e-06, 'epoch': 4.32} [INFO|2024-12-09 14:15:01] logging.py:157 >> {'loss': 2.5153, 'learning_rate': 2.2930e-06, 'epoch': 4.48} [INFO|2024-12-09 14:15:08] logging.py:157 >> {'loss': 2.4999, 'learning_rate': 1.0235e-06, 'epoch': 4.64} [INFO|2024-12-09 14:15:15] logging.py:157 >> {'loss': 2.3872, 'learning_rate': 2.5653e-07, 'epoch': 4.80} [INFO|2024-12-09 14:15:23] logging.py:157 >> {'loss': 2.4085, 'learning_rate': 0.0000e+00, 'epoch': 4.96} [INFO|2024-12-09 14:15:23] trainer.py:3801 >> Saving model checkpoint to saves/Llama-3.2-1B/lora/train_2024-12-09-14-10-7722/checkpoint-155 [INFO|2024-12-09 14:15:23] tokenization_utils_base.py:2646 >> tokenizer config file saved in saves/Llama-3.2-1B/lora/train_2024-12-09-14-10-7722/checkpoint-155/tokenizer_config.json [INFO|2024-12-09 14:15:23] tokenization_utils_base.py:2655 >> Special tokens file saved in saves/Llama-3.2-1B/lora/train_2024-12-09-14-10-7722/checkpoint-155/special_tokens_map.json [INFO|2024-12-09 14:15:23] trainer.py:2584 >> Training completed. Do not forget to share your model on huggingface.co/models =) [INFO|2024-12-09 14:15:23] trainer.py:3801 >> Saving model checkpoint to saves/Llama-3.2-1B/lora/train_2024-12-09-14-10-7722 [INFO|2024-12-09 14:15:23] tokenization_utils_base.py:2646 >> tokenizer config file saved in saves/Llama-3.2-1B/lora/train_2024-12-09-14-10-7722/tokenizer_config.json [INFO|2024-12-09 14:15:23] tokenization_utils_base.py:2655 >> Special tokens file saved in saves/Llama-3.2-1B/lora/train_2024-12-09-14-10-7722/special_tokens_map.json [WARNING|2024-12-09 14:15:24] logging.py:162 >> No metric eval_loss to plot. [WARNING|2024-12-09 14:15:24] logging.py:162 >> No metric eval_accuracy to plot. [INFO|2024-12-09 14:15:24] modelcard.py:449 >> Dropping the following result as it does not have all the necessary fields: {'task': {'name': 'Causal Language Modeling', 'type': 'text-generation'}}