RyanWangZf / Trial2Vec

Findings of EMNLP'22 | Trial2Vec: Zero-Shot Clinical Trial Document Similarity Search using Self-Supervision
MIT License
19 stars 4 forks source link

model.load_state_dict complatible with newer transformers version #7

Closed JPonsa closed 3 months ago

JPonsa commented 4 months ago

newer versions of the transformer library break the model.loca_state_dict function as is. To solve it, add the parameter, strict=False as suggested in https://stackoverflow.com/questions/68453123/runtimeerror-errors-in-loading-state-dict-for-dataparallel-unexpected-keys