AITeamVN commited on
Commit
8df5d5b
·
verified ·
1 Parent(s): 1ffdaf0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +22 -1
README.md CHANGED
@@ -24,4 +24,25 @@ Vietnamese_Embedding is an embedding model fine-tuned from the BGE-M3 model (htt
24
  |----------------------|------------|------------|------------|-------------|-------------|--------------|
25
  | Vietnamese_Embedding | 0.7274 | 0.8992 | 0.9305 | 0.9568 | 0.9922 | 0.8181 |
26
  | Vietnamese-bi-encoder | 0.7109 | 0.8680 | 0.9014 | 0.9299 | 0.9772 | 0.7951 |
27
- | BGE-M3 | 0.5682 | 0.7728 | 0.8382 | 0.8921 | 0.9772 | 0.6822 |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  |----------------------|------------|------------|------------|-------------|-------------|--------------|
25
  | Vietnamese_Embedding | 0.7274 | 0.8992 | 0.9305 | 0.9568 | 0.9922 | 0.8181 |
26
  | Vietnamese-bi-encoder | 0.7109 | 0.8680 | 0.9014 | 0.9299 | 0.9772 | 0.7951 |
27
+ | BGE-M3 | 0.5682 | 0.7728 | 0.8382 | 0.8921 | 0.9772 | 0.6822 |
28
+
29
+
30
+ ## Usage
31
+
32
+ ```python
33
+ from sentence_transformers import SentenceTransformer
34
+ import torch
35
+
36
+ model = SentenceTransformer("AITeamVN/Vietnamese_Embedding")
37
+ model.max_seq_length = 2048
38
+ sentences_1 = ["Trí tuệ nhân tạo là gì", "Tại sao giấc ngủ quan trọng?"]
39
+ sentences_2 = ["Trí tuệ nhân tạo là công nghệ giúp máy móc suy nghĩ và học hỏi như con người. Nó hoạt động bằng cách thu thập dữ liệu, nhận diện mẫu và đưa ra quyết định.",
40
+ "Giấc ngủ giúp cơ thể và não bộ nghỉ ngơi, hồi phục năng lượng và cải thiện trí nhớ. Ngủ đủ giấc giúp tinh thần tỉnh táo và làm việc hiệu quả hơn."]
41
+ query_embedding = model.encode(sentences_1)
42
+ doc_embeddings = model.encode(sentences_2)
43
+ similarity = query_embedding @ doc_embeddings.T
44
+
45
+ '''
46
+ array([[0.6621206 , 0.33066636],
47
+ [0.18678051, 0.4875508 ]], dtype=float32)'''
48
+ ```