使用 InternLM-Chat-7B 模型生成 300 字的小故事(需截图)。
熟悉 hugging face 下载功能,使用 huggingface_hub
python 包,下载 InternLM-20B
的 config.json 文件到本地(需截图下载过程)。
命令行设置镜像站 export HF_ENDPOINT=https://hf-mirror.com
新建download.py
,内容如下
import os
from huggingface_hub import hf_hub_download # Load model directly
hf_hub_download(repo_id="internlm/internlm-20b", filename="config.json",local_dir='/root/model/Shanghai_AI_Laboratory/internlm-20b')
运行download.py
命令行启用web端部署
输入题目,创作内容
命令行启用web端部署
选择模型为internlm
后,开始下载模型
输入指令,得到回复