Skip to content
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

Limit position embeddings in inference #1598

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

bhargaveede
Copy link
Collaborator

Moving the max_position_embeddings truncation from model code as it hampers with training.
Moved it to text-generation/utils.py as that's better place

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@bhargaveede
Copy link
Collaborator Author

@regisss There's a bug which got exposed now and causing OOM with 0fbc457
.
This change is to fix that in a better way such that it won't interfere with training.
Please review and merge this to main and also 1.15-release

@libinta libinta added the run-test Run CI for PRs from external contributors label Dec 12, 2024
Copy link
Collaborator

@regisss regisss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@bhargaveede Can you also address the unsolved comments in #1501 please? At least moving parallel_state.py to optimum/habana/distributed. Using more recent versions of Llama for CI can be done after release, but moving parallel_state.py should be done before release. Otherwise that will be a breaking change in the release after and we should avoid that. It's just about moving one file and updating a couple of imports.

@regisss regisss merged commit 652bf96 into huggingface:main Dec 12, 2024
4 checks passed
regisss pushed a commit that referenced this pull request Dec 12, 2024
zzhang37 pushed a commit to zzhang37/optimum-habana that referenced this pull request Dec 12, 2024
Liangyx2 pushed a commit to HabanaAI/optimum-habana-fork that referenced this pull request Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-test Run CI for PRs from external contributors synapse_1.19_dependency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants