AstrAI/astrai/model/components
ViperEkura 5416c2e8fb perf: replace paged KV cache with contiguous ContiguousCache, decode all groups
- Add KVCache/CacheView abstract base classes in cache.py
- Add ContiguousCache (contiguous per-slot buffer, default) alongside PageCache (paged, renamed from old KVCache)
- Merge make_table_tensor + bind into bind_tasks on KVCache interface
- Remove task_cached/task_record_hashes from base class (PageCache-only)
- Scheduler: decode all position groups instead of just the largest (eliminates 63% group skip rate)
- Scheduler: accept optional cache param for swapping implementations
- Model layer type hints use CacheView base class
- Batch 1-32: 1-7% speedup from eliminating Storage.gather overhead
- All 183 inference tests pass
2026-07-05 11:34:36 +08:00
..
__init__.py refactor: 拆分 module.py 为 components 子包 2026-05-15 20:08:36 +08:00
attention.py perf: replace paged KV cache with contiguous ContiguousCache, decode all groups 2026-07-05 11:34:36 +08:00
decoder_block.py perf: replace paged KV cache with contiguous ContiguousCache, decode all groups 2026-07-05 11:34:36 +08:00
embedding.py refactor : neftune_alpha 在 Embedding 构造时传入,由模型配置链路负责 2026-06-19 14:23:27 +08:00
linear.py feat : GPT-2 residual scaling weight init 2026-06-25 15:08:31 +08:00
lora.py refactor: 统一序列化层,消除分散的 I/O 路径 2026-05-26 16:44:40 +08:00
mlp.py feat : GPT-2 residual scaling weight init 2026-06-25 15:08:31 +08:00
norm.py refactor: 拆分 module.py 为 components 子包 2026-05-15 20:08:36 +08:00
rope.py feat: 新增NTK-Aware RoPE缩放支持 2026-05-25 21:22:07 +08:00