Add openvino converted tokenizers
#96
by
rhecker
- opened
In order to use the openvino models you need to tokenize the sentence first. There is currently no converted tokenizer of MiniLM-L6-H384-uncased on huggingface.
Perhaps we can include it here for the complete flow?
Hello!
Is the tokenizer in the root not sufficient?
E.g.:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2", backend="openvino", device="cpu")
sentences = [
"That is a happy person",
"That is a happy dog",
"That is a very happy person",
"Today is a sunny day"
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]
- Tom Aarsen
I agree it's a bit of an edge case. But this will download the model in the script itself. My preference would be to clone the repo as is and expect all the models required to be downloaded already before execution.