Skip to content

Unable to import DPRContextEncoderTokenizer #2711

Answered by bogdankostic
Myko-10 asked this question in Questions
Discussion options

You must be logged in to vote

Hi @Myko-10, thanks for bringing our attention to this issue. This was a bug and should be fixed once #2755 is merged.

The following was happening:
When initializing a DensePassageRetriever, we were using AutoTokenizers in order to load the tokenizers for the query embedding model and the passage embedding model. In the config of the model you tried load, the tokenizer_clas is set explicitly to DPRContextEncoderTokenizer. However, it seems that the AutoTokenizer doesn't support loading this tokenizer, that's why you got the error message. It only worked when setting infer_tokenizer_classes to True because with this setting, we didn't use AutoTokenizer but try to infer the correct tokenize…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Myko-10
Comment options

Answer selected by julian-risch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants