来源:
1. fla-org/flash-linear-attention (5538 stars)
→ upstream_ref/fla/ops/gated_delta_rule/naive.py (正确的纯 PyTorch GDN)
→ upstream_ref/fla/ops/gated_delta_rule/chunk.py (Triton chunk kernel)
→ upstream_ref/fla/layers/gated_deltanet.py (层集成)
2. vllm-project/vllm main (88717 stars)
→ upstream_ref/vllm_gdn/gdn/qwen_gdn_linear_attn.py (1751行, Qwen3.5 原生 GDN)
→ upstream_ref/vllm_gdn/ops/causal_conv1d.py (1289行, 正确的 Conv1d)
→ upstream_ref/vllm_gdn/third_party/ops/ (FLA Triton ops vendored)
→ upstream_ref/vllm_gdn/models/qwen3_5.py (vllm 最新 Qwen3.5 模型)
3. Deep-Spark/xllm (BI-V100 硬件厂商)
→ upstream_ref/xllm_latest/core/layers/npu_torch/qwen3_gated_delta_net_base.cpp (576行)
→ upstream_ref/xllm_latest/core/kernels/npu/npu_causal_conv1d.cpp
→ upstream_ref/xllm_latest/core/kernels/npu/npu_recurrent_gated_delta_rule.cpp
目的: 修复 corex_gdn.py Conv1d groups 接口不匹配问题
错误: conv1d_weight shape (2560,1,4) 被当成 (num_k_heads,1,4) 索引
conv_dim = key_dim*2 + value_dim = 10240, TP=4 后 2560
FLA naive.py 和 vllm qwen_gdn_linear_attn.py 有正确的实现可直接对接
Upstream Reference: Deep-Spark xllm + vllm (FULL TREE)
Source repos (cloned 2026-08-09, Apache 2.0):
Deep-Spark/xllm— Iluvatar official C++ LLM inference engine (1470 files)Deep-Spark/vllm— Iluvatar official vllm fork (703 files, csrc + model layer)
What's here
xllm/ (complete source minus git/binaries/submodules)
天数智芯官方下一代推理引擎,C++ 原生,多平台(CUDA/ILU/MLU/NPU)。 包含 kernels → layers → models → runtime → scheduler → api_service 完整栈。
Key subtrees:
xllm/core/kernels/ilu/— ixformer API wrappers (ixformer.h是金矿)xllm/core/kernels/cuda/moe/— MoE CUDA kernels (topk_softmax, fused_topk)xllm/core/kernels/cuda/— activation, norm, rope, attention CUDA kernelsxllm/core/layers/ilu/— Iluvatar FusedMoE完整pipelinexllm/core/layers/npu_torch/— GatedDeltaNet C++ implementationxllm/models/llm/qwen3_5.h— Qwen3.5 model definitionxllm/compiler/tilelang/— GDN kernel code generation
ds_vllm/ (csrc + model layers + fused_moe)
天数智芯官方vllm fork,Python + CUDA torch extension。
csrc/— ALL CUDA source (attention, moe, quantization, cache)csrc/libtorch_stable/moe/topk_softmax_kernels.cu— vllm topk_softmaxvllm/_custom_ops.py— Python → torch.ops._moe_C bridgevllm/model_executor/models/qwen3_5.py— ds_vllm的qwen3_5实现vllm/model_executor/layers/fused_moe/— vllm FusedMoE Python layer