transformers 5.2.0 issue
model = AutoModel.from_pretrained('jinaai/jina-reranker-v3',trust_remote_code=True)
Loading weights: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 312/312 [00:00<00:00, 440.69it/s, Materializing param=projector.2.weight]
Traceback (most recent call last):
File "", line 1, in
File "/beegfs/scratch/user/x/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 367, in from_pretrained
return model_class.from_pretrained(
File "/beegfs/scratch/user/x/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4073, in from_pretrained
loading_info = cls._finalize_model_loading(model, load_config, loading_info)
File "/beegfs/scratch/user/x/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4217, in _finalize_model_loading
model.mark_tied_weights_as_initialized()
File "/beegfs/scratch/user/x/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4566, in mark_tied_weights_as_initialized
param = self.get_parameter(tied_param)
File "/beegfs/scratch/user/x/lib/python3.10/site-packages/torch/nn/modules/module.py", line 845, in get_parameter
raise AttributeError(
AttributeError: Identity has no attributeweight
transformers.version
'5.2.0'
works with '4.52.2'
I face the same issue with 5.3.0. Did you manage to solve this? Or did you downgrade your transformers?
Can you try again? This should work now
It works with 5.3.0. That's amazing, thanks!