AnswerDotAI/rerankers

Add possibility of changing the input template on T5Ranker

Closed this issue · 2 comments

Hi guys,

Thanks for your great work!

I'll soon release some MonoT5 rerankers for Portuguese, and I'm heavily considering recommending the rerankers package as the default way of using it, instead of using more complex libraries or writing code from scratch. However, because I used a different template for formatting inputs, I cannot directly use the rerankers package.

I already created a PR (#16) introducing the required changes. While doing so, I noted that the _get_output_tokens function does not set the token_false to the default value for unknown models, so I included this fix as well.

Can you guys please take a look at my PR?

Thanks!

Hey, I've just merged the PR, thank you 😊 I'll release it on PyPi later today along with some other tweaks!

Looking forward to the models 👀

Thanks, @bclavie !