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                                                                                                                                                           
    }'
相关推荐
唐僧洗头爱飘柔95273 天前
【SpringCloud(6)】Gateway路由网关;zuul路由;gateway实现原理和架构概念;gateway工作流程;静态转发配置
spring·spring cloud·架构·gateway·请求转发·服务降级·服务雪崩
xrkhy3 天前
微服务之Gateway网关(1)
微服务·架构·gateway
无名客08 天前
SpringCloud中的网关(Gateway)的作用是什么?
spring·spring cloud·gateway
smilecold9 天前
SpringCloud 入门 - Gateway 网关与 OpenFeign 服务调用
spring cloud·gateway
INFINI Labs11 天前
Elasticsearch 备份:方案篇
大数据·elasticsearch·搜索引擎·gateway·snapshot·backup·ccr
纤瘦的鲸鱼12 天前
Spring Gateway 全面解析:从入门到进阶实践
java·spring·gateway
INFINI Labs14 天前
如何使用 INFINI Gateway 对比 ES 索引数据
大数据·elasticsearch·gateway·easysearch
m0_6515939116 天前
位置透明性、Spring Cloud Gateway与reactor响应式编程的关系
java·spring cloud·系统架构·gateway
nvd1117 天前
使用gateway api来实现GKE 的pods 从外部访问
gateway·googlecloud
罗不俷17 天前
【Kubernetes】(二十)Gateway
容器·kubernetes·gateway