惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Security Archives - TechRepublic
Security Archives - TechRepublic
W
WeLiveSecurity
Hacker News: Ask HN
Hacker News: Ask HN
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
H
Heimdal Security Blog
Help Net Security
Help Net Security
T
Troy Hunt's Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
N
News | PayPal Newsroom
TaoSecurity Blog
TaoSecurity Blog
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
G
GRAHAM CLULEY
S
Security @ Cisco Blogs
The Hacker News
The Hacker News
SecWiki News
SecWiki News
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Simon Willison's Weblog
Simon Willison's Weblog
C
Cisco Blogs
A
Arctic Wolf
S
Securelist
Hacker News - Newest:
Hacker News - Newest: "LLM"
AI
AI
N
News and Events Feed by Topic
L
LINUX DO - 热门话题
P
Privacy & Cybersecurity Law Blog
Google Online Security Blog
Google Online Security Blog
T
The Exploit Database - CXSecurity.com
The Last Watchdog
The Last Watchdog
S
Secure Thoughts
Webroot Blog
Webroot Blog
Scott Helme
Scott Helme
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Cisco Talos Blog
Cisco Talos Blog
S
Schneier on Security
Latest news
Latest news
T
Threatpost
K
Kaspersky official blog
Know Your Adversary
Know Your Adversary
Schneier on Security
Schneier on Security
I
Intezer
PCI Perspectives
PCI Perspectives
S
Security Affairs
爱范儿
爱范儿
GbyAI
GbyAI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

博客园 - centosboy

Thinkpad T490卡顿排查 diff的安装与使用 ubuntu docker运行大模型 vllm部署 zabbix监控mongodb /root/.dbshell无权限解决办法 开机启动后应用limit没有生效 关于运维工作的一点感悟 将CDLINUX装入U盘 Autossh打洞 hive分区表实践 hashlib模块 rm 防误删脚本 linux 通过inode删除文件 那些年踩过的坑 htpdate代替ntpdate同步时间 Openfire搭建聊天系统 zookeeper运维 centos ping添加丢包记录 Linux tee命令输出显示在屏幕和保存到日志文件中
xinference初探
centosboy · 2025-12-18 · via 博客园 - centosboy

注册模型:

model.json

  "version": 2,
  "context_length": 2048,
  "model_name": "qwen2.5-1.5b-instruct",
  "model_lang": ["en", "zh"],
  "model_ability": ["chat"],
  "model_family": "qwen2.5",
  "chat_template": "{% for message in messages %}{{ message['role'] }}: {{ message['content'] }}\n{% endfor %}assistant:",
  "model_specs": [
    {
      "model_format": "pytorch",
      "model_file_name_template": "model.safetensors",
      "model_size_in_billions": 2,
      "quantization": "none",
      "model_hub": "huggingface",
      "model_uri": "file:///data/models/qwen2.5-1.5B/qwen2.5-1.5B-instruct"
    }
  ],
  "is_builtin": false
}

注册模型
xinference launch --model-name qwen-2.5-1.5 --model-engine vllm

运行模型
xinference launch --model-name qwen-2.5-1.5b-instruct --model-engine transformers

验证:
curl -X 'POST' 'http://localhost:9997/v1/chat/completions' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{
"model": "qwen2.5-1.5b-instruct",
"messages": [
{
"role": "user",
"content": "hello"
}
]
}'