LMDeploy 量化部署实践闯关任务

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
2.1.2 以命令行形式连接API服务器

在这里插入图片描述

2.1.3 以Gradio网页形式连接API服务器
在这里插入图片描述
2.2 LMDeploy Lite——内存下降16G
在这里插入图片描述
2.2.2 设置在线 kv cache int4/int8 量化
在这里插入图片描述
2.2.3 W4A16 模型量化和部署
报错

ValueError: The repository for ptb_text_only contains custom code which must be executed to correctly load the dataset. You can inspect the repository content at https://hf.co/datasets/ptb_text_only.
Please pass the argument `trust_remote_code=True` to allow custom code to be run.

在这里插入图片描述

pip install datasets==2.16.1

模型大小对比 1.5G V.S. 3.6G
在这里插入图片描述
运行占用33G
在这里插入图片描述
3.1.2 W4A16 量化+ KV cache+KV cache 量化

全都要之后占用为18G,比量化前少2G
在这里插入图片描述
API调用
在这里插入图片描述

4 LMDeploy之FastAPI与Function call

在这里插入图片描述
4.2 Function call
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值