zeroshot commited on
Commit
f2889d3
1 Parent(s): 64ba765

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +23 -0
README.md CHANGED
@@ -1635,6 +1635,29 @@ Current list of sparse and quantized bge ONNX models:
1635
  | [zeroshot/bge-small-en-v1.5-quant](https://huggingface.co/zeroshot/bge-small-en-v1.5-quant) | Quantization (INT8) |
1636
 
1637
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1638
  For general questions on these models and sparsification methods, reach out to the engineering team on our [community Slack](https://join.slack.com/t/discuss-neuralmagic/shared_invite/zt-q1a1cnvo-YBoICSIw3L1dmQpjBeDurQ).
1639
 
1640
  ![;)](https://media.giphy.com/media/bYg33GbNbNIVzSrr84/giphy-downsized-large.gif)
 
1635
  | [zeroshot/bge-small-en-v1.5-quant](https://huggingface.co/zeroshot/bge-small-en-v1.5-quant) | Quantization (INT8) |
1636
 
1637
 
1638
+ ```bash
1639
+ pip install -U deepsparse-nightly[sentence_transformers]
1640
+ ```
1641
+
1642
+ ```python
1643
+ from deepsparse.sentence_transformers import SentenceTransformer
1644
+ model = SentenceTransformer('zeroshot/bge-small-en-v1.5-quant', export=False)
1645
+
1646
+ # Our sentences we like to encode
1647
+ sentences = ['This framework generates embeddings for each input sentence',
1648
+ 'Sentences are passed as a list of string.',
1649
+ 'The quick brown fox jumps over the lazy dog.']
1650
+
1651
+ # Sentences are encoded by calling model.encode()
1652
+ embeddings = model.encode(sentences)
1653
+
1654
+ # Print the embeddings
1655
+ for sentence, embedding in zip(sentences, embeddings):
1656
+ print("Sentence:", sentence)
1657
+ print("Embedding:", embedding.shape)
1658
+ print("")
1659
+ ```
1660
+
1661
  For general questions on these models and sparsification methods, reach out to the engineering team on our [community Slack](https://join.slack.com/t/discuss-neuralmagic/shared_invite/zt-q1a1cnvo-YBoICSIw3L1dmQpjBeDurQ).
1662
 
1663
  ![;)](https://media.giphy.com/media/bYg33GbNbNIVzSrr84/giphy-downsized-large.gif)