-
Notifications
You must be signed in to change notification settings - Fork 608
[llama-mm] Make text decoder exportable #6999
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/6999
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit c6909a7 with merge base 6ac19cc ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
e71f535
to
4deeb3f
Compare
) | ||
from torch.testing import assert_close | ||
|
||
params = { |
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.
Can load https://github.com/pytorch/executorch/blob/main/examples/models/llama3_2_vision/text_decoder/params/demo_config.json, also can set n_layers to 1 to make test go faster
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.
Changed, reading json is not very convenient in unit test
@@ -0,0 +1,92 @@ | |||
# Copyright (c) Meta Platforms, Inc. and affiliates. |
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.
Can rename to test_aoti.py
or something
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.
Was hoping to host all tests related to text decoder
decoder_max_seq_len=self.max_seq_len, | ||
) | ||
# number of tokens for example input | ||
self.n_tokens = 34 |
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.
Why 34 just curious
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.
Just the number of tokens used by the example input. Could be something else.
examples/models/llama3_2_vision/text_decoder/test/test_text_decoder.py
Outdated
Show resolved
Hide resolved
examples/models/llama3_2_vision/text_decoder/test/test_text_decoder.py
Outdated
Show resolved
Hide resolved
Summary: Adds source transformation and changes example input to make text decoder exportable. Test Plan: Added new unit test. Reviewers: Subscribers: Tasks: Tags:
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
a1d7df0
to
c6909a7
Compare
Summary: Adds source transformation and changes example input to make text decoder exportable.
Test Plan: Added new unit test.
Reviewers:
Subscribers:
Tasks:
Tags:
Summary
[PLEASE REMOVE] See CONTRIBUTING.md's Pull Requests for ExecuTorch PR guidelines.
[PLEASE REMOVE] If this PR closes an issue, please add a
Fixes #<issue-id>
line.[PLEASE REMOVE] If this PR introduces a fix or feature that should be the upcoming release notes, please add a "Release notes: " label. For a list of available release notes labels, check out CONTRIBUTING.md's Pull Requests.
Test plan
[PLEASE REMOVE] How did you test this PR? Please write down any manual commands you used and note down tests that you have written if applicable.