(mt564_env) (base) pareshmishra@pareshs-MacBook-Air modeltraining_scrapping % python train_mt564_model.py --model_name ./data/models/TinyLlama-1.1B-Chat-v1.0 --training_data ./data/processed/mt564_training_data.json --output_dir ./mt564_tinyllama_model 2025-05-14 10:58:12,819 - INFO - Created a temporary directory at /var/folders/mx/gkzn2cwj6ylcqhhpb78gycfh0000gn/T/tmpfzwxh107 2025-05-14 10:58:12,819 - INFO - Writing /var/folders/mx/gkzn2cwj6ylcqhhpb78gycfh0000gn/T/tmpfzwxh107/_remote_module_non_scriptable.py A module that was compiled using NumPy 1.x cannot be run in NumPy 2.2.5 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. Traceback (most recent call last): File "/Users/pareshmishra/Documents/wordpress_codes/replite code /modeltraining_datascraper/modeltraining_scrapping/train_mt564_model.py", line 211, in main() File "/Users/pareshmishra/Documents/wordpress_codes/replite code /modeltraining_datascraper/modeltraining_scrapping/train_mt564_model.py", line 94, in main from transformers import ( File "/Users/pareshmishra/Documents/wordpress_codes/replite code /modeltraining_datascraper/modeltraining_scrapping/mt564_env/lib/python3.11/site-packages/transformers/utils/import_utils.py", line 1076, in __getattr__ module = self._get_module(self._class_to_module[name]) File "/Users/pareshmishra/Documents/wordpress_codes/replite code /modeltraining_datascraper/modeltraining_scrapping/mt564_env/lib/python3.11/site-packages/transformers/utils/import_utils.py", line 1086, in _get_module return importlib.import_module("." + module_name, self.__name__) File "/Users/pareshmishra/anaconda3/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/Users/pareshmishra/Documents/wordpress_codes/replite code /modeltraining_datascraper/modeltraining_scrapping/mt564_env/lib/python3.11/site-packages/transformers/trainer.py", line 87, in from .trainer_pt_utils import ( File "/Users/pareshmishra/Documents/wordpress_codes/replite code /modeltraining_datascraper/modeltraining_scrapping/mt564_env/lib/python3.11/site-packages/transformers/trainer_pt_utils.py", line 211, in device: Optional[torch.device] = torch.device("cuda"), /Users/pareshmishra/Documents/wordpress_codes/replite code /modeltraining_datascraper/modeltraining_scrapping/mt564_env/lib/python3.11/site-packages/transformers/trainer_pt_utils.py:211: UserWarning: Failed to initialize NumPy: _ARRAY_API not found (Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/torch/csrc/utils/tensor_numpy.cpp:84.) device: Optional[torch.device] = torch.device("cuda"), 2025-05-14 10:58:13,398 - INFO - Loading training data from ./data/processed/mt564_training_data.json 2025-05-14 10:58:13,399 - INFO - Formatted 25 training examples 2025-05-14 10:58:13,409 - INFO - Loading tokenizer for ./data/models/TinyLlama-1.1B-Chat-v1.0 2025-05-14 10:58:13,450 - INFO - Tokenizing datasets 2025-05-14 10:58:13,507 - INFO - Loading model ./data/models/TinyLlama-1.1B-Chat-v1.0 Traceback (most recent call last): File "/Users/pareshmishra/Documents/wordpress_codes/replite code /modeltraining_datascraper/modeltraining_scrapping/train_mt564_model.py", line 211, in main() File "/Users/pareshmishra/Documents/wordpress_codes/replite code /modeltraining_datascraper/modeltraining_scrapping/train_mt564_model.py", line 158, in main model = AutoModelForCausalLM.from_pretrained( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/pareshmishra/Documents/wordpress_codes/replite code /modeltraining_datascraper/modeltraining_scrapping/mt564_env/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 484, in from_pretrained return model_class.from_pretrained( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/pareshmishra/Documents/wordpress_codes/replite code /modeltraining_datascraper/modeltraining_scrapping/mt564_env/lib/python3.11/site-packages/transformers/modeling_utils.py", line 2881, in from_pretrained ) = cls._load_pretrained_model( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/pareshmishra/Documents/wordpress_codes/replite code /modeltraining_datascraper/modeltraining_scrapping/mt564_env/lib/python3.11/site-packages/transformers/modeling_utils.py", line 3278, in _load_pretrained_model raise RuntimeError(f"Error(s) in loading state_dict for {model.__class__.__name__}:\n\t{error_msg}") RuntimeError: Error(s) in loading state_dict for LlamaForCausalLM: size mismatch for model.layers.0.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.0.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.1.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.1.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.2.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.2.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.3.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.3.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.4.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.4.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.5.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.5.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.6.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.6.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.7.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.7.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.8.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.8.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.9.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.9.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.10.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.10.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.11.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.11.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.12.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.12.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.13.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.13.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.14.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.14.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.15.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.15.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.16.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.16.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.17.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.17.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.18.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.18.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.19.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.19.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.20.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.20.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.21.self_attn.k_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). size mismatch for model.layers.21.self_attn.v_proj.weight: copying a param with shape torch.Size([256, 2048]) from checkpoint, the shape in current model is torch.Size([2048, 2048]). You may consider adding `ignore_mismatched_sizes=True` in the model `from_pretrained` method.