基础作业:
- 使用 InternLM-Chat-7B 模型生成 300 字的小故事(需截图)。
- 熟悉 hugging face 下载功能,使用
huggingface_hub
python 包,下载InternLM-20B
的 config.json 文件到本地(需截图下载过程)。
首先conda安装hugging face hub库:
python -m pip install huggingface_hub
然后使用hf_hub_download()下载所需的文件:(感觉hf有点像百度网盘)
>> python
>> from huggingface_hub import hf_hub_download
>> hf_hub_download(repo_id="internlm/internlm-chat-20b", filename="config.json", cache_dir="/root/model/Shanghai_AI_Laboratory/internlm-chat-20b")
下载前需要参考q&a配置hf镜像站:https://hf-mirror.com/
下载好的文件截图:
进阶作业(可选做)
- 完成浦语·灵笔的图文理解及创作部署(需截图)
- 完成 Lagent 工具调用 Demo 创作部署(需截图)