OpenBMB/Eurus

AttributeError: 'BaseModelOutputWithPast' object has no attribute 'item'

AIR-hl opened this issue · 1 comments

When I using local model files and setting trust_remote_code=False will appear following error:
image

Hi,

trust_remote_code=True is necessary because the transformers library does not originally support the model structure. An alternative approach is to paste the model code in your Python file and directly load the checkpoint by EurusRewardModel.from_pretrained()