-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
二阶段微调训练的问题 #29
Comments
是解决了吗,没有的话可以发一下配置的yaml文件,然后也可以检查下权重是否下载完全 |
这是我的sft.yaml配置文件,在这里我尝试用单卡A100训练,所以改了run下面的参数,训练运行 sft.yaml:
|
看了下,应该不是报错,https://github.com/Coobiw/MiniGPT4Qwen/blob/master/lavis/models/base_model.py#L53
这里只是一个log,因为model.pth里只有中间的projection层的参数(第一步pretrain stage只训练中间projection层),其他都用的eva,blip2_qformer和qwen-7B的参数,所以会有一个INFO的提醒,按照 https://github.com/Coobiw/MiniGPT4Qwen/blob/master/WEIGHT.md 中下载权重就好 担心的话先训几步看看loss,显存不够的话可以把 |
报错信息:
Using downloaded and verified file: /data/MiniGPT4Qwen/lavis/../cache/dataset/llava_instruct/llava_instruction_156k.json
2024-07-02 14:04:21,365 [INFO] Building datasets...
Using downloaded and verified file: /data/MiniGPT4Qwen/lavis/../cache/dataset/videochatgpt/videochatgpt_instruction_100k.json
2024-07-02 14:04:22,514 [INFO] Building datasets...
Finishing Initializing Vision-Encoder...
2024-07-02 14:04:35,207 [INFO] freeze vision encoder
Finishing Loading Q-former Initializing Config...
Finishing Initializing Q-former...
2024-07-02 14:04:35,917 [INFO] no text input for q-former
Loading LLM:/data/MiniGPT4Qwen/cache/ckpt/Qwen7B-chat...
2024-07-02 14:04:36,396 [WARNING] The model is automatically converting to bf16 for faster inference. If you want to disable the automatic precision, please manually add bf16/fp16/fp32=True to "AutoModelForCausalLM.from_pretrained".
2024-07-02 14:04:36,397 [WARNING] Try importing flash-attention for faster inference...
2024-07-02 14:04:36,397 [WARNING] Warning: import flash_attn rotary fail, please install FlashAttention rotary to get higher efficiency https://github.com/Dao-AILab/flash-attention/tree/main/csrc/rotary
2024-07-02 14:04:36,397 [WARNING] Warning: import flash_attn rms_norm fail, please install FlashAttention layer_norm to get higher efficiency https://github.com/Dao-AILab/flash-attention/tree/main/csrc/layer_norm
2024-07-02 14:04:36,397 [WARNING] Warning: import flash_attn fail, please install FlashAttention to get higher efficiency https://github.com/Dao-AILab/flash-attention
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████| 8/8 [00:06<00:00, 1.16it/s]
Unfreeze LLM!!!
Start loading pretrained model: /data/MiniGPT4Qwen/cache/ckpt/blip2/blip2_pretrained_flant5xxl.pth
Loading the File Named: /data/MiniGPT4Qwen/cache/ckpt/blip2/blip2_pretrained_flant5xxl.pth...
2024-07-02 14:04:43,919 [INFO] load checkpoint from /data/MiniGPT4Qwen/cache/ckpt/blip2/blip2_pretrained_flant5xxl.pth
Start loading finetuned model: /data/MiniGPT4Qwen/lavis/output/ckpt-and-data/pretrain/global_step2181/model.pth
Checkpoint: /data/MiniGPT4Qwen/lavis/output/ckpt-and-data/pretrain/global_step2181/model.pth
###################################################
在这里读取预训练模型model.pth时,报错提示Missing keys
###################################################
2024-07-02 14:04:43,958 [INFO] Missing keys ['query_tokens', 'visual_encoder.cls_token', 'visual_encoder.pos_embed', 'visual_encoder.patch_embed.proj.weight', 'visual_encoder.patch_embed.proj.bias', 'visual_encoder.blocks.0.norm1.weight', 'visual_encoder.blocks.0.norm1.bias', 'visual_encoder.blocks.0.attn.q_bias', 'visual_encoder.blocks.0.attn.v_bias', 'visual_encoder.blocks.0.attn.qkv.weight', 'visual_encoder.blocks.0.attn.proj.weight', 'visual_encoder.blocks.0.attn.proj.bias', 'visual_encoder.blocks.0.norm2.weight', ......后面还有很多
请问是什么原因导致的,谢谢!
The text was updated successfully, but these errors were encountered: