【transformer】安裝

HappierJoanne發表於2024-06-10

pip install transformers==4.28.1

下載pyyaml>=5.1時候遇到網路問題下載不下來

pip pyyaml==5.3 -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install transformers==4.28.1 -i https://pypi.tuna.tsinghua.edu.cn/simple

---hugging-face下載bert庫

export HF_ENDPOINT=https://hf-mirror.com
export HF_HUB_ENABLE_HF_TRANSFER=1
pip install -U huggingface_hub
pip install hf_transfer
huggingface-cli download --resume-download --local-dir-use-symlinks False google-bert/bert-base-chinese --local-dir /data/aojiao/HuggingFace/google-bert/bert-base-chinese

huggingface-cli download --resume-download --local-dir-use-symlinks False uer/chinese_roberta_L-12_H-128 --local-dir/data3/home/11102998/HuggingFace/uer/chinese_roberta_L-12_H-128

相關文章