howard-hou commited on
Commit
be94228
1 Parent(s): e3064ad

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -1
README.md CHANGED
@@ -21,7 +21,9 @@ You can use this model simply as a re-ranker, note now the model is only availab
21
  from transformers import AutoTokenizer, AutoModel
22
 
23
  tokenizer = AutoTokenizer.from_pretrained("howard-hou/RankingPrompterForPreTraining-small")
24
- model = AutoModel.from_pretrained("howard-hou/RankingPrompterForPreTraining-small")
 
 
25
 
26
  #
27
  documents = [
 
21
  from transformers import AutoTokenizer, AutoModel
22
 
23
  tokenizer = AutoTokenizer.from_pretrained("howard-hou/RankingPrompterForPreTraining-small")
24
+ # trust_remote_code=True 很重要,否则不会读取到正确的模型
25
+ model = AutoModel.from_pretrained("howard-hou/RankingPrompterForPreTraining-small",
26
+ trust_remote_code=True)
27
 
28
  #
29
  documents = [