vLLM加载lora

下载Huggingface模型

安装包

复制代码
pip install huggingface_hub  -i https://pypi.tuna.tsinghua.edu.cn/simple

下载

复制代码
from huggingface_hub import snapshot_download

sql_lora_path = snapshot_download(repo_id="Djs07/qwen2.5-1.5b-lora")

会放在~/.cache/huggingface/hub/ 目录下

启动服务

先把lora模型拷贝到当前目录再执行

复制代码
vllm serve deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B --enable-lora --lora-modules Qwen-Lora=models--Djs07--qwen2.5-1.5b-lora/snap
shots/8d7d20b1cbb95e7de29abe404e900c106fa8c8cb/

测试

模型改为上面设置的名字

复制代码
curl http://172.17.0.3:10000/v1/completions   -H "Content-Type: application/json"     -d '{                                                       
        "model": "Qwen-Lora",                                                                                                                                                      
        "prompt": "San Francisco is a",                                                                                                                                            
        "max_tokens": 7,                                                                                                                                                           
        "temperature": 0                                                                                                                                                           
    }'
相关推荐
青衫客362 天前
Portkey-AI gateway 的一次“假压缩头”翻车的完整排障记:由 httpx 解压异常引发的根因分析
大模型·llm·gateway·httpx
PXM的算法星球6 天前
spring gateway配合nacos实现负载均衡
spring·gateway·负载均衡
1990_super7 天前
使用ceph-deploy安装和配置RADOS Gateway (RGW)并使用S3访问集群
ceph·gateway
北极糊的狐10 天前
接口返回504 Gateway Time-out 错误,这意味着请求在网关或代理服务器等待上游服务器响应时超时。以下是可能的原因和排查建议:
数据库·gateway
sg_knight11 天前
Spring Cloud Gateway全栈实践:动态路由能力与WebFlux深度整合
java·spring boot·网关·spring·spring cloud·微服务·gateway
放纵日放纵13 天前
微服务—Gateway
微服务·架构·gateway
你我约定有三13 天前
分布式微服务--GateWay(1)
java·开发语言·分布式·微服务·架构·gateway
William一直在路上17 天前
KONG API Gateway中的核心概念
网络·gateway·kong