Add proper Sentence Transformers integration

#1
by tomaarsen HF staff - opened

Hello!

Foreword

Congratulations on your release! I'm quite curious what the 2_R stands for - I'm excited to learn more about your approach.

Pull Request overview

  • Add 1st party Sentence Transformers support

Details

In this PR, I'm proposing to add Sentence Transformers support just like for SFT-Embedding-Mistral; many users produce their embeddings via ST, and this would allow convenient access of your model. The configuration files specify that the model requires last-token pooling, and I've set the max_seq_length in ST to 4096 by default (can be overridden with model.max_seq_length = ...) just like SFT-Embedding-Mistral. You can change this up or down, though - I'm not sure what your model was designed/trained for.

P.s. this will also keep your model in the MTEB leaderboard when users filter for Sentence Transformer models only.

Feel free to let me know if you have any questions!

  • Tom Aarsen
tomaarsen changed pull request status to open
Salesforce org

Hi Tom,

Thank you for your excellent effort in adding Sentence Transformers support! Your contribution is invaluable, and ensuring our model remains visible in the MTEB leaderboard for Sentence Transformer models is a thoughtful addition. I will review the PR details and anticipate merging them into the main branch.

The "2_R" in our versioning indicates the second release, dedicated specifically to research. We will share more details about the model soon.

Best,
Ye

yliu279 changed pull request status to merged

Sign up or log in to comment