通常通過(guò)鏡像網(wǎng)站下載https://hf-mirror.com/。
在鏈接頁(yè)面有介紹方法,對(duì)于不大的模型可以直接下載。這里介紹比較常用且方便的下載方法。
使用huggingface 官方提供的 huggingface-cli 命令行工具
安裝(huggingface_hub、hf_transfer安裝可以使用-i命令從鏡像網(wǎng)站下載)
pip install -U huggingface_hub hf_transfer
基本命令(每次打開遠(yuǎn)程鏈接都要輸入)
export HF_HUB_ENABLE_HF_TRANSFER=1
export HF_ENDPOINT=https://hf-mirror.com
下載模型(下載NousResearch/Llama-2-13b-chat-hf,放在當(dāng)前目錄文件夾Llama-2-13b-chat-hf下)文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-832303.html
huggingface-cli download --resume-download NousResearch/Llama-2-13b-chat-hf --local-dir Llama-2-13b-chat-hf --local-dir-use-symlinks False
攜帶參數(shù)下載文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-832303.html
huggingface-cli download --token hf_*** --resume-download meta-llama/Llama-2-7b-hf --local-dir Llama-2-7b-hf --local-dir-use-symlinks False
到了這里,關(guān)于Huggingface鏡像網(wǎng)站下載語(yǔ)言模型方法的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!