本文主要是介绍如何在huggingface上申请下载使用llama2/3模型,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1. 在对应模型的huggingface页面上提交申请
搜索对应的模型型号
登录huggingface,在模型详情页面上,找到这个表单,填写内容,提交申请。需要使用梯子,country填写梯子的位置吧(比如美国)
等待一小时左右,会有邮件通知。
- 创建access token
在huggingface上登录后,点击头像,选择setting,点击左侧的access tokens,新建一个,然后复制。
- 使用huggingface cli下载模型
pip install -U huggingface_hub
export HF_ENDPOINT=https://hf-mirror.com
huggingface-cli download --resume-download 模型名称 --local-dir 存放模型的位置 --local-dir-use-symlinks False --resume-download --token token序列号xxxxxxx
比如
huggingface-cli download --resume-download meta-llama/Llama-2-7b-chat-hf --local-dir /data1/user/model/meta-llama/Llama-2-7b-chat-hf/ --local-dir-use-symlinks False --resume-download --token xxxxx
这样就可以下载好啦
这篇关于如何在huggingface上申请下载使用llama2/3模型的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!