Sentence Transformer compatibility
The model requires only a few changes (e.g. write down a pooling config) to be compatible with sentence transformers.
sentence_transformers.SentenceTransformer WARNING: No sentence-transformers model found with name nvidia/NV-Embed-v1. Creating a new one with mean pooling.
Would it be possible to add these?
Thanks for the question. We will add the sentence transformer support soon.
Seconding that request! Sentence transformers support would be very handy.
Now, NV-Embed-v1 supports the compatibility for sentence transformer. The example is updated in model card: https://huggingface.co/nvidia/NV-Embed-v1. Thank you.
Okay! Thanks for making the update quick.
Will not work for most users, as user often have sentence-transformers running just as a dependency (https://github.com/UKPLab/sentence-transformers/network/dependents), without exposing model.tokenizer.padding_side
-> Would need to be loaded from config instead of monkey_patching.
model.max_seq_length = 4096
model.tokenizer.padding_side="right"
IIRC: max_seq_length ->
https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/blob/main/tokenizer_config.json
{
"model_max_length": 4096
}
model.tokenizer.padding_side
Isn't right the default anyways? Or am I confusing it with left?