CogVLM2 icon indicating copy to clipboard operation
CogVLM2 copied to clipboard

huggingface model how to convert to SAT model

Open GondorFu opened this issue 1 year ago • 5 comments

Feature request / 功能建议

how to convert huggingface model convert to SAT model?

Motivation / 动机

So can use sat to train V2 faster.

Your contribution / 您的贡献

NA

GondorFu avatar Jun 28 '24 03:06 GondorFu

Here are the SAT models of CogVLM2: https://github.com/THUDM/CogVLM/blob/cogvlm2_dev/utils/models/cogvlm2_model.py

You can train the model with this branch: https://github.com/THUDM/CogVLM/tree/cogvlm2_dev

1049451037 avatar Jun 28 '24 03:06 1049451037

Great,thank you so much!

GondorFu avatar Jun 28 '24 10:06 GondorFu

Do I just need to modify this file finetune_demo/finetune_cogvlm_demo.py from FineTuneTrainCogVLMModel to FineTuneTrainCogVLM2Model? And I wonder how to intial the tokenizer?

GondorFu avatar Jun 28 '24 11:06 GondorFu

Here are the SAT models of CogVLM2: https://github.com/THUDM/CogVLM/blob/cogvlm2_dev/utils/models/cogvlm2_model.py

You can train the model with this branch: https://github.com/THUDM/CogVLM/tree/cogvlm2_dev

It seems can't load directly current open-source CogVLM2 model in CogVLM finetune code, which still need to convert hf checkpoint to sat format for using.

GondorFu avatar Jun 29 '24 01:06 GondorFu

请问您解决了吗,我下载不下来cogvlm2-llama3-chinese-chat-19Bzip文件,也希望能转一下

Hello-Worldd avatar Jan 21 '25 08:01 Hello-Worldd