返回模型
说明文档
模型卡片:Vietnamese_Embedding
Vietnamese_Embedding 是一个基于 BGE-M3 模型(https://huggingface.co/BAAI/bge-m3)微调的嵌入模型,旨在增强越南语的检索能力。
- 该模型使用约 300,000 个越南语查询、正面文档和负面文档的三元组进行训练。
- 该模型使用最大序列长度 2048 进行训练。
模型详情
模型描述
- 模型类型: 句子转换器
- 基础模型: BAAI/bge-m3
- 最大序列长度: 2048 个标记
- 输出维度: 1024 维
- 相似度函数: 点积相似度
- 语言: 越南语
- 许可证: Apache 2.0
使用方法
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)
'''
评估结果:
- 数据集:Legal Zalo 2021 的完整训练数据集。我们的模型未在该数据集上进行训练。
| 模型 | Accuracy@1 | Accuracy@3 | Accuracy@5 | Accuracy@10 | MRR@10 |
|---|---|---|---|---|---|
| Vietnamese_Reranker | 0.7944 | 0.9324 | 0.9537 | 0.9740 | 0.8672 |
| Vietnamese_Embedding_v2 | 0.7262 | 0.8927 | 0.9268 | 0.9578 | 0.8149 |
| Vietnamese_Embedding (public) | 0.7274 | 0.8992 | 0.9305 | 0.9568 | 0.8181 |
| Vietnamese-bi-encoder (BKAI) | 0.7109 | 0.8680 | 0.9014 | 0.9299 | 0.7951 |
| BGE-M3 | 0.5682 | 0.7728 | 0.8382 | 0.8921 | 0.6822 |
Vietnamese_Reranker 和 Vietnamese_Embedding_v2 使用 1,100,000 个三元组进行训练。
虽然 Vietnamese_Embedding_v2 在法律领域的分数略有下降,但由于该阶段的数据量更大,因此对于其他领域来说效果非常好。
您可以通过以下链接访问两个模型:Vietnamese_Embedding_v2、Vietnamese_Reranker
您可以通过运行 python evaluation_model.py 代码来复现评估结果(数据从 Kaggle 下载)。
联系方式
邮箱:nguyennhotrung3004@gmail.com
开发者
成员:Nguyễn Nho Trung、Nguyễn Nhật Quang、Nguyen Van Huy
引用
@misc{Vietnamese_Embedding,
title={Vietnamese_Embedding: Embedding model in Vietnamese language.},
author={Nguyen Nho Trung, Nguyen Nhat Quang, Nguyen Van Huy},
year={2025},
publisher={Huggingface},
}
AITeamVN/Vietnamese_Embedding
作者 AITeamVN
sentence-similarity
sentence-transformers
↓ 139.7K
♥ 57
创建时间: 2025-03-17 06:56:47+00:00
更新时间: 2025-08-25 13:32:21+00:00
在 Hugging Face 上查看文件 (19)
.gitattributes
1_Pooling/config.json
README.md
config.json
config_sentence_transformers.json
evaluation_model.py
model.safetensors
modules.json
onnx/config.json
onnx/model.onnx
ONNX
onnx/model.onnx_data
onnx/special_tokens_map.json
onnx/tokenizer.json
onnx/tokenizer_config.json
sentence_bert_config.json
sentencepiece.bpe.model
special_tokens_map.json
tokenizer.json
tokenizer_config.json