报错:We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like baichuan-inc/Baichuan2-7B-Base is not the path to a directory containing a file named config.json. Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.
解决办法
1.安装依赖
pip install -U huggingface_hub
2.写入环境变量建议写入~/.bashrc
# Linux
export HF_ENDPOINT=https://hf-mirror.com
参考链接: