When trying to convert a DPR model to transformers, DPRQuestionEncoder is used for the context encoder model. This is due to the fact that transformer's AutoModel always creates a DPRQuestionEncoder when it is passed a DPRConfig. This PR ensures that we use DPRContextEncoder for the context encoder model.
When trying to convert a DPR model to transformers,
DPRQuestionEncoder
is used for the context encoder model. This is due to the fact that transformer'sAutoModel
always creates aDPRQuestionEncoder
when it is passed aDPRConfig
. This PR ensures that we useDPRContextEncoder
for the context encoder model.