-
Notifications
You must be signed in to change notification settings - Fork 506
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
[RFC] Adding overrides for max cache seq length #1449
[RFC] Adding overrides for max cache seq length #1449
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/1449
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 3fc1135 with merge base bc2c013 (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1449 +/- ##
==========================================
+ Coverage 70.72% 72.90% +2.18%
==========================================
Files 288 289 +1
Lines 14213 14336 +123
==========================================
+ Hits 10052 10452 +400
+ Misses 4161 3884 -277 ☔ View full report in Codecov by Sentry. |
What's up with the eleuther eval tests? They're passing locally for me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall it looks reasonable to me, will leave it to @pbontrager or @joecummings for the final sign-off
Thanks so much for the reviews @ebsmothers. Will address once #1424 lands and things are merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No concerns, but pls address @ebsmothers comments.
Context
What is the purpose of this PR? Is it to
#1364
Changelog
This PR:
encoder
anddecoder
max_seq_len
args. These arguments are exposed to the top-level transformer class (i.e.TransformerDecoder,
DeepFusionModel
, so that the API for all models remains the samemodel.setup_caches(bsz, dtype, encoder_max_seq_len, decoder_max_seq_len)
input_pos
to update and retrieve from the KV-cache. Instead, the KV cache tracks its own position.Test plan
Please make sure to do each of the following if applicable to your PR. (If you're not sure about any one of these just ask and we will happily help. We also have a contributing page for some guidance on contributing.)
pre-commit install
)pytest tests
pytest tests -m integration_test
UX
If your function changed a public API, please add a dummy example of what the user experience will look like when calling it.
Example of docstring:
torchtune/torchtune/modules/vision_transformer.py
Line 285 in 6a7951f
Example in our docs: https://pytorch.org/torchtune/main/tutorials/qat_finetune.html#applying-qat-to-llama3-models