dandelionsllm / pandallm

Panda项目是于2023年5月启动的开源海外中文大语言模型项目,致力于大模型时代探索整个技术栈,旨在推动中文自然语言处理领域的创新和合作。
Apache License 2.0
1.07k stars 91 forks source link

权重转换脚本不支持来自 Facebook 的原版权重 #22

Closed ShadowPower closed 1 year ago

ShadowPower commented 1 year ago

使用了项目中的 apply_delta.py 搭配来自 Facebook 的原版权重进行转换 错误如下: OSError: E:/MetaAI/LLaMA/7B does not appear to have a file named config.json. Checkout 'https://huggingface.co/E:/MetaAI/LLaMA/7B/None' for available files.

原版的权重目录里确实不包含 config.json 文件,请问应如何转换成兼容本项目的版本?

SparkJiao commented 1 year ago

需要先用HF的脚本把LLaMA的原版权重转成HF版本的: https://github.com/huggingface/transformers/blob/main/src/transformers/models/llama/convert_llama_weights_to_hf.py

然后用apply_delta.py把我们提供的权重和HF版本的LLaMA权重进行合并。

ShadowPower commented 1 year ago

已经解决了,感谢