vLLM for Baidu Kunlun
Summary
vLLM Kunlun is a community-maintained hardware plugin that enables vLLM to run on Baidu Kunlun XPU, supporting 20+ LLMs, quantization, LoRA, and speculative decoding.
View Cached Full Text
Cached at: 07/31/26, 08:45 AM
baidu/vLLM-Kunlun
Source: https://github.com/baidu/vLLM-Kunlun

๐ Documentation | ๐ Quick Start | ๐ฆ Installation | ๐ฌ Slack
Latest News ๐ฅ
- [2026/07] ๐ง v0.25.1 under development โ Added Qwen3.5 / Qwen3.5-MoE, Gemma4 (text and multimodal), GLM MoE DSA, and DFlash speculative decoding
- [2026/02] โก Performance optimizations โ Fused MoE with small batches, optimized attention metadata building, Multi-LoRA inference achieves 80%+ of non-LoRA performance
- [2026/02] ๐ง DeepSeek-V3.2 MTP support โ Added MTP (Multi-Token Prediction) for DeepSeek-V3.2, with RoPE and decoding stage kernel optimizations
- [2026/01] ๐ข New quantization methods โ Support for compressed-tensors W4A16, AWQ MoE W4A16, and DeepSeek-V3.2 W8A8 quantization
- [2026/01] ๐ ๏ธ CI/CD overhaul โ Added E2E tests, unit test CI, ruff format checks, and modular CI workflow refactoring
- [2025/12] ๐ v0.11.0 released โ Added Qwen3-Omni, Qwen3-Next, Seed-OSS support (Release Notes)
- [2025/12] ๐ฆ v0.10.1.1 released โ 5+ multimodal models, AWQ/GPTQ quantization for dense models, Piecewise Kunlun Graph, vLLM V1 engine, Flash-Infer Top-K/Top-P sampling with 10-100ร speedup (Release Notes)
- [2025/12] ๐ Initial release of vLLM Kunlun โ Open sourced on Dec 8, 2025
Overview
vLLM Kunlun (vllm-kunlun) is a community-maintained hardware plugin designed to seamlessly run vLLM on the Kunlun XPU. It is the recommended approach for integrating the Kunlun backend within the vLLM community, adhering to the principles outlined in the RFC Hardware Pluggable.
This plugin provides a hardware-pluggable interface that decouples the integration of the Kunlun XPU with vLLM. By utilizing vLLM Kunlun, popular open-source models โ including Transformer-like, Mixture-of-Expert (MoE), Embedding, and Multi-modal LLMs โ can run effortlessly on the Kunlun XPU.
โจ Key Features
- Seamless Plugin Integration โ Works as a standard vLLM platform plugin via Python entry points, no need to modify vLLM source code
- Broad Model Support โ Supports 20+ mainstream LLMs including Qwen, Llama, DeepSeek, GLM, Gemma4, Kimi-K2, and multimodal models
- Quantization Support โ W8A8 (INT8), AWQ, GPTQ, and compressed-tensors W4A16 for MoE and dense models
- LoRA Fine-Tuning โ LoRA and Multi-LoRA adapter support for Qwen series models
- Piecewise Kunlun Graph โ Hardware-accelerated graph optimization for high-performance inference
- FlashMLA Attention โ Optimized multi-head latent attention for DeepSeek MLA architectures
- Speculative Decoding โ MTP (Multi-Token Prediction) for DeepSeek-V3.2 and DFlash/EAGLE-style proposers
- Tensor Parallelism โ Multi-device parallel inference with distributed execution support
- OpenAI-Compatible API โ Serve models with the standard OpenAI API interface
Prerequisites
- Hardware: Kunlun3 P800
- OS: Ubuntu 20.04
- Software:
- Python >= 3.10
- PyTorch >= 2.5.1 (KL3-customized
xpytorchbuild, see Installation) - vLLM (matching version, see requirements.txt)
- transformers == 5.2.0 (Qwen3.5 requires transformers 5.x)
Supported Models
Generative Models
| Model | Support | Quantization | LoRA | Kunlun Graph |
|---|---|---|---|---|
| Qwen2 | โ | โ | โ | โ |
| Qwen2.5 | โ | โ | โ | โ |
| Qwen3 | โ | โ | โ | โ |
| Qwen3-Moe | โ | โ | โ | โ |
| Qwen3-Next | โ | โ | โ | โ |
| Qwen3.5 | โ | โ | โ | |
| Qwen3.5-Moe | โ | โ | โ | |
| MiMo-V2-Flash | โ | โ | โ | |
| Llama2 | โ | โ | โ | โ |
| Llama3 | โ | โ | โ | โ |
| Llama3.1 | โ | โ | โ | |
| gpt-oss | โ | โ | ||
| Gemma4 | โ | โ | ||
| GLM4.5 | โ | โ | โ | |
| GLM4.5Air | โ | โ | โ | |
| GLM5 | โ | โ | โ | |
| InternLM2 | โ | โ | ||
| Seed-OSS | โ | โ | ||
| DeepSeek-R1 | โ | โ | โ | |
| DeepSeek-V3 | โ | โ | โ | |
| DeepSeek-V3.2 | โ | โ | โ | |
| Kimi-K2 | โ | โ | โ |
Multimodal Language Models
| Model | Support | Quantization | LoRA | Kunlun Graph |
|---|---|---|---|---|
| Qwen2-VL | โ | โ | โ | |
| Qwen2.5-VL | โ | โ | โ | |
| Qwen3-VL | โ | โ | โ | |
| Qwen3-VL-MoE | โ | โ | โ | |
| Gemma4 | โ | โ | ||
| InternVL-2.5 | โ | โ | ||
| InternVL-3.5 | โ | โ | ||
| InternS1 | โ | โ |
Performance Visualization ๐
High-performance computing at work: How different models perform on the Kunlun3 P800.
Current environment: 16-way concurrency, input/output size 2048.

Quick Start
Start an OpenAI-Compatible API Server
python -m vllm.entrypoints.openai.api_server \
--host 0.0.0.0 \
--port 8356 \
--model <your-model-path> \
--gpu-memory-utilization 0.9 \
--trust-remote-code \
--max-model-len 32768 \
--tensor-parallel-size 1 \
--dtype float16 \
--max_num_seqs 128 \
--max_num_batched_tokens 32768 \
--block-size 128 \
--no-enable-prefix-caching \
--no-enable-chunked-prefill \
--distributed-executor-backend mp \
--served-model-name <your-model-name>
Send a Request
curl http://localhost:8356/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "<your-model-name>",
"messages": [{"role": "user", "content": "Hello!"}],
"max_tokens": 512
}'
Version Matrix
| Version | Release Type | Documentation |
|---|---|---|
| v0.25.1 | Latest development version (main) | Quick Start ยท Installation |
| v0.11.0 | Latest stable release | Quick Start ยท Installation |
Architecture
vllm-kunlun/
โโโ vllm_kunlun/ # Core plugin package
โ โโโ platforms/ # Kunlun XPU platform implementation
โ โโโ models/ # Model implementations (DeepSeek, Qwen, Gemma4, InternVL, etc.)
โ โโโ ops/ # Custom operators
โ โ โโโ attention/ # FlashMLA, paged attention, merge attention states
โ โ โโโ fla/ # Flash linear attention operations
โ โ โโโ fused_moe/ # Fused MoE kernels
โ โ โโโ mamba/ # Mamba / linear-attention state ops
โ โ โโโ rotary_embedding/ # RoPE variants
โ โโโ quantization/ # AWQ, GPTQ, compressed-tensors, moe_wna16
โ โโโ lora/ # LoRA / Multi-LoRA support
โ โโโ v1/ # vLLM V1 engine adaptations (incl. spec decode: MTP, DFlash)
โ โโโ distributed/ # Communicators and distributed helpers
โ โโโ entrypoints/ # OpenAI-compatible serving overrides and tool parsers
โ โโโ reasoning/ # Reasoning parsers (Qwen3, Gemma4)
โ โโโ compilation/ # Torch compile wrapper for Kunlun Graph
โ โโโ transformers_utils/ # transformers config/tokenizer adaptations
โ โโโ csrc/ # C++ extensions (custom kernels)
โ โโโ config/ # Model configuration overrides
โโโ tests/ # Test suite
โโโ docs/ # Documentation (Sphinx-based, ReadTheDocs hosted)
โโโ ci/ # CI pipeline configurations
โโโ setup.py # Legacy build script (with C++ extensions)
โโโ pyproject.toml # Modern Python build configuration (hatchling)
Contributing
We welcome contributions from the community! Please read our Contributing Guide before submitting a PR.
PR Classification
Use the following prefixes for PR titles:
[Attention]โ Attention mechanism features/optimizations[Core]โ Core vllm-kunlun logic (platform, attention, communicators, model runner)[Kernel]โ Compute kernels and ops[Bugfix]โ Bug fixes[Doc]โ Documentation improvements[Test]โ Tests[CI]โ CI/CD improvements[Misc]โ Other changes
Star History ๐ฅ
We opened the project at Dec 8, 2025. We love open source and collaboration โค๏ธ
Sponsors ๐
We sincerely appreciate the KunLunXin team for their support in providing XPU resources, which enabled efficient model adaptation debugging, comprehensive end-to-end testing, and broader model compatibility.
License
Apache License 2.0, as found in the LICENSE file.
Similar Articles
vllm-project/vllm
vLLM is a fast, open-source library for LLM inference and serving, featuring PagedAttention, continuous batching, broad quantization and hardware support, and compatibility with 200+ Hugging Face model architectures.
llm-d (Website)
llm-d ๆฏไธไธชๅผๆบใKubernetes ๅ็็ๅๅธๅผ LLM ๆจ็ๆ ๏ผๆฏๆ vLLMใSGLang ็ญๅผๆ๏ผๅฏๅจ GPUใTPUใXPU ็ญๅผๆ็กฌไปถไธๆไพ็ไบง็บงๆๅก๏ผๅนถๅฎฃ็งฐๅคงๅน ๆๅๅๅ้ไธ้ไฝ TTFTใ
vLLM v0.28.0
vLLM v0.28.0 is an updated release of the open-source library for fast and efficient LLM inference and serving, featuring enhancements like PagedAttention and broad hardware support.
Inference Engines for LLMs & Local AI Hardware (2026 Edition)
This article provides a comprehensive guide to LLM inference engines for local AI hardware in 2026, explaining how to choose based on hardware strategy, workload, and serving model, and covering engines like llama.cpp, MLX, ExLlamaV2/3, vLLM, SGLang, TensorRT-LLM, and NVIDIA Dynamo.
Inside vLLM: Anatomy of a High-Throughput LLM Inference System (2025)
A deep dive into vLLM's architecture and components for high-throughput LLM inference, covering scheduling, paged attention, continuous batching, advanced features, scaling, serving, and benchmarking.