mirror of
https://github.com/deepseek-ai/DeepInfer.git
synced 2026-10-28 23:07:09 +08:00
- Decode runs eagerly and compiles per-layer regions (attention half, MoE) with stage boundaries (neuron_ops/regions.py, DEEPINFER_NEURON_GRAPH_MODE=regions); layer KV views are sliced from the roots inside the graph (_LazyKVCache). - vllm-neuron#71 NKI kernels (Apache-2.0, vendored under neuron_ops/nki/ with attribution), called via torch_neuronx.nki_hop.wrap_nki: blockquant (fp8/fp4 GEMMs incl. grouped einsum, MoE and shared expert on bf16 activations), sparse_attn / index_score / compress_pool (nki_attention.py), hc_mixes / hc_expand / hc_collapse / hc_attn_out / rmsnorm / swiglu (nki_hc.py, nki_norm.py). - Compile-safe formulations: row-major scales, no dtype bitcasts of graph inputs (uint8 weight tensors), whole-row KV stores, byte assembly in int32 narrowed once at the store, arithmetic int16 scale packing, plain fma/rsqrt and bf16 F.linear under compile; default backend deepinfer_neuron (torch fp8 carried as uint8, avoiding NCC_EOCP001 with the kernels' OCP fp8). - Host: tiny model 9/9 vs golden on all prompts; device: kernel tests pass (13 attention, 88 hc/norm); region decode graph compiles except the attention projection stage (being reduced). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| asc | ||
| cuda | ||
| neuron | ||
| __init__.py | ||
| cache_common.py | ||
| candidate_blocks.py | ||
| common.py | ||
| compress.py | ||
| compute_seqlens_k_zos.py | ||
| conftest.py | ||
| dflash_copy.py | ||
| dflash.py | ||
| flash_mla_utils.py | ||
| fused_sample.py | ||
| fused_transform.py | ||
| gather_engram_tokens_zos.py | ||
| gather_input_ids_zos.py | ||
| gather.py | ||
| get_kv_index.py | ||
| image_embed_ops.py | ||
| kv_index_cat.py | ||
| load_paged_kv_cache.py | ||
| norm.py | ||
| ops.py | ||
| outlier_detection.py | ||
| prepare_cp_mirror.py | ||
| prepare_v4_decode_metadata.py | ||
| random_sampling.py | ||
| sampler.py | ||
| schedule_mtp_varlen.py | ||
| state_cache.py | ||
| store_kv_cache.py | ||
| store_mtp_info.py | ||
| structure_output.py | ||
| sum_smaller_probs.py | ||
| swa_index.py | ||