AstrAI/tests/inference
ViperEkura 30cc2d67a4 refactor: 分页 KV cache 替换固定 slot,删除 PrefixCache 及相关死代码
- 用 PagedCache + CacheView 替换固定 slot 式 KV cache,attention 层只通过 page_table 间接索引
- 删除 PrefixCache(radix tree)及 scheduler 中所有 prefix cache 命中/插入/释放逻辑
- 删除无用函数:pin、version、free_count、_mark_seq_mask 及 seq_mask 分配
- 修复 write 在多页 prefill 时 offset 为负导致 chunk 计算错误
- _make_page_table_tensor 改用 list 拼接一次 tensor,去掉逐元素赋值
- 清理 model 接口参数:kv_cache, slot_indices → paged_cache(CacheView)
- 精简 docstring 为单行,删除冗余 section 注释和旧代码
- 修复 test_scheduler_concurrency.py 缺少 import pytest
2026-05-08 20:44:05 +08:00
..
conftest.py fix: 修复 remove_task 未释放 KV cache slot 导致第二轮对话死锁 2026-05-08 14:53:04 +08:00
test_scheduler_concurrency.py refactor: 分页 KV cache 替换固定 slot,删除 PrefixCache 及相关死代码 2026-05-08 20:44:05 +08:00
test_server.py fix: 修复 remove_task 未释放 KV cache slot 导致第二轮对话死锁 2026-05-08 14:53:04 +08:00