mirror of
https://github.com/deepseek-ai/DeepInfer.git
synced 2026-10-28 23:07:09 +08:00
The pure-torch sparse attention followed FlashMLA's tests/ref.py (fp32 P). The CUDA kernels (sm100 prefill phase1.cuh:238-253) and the official reference round P = exp(s - running_max) to bf16 before the P@V GEMM in an online softmax; do the same with 64-key blocks. Localized with examples/neuron/probe_layer0.py (per-op reference vs DeepInfer capture): layer 0 is now bit-exact up to two rounding points that are DeepInfer's own GPU/Ascend behaviour (SwiGLU -> FP8 from fp32, bf16 routed partial in the MoE combine). CPU end-to-end on the tiny checkpoint: 26/27 greedy tokens match the reference, the miss being a 0.0096-margin step the reference flips against itself. 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 | ||