书生·浦语大模型趣味Demo

趣味 Demo 任务

  • 本地部署 InternLM2-Chat-1.8B 模型进行智能对话

作业

基础作业:使用 InternLM2-Chat-1.8B 模型生成一个 300 字的小故事
在这里插入图片描述
进阶作业
使用 huggingface_hub包,下载 InternLM-Chat-7B 的 config.json 文件到本地

import os 
from huggingface_hub import hf_hub_download  # Load model directly 

hf_hub_download(repo_id="internlm/internlm2-7b", filename="config.json")

在这里插入图片描述

配置环境

使用conda创建python虚拟环境并安装依赖包

conda create -n demo python==3.10 -y
conda activate demo
conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.7 -c pytorch -c nvidia
pip install huggi
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值