[REQUEST] Inference V2: add one model family on the existing kernels (dense Qwen3 proposed)
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend, machine-learning
Hướng nghiên cứu
Read deepspeed/inference/v2/model_implementations/AddingAModel.md and the existing Qwen2 implementation and factory to understand the container, model, policy, and build_hf_engine patterns. The proposed scope is a dense Qwen3 family with QK RMSNorm between QKV projection and attention, plus a state-dict mapping check and a small forward comparison against Hugging Face. First confirm the inference owners welcome the contribution and agree on the QK-norm approach; no tests or exact file paths for them are named.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
deepspeed/inference/v2/model_implementations is a hand-written backend, not a generic Hugging Face runner. build_hf_engine only accepts opt, llama, mistral, mixtral, falcon, phi, phi3, qwen, qwen2, qwen2_moe, exaone4, and exaone4_5. Every other model_type raises Unsupported model type. The factory still says # TODO: generalize this to other models.
Each added model needs a parameter container, a forward on DSTransformerModelBase, and an InferenceV2Policy, then a branch in the factory. The kernels underneath stay the same: fp16/bf16, LayerNorm or RMSNorm, GELU/ReLU/SiLU or the gated forms, RoPE (rotate_half / rotate_every_other) or ALiBi, causal ragged attention, and an optional MoE GEMM.
Describe the solution you'd like
I would like to add one family, and only after you say the contribution is welcome.
Proposed family: dense Qwen3 (model_type=qwen3). Qwen, Qwen2, and Qwen2-MoE are already implemented, so the container and policy pattern is the one you already review. This would not include Qwen3-MoE or Qwen3-Next. Qwen3-Next is a hybrid attention model and does not fit these kernels.
Qwen3's decoder matches the Qwen2 block except for one step: RMSNorm on q and k, per head, after the QKV projection and before RoPE. The Qwen2 forward already has a boundary between self.qkv(...) and self.attn(...). The plan is to norm q and k there with the existing RMSNorm module, then call attention unchanged. No new CUDA op.
Scope if you agree:
model_implementations/qwen_v3/: container, model, policy, followingAddingAModel.mdand the Qwen2 files- one
qwen3branch inbuild_hf_engine - a check that the container mapping accepts a Qwen3 state dict, and a small forward comparison against Hugging Face on a tiny random config
Out of scope unless you ask for it: new CUTLASS or ragged-attention kernels, MLA, sliding-window or hybrid attention, multimodal towers, and Qwen3-MoE.
Describe alternatives you've considered
- A family that is only a checkpoint remap of the Llama/Qwen2 block, with no forward change. That is smaller, and I will switch to it if you would rather not have the QK-norm step in the model forward.
- Leaving Inference V2 as it is. The older injection path under
deepspeed/model_implementationsis a different engine and does not cover this either.
Additional context
Questions for the inference owners (@hwchen2017 @tohtana):
- Is a contribution that adds one Inference V2 family on the existing kernels welcome?
- Is dense Qwen3 the family you want, or should this be a pure remap of a model you name?
- Is applying the existing RMSNorm to q and k between
qkvandattnacceptable, or does QK-norm need to stay inside the attention kernel?
Happy to adjust the family or drop the QK-norm approach if it does not match how you want this code to grow.
- Ngôn ngữ chính
- Python
- Star
- 43.3k
- Fork
- 5.1k
- Merge trung bình
- 5 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 85
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của deepspeedai/DeepSpeed
-
[Bug] DeepSpeedEngine.step leaves _running_engine_step=True permanently on exception, corrupting is_gradient_accumulation_boundary()Có thể đã có người làm @its-amann đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
deepspeedai/DeepSpeed#9190 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug] PipelineEngine._exec_reduce_grads and _exec_optimizer_step leave _force_grad_boundary=True permanently after any exceptionCó thể đã có người làm @bantianyue đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
deepspeedai/DeepSpeed#9183 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
deepspeedai/DeepSpeed#9019 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
fp16 `hysteresis: 0` (or negative) makes DynamicLossScaler never lower the loss scale, so every overflowing step is skipped foreverCó thể đã có người làm @damienen đã nhận 26 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
deepspeedai/DeepSpeed#8982 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[BUG] OneCycle applies the minimum momentum to the first Adam updateCó thể đã có người làm @ai-yang đã nhận 30 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
deepspeedai/DeepSpeed#8951 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của deepspeedai/DeepSpeed
Issue tương tự
-
area/auth comp/agent P3 type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
NousResearch/hermes-agent#161417 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Dao-AILab/flash-attention#3251 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[New Check]: sqlserver_public_network_access_disabledCó thể đã có người làm @pouria-l đã nhận hôm nay. Đang mởfeature-request status/needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
prowler-cloud/prowler#13607 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
external langchain
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
langchain-ai/docs#8184 ·
Maintainer thường phản hồi trong vòng 1 ngày