Add Qwen3.6 MoE inference support

This commit is contained in:
2026-07-13 20:24:41 +08:00
parent 588bfd9df3
commit a2de146fb6
27 changed files with 3153 additions and 149 deletions

View File

@@ -3,13 +3,15 @@
> 从零用 **Rust + CUDA** 构建的 LLM 推理引擎,目标是吃透 LLM Serving 全栈技术。
xserv 不依赖 PyTorch / vLLM / TensorRT 等现成框架自己实现了张量抽象、CUDA kernel、
分词器、模型前向、KV cache、调度器和 OpenAI 兼容的 HTTP 服务。支持 **Qwen3-8B**BF16
**gpt-oss-20b**MoEBF16/FP8/MXFP4 量化),多卡 TP/PP并提供一套与 **llama.cpp**
分词器、模型前向、KV cache、调度器和 OpenAI 兼容的 HTTP 服务。支持 **Qwen3-8B**
**Qwen3.6-35B-A3B**BF16**gpt-oss-20b**MoEBF16/FP8/MXFP4 量化),多卡
TP/PP并提供一套与 **llama.cpp**
对比正确性和性能的标准 benchmark。
## 现状一览
- **模型**GPT-2124M、Qwen3-8BBF16gpt-oss-20b32 专家 top-4 MoEharmony 格式)
- **模型**GPT-2124M、Qwen3-8BBF16Qwen3.6-35B-A3B256 专家 top-8 MoEBF16
gpt-oss-20b32 专家 top-4 MoEharmony 格式)
- **性能**RTX 5090贪心单流
- Qwen3-8B BF16 单卡:约 56 tok/sHF transformers 的 1.4×
- gpt-oss-20b FP8 稀疏 MoE + CUDA Graph decode**TPOT 5.8ms~172 tok/s
@@ -110,6 +112,14 @@ curl http://localhost:8080/v1/chat/completions \
其它端点:`GET /health``GET /v1/models`
Qwen3.6-35B-A3B 当前走 8 卡流水线并行BF16暂不支持单卡或 TP
```bash
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \
./target/release/xserv-server /path/to/qwen3.6-35b-a3b \
--pp 8 --max-batch 1 --max-seq-len 4096
```
### 2. 命令行推理
```bash