执行摘要
添加 Mamba 模型前缀缓存输出一致性测试,确保 APC 开启与关闭时结果相同。
根据PR body,此变更旨在测试#34798修复的bug,该bug导致Mamba模型在APC启用时索引计算错误输出不正确。作者指出:'This PR builds upon https://github.com/vllm-project/vllm/pull/34798 to support the kernel fix and test the e2e correctness of mamba regardless of prefix caching settings.'
此PR值得工程师精读,特别是关注测试设计如何平衡资源消耗和正确性验证。值得关注的点包括:使用logprobs而非原始输出避免flakiness、处理内存清理的测试顺序调整、以及与大模型使用相关的权衡讨论。
Review中主要讨论点:1) gemini-code-assist[bot]指出使用大模型tiiuae/falcon-mamba-7b可能导致CI慢和OOM,建议使用小模型如tiiuae/falcon-mamba-tiny-dev;作者在代码注释中解释'we have to use a real large model to get reasonable results'。2) AndreasKaratzas询问测试移动原因,作者在PR summary中回应已知的vLLM在Multiprocessing=0时不清理GPU内存的问题,因此需将测试放最后。3) 在Issue评论中,robertgshaw2-redhat和tjtanaa担忧测试flakiness,作者因此将输出比较从精确匹配改为check_logprobs_close以增强稳定性。
参与讨论