-
Notifications
You must be signed in to change notification settings - Fork 404
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
2/n - Make Gemma use regular TransformerDecoder #1553
2/n - Make Gemma use regular TransformerDecoder #1553
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/1553
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 175782f with merge base 7c51100 (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
🫡
from torchtune.modules.loss import CEWithChunkedOutputLoss | ||
from torchtune.utils import get_logger, torch_version_ge | ||
|
||
log = get_logger("INFO") | ||
|
||
|
||
def compile_model( | ||
model: Union[TransformerDecoder, TiedEmbeddingTransformerDecoder], | ||
model: TransformerDecoder, |
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 wasn't this handled in 1/n?
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.
I forgot and left a comment that i was doing it in 2/n
|
||
|
||
class GemmaNormEmbeddings(nn.Embedding): | ||
def __init__(self, in_dim: int, out_dim: int): |
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.
docstrings, esp to explain why this is a separate class
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1553 +/- ##
==========================================
- Coverage 73.32% 73.18% -0.14%
==========================================
Files 288 289 +1
Lines 14133 14164 +31
==========================================
+ Hits 10363 10366 +3
- Misses 3770 3798 +28 ☔ View full report in Codecov by Sentry. |
Context
What is the purpose of this PR? Is it to
This PR was built on top of #1547 (comment), so qwen changes should disappear from here after the other PR is merged
Changelog
Test plan
resume from checkpoint working well