学术加速
免责声明
本文为您介绍第三方公开和内置的的学术加速服务,用于加速访问GitHub、HuggingFace等,不保证服务的可用性和可靠性。
GitHub公开学术加速服务
💡 注意
加速服务的域名有可能因为被封禁而失效,可以访问`https://ghproxy.link/`获取可用的域名。
加速服务的域名有可能因为被封禁而失效,可以访问`https://ghproxy.link/`获取可用的域名。
- 复制原始GitHub仓库https的clone地址。
- 在地址前添加加速服务的域名
https://ghfast.top/
。
例如:
- 原地址:
https://github.com/demo1
- 代理地址:
https://ghfast.top/https:/github.com/demo1
git clone https://ghfast.top/https://github.com/demo1
Huggingface公开学术加速服务
选择存储路径
💡 注意
旧版开发机系统盘仅有50GiB,新版开发机系统盘只有100GiB,模型数据集尽可能不要存储在系统目录中。
旧版开发机系统盘仅有50GiB,新版开发机系统盘只有100GiB,模型数据集尽可能不要存储在系统目录中。
选择存储目录,因部分模型数据集较大,请提前规划好存储路径,建议使用共享存储卷挂载路径例如/data
作为模型下载路径。
使用 Huggingface CLI 下载
💡 注意
有些项目需要登录,需要添加`--token`参数:`huggingface-cli download --token hf_*** --resume-download meta-llama/Llama-2-7b-hf --local-dir Llama-2-7b-hf`
有些项目需要登录,需要添加`--token`参数:`huggingface-cli download --token hf_*** --resume-download meta-llama/Llama-2-7b-hf --local-dir Llama-2-7b-hf`
huggingface-cli 是 Hugging Face 官方提供的命令行工具,自带完善的下载功能。
- 安装依赖
# 设置 pip 超时时间
export PIP_DEFAULT_TIMEOUT=0
# 配置主索引源
pip config set global.index-url https://mirror-cn-huabei1-internal.ebcloud.com/repository/pypi/simple
# 额外配置 nvidia 源
pip config set global.extra-index-url "https://mirror-cn-huabei1-internal.ebcloud.com/repository/nvidia-pypi/simple"
# 安装huggingdace依赖
pip install -U huggingface_hub
- 设置环境变量
export HF_ENDPOINT=https://hf-mirror.com
- 下载模型/数据集,需修改 --local-dir 为正确的存储路径
# 下载模型
huggingface-cli download --resume-download gpt2 --local-dir gpt2
# 下载模型
huggingface-cli download --repo-type dataset --resume-download wikitext --local-dir wikitext
使用 hfd 下载
💡 注意
有些项目需要登录,添加`--hf_username--hf_token`参数:`hfd meta-llama/Llama-2-7b --hf_username YOUR_HF_USERNAME --hf_token hf_***`
有些项目需要登录,添加`--hf_username--hf_token`参数:`hfd meta-llama/Llama-2-7b --hf_username YOUR_HF_USERNAME --hf_token hf_***`
- 下载hfd
wget https://hf-mirror.com/hfd/hfd.sh
chmod a+x hfd.sh
- 设置环境变量
export HF_ENDPOINT=https://hf-mirror.com
- 下载模型/数据集
./hfd.sh DeepSeek-R1
英博云内置服务
💡 注意
仅限于解决学术使用github和huggingface网络速度慢的问题,不承诺稳定性保证,若遭遇恶意攻击等,将随时停止该加速服务。
仅限于解决学术使用github和huggingface网络速度慢的问题,不承诺稳定性保证,若遭遇恶意攻击等,将随时停止该加速服务。
目前支持加速访问的地址如下:
- github.com
- wandb.ai
- huggingface.co
- cdn-lfs.hf.co
- githubusercontent.com
- githubassets.com
在英博云内终端使用方法:
source /public/bin/network_accelerate
取消学术加速的方法:
source /public/bin/network_accelerate_stop