Update README.md
Browse files
README.md
CHANGED
@@ -62,11 +62,11 @@ class SentenceEmbeddingPipeline(Pipeline):
|
|
62 |
return sentence_embeddings
|
63 |
|
64 |
# load optimized model
|
65 |
-
|
66 |
-
model = ORTModelForFeatureExtraction.from_pretrained(
|
67 |
|
68 |
# create optimized pipeline
|
69 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
70 |
optimized_emb = SentenceEmbeddingPipeline(model=model, tokenizer=tokenizer)
|
71 |
pred1 = optimized_emb("Hello world!")
|
72 |
pred2 = optimized_emb("I hate everything.")
|
|
|
62 |
return sentence_embeddings
|
63 |
|
64 |
# load optimized model
|
65 |
+
model_name = "rawsh/multi-qa-MiniLM-distill-onnx-L6-cos-v1"
|
66 |
+
model = ORTModelForFeatureExtraction.from_pretrained(model_name, file_name="model_quantized.onnx")
|
67 |
|
68 |
# create optimized pipeline
|
69 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True)
|
70 |
optimized_emb = SentenceEmbeddingPipeline(model=model, tokenizer=tokenizer)
|
71 |
pred1 = optimized_emb("Hello world!")
|
72 |
pred2 = optimized_emb("I hate everything.")
|