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
Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment