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

adapt transformers 4.37 loading #1606

Merged
merged 3 commits into from
Feb 6, 2024
Merged

adapt transformers 4.37 loading #1606

merged 3 commits into from
Feb 6, 2024

Conversation

changwangss
Copy link
Contributor

@changwangss changwangss commented Feb 5, 2024

Type of Change

ticket: https://jira.devtools.intel.com/browse/ILITV-3414
root cause, transformers 4.37.2 limits pytorch_model.bin loading by https://github.com/huggingface/transformers/blob/v4.37.2/src/transformers/modeling_utils.py#L530

"model.safetensors" only support tensor values, the state_dict not only includes weight key and value but also has inc quantization config(str) with pytorch fx mode, so still keep the "pytorch_model.bin".

Description

Description

detail description

Expected Behavior & Potential Risk

the expected behavior that triggered by this PR

How has this PR been tested?

how to reproduce the test (including hardware information)

Dependency Change?

any library dependency introduced or removed

@changwangss changwangss requested a review from xin3he February 5, 2024 05:49
@changwangss
Copy link
Contributor Author

changwangss commented Feb 5, 2024

@changwangss
Copy link
Contributor Author

CI failed with performance gap but it seems caused by this PR, @chensuyue please give some helps.

@chensuyue chensuyue merged commit 6133f4e into master Feb 6, 2024
47 of 50 checks passed
@chensuyue chensuyue deleted the wangchang/save branch February 6, 2024 05:51
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.

3 participants