Merged
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
LysandreJik
approved these changes
Jun 16, 2023
| if len(unexpected_keys) > 0: | ||
| logger.warning( | ||
| archs = [] if model.config.architectures is None else model.config.architectures | ||
| warner = logger.warn if model.__class__.__name__ in archs else logger.info |
ydshieh
reviewed
Jun 20, 2023
| unexpected_keys = list(set(loaded_keys) - set(expected_keys)) | ||
|
|
||
| if is_accelerate_available(): | ||
| model.tie_weights() |
Collaborator
There was a problem hiding this comment.
@sgugger This line causes a test of marian failing due to garbage output values.
It was removed by @SunMarc in #24200 when I reported the same issue to him.
If this line is necessary, we might need some fix/change for marian or its test.
tests/models/marian/test_modeling_marian.py::TestMarian_FI_EN_V2::test_batch_generation_en_fr
(line 433) AssertionError: Lists differ: ['I like to read books', 'I like watching football'] != ['obliterat obliterat obliterat obliterat o[1345 chars]ɰɰɰ']
Collaborator
Author
There was a problem hiding this comment.
This line is necessary. I'll look at the test later today.
Closed
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This continue cleaning up a bit the model loading by:
_tied_weight_keysclass variable when deleting weights without warning for safetensors serialization