请问一下如何使用ckpt文件?
我下载了chatGLM 6B的模型和代码,发现model文件夹里需要json和bin文件。请问一下如何使用ckpt文件?
您好,感谢您的回复,中途我又尝试了chatglm-6B-4int自己训练花了点时间
我按照您的方法克隆了chagglm_finetuning的代码,新建了best_ckpt文件夹并把zhenhuan.ckpt放在里面,自己新建了adapter_config.json,发现报错 AssertionError: ('lora config get bad with_lora ', False)
估计是我的adapter_config.json不对,其内容如下
{
"base_model_name_or_path": "/data/nlp/pre_models/torch/chatglm/chatglm-6b",
"bias": "none",
"enable_lora": null,
"fan_in_fan_out": false,
"inference_mode": false,
"lora_alpha": 32,
"lora_dropout": 0.1,
"merge_weights": false,
"modules_to_save": null,
"peft_type": "LORA",
"r": 32,
"target_modules": [
"q",
"k",
"v"
],
"task_type": "SEQ_2_SEQ_LM"
}
您方便指点一下如何修改或提供您的adapter_config.json吗?非常感谢您的时间
您好,我克隆了https://github.com/piDack/chat_zhenhuan项目,把ckpt文件放在了best_ckpt文件夹,运行时提示best_ckpt文件夹缺少config.json
我把config文件夹里的config.json复制到best_ckpt文件夹下,运行提示如下错误
RuntimeError: Error(s) in loading state_dict for MyTransformer:
size mismatch for _TransformerLightningModule__backbone.transformer.transformer.word_embeddings.weight: copying
a param with shape torch.Size([130528, 4096]) from checkpoint, the shape in current model is torch.Size([150528, 4096]).
我不确定是config.json配置文件的错误,还是chatglm-6b模型的错误,您有空了请帮忙解答一下,非常感谢您的时间
Hi,我怀疑是chatglm更新导致的,你可以选择从头开始训练