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                                                                                                                                                           
    }'
相关推荐
摇滚侠7 小时前
2025最新 SpringCloud 教程,Gateway-过滤器-globalFilter,笔记60
笔记·spring cloud·gateway
摇滚侠7 小时前
2025最新 SpringCloud 教程,Gateway-过滤器-默认过滤器,笔记59
笔记·spring cloud·gateway
摇滚侠7 小时前
2025最新 SpringCloud 教程,Gateway-过滤器-自定义,全局跨域,总结,笔记61,笔记62,笔记63
笔记·spring cloud·gateway
摇滚侠1 天前
2025最新 SpringCloud 教程,Gateway-断言-Query,笔记56
笔记·spring cloud·gateway
摇滚侠1 天前
2025最新 SpringCloud 教程,Gateway-断言-长短写法,笔记55
笔记·spring cloud·gateway
摇滚侠1 天前
2025最新 SpringCloud 教程,Gateway-路由-工作原理,笔记54
笔记·spring cloud·gateway
摇滚侠1 天前
2025最新 SpringCloud 教程,Gateway 路由-规则配置,笔记53
笔记·spring cloud·gateway
k***08293 天前
Gateway Timeout504 网关超时的完美解决方法
gateway
nvd113 天前
GKE Gateway 30秒超时问题深度排查全纪录
gateway
8***a8153 天前
SpringCloud Gateway 集成 Sentinel 详解 及实现动态监听Nacos规则配置实时更新流控规则
spring cloud·gateway·sentinel