mirror of
https://github.com/deepseek-ai/DeepInfer.git
synced 2026-10-28 23:07:09 +08:00
The fp4 expert GEMMs dequantize the whole weight to bf16 in HBM on every call (device profile: the MoE graph reads 756 MB a layer), and a rank computes all 6 of its experts while a 6-row step routes to about one. fp4_linear_2core_gated takes a per-expert flag (any row routed to it) and runs the dequant and GEMM in an nl.fori_loop bounded by it, so an unrouted expert costs a zero fill. Decode sizes only (<= 16 rows); prompt chunks route to every expert anyway. bench70 (vllm-sonnet 512, TP=64, nextn=5): TPOT 258.9 -> 248.4 ms, step 738 -> 711 ms, tokens per step identical. Tiny cp=2 nextn=5 on device: 9/9 golden tokens, drafts unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| _C | ||
| distributed | ||
| engine | ||
| entrypoints | ||
| hugging_face | ||
| model_executor | ||
| neuron_ops | ||
| npu_ops | ||
| structure_output | ||
| ve | ||
| worker | ||
| __init__.py | ||
| attrdict.py | ||
| config.py | ||
| environ.py | ||
| load_class.py | ||
| logger.py | ||
| model_config_loader.py | ||
| multimodal_tokens.py | ||
| platform.py | ||
| py.typed | ||
| sampling_params.py | ||
| sequence.py | ||
| shared_memory.py | ||
| testing.py | ||
| timer.py | ||
| utils.py | ||