Skip to content
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

腾讯格式的权重转换成HF格式的转换脚本在哪里? #44

Open
riverzhou opened this issue Apr 24, 2023 · 12 comments
Open

腾讯格式的权重转换成HF格式的转换脚本在哪里? #44

riverzhou opened this issue Apr 24, 2023 · 12 comments

Comments

@riverzhou
Copy link

No description provided.

@jamestch
Copy link

同样的问题

@zhangyebai
Copy link

zhangyebai commented Apr 25, 2023

TencentPretain
scripts

@jamestch
Copy link

TencentPretain scripts

这个仓库下面,似乎没找到llama tencentpretrain格式到huggingface格式的转换脚本

@zhangyebai
Copy link

zhangyebai commented Apr 25, 2023

  1. Tencent -> Llama

image

convert_tencentpretrain_to_llama.py

  1. Llama -> Huggingface

image

convert_llama_weights_to_hf.py
我理解的路径应该是这样

@riverzhou
Copy link
Author

转llama的时候,layer_num参数怎么设置,是用默认(12层)么?

@ydli-ai
Copy link
Member

ydli-ai commented Apr 25, 2023 via email

@zhangyebai
Copy link

期待作者给出 ChatLLaMA-zh-7B 到 ChatLLaMA-zh-7B-hf的转换脚本,在线等

@riverzhou
Copy link
Author

期待作者给出 ChatLLaMA-zh-7B 到 ChatLLaMA-zh-7B-hf的转换脚本,在线等

其实能直接转llama我很合用,因为我是用llama.cpp

@riverzhou
Copy link
Author

转llama的时候,layer_num参数怎么设置,是用默认(12层)么?

自己回答自己的问题。7B的模型是32层,13B的模型是40层。
如有错误请大家指正。

@Minami-su
Copy link

转成huggingface后效果咋样,会有损失吗?

@hepj987
Copy link

hepj987 commented May 23, 2023

@riverzhou
请问llama.cpp你是如何运行的?

@riverzhou
Copy link
Author

@riverzhou 请问llama.cpp你是如何运行的?

先用 TencentPretrain 项目里的转换脚本把作者的腾讯格式的数据转成原始的 llama 的格式(layer_num参数:7B的模型是32层,13B的模型是40层。),
再用 llama.cpp 项目里 转换脚本转成 ggml 的格式,
最后,可选做量化,Q4 Q5 Q8都可以。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants