-
Notifications
You must be signed in to change notification settings - Fork 599
[llm] Update metadata max_seq_len based on the max range of dynamic shapes #11611
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/11611
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit db863ef with merge base a6d8440 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@larryliu0820 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
e48419f
to
b45e4c1
Compare
@larryliu0820 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: See if any CI is broken by this. Differential Revision: D76530379 Pulled By: larryliu0820
b45e4c1
to
a897dae
Compare
This pull request was exported from Phabricator. Differential Revision: D76530379 |
Summary: With some testing it seems like we can't export with token dimension max being `max_seq_len` in dynamic shape, if we only export with `tokens`. However if we export with both `tokens` and `input_pos`, we can set token dimension max value to be `max_seq_len`. This diff fix 2 things: * Change dynamic shape based on different inputs * Change pte's metadata `get_max_seq_len` and `get_max_context_len` based on the value of token dimension max value in dynamic shape. Differential Revision: D76530379 Pulled By: larryliu0820
a897dae
to
d2a5153
Compare
This pull request was exported from Phabricator. Differential Revision: D76530379 |
Summary: With some testing it seems like we can't export with token dimension max being `max_seq_len` in dynamic shape, if we only export with `tokens`. However if we export with both `tokens` and `input_pos`, we can set token dimension max value to be `max_seq_len`. This diff fix 2 things: * Change dynamic shape based on different inputs * Change pte's metadata `get_max_seq_len` and `get_max_context_len` based on the value of token dimension max value in dynamic shape. Test Plan: Imported from GitHub, without a `Test Plan:` line. To repro the issue with max value being `max_seq_len` for `tokens` only argument, change the `_get_dynamic_shape()` and run: ``` buck run fbcode//executorch/examples/models/llama/fb:cria05 -- cria_0_5b -E 8,0 -d fp32 cria.pte ``` Differential Revision: D76530379 Pulled By: larryliu0820
d2a5153
to
695adc7
Compare
This pull request was exported from Phabricator. Differential Revision: D76530379 |
@larryliu0820 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
…11611) Summary: With some testing it seems like we can't export with token dimension max being `max_seq_len` in dynamic shape, if we only export with `tokens`. However if we export with both `tokens` and `input_pos`, we can set token dimension max value to be `max_seq_len`. This diff fix 2 things: * Change dynamic shape based on different inputs * Change pte's metadata `get_max_seq_len` and `get_max_context_len` based on the value of token dimension max value in dynamic shape. Reviewed By: kimishpatel Differential Revision: D76530379 Pulled By: larryliu0820
0b301b7
to
d7d00f6
Compare
This pull request was exported from Phabricator. Differential Revision: D76530379 |
…11611) Summary: With some testing it seems like we can't export with token dimension max being `max_seq_len` in dynamic shape, if we only export with `tokens`. However if we export with both `tokens` and `input_pos`, we can set token dimension max value to be `max_seq_len`. This diff fix 2 things: * Change dynamic shape based on different inputs * Change pte's metadata `get_max_seq_len` and `get_max_context_len` based on the value of token dimension max value in dynamic shape. Reviewed By: kimishpatel Differential Revision: D76530379 Pulled By: larryliu0820
d7d00f6
to
db863ef
Compare
This pull request was exported from Phabricator. Differential Revision: D76530379 |
With some testing it seems like we can't export with token dimension max being
max_seq_len
in dynamic shape, if we only export withtokens
.However if we export with both
tokens
andinput_pos
, we can set token dimension max value to bemax_seq_len
.This diff fix 2 things:
get_max_seq_len
andget_max_context_len
based on the value of token dimension max value in dynamic shape.