fkrasnov2 commited on
Commit
9eb685c
·
verified ·
1 Parent(s): 79693b0

small talk

Browse files
Files changed (1) hide show
  1. README.md +20 -1
README.md CHANGED
@@ -1,4 +1,23 @@
1
  ---
2
  license: unlicense
3
  pipeline_tag: sentence-similarity
4
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: unlicense
3
  pipeline_tag: sentence-similarity
4
+ ---
5
+ Encoder-model for search query similarity task.
6
+
7
+ Fast and accurate.
8
+
9
+ Sentence Piece fitted on 269 million Russian search queries log.
10
+
11
+
12
+ ```python
13
+ from transformers import AutoModel, AutoTokenizer
14
+
15
+ model = AutoModel.from_pretrained('fkrasnov2/SBE')
16
+ tokenizer = AutoTokenizer.from_pretrained('fkrasnov2/SBE')
17
+
18
+ input_ids = tokenizer.encode("чёрное платье", max_length=model.config.max_position_embeddings, truncation=True, return_tensors='pt')
19
+
20
+ vector = model(input_ids=input_ids, attention_mask=input_ids>3)[0][0,0]
21
+
22
+ assert model.config.hidden_size == vector.shape[0]
23
+ ```