You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead, the loading fails on get_parameter_or_buffer:
> raise AttributeError(f"`{target}` is neither a parameter nor a buffer.")
E AttributeError: `te_layer.layernorm_mlp._extra_state` is neither a parameter nor a buffer.
The text was updated successfully, but these errors were encountered:
System Info
transformers
main
branch, python 3.12.Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Using
TransformerEngine
layers as an example, which add fp8 metadata to the_extra_state
key:Expected behavior
from_pretrained should pass the deserialized
extra_state
value to the nn.Module'sfrom_state_dict
method; which will then call intoset_extra_state
. https://docs.pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.get_extra_state.Instead, the loading fails on
get_parameter_or_buffer
:The text was updated successfully, but these errors were encountered: