-
Notifications
You must be signed in to change notification settings - Fork 25
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
Is it possible to export models? #16
Comments
Yeah, all the model weights an so on are stored in Is there a particular format you'd need for the export? |
Yes, I would like to export the sledge models. But just to be clear, the objective would be to predict with it from python. Similar to what we do with sentence-transformers library. Example:
Not sure if that is possible. Haven't found any doc. |
Ah, sorry I misunderstood what you meant by export. OpenNIR was designed primarily with a CLI in mind. If you have other queries you want to run on the same dataset, I have a quick+dirty suggestion here. There's also the If you're not running an IR experiment (or you'd prefer not to use the CLI), it's possible to create the underlying objects. You'll want to use |
I was looking for a way to load the model into huggingface's model. These need a config.json file and model.bin file. I was wondering what format these file is, and how to convert it to something that can be opened in hf. I tried this
And got
|
The Hope this helps! |
Has anyone been able to create a python object of the model? I made an attempt here https://colab.research.google.com/drive/15Gak_LmwEWPbJo3w_EVG8FyfLMWPwoGh?usp=sharing But wasn't able to successfully able to create the model. |
You're trying to load up a I have not tested on an actual ranking task, but it's able to load properly. And it worked with a quick toy example. |
Does this meet your needs too, @thigm85? |
Thanks Sean, very much appreciated! |
thanks, I am using that as well. Could you clarify what the scores that you are showing in that example mean? I understand these are the logits of the classification head of the CLS token. Specifically, you show the score of 0-th class, does this correspond to the relevant, or non relevant score? |
Hi @timbmg, Yeah, the 0th class corresponds to the relevance score (using the convention from Nogueira et al) - sean |
Is it possible to export models so that we can use it outside of your ranking pipeline? For example BERT models fine tuned on MSMARCO.
The text was updated successfully, but these errors were encountered: