Linly icon indicating copy to clipboard operation
Linly copied to clipboard

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

Open riverzhou opened this issue 2 years ago • 12 comments

riverzhou avatar Apr 24 '23 12:04 riverzhou

同样的问题

jamestch avatar Apr 24 '23 12:04 jamestch

TencentPretain scripts

zhangyebai avatar Apr 25 '23 05:04 zhangyebai

TencentPretain scripts

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

jamestch avatar Apr 25 '23 06:04 jamestch

  1. Tencent -> Llama image

convert_tencentpretrain_to_llama.py

  1. Llama -> Huggingface image

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

zhangyebai avatar Apr 25 '23 06:04 zhangyebai

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

riverzhou avatar Apr 25 '23 06:04 riverzhou

直接转到hf的脚本还在测试中,近期会上传


发件人: 张夜白 @.> 发送时间: Tuesday, April 25, 2023 2:35:01 PM 收件人: ydli-ai/Chinese-ChatLLaMA @.> 抄送: Subscribed @.***> 主题: Re: [ydli-ai/Chinese-ChatLLaMA] 腾讯格式的权重转换成HF格式的转换脚本在哪里? (Issue #44)

  1. Tencent -> Llama

[image]https://user-images.githubusercontent.com/24763457/234192949-8b9ee692-7206-4dfc-ab8e-43a77f48d2e1.png

convert_tencentpretrain_to_llama.py

  1. Llama -> Huggingface

[image]https://user-images.githubusercontent.com/24763457/234193393-638769c1-2059-4c51-9f6d-cad04e8ab33e.png

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

― Reply to this email directly, view it on GitHubhttps://github.com/ydli-ai/Chinese-ChatLLaMA/issues/44#issuecomment-1521225552, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE3SPV3DIZTSYUVCLG4LR33XC5WBLANCNFSM6AAAAAAXJQW52E. You are receiving this because you are subscribed to this thread.Message ID: @.***>

ydli-ai avatar Apr 25 '23 06:04 ydli-ai

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

zhangyebai avatar Apr 25 '23 06:04 zhangyebai

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

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

riverzhou avatar Apr 25 '23 06:04 riverzhou

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

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

riverzhou avatar Apr 25 '23 09:04 riverzhou

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

Minami-su avatar Apr 27 '23 11:04 Minami-su

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

hepj987 avatar May 23 '23 01:05 hepj987

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

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

riverzhou avatar May 25 '23 02:05 riverzhou