Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluating cross encoders #15

Open
loopdeloop76 opened this issue Jan 6, 2023 · 2 comments
Open

Evaluating cross encoders #15

loopdeloop76 opened this issue Jan 6, 2023 · 2 comments

Comments

@loopdeloop76
Copy link

Hi @Muennighoff,
I would like to use your cross encoder with different GPT models.
I have noticed that this script is different from the code in the notebook. Could you explain the difference? Which code should I use, if I want to evaluate cross encoding for different GPT models (e.g. BioGPT)?

Also, do you happen to have the code for running the script in batches, as it is quite slow to predict each query / document pair one by one?
Thanks
Mark

@Muennighoff
Copy link
Owner

Hi @Muennighoff, I would like to use your cross encoder with different GPT models. I have noticed that this script is different from the code in the notebook. Could you explain the difference? Which code should I use, if I want to evaluate cross encoding for different GPT models (e.g. BioGPT)?

Also, do you happen to have the code for running the script in batches, as it is quite slow to predict each query / document pair one by one? Thanks Mark

Hey I would recommend adapting this one: https://github.com/Muennighoff/sgpt/blob/main/crossencoder/beir/sgptce.py, which is equivalent to the notebook, as it has batching, but you may want to remove some of the stuff related to evaluation.

Else the script in the README is also good, but you will need to add batching and padding to it.

Feel free to share if you have a nice script!

@loopdeloop76
Copy link
Author

Great, that helps, thank you for your quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants