Qwen3.5 四款小尺寸模型开源:昇腾适配已到位,AtomGit AI 开放体验

Qwen3.5 四款小尺寸模型开源:昇腾适配已到位,AtomGit AI 开放体验

近日,千问(Qwen)正式开源 Qwen3.5 小尺寸模型系列,包括:Qwen3.5-0.8B、Qwen3.5-2B、Qwen3.5-4B、Qwen3.5-9B。目前,昇腾生态已完成对 Qwen3.5 小尺寸系列四款模型的适配支持,相关模型文件与权重已同步上线 AtomGit AI,开发者们可直接获取并进行部署测试啦~

🔗 vLLM Ascend 部署:

0.8B ➡️ https://ai.atomgit.com/vLLM_Ascend/Qwen3.5-0.8B

2B ➡️ https://ai.atomgit.com/vLLM_Ascend/Qwen3.5-2B

4B ➡️ https://ai.atomgit.com/vLLM_Ascend/Qwen3.5-4B

9B ➡️ https://ai.atomgit.com/vLLM_Ascend/Qwen3.5-9B

🔗 SGLang 部署:

0.8B ➡️ https://ai.atomgit.com/SGLangAscend/Qwen3.5-0.8B

2B ➡️ https://ai.atomgit.com/SGLangAscend/Qwen3.5-2B

4B ➡️ https://ai.atomgit.com/SGLangAscend/Qwen3.5-4B

9B ➡️ https://ai.atomgit.com/SGLangAscend/Qwen3.5-9B

小尺寸,不等于低能力

Qwen3.5 小模型系列继承了家族的统一架构与训练体系,采用原生多模态训练与最新模型结构优化,在轻量体积下依然保持了不错的综合能力。

📌 0.8B / 2B:轻量化优先,面向端侧部署

特点:参数规模小,占用资源低,推理延迟控制表现突出,适合算力与显存受限环境。

适用场景:移动端设备、IoT 边缘节点、本地嵌入式场景,以及对实时响应要求较高的低时延交互应用。

📌 4B:轻量级 Agent 与多模态应用的平衡选择

特点:在保持较低资源消耗的同时,具备较完整的多模态理解与推理能力,适合作为中等复杂度任务的基础模型。

适用场景:轻量级智能体(Agent)构建、多模态交互应用、对推理能力与算力成本需平衡控制的业务场景。

📌 9B:紧凑规模下的高能力密度模型

特点:在中小参数规模下实现较高能力上限,综合性能表现接近更大规模模型,媲美 gpt-oss-120B,具备较强的泛化与复杂任务处理能力。

适用场景:适合需要较高智力水平但受限显存资源的服务器端部署,是性价比极高的通用模型选择。

接下来我们以 Qwen3.5-2B 为例,带大家一步步完成在 Ascend 上的基于 vLLM 和SGLang 的部署流程,其他几款模型的部署方式基本一致,可类比操作。

Qwen3.5-2B 基于 vLLM 部署流程

环境准备

模型权重

注: 建议将模型权重下载至多节点共享目录,例如  /root/.cache/。

安装

1️⃣ 官方 Docker 镜像

您可以通过镜像链接下载镜像压缩包来进行部署,具体流程如下:

# 使用docker加载下载的镜像压缩包 # 根据您的环境更新要加载的vllm-ascend镜像压缩包名称,以下以A3 arm为例: docker load -i Vllm-ascend-Qwen3_5-A3-Ubuntu-v0.tar  # 根据您的设备更新 --device(Atlas A3:/dev/davinci[0-15])。 # 注意:您需要提前将权重下载至 /root/.cache。 # 更新 vllm-ascend 镜像,并配置对应的Image名 export IMAGE=vllm-ascend:qwen3_5-v0-a3  export NAME=vllm-ascend # 使用定义的变量运行容器 # 注意:若使用 Docker 桥接网络,请提前开放可供多节点通信的端口 docker run --rm \ --name $NAME \ --net=host \ --shm-size=100g \ --device /dev/davinci0 \ --device /dev/davinci1 \ --device /dev/davinci2 \ --device /dev/davinci3 \ --device /dev/davinci4 \ --device /dev/davinci5 \ --device /dev/davinci6 \ --device /dev/davinci7 \ --device /dev/davinci_manager \ --device /dev/devmm_svm \ --device /dev/hisi_hdc \ -v /usr/local/dcmi:/usr/local/dcmi \ -v /usr/local/Ascend/driver/tools/hccn_tool:/usr/local/Ascend/driver/tools/hccn_tool \ -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \ -v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \ -v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \ -v /etc/ascend_install.info:/etc/ascend_install.info \ -v /root/.cache:/root/.cache \ -it $IMAGE bash

2️⃣ 源码构建

如果您不希望使用上述 Docker 镜像,也可通过源码完整构建:

  • 保证你的环境成功安装了 CANN 8.5.0
  • 从源码安装  vllm-ascend ,请参考安装指南

从源码安装  vllm-ascend  后,您需要将 vllm、vllm-ascend、transformers 升级至主分支:

# 升级 vllm git clone https://github.com/vllm-project/vllm.git cd vllm git checkout a75a5b54c7f76bc2e15d3025d6 git fetch origin pull/34521/head:pr-34521 git merge pr-34521 VLLM_TARGET_DEVICE=empty pip install -v . # 升级 vllm-ascend pip uninstall vllm-ascend -y git clone https://github.com/vllm-project/vllm-ascend.git cd vllm-ascend git checkout c63b7a11888e9e1caeeff8 git fetch origin pull/6742/head:pr-6742 git merge pr-6742 pip install -v . # 重新安装 transformers git clone https://github.com/huggingface/transformers.git cd transformers git reset --hard fc9137225880a9d03f130634c20f9dbe36a7b8bf pip install .

如需部署多节点环境,您需要在每个节点上分别完成环境配置。

部署

单节点部署

A3 系列

执行以下脚本进行在线推理。

export PYTORCH_NPU_ALLOC_CONF="expandable_segments:True" export HCCL_OP_EXPANSION_MODE="AIV" export HCCL_BUFFSIZE=1024 export OMP_NUM_THREADS=1 export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD export TASK_QUEUE_ENABLE=1 vllm serve /root/.cache/modelscope/hub/models/vllm-ascend/Qwen3.5-2B/ \     --served-model-name "qwen3.5" \     --host 0.0.0.0 \     --port 8010 \     --data-parallel-size 1 \     --tensor-parallel-size 4 \     --max-model-len 5000 \     --max-num-batched-tokens 16384 \     --max-num-seqs 128 \     --gpu-memory-utilization 0.94 \     --trust-remote-code \     --async-scheduling \     --allowed-local-media-path / \     --mm-processor-cache-gb 0 \ --enforce-eager \     --additional-config '{"enable_cpu_binding":true, "multistream_overlap_shared_expert": true}' 

执行以下脚本向模型发送一条请求:

curl http://localhost:8000/v1/completions \   -H "Content-Type: application/json" \   -d '{         "prompt": "The future of AI is",         "path": "/path/to/model/Qwen3.5-2B/",         "max_tokens": 100,         "temperature": 0         }'

​​​​​执行结束后,您可以看到模型回答如下:

Prompt: 'The future of AI is', Generated text: ' not just about building smarter machines, but about creating systems that can collaborate with humans in meaningful, ethical, and sustainable ways. As AI continues to evolve, it will increasingly shape how we live, work, and interact — and the decisions we make today will determine whether this future is one of shared prosperity or deepening inequality.\n\nThe rise of generative AI, for example, has already begun to transform creative industries, education, and scientific research. Tools like ChatGPT, Midjourney, and'

也可执行以下脚本向模型发送一条多模态请求:

curl http://localhost:8000/v1/completions \   -H "Content-Type: application/json" \     -d '{         "model": "qwen3.5",         "messages": [             {"role": "system", "content": "You are a helpful assistant."},             {"role": "user", "content": [                 {"type": "image_url", "image_url": {"url": "https://modelscope.oss-cn-beijing.aliyuncs.com/resource/qwen.png"}},                 {"type": "text", "text": "What is the text in the illustrate?"}             ]}         ]     }'

​​​​​​执行结束后,您可以看到模型回答如下:

{"id":"chatcmpl-9dab99d55addd8c0","object":"chat.completion","created":1771060145,"model":"qwen3.5","choices":[{"index":0,"message":{"role":"assistant","content":"TONGYI Qwen","refusal":null,"annotations":null,"audio":null,"function_call":null,"tool_calls":[],"reasoning":null},"logprobs":null,"finish_reason":"stop","stop_reason":null,"token_ids":null}],"service_tier":null,"system_fingerprint":null,"usage":{"prompt_tokens":112,"total_tokens":119,"completion_tokens":7,"prompt_tokens_details":null},"prompt_logprobs":null,"prompt_token_ids":null,"kv_transfer_params":null}

Qwen3.5-2B 基于 SGLang 部署流程

环境准备

安装

NPU 运行时环境所需的依赖已集成到 Docker 镜像中,并上传至 quay.io 平台,用户可直接拉取该镜像。

#Atlas  800 A3 swr.cn-southwest-2.myhuaweicloud.com/base_image/dockerhub/lmsysorg/sglang:main-cann8.5.0-a3 #Atlas  800 A2 swr.cn-southwest-2.myhuaweicloud.com/base_image/dockerhub/lmsysorg/sglang:main-cann8.5.0-910b #start  container docker run -itd --shm-size=16g --privileged=true --name ${NAME} \ --privileged=true --net=host \ -v /var/queue_schedule:/var/queue_schedule \ -v /etc/ascend_install.info:/etc/ascend_install.info \ -v /usr/local/sbin:/usr/local/sbin \ -v /usr/local/Ascend/driver:/usr/local/Ascend/driver \ -v /usr/local/Ascend/firmware:/usr/local/Ascend/firmware \ --device=/dev/davinci0:/dev/davinci0  \ --device=/dev/davinci1:/dev/davinci1  \ --device=/dev/davinci2:/dev/davinci2  \ --device=/dev/davinci3:/dev/davinci3  \ --device=/dev/davinci4:/dev/davinci4  \ --device=/dev/davinci5:/dev/davinci5  \ --device=/dev/davinci6:/dev/davinci6  \ --device=/dev/davinci7:/dev/davinci7  \ --device=/dev/davinci8:/dev/davinci8  \ --device=/dev/davinci9:/dev/davinci9  \ --device=/dev/davinci10:/dev/davinci10  \ --device=/dev/davinci11:/dev/davinci11  \ --device=/dev/davinci12:/dev/davinci12  \ --device=/dev/davinci13:/dev/davinci13  \ --device=/dev/davinci14:/dev/davinci14  \ --device=/dev/davinci15:/dev/davinci15  \ --device=/dev/davinci_manager:/dev/davinci_manager \ --device=/dev/hisi_hdc:/dev/hisi_hdc \ --entrypoint=bash \ quay.io/ascend/sglang:${tag}

权重下载

🔗 Qwen2.5-2B:https://ai.atomgit.com/hf_mirrors/Qwen/Qwen3.5-2B

部署

单节点部署

执行以下脚本进行在线推理。

# high performance cpu echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor sysctl -w vm.swappiness=0 sysctl -w kernel.numa_balancing=0 sysctl -w kernel.sched_migration_cost_ns=50000 # bind cpu export SGLANG_SET_CPU_AFFINITY=1 unset https_proxy unset http_proxy unset HTTPS_PROXY unset HTTP_PROXY unset ASCEND_LAUNCH_BLOCKING # cann source /usr/local/Ascend/ascend-toolkit/set_env.sh source /usr/local/Ascend/nnal/atb/set_env.sh export STREAMS_PER_DEVICE=32 export HCCL_BUFFSIZE=1000 export HCCL_OP_EXPANSION_MODE=AIV export HCCL_SOCKET_IFNAME=lo export GLOO_SOCKET_IFNAME=lo python3 -m sglang.launch_server \         --model-path $MODEL_PATH \         --attention-backend ascend \         --device npu \         --tp-size 1 \         --chunked-prefill-size -1 --max-prefill-tokens 120000 \         --disable-radix-cache \         --trust-remote-code \         --host 127.0.0.1 \         --mem-fraction-static 0.8 \         --port 8000 \         --cuda-graph-bs 16 \         --enable-multimodal \         --mm-attention-backend ascend_attn

发送请求测试

curl --location http://127.0.0.1:8000/v1/chat/completions --header 'Content-Type: application/json' --data '{   "model": "qwen3.5",   "messages": [     {       "role": "user",       "content": [         {           "type": "image_url",           "image_url": {"url": "/image_path/qwen.png"}          },         {"type": "text", "text": "What is the text in the illustrate?"}       ]     }   ] }'

​​​​​​结果返回如下

{"id":"cdcd6d14645846e69cc486554f198154","object":"chat.completion","created":1772098465,"model":"qwen3.5","choices":[{"index":0,"message":{"role":"assistant","content":"The user is asking about the text present in the image. I will analyze the image to identify the text.\n</think>\n\nThe text in the image is \"TONGyi Qwen\".","reasoning_content":null,"tool_calls":null},"logprobs":null,"finish_reason":"stop","matched_stop":248044}],"usage":{"prompt_tokens":98,"total_tokens":138,"completion_tokens":40,"prompt_tokens_details":null,"reasoning_tokens":0},"metadata":{"weight_version":"default"}}

声明

当前为尝鲜版本,我们还在持续优化性能,给大家带来更好的体验。

以上内容及代码仓中提到的数据集和模型仅作示例使用,仅供非商业用途学习与参考。如果您基于示例使用这些数据集和模型,请注意遵守对应的开源协议(License),避免产生相关纠纷。

如果您在使用过程中遇到任何问题(包括功能、合规等),欢迎在代码仓提交 Issue,我们会及时查看并回复~

Read more

什么是Webhook?工作原理?如何实现?缺点?

什么是Webhook?工作原理?如何实现? 背景 在使用钉钉机器人配置Stream推送 - 钉钉开放平台,qq机器人(微信没有机器人),企业微信机器人、飞书机器人、GitHub WebHook、腾讯问卷这些应用时, 这些应用都提供了Webhook,它允许系统之间在事件发生时主动传递信息,而无需持续轮询。 有的人一开始可能很困惑,什么是Webhook?如何使用? 什么是 Webhook? 通俗一点就是,你(自己的服务器提供一个webhook)在手机(其它支持webhook的平台注册)上定了一个明天早上6点的闹钟(将自己的webhook注册在其它平台上),当时间来到第二天早上6点时候,手机(其它支持webhook的平台)闹钟响起(触发你注册的webhook),你(自己的服务器提供一个webhook)就会听到铃声响起来(自己的服务器上的webhook触发)。 Webhook 是一种简单的 HTTP 回调机制,它允许一个应用程序在事件发生时自动通过 HTTP 请求通知另一个应用程序。这意味着 Webhook 在某个特定事件发生时,自动向指定的 URL

从Web到全平台:Capacitor打包工具实战指南

作为前端开发者,你是否曾面临这样的困境:好不容易用React、Vue或Angular开发完Web应用,却被要求适配iOS和Android端?学习原生开发成本太高,找原生团队协作又耗时费力。今天要给大家介绍的Capacitor,正是解决这个痛点的利器——由Ionic团队打造的现代跨平台打包工具,能让Web开发者零原生基础也能构建全平台应用。 一、为什么选Capacitor?先看它的核心优势 在接触具体用法前,我们得先搞清楚:Capacitor凭什么成为Web转原生的优选?对比传统方案,它的优势太明显了: 1. 零框架侵入,适配所有Web项目 不同于某些强绑定框架的工具,Capacitor对前端技术栈完全无要求。不管你是用React写的管理系统、Vue开发的移动端页面,还是原生HTML/CSS/JS写的项目,都能直接接入打包。我曾把一个基于Vue3的官网快速打包成APP,整个过程没改一行业务代码。 2. 现代WebView加持,性能接近原生 Capacitor在iOS端采用WKWebView,Android端使用Chromium WebView,这俩都是各平台性能最优的Web

【前端】--- ES6下篇(带你深入了解ES6语法)

【前端】--- ES6下篇(带你深入了解ES6语法)

前言:ECMAScript是 JavaScript 的标准化版本,由 ECMA 国际组织制定。ECMAScript 定义了 JavaScript 的语法、类型、语句、关键字、保留字等。 ES6 是 ECMAScript 的第六个版本,于 2015 年发布,引入了许多重要的新特性,使 JavaScript 更加现代化。 进制  ES6 中增加了二进制和八进制的写法: 二进制使用前缀 '0b' 或 '0B' , 八进制使用前缀 '0o' 或 '0O'                       二进制: 前缀:   0b 或 0B:

Cursor实战:Web版背单词应用开发演示

Cursor实战:Web版背单词应用开发演示

Cursor实战:Web版背单词应用开发演示 * 需求分析 * 自行编写需求文档 * 借助Cursor生成需求文档 * 前端UI设计 * 后端开发 * 项目结构 * 环境参数 * 数据库设计 * 安装Python依赖 * 运行应用 * 前端代码修改 * 测试前端界面 * 测试数据生成 * 功能测试 * Bug修复 * 总结 在上一篇《Cursor AI编程助手不完全指南》中,我们详细介绍了Cursor这款强大的AI编程工具。为了让大家能更直观地了解 Cursor 的实战应用价值,本文将通过一个实际项目来展示其开发流程。我们将使用 Cursor 开发一个 Web 版单词学习程序,通过这个案例,您将看到 AI 辅助开发的完整过程,体验从需求分析到代码实现的全过程。让我们开始这次实战之旅。 需求分析 在开始开发之前,明确的需求文档是项目成功的关键。一个好的需求文档不仅能指导开发方向,还能作为与 Cursor 进行高效对话的重要基础。我们有两种方式来准备需求文档:自行编写需求文档和借助 Cursor 生成需求文档