whn09 0cae424dc4 Neuron: one KV gather per chunk for dense attention; no layer_idx guards (#26)
- nki_attention._chunk_attention: a prompt chunk run as a decode step gathers a
  dense compressed-KV scope once (every token's list is a prefix of the
  longest) and masks it per row; top-k and SWA scopes stay per row. The
  per-row gather was [128, 8192, 512] for a ratio-2 layer of the full model:
  3.8 GB moved per call and a 3 GB NEFF (model code) that ran HBM out.
- decode_part_timer: the decode timers are no-ops inside region graphs. Their
  f-string labels read layer_idx, so Dynamo guarded on it and retraced every
  layer instead of every layer kind.

Tiny V4.1 on a NeuronCore, bucket 128: short 9/9, long 9/9 (logit cos >= 0.997).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 04:32:20 +08:00
..
__init__.py initial commit 2026-10-20 12:09:42 +08:00
attn.py Neuron: one KV gather per chunk for dense attention; no layer_idx guards (#26) 2026-10-23 04:32:20 +08:00
builder.py initial commit 2026-10-20 12:09:42 +08:00
compress.py initial commit 2026-10-20 12:09:42 +08:00
containers.py initial commit 2026-10-20 12:09:42 +08:00
cross_layer.py initial commit 2026-10-20 12:09:42 +08:00
engram_metadata.py initial commit 2026-10-20 12:09:42 +08:00
engram_parameters.py initial commit 2026-10-20 12:09:42 +08:00
engram.py Neuron: full DeepSeek-V4.1-Flash load + decode region graphs at EP=64 (issues #21, #25) 2026-10-23 01:39:22 +08:00
hc_blocks.py initial commit 2026-10-20 12:09:42 +08:00
hc_lazy.py initial commit 2026-10-20 12:09:42 +08:00
hc.py Neuron: per-layer region graphs + vllm-neuron#71 NKI kernels (issues #10, #11, #13, #25) 2026-10-22 17:36:54 +08:00
heads.py initial commit 2026-10-20 12:09:42 +08:00
index_attn.py Neuron: one KV gather per chunk for dense attention; no layer_idx guards (#26) 2026-10-23 04:32:20 +08:00
linear.py initial commit 2026-10-20 12:09:42 +08:00
mhc_modeling.py Neuron: per-layer region graphs + vllm-neuron#71 NKI kernels (issues #10, #11, #13, #25) 2026-10-22 17:36:54 +08:00
mhc_ops.py Neuron: per-layer region graphs + vllm-neuron#71 NKI kernels (issues #10, #11, #13, #25) 2026-10-22 17:36:54 +08:00
mla_attn.py initial commit 2026-10-20 12:09:42 +08:00
mlp.py Neuron: full DeepSeek-V4.1-Flash load + decode region graphs at EP=64 (issues #21, #25) 2026-10-23 01:39:22 +08:00
moe.py initial commit 2026-10-20 12:09:42 +08:00
norm.py initial commit 2026-10-20 12:09:42 +08:00
rope.py initial commit 2026-10-20 12:09:42 +08:00
utils.py Neuron: one KV gather per chunk for dense attention; no layer_idx guards (#26) 2026-10-23 04:32:20 +08:00
yoco.py initial commit 2026-10-20 12:09:42 +08:00