AttributeError: 'NewConfig' object has no attribute '_attn_implementation'
I am having trouble loading the model, can you suggest what I am doing wrong?) thanks
File "/opt/conda/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 558, in from_pretrained
return model_class.from_pretrained(
File "/opt/conda/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2966, in from_pretrained
model = cls(config, *model_args, **model_kwargs)
File "/root/.cache/huggingface/modules/transformers_modules/Alibaba-NLP/new-impl/40ced75c3017eb27626c9d4ea981bde21a2662f4/modeling.py", line 838, in init
self.encoder = NewEncoder(config)
File "/root/.cache/huggingface/modules/transformers_modules/Alibaba-NLP/new-impl/40ced75c3017eb27626c9d4ea981bde21a2662f4/modeling.py", line 707, in init
self.layer = nn.ModuleList([NewLayer(config) for _ in range(config.num_hidden_layers)])
"/root/.cache/huggingface/modules/transformers_modules/Alibaba-NLP/new-impl/40ced75c3017eb27626c9d4ea981bde21a2662f4/modeling.py", line 707, in
self.layer = nn.ModuleList([NewLayer(config) for _ in range(config.num_hidden_layers)])
File "/root/.cache/huggingface/modules/transformers_modules/Alibaba-NLP/new-impl/40ced75c3017eb27626c9d4ea981bde21a2662f4/modeling.py", line 634, in init
attn_implementation = config._attn_implementation
File "/opt/conda/lib/python3.10/site-packages/transformers/configuration_utils.py", line 261, in getattribute
return super().getattribute(key)
AttributeError: 'NewConfig' object has no attribute '_attn_implementation'
_attn_implementation
is an attribute of the base class PretrainedConfig
.
I guess your transformers
version is less than 4.36.0
, upgrade it would be helpful.