Sentence Similarity
PyTorch
Safetensors
sentence-transformers
Transformers
Vietnamese
generic
roberta
feature-extraction
Instructions to use bkai-foundation-models/vietnamese-bi-encoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use bkai-foundation-models/vietnamese-bi-encoder with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("bkai-foundation-models/vietnamese-bi-encoder") sentences = [ "Làm thế nào Đại học Bách khoa Hà Nội thu hút sinh viên quốc tế?", "Đại học Bách khoa Hà Nội đã phát triển các chương trình đào tạo bằng tiếng Anh để làm cho việc học tại đây dễ dàng hơn cho sinh viên quốc tế.", "Môi trường học tập đa dạng và sự hỗ trợ đầy đủ cho sinh viên quốc tế tại Đại học Bách khoa Hà Nội giúp họ thích nghi nhanh chóng.", "Hà Nội có khí hậu mát mẻ vào mùa thu.", "Các món ăn ở Hà Nội rất ngon và đa dạng." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [5, 5] - Transformers
How to use bkai-foundation-models/vietnamese-bi-encoder with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("bkai-foundation-models/vietnamese-bi-encoder") model = AutoModel.from_pretrained("bkai-foundation-models/vietnamese-bi-encoder", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -25,9 +25,10 @@ license: apache-2.0
|
|
| 25 |
# bkai-foundation-models/vietnamese-bi-encoder
|
| 26 |
|
| 27 |
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
|
|
|
| 28 |
We train the model on a merged training dataset that consists of:
|
| 29 |
-
- MS Macro (translated
|
| 30 |
-
- SQuAD v2 (translated
|
| 31 |
- 80% of the training set from the Legal Text Retrieval Zalo 2021 challenge
|
| 32 |
|
| 33 |
We use [phobert-base-v2](https://github.com/VinAIResearch/PhoBERT) as the pre-trained backbone.
|
|
|
|
| 25 |
# bkai-foundation-models/vietnamese-bi-encoder
|
| 26 |
|
| 27 |
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
| 28 |
+
|
| 29 |
We train the model on a merged training dataset that consists of:
|
| 30 |
+
- MS Macro (translated into Vietnamese)
|
| 31 |
+
- SQuAD v2 (translated into Vietnamese)
|
| 32 |
- 80% of the training set from the Legal Text Retrieval Zalo 2021 challenge
|
| 33 |
|
| 34 |
We use [phobert-base-v2](https://github.com/VinAIResearch/PhoBERT) as the pre-trained backbone.
|