2 InternLM-Chat-7B 智能对话 Demo
2.1环境准备
2.2拷贝模型
2.3代码准备
cd /root/code
git clone https://gitee.com/internlm/InternLM.git
2.4终端demo
2.5web demo
Hugging Face下载internlm-20b配置文件
pip install -U huggingface_hub
import os from huggingface_hub import hf_hub_download # Load model directly hf_hub_download(repo_id="internlm/internlm-20b", filename="config.json")
#执行后会报网络错误,使用镜像hf-mirror.com
执行 HF_ENDPOINT=https://hf-mirror.com python download_20Bcfg.py
即可成功下载