ViperEkura
3583c46b66
feat: 推理引擎前缀缓存(KV cache 复用)
- cache.py: 新增模块级 page_hash() 多项式滚动哈希函数;PagedCache 新增
record_page/lookup_prefix/inc_ref,free() 自动清理哈希映射
- scheduler.py: Task 新增 _prefix_cached_tokens;_refill_active_batch 先查
缓存命中页(inc_ref)再分配剩余页;合并 _execute_prefill 为单一方法,
按 (prompt_len, start_pos) 分组批量执行全量/部分 prefill;
_record_page_hashes 注册完整页哈希;修复 device/dtype 默认值从硬编码
改为 None(自动检测模型设备)
- test: mock model 补充 dtype/device 适配自动检测
2026-05-09 23:53:57 +08:00
..
2026-04-05 22:27:57 +08:00
2026-05-09 23:53:57 +08:00
2026-04-05 19:38:12 +08:00
2026-04-02 15:05:07 +08:00
2026-05-09 14:36:42 +08:00
2026-04-06 09:54:17 +08:00