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                                                                                                                                                           
    }'
相关推荐
龙茶清欢18 小时前
2、Nginx 与 Spring Cloud Gateway 详细对比:定位、场景与分工
java·运维·spring boot·nginx·spring cloud·gateway
龙茶清欢1 天前
在 Spring Cloud Gateway 中实现跨域(CORS)的两种主要方式
java·spring boot·spring cloud·微服务·gateway
William一直在路上2 天前
Kong Gateway 实操实例:代理上游服务并配置限流插件
gateway·kong
龙茶清欢3 天前
4、除了常见的 services(业务微服务)和 gateway(API 网关)模块外,还必须建立一系列支撑性、平台级、基础设施类模块
微服务·架构·gateway
debug 小菜鸟5 天前
Python + Flask + API Gateway + Lambda + EKS 实战
python·flask·gateway
Li zlun5 天前
Kubernetes 进阶实战:CRD、Gateway API 与优先级调度
java·kubernetes·gateway
zzz.106 天前
k8s中的Gateway API 和istio
云原生·kubernetes·gateway·istio
疯狂的维修15 天前
关于Gateway configration studio软件配置网关
网络协议·c#·自动化·gateway
hadage23315 天前
--- 统一请求入口 Gateway ---
gateway