qilowoq commited on
Commit
97d7764
1 Parent(s): d089493

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -30,7 +30,8 @@ model = XLMRobertaModel.from_pretrained('qilowoq/bge-m3-en-ru')
30
 
31
  sentences = ["This is an example sentence", "Это пример предложения"]
32
 
33
- embeddings = new_model(**tokenizer(sentences, return_tensors="pt", padding=True, truncation=True)).pooler_output
 
34
  ```
35
 
36
 
 
30
 
31
  sentences = ["This is an example sentence", "Это пример предложения"]
32
 
33
+ with torch.no_grad():
34
+ embeddings = new_model(**tokenizer(sentences, return_tensors="pt", padding=True, truncation=True)).pooler_output
35
  ```
36
 
37