xlang-ai / instructor-embedding

[ACL 2023] One Embedder, Any Task: Instruction-Finetuned Text Embeddings
Apache License 2.0
1.79k stars 132 forks source link

Is it possible to use the Instructor model directly via sentence-transformers? #33

Closed doraui closed 1 year ago

doraui commented 1 year ago

It would be very useful, e.g. to train a cross-encoder.

Harry-hash commented 1 year ago

Hi, Thanks a lot for your interest in the INSTRUCTOR model!

As we modified some classes in the sentence-transformers, you may find it more convenient to install both sentence-transformers and InstructorEmbedding for using the INSTRUCTOR model.

To score sentence pairs, you may use the INSTRUCTOR models to compute the similarities between sentence pairs. Check out our example here: https://github.com/HKUNLP/instructor-embedding#compute-similarities-between-texts

Feel free to add any further questions or comments!

hongjin-su commented 1 year ago

Feel free to re-open the issue if you have any further questions or comments!