[Feature] DeepSeek-V4 MoE is Blackwell-only via DeepGEMM — is a non-Blackwell path wanted?
Maintainer thường phản hồi trong vòng 2 ngày
@grimoire đang làm issue này rồi.
Từ ngày 20/8/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Motivation
DeepSeek-V4 currently reaches only one MoE path in the PyTorch engine: DeepseekV4MoE constructs FusedMoEV4FP4 unconditionally (lmdeploy/pytorch/models/deepseek_v4.py:633), which resolves to TritonFusedMoEV4FP4Builder and ultimately to DeepGEMM's m_grouped_fp8_fp4_gemm_nt_contiguous. That kernel accepts packed FP4 expert weights only on arch_major == 10, as the implementation's own docstring notes — so the model is effectively Blackwell-only, and even SM90 is excluded.
That is a reasonable place to start, but it leaves out the hardware most self-hosted deployments in this ecosystem actually have. It also sits oddly next to LMDeploy's own position on old GPUs: TurboMind's MXFP4 support is advertised as working "on NVIDIA GPUs starting from V100". The model file itself carries no architecture gate; the restriction lives entirely in which MoE implementation gets selected.
I would like to know whether a non-Blackwell MoE path for DeepSeek-V4 is something the project wants. If it is, I am in a position to help with the part that is usually hardest to arrange — real hardware and measurements.
What I have
I have DeepSeek-V4-Flash-0731 serving on 8x A800 (SM80) through a different engine, using the stock checkpoint with no conversion step — the published e2m1 weights and e8m0 block scales are read as-is, decoded by a Marlin W4A16 kernel instead of DeepGEMM:
- GSM8K 96.44% (1272/1319, greedy, thinking off). The DeepSeek official API scores 96.29% on the same questions and grader, at the same 129 tokens/question — so the serving path costs nothing measurable in quality.
- 105.7 tok/s single-stream with speculative decoding; 330 tok/s aggregate at 16 concurrent
- needle-in-a-haystack clean across 4K / 32K / 128K x three needle depths
- prefill 19 s at 64K, 64 s at 218K; a repeat of the same 218K prompt returns in 0.87 s on a prefix-cache hit
- 1M context ceiling, fp8 KV cache
The point I'd draw from that: a Marlin-family W4A16 GEMM reproduces the published model on Ampere with no accuracy left on the table. There is nothing exotic needed for these weights.
The machine, in case it is useful to know what a contribution here would be validated on — 8x A800-SXM4-80GB, NVLink fully connected (NV8 between every pair), driver 590.44.01, 640 GB of GPU memory in one node. It is a dedicated box, not a shared slice, so I can hold a model resident and run whatever matrix is useful rather than working around a queue. If the answer to the question below is yes, testing on real SM80 silicon is the part I can cover — that is usually the awkward half of supporting hardware the maintainers do not have.
The relevant finding for LMDeploy: DeepSeek's published FP4 experts do not need Blackwell. A Marlin-family W4A16 GEMM decodes e2m1 with plain bit manipulation and runs on SM80 upward. The Blackwell requirement comes from DeepGEMM specifically, not from the weight format.
The gap, as far as I can see
lmdeploy/pytorch/kernels/cuda/ has fused_moe, blocked_fp8, w8a8 and v4_fp4, but no Marlin-family kernel, so there is currently nothing to fall back to for packed 4-bit experts. The two options I can see:
- Dequantise the FP4 experts to BF16 at load and use the generic fused MoE. Small change, but the expert weights grow roughly 4x — for V4-Flash that does not fit on 8x80GB, so it is not a real option at this scale.
- Bring in a Marlin-style W4A16 grouped GEMM and select it when the FP4 path is unavailable. This is the one that actually works, and it is a substantial piece of kernel work.
What I am asking
Is (2) something LMDeploy wants? I am not asking anyone to take on Ampere maintenance — I am asking whether a contribution in that direction would be welcome, before I spend days on a kernel port that might not have a home. If it is welcome I would rather do it in the open with the maintainers' guidance on where the pieces belong, and I can carry the A800 testing.
If the answer is that DeepSeek-V4 is intentionally Blackwell-only for now, that is a legitimate scope decision and I would rather hear it plainly than guess from the code.
Related resources
lmdeploy/pytorch/models/deepseek_v4.py:633— unconditionalFusedMoEV4FP4lmdeploy/pytorch/backends/cuda/moe/v4_fp4.py:106— "DeepGEMM's grouped FP8xFP4 kernels accept packed FP4 expert weights only on arch_major == 10"- #4658 — TurboMind support for the same model (different backend, related question)
- Ngôn ngữ chính
- Python
- Star
- 8.2k
- Fork
- 797
- Merge trung bình
- 3 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 52
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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 InternLM/lmdeploy
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug] apply_rotary_pos_emb: leaves output tails unwritten with partial rotationCó thể đã có người làm @shotsan đã nhận 15 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
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug] PyTorch engine ignores use_rslora, so rsLoRA adapters run sqrt(r) times too weakCó thể đã có người làm @Andreas-Hum đã 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 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[Feature] Expose `max_model_len` (session_len) in `/v1/models` model cardCó thể đã có người làm @FOWEPJF255 đã nhận 37 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của InternLM/lmdeploy
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
AIR-Bench Foundation reads the first letter of the word after "answer" as the model's choiceCó thể đã có người làm @beartester34 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
modelscope/evalscope#2330 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Distribution plot crashes when a numeric feature is constant in the train or test setCó thể đã có người làm @adembilge đã nhận hôm nay. Đang mởbug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
MAIF/shapash#847 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 10 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 2 ngày
-
namespace team:operations
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
EclipseFdn/open-vsx.org#16738 ·
Maintainer thường phản hồi trong vòng 1 ngày