lesson2作业

460 words

基础作业

使用 InternLM-Chat-7B 模型生成 300 字的小故事(需截图)。

熟悉 hugging face 下载功能,使用 huggingface_hub python 包,下载 InternLM-20B 的 config.json 文件到本地(需截图下载过程)。

1
2
3
4
5
6
import os
from huggingface_hub import hf_hub_download # Load model directly

# 设置环境变量
os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'
hf_hub_download(repo_id="internlm/internlm-7b", filename="config.json",local_dir="./")

进阶作业(可选做)

完成浦语·灵笔的图文理解及创作部署(需截图)

  • 测试多模态对话
  • 测试创作图文并茂文章
    • image-20240111183853604

完成 Lagent 工具调用 Demo 创作部署(需截图)

Comments