CoolFace
Modelpublic

thaile1809/Vietnamese_Embedding_fast

sourceHugging Facecc-by-nc-4.0updated 1y agoView on Hugging Face
0likes96downloads
Model Card

license: cc-by-nc-4.0 language:

  • —vi base_model:
  • —BAAI/bge-m3 pipelinetag: sentence-similarity libraryname: sentence-transformers tags:
  • —Embedding ---

Model Card: Vietnamese_Embedding

Vietnamese_Embedding is an embedding model fine-tuned from the BGE-M3 model (https://huggingface.co/BAAI/bge-m3) to enhance retrieval capabilities for Vietnamese.

  • —The model was trained on approximately 300,000 triplets of queries, positive documents, and negative documents for Vietnamese.
  • —The model was trained with a maximum sequence length of 2048.

Model Details

Model Description

  • —Model Type: Sentence Transformer
  • —Base model: BAAI/bge-m3
  • —Maximum Sequence Length: 2048 tokens
  • —Output Dimensionality: 1024 dimensions
  • —Similarity Function: Dot product Similarity
  • —Language: Vietnamese

Usage

python
from sentence_transformers import SentenceTransformer
import torch

model = SentenceTransformer("AITeamVN/Vietnamese_Embedding")
model.max_seq_length = 2048
sentences_1 = ["Trí tuệ nhân tạo là gì", "Lợi ích của giấc ngủ"]
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.", 
               "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."]
query_embedding = model.encode(sentences_1)
doc_embeddings = model.encode(sentences_2)
similarity = query_embedding @ doc_embeddings.T
print(similarity)

'''
array([[0.66212064, 0.33066642],
       [0.25866613, 0.5865289 ]], dtype=float32)
'''

Evaluation:

  • —Dataset: Entire training dataset of Legal Zalo 2021. Our model was not trained on this dataset.
ModelAccuracy@1Accuracy@3Accuracy@5Accuracy@10Accuracy@100MRR@10
Vietnamese_Embedding0.72740.89920.93050.95680.99220.8181
Vietnamese-bi-encoder (BKAI)0.71090.86800.90140.92990.97720.7951
BGE-M30.56820.77280.83820.89210.97720.6822

You can reproduce the evaluation result by running code python evaluation_model.py (data downloaded from Kaggle).

Developer

Member: Nguyễn Nho Trung, Nguyễn Nhật Quang

Contact

Email:

  • —nguyennhotrung3004@gmail.com
  • —nhatquang2306@gmail.com

Citation

Plaintext
@misc{Vietnamese_Embedding,
  title={Vietnamese_Embedding: Embedding model in Vietnamese language.},
  author={Nguyen Nho Trung, Nguyen Nhat Quang},
  year={2025},
  publisher={Huggingface},
} 
thaile1809/Vietnamese_Embedding_fast · CoolFace