Skip to content

Remove unused variables #1238

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

Merged
merged 1 commit into from
Jul 29, 2024
Merged

Remove unused variables #1238

merged 1 commit into from
Jul 29, 2024

Conversation

stsouko
Copy link
Contributor

@stsouko stsouko commented Jul 28, 2024

Unused shape unpacking blocks customization of input and embedding layer.

Copy link

pytorch-bot bot commented Jul 28, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/1238

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit a2a610a with merge base f0a15c5 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link

Hi @stsouko!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@ebsmothers
Copy link
Contributor

Hi @stsouko thanks for creating the PR. The change looks fine to me since, as you point out, neither bsz nor seq_len are actually used later in the class. Out of curiosity, what sort of customization are you looking to do here? I'd be interested to know what shape your tokens are and what you're using as an embedding layer (assuming you wouldn't mind sharing this). I assume the output of your embeddings will still be shape [b, s, d], but it'd be helpful to ensure we're supporting these more custom cases properly.

Also please make sure to sign the CLA if you haven't already.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 28, 2024
@stsouko
Copy link
Contributor Author

stsouko commented Jul 28, 2024

Hi @ebsmothers,
I would like to modify embedding to implement Llava like multimodal adaptation, thus, input can be a custom data structure which contains minibatch of text token ids and vectors of different modality.

Output shape, sure, will be the same.

@ebsmothers
Copy link
Contributor

Thanks for the info! Kicked off a CI run, once everything is green I think this is good to merge. Also cc @pbontrager who has been looking at our multimodality support

@ebsmothers ebsmothers merged commit 7dae04d into pytorch:main Jul 29, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants