Within the class method _from_pretrained in module model.py of latest version of the package (currently gliner==0.1.12) there is the following call (line 421)
model.load_state_dict(state_dict, strict=strict, assign=True)
where model is a torch.nn.Module.
Despite in the requirements.txt it is state that the package require torch>=2.0.0, only for torch>=2.1.0 the method load_state_dict admits an argument assign.
Within the class method
_from_pretrained
in module model.py of latest version of the package (currently gliner==0.1.12) there is the following call (line 421)model.load_state_dict(state_dict, strict=strict, assign=True)
wheremodel
is atorch.nn.Module
. Despite in the requirements.txt it is state that the package require torch>=2.0.0, only for torch>=2.1.0 the methodload_state_dict
admits an argumentassign
.