M-Chimiste commited on
Commit
639ac83
·
1 Parent(s): 708d667

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +18 -0
README.md CHANGED
@@ -1,3 +1,21 @@
1
  ---
2
  license: apache-2.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  ---
4
+ # Cross-Encoder for MS Marco
5
+
6
+ This model is a generic masked language model fine tuned on stack overflow data. It's base pre-trained model was the cross-encoder/ms-marco-MiniLM-L-12-v2 model.
7
+
8
+ The model can be used for creating vectors for search applications. It was trained to be used in conjunction with a knn search with OpenSearch for a pet project I've been working on. It's easiest to create document embeddings with the flair package as shown below.
9
+
10
+
11
+ ## Usage with Transformers
12
+
13
+ ```python
14
+ from flair.data import Sentence
15
+ from flair.embeddings import TransformerDocumentEmbeddings
16
+
17
+ sentence = Sentence("Text to be embedded.")
18
+ model = TransformerDocumentEmbeddings("model-name")
19
+ model.embed(sentence)
20
+ embeddings = sentence.embedding
21
+ ```