-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Memory tests #13669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Memory tests #13669
Conversation
These only test the basics so far, but should allow for more expansive tests to come. Branch: MemoryTests Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
These tests use private headers, so won't build on windows Branch: MemoryTests Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
As it is, this is mostly testing the Relying on symbols that are not explicitly exported from An alternative approach that could be better probably is to run tests using just the public API. But for that, we need to create dummy models in some ways. So I am thinking if we should look into adding some very basic experimental API for constructing tiny models for a user-specified arch, which we can then use for testing. Such functionality can be useful not only for testing the KV caches, but other stuff too. I think @ngxson had some ideas in this direction. |
@ggerganov Makes sense. I had planned to add more tests yesterday, but ended up spending my time getting the other branches in the chain updated for the recent changes on I can try to refactor this to only use the public APIs as you suggest. I think the biggest hang up will be somehow mocking tiny models that represent specific caching types in One solution that could have interesting consequences would be to declare many of the members in My day is a bit of a meeting wall, but if I get some time in the editor, I'll see if I can push any further on making these tests useful. |
@ggerganov @ngxson I think there's a fairly simple way to enable custom model extensions in unit tests, but I'm guessing it conflicts with plans you already have in place, so want to spell it out here for comment before going too deep. Basically, each member in
Going down this route would also open the door to building model-architecture extension modules for real model architectures by eliminating the need for new architectures to extend the One key property of all methods that would be made Another key implication of going down this route would be that the |
Description
This PR ports the scaffold for unit tests around the memory hierarchy from #12331 . I didn't yet add tests for the new iSWA memory since that was added after I started writing tests. My thought is to add these basic tests to enable further development towards the hybrid cache implementation in parallel with more robust tests.