Skip to content

Use public API instead of removed private function in te_llama.py#1856

Merged
timmoon10 merged 1 commit into
NVIDIA:mainfrom
janekb04:fix-te-llama
Jun 9, 2025
Merged

Use public API instead of removed private function in te_llama.py#1856
timmoon10 merged 1 commit into
NVIDIA:mainfrom
janekb04:fix-te-llama

Conversation

@janekb04
Copy link
Copy Markdown
Collaborator

@janekb04 janekb04 commented Jun 6, 2025

Description

Replaced use of _load_state_dict_into_model with model.load_state_dict because the private function _load_state_dict_into_model was removed in huggingface/transformers#36335.

Without this fix, the example no longer works with the most recent version of Hugging Face Transformers.

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

* replaced use of _load_state_dict_into_model with model.load_state_dict because the private function _load_state_dict_into_model was removed in huggingface/transformers#36335

Signed-off-by: Jan Bielak <jbielak@nvidia.com>
@timmoon10 timmoon10 requested a review from sudhakarsingh27 June 6, 2025 21:50
Copy link
Copy Markdown
Member

@ksivaman ksivaman left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@sudhakarsingh27 sudhakarsingh27 left a comment

Choose a reason for hiding this comment

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

LGTM

@timmoon10 timmoon10 merged commit fc18520 into NVIDIA:main Jun 9, 2025
11 of 12 checks passed
@janekb04 janekb04 deleted the fix-te-llama branch June 26, 2025 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants