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

推荐订阅源

CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
量子位
腾讯CDC
月光博客
月光博客
博客园 - 【当耐特】
博客园 - 聂微东
罗磊的独立博客
aimingoo的专栏
aimingoo的专栏
D
DataBreaches.Net
Apple Machine Learning Research
Apple Machine Learning Research
F
Fortinet All Blogs
博客园 - Franky
爱范儿
爱范儿
L
LangChain Blog
云风的 BLOG
云风的 BLOG
TaoSecurity Blog
TaoSecurity Blog
N
News and Events Feed by Topic
Security Archives - TechRepublic
Security Archives - TechRepublic
阮一峰的网络日志
阮一峰的网络日志
人人都是产品经理
人人都是产品经理
The Cloudflare Blog
Simon Willison's Weblog
Simon Willison's Weblog
Google DeepMind News
Google DeepMind News
S
Schneier on Security
H
Help Net Security
H
Heimdal Security Blog
The GitHub Blog
The GitHub Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Y
Y Combinator Blog
N
Netflix TechBlog - Medium
Microsoft Azure Blog
Microsoft Azure Blog
Cyberwarzone
Cyberwarzone
Cloudbric
Cloudbric
Recorded Future
Recorded Future
Hacker News: Ask HN
Hacker News: Ask HN
S
Security @ Cisco Blogs
Project Zero
Project Zero
AWS News Blog
AWS News Blog
Spread Privacy
Spread Privacy
MyScale Blog
MyScale Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
Securelist
Recent Announcements
Recent Announcements
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CERT Recently Published Vulnerability Notes
M
MIT News - Artificial intelligence
IT之家
IT之家
Google Online Security Blog
Google Online Security Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com

博客园 - 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"
}
]
}'