https://huggingface.co/spaces/Chintan-Shah/MyMultiModalExperiment
D:\Chintan\OneDrive\Workspace\ERAv2\MultiModal_FineTuning>python QLora_FineTuning_Phi3_C1.py
C:\Users\Trial\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\tokenization_utils_base.py:1601: FutureWarning: `clean_up_tokenization_spaces` was not set. It will be set to `True` by default. This behavior will be depracted in transformers v4.45, and will be then set to `False` by default. For more details check this issue: https://github.com/huggingface/transformers/issues/31884
warnings.warn(
`flash-attention` package not found, consider installing for better performance: No module named 'flash_attn'.
Current `flash-attention` does not support `window_size`. Either upgrade or use `attn_implementation='eager'`.
`low_cpu_mem_usage` was None, now set to True since model is quantized.
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:18<00:00, 9.13s/it]
[nltk_data] Downloading package stopwords to
[nltk_data] C:\Users\Trial\AppData\Roaming\nltk_data...
[nltk_data] Package stopwords is already up-to-date!
[nltk_data] Downloading package punkt to
[nltk_data] C:\Users\Trial\AppData\Roaming\nltk_data...
[nltk_data] Package punkt is already up-to-date!
[nltk_data] Downloading package punkt_tab to
[nltk_data] C:\Users\Trial\AppData\Roaming\nltk_data...
[nltk_data] Package punkt_tab is already up-to-date!
Trainable parameters: 111,680,512
All parameters: 2,120,820,736
Percentage of trainable parameters: 5.27%
max_steps is given, it will override any value given in num_train_epochs
0%| | 0/6000 [00:00<?, ?it/s]You are not running the flash-attention implementation, expect numerical differences.
C:\Users\Trial\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\utils\checkpoint.py:295: FutureWarning: `torch.cpu.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cpu', args...)` instead.
with torch.enable_grad(), device_autocast_ctx, torch.cpu.amp.autocast(**ctx.cpu_autocast_kwargs): # type: ignore[attr-defined]
Could not estimate the number of tokens of the input, floating-point operations will not be computed
{'loss': 4.2947, 'grad_norm': 1.6839556694030762, 'learning_rate': 4.5e-05, 'epoch': 0.01}
{'loss': 3.2241, 'grad_norm': 1.8457916975021362, 'learning_rate': 4e-05, 'epoch': 0.03}
{'loss': 3.0872, 'grad_norm': 1.8399261236190796, 'learning_rate': 3.5e-05, 'epoch': 0.04}
{'loss': 2.9852, 'grad_norm': 1.998960256576538, 'learning_rate': 3e-05, 'epoch': 0.06}
40%|█████████████████████████████████████████████▌ | 2400/6000 [41:55<55:32, 1.08it/s]C:\Users\Trial\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\utils\checkpoint.py:295: FutureWarning: `torch.cpu.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cpu', args...)` instead.
with torch.enable_grad(), device_autocast_ctx, torch.cpu.amp.autocast(**ctx.cpu_autocast_kwargs): # type: ignore[attr-defined]
{'loss': 2.9303, 'grad_norm': 1.5595556497573853, 'learning_rate': 2.5e-05, 'epoch': 0.07}
{'loss': 2.8839, 'grad_norm': 2.708310604095459, 'learning_rate': 2e-05, 'epoch': 0.09}
{'loss': 2.8794, 'grad_norm': 2.0087153911590576, 'learning_rate': 1.5e-05, 'epoch': 0.1}
{'loss': 2.8551, 'grad_norm': 1.93650221824646, 'learning_rate': 1e-05, 'epoch': 0.12}
80%|█████████████████████████████████████████████████████████████████████████████████████████▌ | 4800/6000 [1:18:20<17:53, 1.12it/s]C:\Users\Trial\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\utils\checkpoint.py:295: FutureWarning: `torch.cpu.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cpu', args...)` instead.
with torch.enable_grad(), device_autocast_ctx, torch.cpu.amp.autocast(**ctx.cpu_autocast_kwargs): # type: ignore[attr-defined]
{'loss': 2.8151, 'grad_norm': 2.461733818054199, 'learning_rate': 5e-06, 'epoch': 0.13}
{'loss': 2.8189, 'grad_norm': 2.3669679164886475, 'learning_rate': 0.0, 'epoch': 0.15}
{'train_runtime': 5801.282, 'train_samples_per_second': 2.069, 'train_steps_per_second': 1.034, 'train_loss': 3.0773943888346356, 'epoch': 0.15}
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6000/6000 [1:36:41<00:00, 1.03it/s]
projector_state_dict = torch.load(projector_path, map_location=phi_model.device)
Loaded projector with input_dim=512, output_dim=3072
Trainable parameters: 111,680,512
All parameters: 3,932,760,064
Percentage of trainable parameters: 2.84%
max_steps is given, it will override any value given in num_train_epochs
0%| | 0/6000 [00:00<?, ?it/s]`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`...
You are not running the flash-attention implementation, expect numerical differences.
C:\Users\Trial\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\utils\checkpoint.py:295: FutureWarning: `torch.cpu.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cpu', args...)` instead.
with torch.enable_grad(), device_autocast_ctx, torch.cpu.amp.autocast(**ctx.cpu_autocast_kwargs): # type: ignore[attr-defined]
Could not estimate the number of tokens of the input, floating-point operations will not be computed
{'loss': 2.8158, 'grad_norm': 0.5202670693397522, 'learning_rate': 4.5e-05, 'epoch': 0.01}
{'loss': 2.7849, 'grad_norm': 0.9820236563682556, 'learning_rate': 4e-05, 'epoch': 0.03}
{'loss': 2.7731, 'grad_norm': 0.4473443627357483, 'learning_rate': 3.5e-05, 'epoch': 0.04}
{'loss': 2.7528, 'grad_norm': 0.39497828483581543, 'learning_rate': 3e-05, 'epoch': 0.06}
{'loss': 2.7371, 'grad_norm': 0.5294825434684753, 'learning_rate': 2.5e-05, 'epoch': 0.07}
50%|████████████████████████████████████████████████████████ | 3000/6000 [2:28:35<47:34, 1.05it/s]C:\Users\Trial\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\utils\checkpoint.py:295: FutureWarning: `torch.cpu.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cpu', args...)` instead.
with torch.enable_grad(), device_autocast_ctx, torch.cpu.amp.autocast(**ctx.cpu_autocast_kwargs): # type: ignore[attr-defined]
{'loss': 2.7332, 'grad_norm': 0.7306874990463257, 'learning_rate': 2e-05, 'epoch': 0.09}
{'loss': 2.7198, 'grad_norm': 0.5060272812843323, 'learning_rate': 1.5e-05, 'epoch': 0.1}
{'loss': 2.7074, 'grad_norm': 0.6618576049804688, 'learning_rate': 1e-05, 'epoch': 0.12}
{'loss': 2.7094, 'grad_norm': 0.6062239408493042, 'learning_rate': 5e-06, 'epoch': 0.13}
{'loss': 2.7186, 'grad_norm': 1.026847243309021, 'learning_rate': 0.0, 'epoch': 0.15}
{'train_runtime': 11545.8529, 'train_samples_per_second': 1.039, 'train_steps_per_second': 0.52, 'train_loss': 2.745202392578125, 'epoch': 0.15}
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6000/6000 [3:12:25<00:00, 1.92s/it]
9 commits
Python
100.0%
https://huggingface.co/spaces/Chintan-Shah/MyMultiModalExperiment
D:\Chintan\OneDrive\Workspace\ERAv2\MultiModal_FineTuning>python QLora_FineTuning_Phi3_C1.py
C:\Users\Trial\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\tokenization_utils_base.py:1601: FutureWarning: `clean_up_tokenization_spaces` was not set. It will be set to `True` by default. This behavior will be depracted in transformers v4.45, and will be then set to `False` by default. For more details check this issue: https://github.com/huggingface/transformers/issues/31884
warnings.warn(
`flash-attention` package not found, consider installing for better performance: No module named 'flash_attn'.
Current `flash-attention` does not support `window_size`. Either upgrade or use `attn_implementation='eager'`.
`low_cpu_mem_usage` was None, now set to True since model is quantized.
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:18<00:00, 9.13s/it]
[nltk_data] Downloading package stopwords to
[nltk_data] C:\Users\Trial\AppData\Roaming\nltk_data...
[nltk_data] Package stopwords is already up-to-date!
[nltk_data] Downloading package punkt to
[nltk_data] C:\Users\Trial\AppData\Roaming\nltk_data...
[nltk_data] Package punkt is already up-to-date!
[nltk_data] Downloading package punkt_tab to
[nltk_data] C:\Users\Trial\AppData\Roaming\nltk_data...
[nltk_data] Package punkt_tab is already up-to-date!
Trainable parameters: 111,680,512
All parameters: 2,120,820,736
Percentage of trainable parameters: 5.27%
max_steps is given, it will override any value given in num_train_epochs
0%| | 0/6000 [00:00<?, ?it/s]You are not running the flash-attention implementation, expect numerical differences.
C:\Users\Trial\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\utils\checkpoint.py:295: FutureWarning: `torch.cpu.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cpu', args...)` instead.
with torch.enable_grad(), device_autocast_ctx, torch.cpu.amp.autocast(**ctx.cpu_autocast_kwargs): # type: ignore[attr-defined]
Could not estimate the number of tokens of the input, floating-point operations will not be computed
{'loss': 4.2947, 'grad_norm': 1.6839556694030762, 'learning_rate': 4.5e-05, 'epoch': 0.01}
{'loss': 3.2241, 'grad_norm': 1.8457916975021362, 'learning_rate': 4e-05, 'epoch': 0.03}
{'loss': 3.0872, 'grad_norm': 1.8399261236190796, 'learning_rate': 3.5e-05, 'epoch': 0.04}
{'loss': 2.9852, 'grad_norm': 1.998960256576538, 'learning_rate': 3e-05, 'epoch': 0.06}
40%|█████████████████████████████████████████████▌ | 2400/6000 [41:55<55:32, 1.08it/s]C:\Users\Trial\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\utils\checkpoint.py:295: FutureWarning: `torch.cpu.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cpu', args...)` instead.
with torch.enable_grad(), device_autocast_ctx, torch.cpu.amp.autocast(**ctx.cpu_autocast_kwargs): # type: ignore[attr-defined]
{'loss': 2.9303, 'grad_norm': 1.5595556497573853, 'learning_rate': 2.5e-05, 'epoch': 0.07}
{'loss': 2.8839, 'grad_norm': 2.708310604095459, 'learning_rate': 2e-05, 'epoch': 0.09}
{'loss': 2.8794, 'grad_norm': 2.0087153911590576, 'learning_rate': 1.5e-05, 'epoch': 0.1}
{'loss': 2.8551, 'grad_norm': 1.93650221824646, 'learning_rate': 1e-05, 'epoch': 0.12}
80%|█████████████████████████████████████████████████████████████████████████████████████████▌ | 4800/6000 [1:18:20<17:53, 1.12it/s]C:\Users\Trial\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\utils\checkpoint.py:295: FutureWarning: `torch.cpu.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cpu', args...)` instead.
with torch.enable_grad(), device_autocast_ctx, torch.cpu.amp.autocast(**ctx.cpu_autocast_kwargs): # type: ignore[attr-defined]
{'loss': 2.8151, 'grad_norm': 2.461733818054199, 'learning_rate': 5e-06, 'epoch': 0.13}
{'loss': 2.8189, 'grad_norm': 2.3669679164886475, 'learning_rate': 0.0, 'epoch': 0.15}
{'train_runtime': 5801.282, 'train_samples_per_second': 2.069, 'train_steps_per_second': 1.034, 'train_loss': 3.0773943888346356, 'epoch': 0.15}
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6000/6000 [1:36:41<00:00, 1.03it/s]
projector_state_dict = torch.load(projector_path, map_location=phi_model.device)
Loaded projector with input_dim=512, output_dim=3072
Trainable parameters: 111,680,512
All parameters: 3,932,760,064
Percentage of trainable parameters: 2.84%
max_steps is given, it will override any value given in num_train_epochs
0%| | 0/6000 [00:00<?, ?it/s]`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`...
You are not running the flash-attention implementation, expect numerical differences.
C:\Users\Trial\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\utils\checkpoint.py:295: FutureWarning: `torch.cpu.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cpu', args...)` instead.
with torch.enable_grad(), device_autocast_ctx, torch.cpu.amp.autocast(**ctx.cpu_autocast_kwargs): # type: ignore[attr-defined]
Could not estimate the number of tokens of the input, floating-point operations will not be computed
{'loss': 2.8158, 'grad_norm': 0.5202670693397522, 'learning_rate': 4.5e-05, 'epoch': 0.01}
{'loss': 2.7849, 'grad_norm': 0.9820236563682556, 'learning_rate': 4e-05, 'epoch': 0.03}
{'loss': 2.7731, 'grad_norm': 0.4473443627357483, 'learning_rate': 3.5e-05, 'epoch': 0.04}
{'loss': 2.7528, 'grad_norm': 0.39497828483581543, 'learning_rate': 3e-05, 'epoch': 0.06}
{'loss': 2.7371, 'grad_norm': 0.5294825434684753, 'learning_rate': 2.5e-05, 'epoch': 0.07}
50%|████████████████████████████████████████████████████████ | 3000/6000 [2:28:35<47:34, 1.05it/s]C:\Users\Trial\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\utils\checkpoint.py:295: FutureWarning: `torch.cpu.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cpu', args...)` instead.
with torch.enable_grad(), device_autocast_ctx, torch.cpu.amp.autocast(**ctx.cpu_autocast_kwargs): # type: ignore[attr-defined]
{'loss': 2.7332, 'grad_norm': 0.7306874990463257, 'learning_rate': 2e-05, 'epoch': 0.09}
{'loss': 2.7198, 'grad_norm': 0.5060272812843323, 'learning_rate': 1.5e-05, 'epoch': 0.1}
{'loss': 2.7074, 'grad_norm': 0.6618576049804688, 'learning_rate': 1e-05, 'epoch': 0.12}
{'loss': 2.7094, 'grad_norm': 0.6062239408493042, 'learning_rate': 5e-06, 'epoch': 0.13}
{'loss': 2.7186, 'grad_norm': 1.026847243309021, 'learning_rate': 0.0, 'epoch': 0.15}
{'train_runtime': 11545.8529, 'train_samples_per_second': 1.039, 'train_steps_per_second': 0.52, 'train_loss': 2.745202392578125, 'epoch': 0.15}
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6000/6000 [3:12:25<00:00, 1.92s/it]
9 commits
Python
100.0%