Use the HuggingFace model intfloat/e5-mistral-7b-instruct
for sentence embedding?
#3601
Unanswered
grossjohann
asked this question in
Q&A
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have modified
serving.properties
for the HuggingFace modelintfloat/e5-mistral-7b-instruct
and I'm not clear if this made any sense at all.I ran
djl-convert -m intfloat/e5-mistral-7b-instruct -o model/e5-mistral-7b-instruct
and then use the following to point to the resulting model:Then I got this error message:
I see that
djl-convert
putpooling=lasttoken
inserving.properties
.After some searching around, other
djl-convert
produced models that did work for text embedding didn't have thepooling
line inserving.properties
and it seemsmean
is the default value. So I hand-edited the file to saypooling=mean
and now the Java code loads the model correctly.But is this going to produce any embeddings that make sense?
Where can I start reading to understand what this line is doing and whether it might make sense?
The HuggingFace page for this model has some (Python) code using
SentenceTransformers
and some more code usingAutoTokenizer
andAutoModel
but I'm not able to map that to DJL.Beta Was this translation helpful? Give feedback.
All reactions