Swift

服务器基本配置 镜像相关 pip镜像网站: #清华镜像源安装示例 pip install ms-swift -i https://pypi.tuna.tsinghua.edu.cn/simple huggingface镜像配置三件套: export HF_ENDPOINT=https://hf-mirror.com export HF_HUB_DISABLE_XET=1 export HF_HUB_ENABLE_HF_TRANSFER=1 cache数据相关 huggingface/modelscope: #临时 export HF_HOME=~/shared-nvme/hf_home export TRANSFORMERS_CACHE=~/shared-nvme/hf_cache export HF_DATASETS_CACHE=~/shared-nvme/hf_datasets export HUGGINGFACE_HUB_CACHE=~/shared-nvme/hf_cache export MODELSCOPE_CACHE=~/shared-nvme/modelscope export MS_CACHE=~/shared-nvme/ms_cache export TORCH_HOME=~/shared-nvme/torch_cache export TRITON_CACHE_DIR=~/shared-nvme/torch_cache export PIP_CACHE_DIR=~/shared-nvme/torch_cache #永久 cat << 'EOF' >> ~/.bashrc # ===== AI CACHE REDIRECT ===== export HF_HOME=~/shared-nvme/hf_home export TRANSFORMERS_CACHE=~/shared-nvme/hf_cache export HF_DATASETS_CACHE=~/shared-nvme/hf_datasets export HUGGINGFACE_HUB_CACHE=~/shared-nvme/hf_cache export MODELSCOPE_CACHE=~/shared-nvme/modelscope export MS_CACHE=~/shared-nvme/ms_cache export TORCH_HOME=~/shared-nvme/torch_cache export TRITON_CACHE_DIR=~/shared-nvme/torch_cache export PIP_CACHE_DIR=~/shared-nvme/torch_cache EOF source ~/.bashrc 验证是否成功: ...