/ Модель

Характеристики

Контекст
514 токенов
Параметры
305 млн
Лицензия
MIT
Архитектура
xlm-roberta · dense
Базовая модель
multilingual-e5-base
Библиотека
sentence-transformers
Опубликована
13 сен 2026

VietRAG-Embed

ЭмбеддингиТекст → embedding6 профессий

Вьетнамская модель эмбеддингов для семантического поиска и извлечения контекста в системах RAG.

243скачиваний за 30 дней1лайквеса обновлены13 сен 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Эмбеддинги» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

VietRAG-Embed — вьетнамская плотная модель эмбеддингов, разработанная VietRAG и дообученная на базе intfloat/multilingual-e5-base. Она построена на XLM-RoBERTa и Sentence Transformers, содержит 305,2 млн параметров и преобразует запросы и фрагменты текста в нормализованные векторы размерности 768. Для запросов требуется префикс «query: », а для документов — «passage: ». Модель предназначена для семантического поиска по вьетнамским документам, извлечения контекста для ответов на вопросы и RAG, а также для отбора кандидатов перед переранжированием. Она не генерирует ответы самостоятельно.

Модель обучена на 937 686 вьетнамских парах запрос–релевантный текст–сложный отрицательный пример, включая данные веб-поиска и научно-технические материалы. Её можно применять для поиска по FAQ и базам знаний, а нормализованные векторы подходят для сравнения косинусной близостью или скалярным произведением. Лицензия — MIT.

Основной язык — вьетнамский; качество для других языков и смешанных запросов не подтверждено. Контекст ограничен 514 токенами по метаданным, а README указывает усечение входа длиннее 512 токенов, поэтому длинные документы следует делить на смысловые фрагменты. Результаты поиска могут быть тематически близкими, но фактически неверными; приведённый внутренний диагностический тест использует общий корпус с обучением и не гарантирует качество на пользовательских данных.

Сценарии применения

  • семантический поиск по вьетнамским документам
  • поиск фрагментов для ответов на вопросы
  • извлечение документов из вьетнамской базы знаний или FAQ
  • подбор контекста для генеративной RAG-системы
  • отбор кандидатов перед переранжированием cross-encoder

Ограничения

Модель оптимизирована преимущественно для вьетнамского языка; качество для других языков и смешанных запросов не подтверждено. Длинные входы усекутся примерно после 512 токенов, а диагностические результаты на общем с обучением корпусе не гарантируют качество на новых данных.

Для каких профессий подходит6

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

VietRAG-Embed

VietRAG-Embed is a Vietnamese dense-retrieval model fine-tuned from intfloat/multilingual-e5-base. It maps queries and passages to normalized 768-dimensional vectors for semantic search, question answering retrieval, and Retrieval-Augmented Generation (RAG).

The model was trained on 937,686 cleaned Vietnamese query–positive–hard-negative records, with an emphasis on web passage QA and scientific retrieval.

Website: minhlab.ai.vn · Source code: VietRAG-Embed-E5-Base

Model details

PropertyValue
ArchitectureXLM-RoBERTa / Sentence Transformers
Base modelintfloat/multilingual-e5-base
Primary languageVietnamese
Embedding dimension768
Maximum sequence length512 tokens
PoolingMean pooling
Output normalizationL2 normalization
SimilarityCosine similarity
Parameters278,043,648

Intended use

VietRAG-Embed is intended for:

  • Vietnamese document and passage retrieval
  • Semantic search
  • FAQ and knowledge-base retrieval
  • Retrieval for extractive QA or generative RAG systems
  • Candidate generation before a cross-encoder reranker
  • Query-to-passage similarity

This is an embedding model, not a generative language model. It retrieves relevant text but does not generate answers by itself.

Required E5 prefixes

Inputs must use the prefixes employed during training:

  • Queries: query:
  • Documents or passages: passage:

Omitting these prefixes can reduce retrieval quality. Apply the prefix before tokenization and keep the convention identical when indexing and searching.

Quick start

pip install -U sentence-transformers
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("nhminh107/VietRAG-Embed")

queries = [
    "query: Thủ đô của Việt Nam là gì?",
]
passages = [
    "passage: Hà Nội là thủ đô của nước Cộng hòa xã hội chủ nghĩa Việt Nam.",
    "passage: Nước đóng băng ở 0 độ C trong điều kiện áp suất tiêu chuẩn.",
]

query_embeddings = model.encode(
    queries,
    normalize_embeddings=True,
    convert_to_tensor=True,
)
passage_embeddings = model.encode(
    passages,
    normalize_embeddings=True,
    convert_to_tensor=True,
)

scores = model.similarity(query_embeddings, passage_embeddings)
print(scores)

Because embeddings are normalized, cosine similarity is equivalent to the inner product.

FAISS retrieval example

import faiss
import numpy as np
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("nhminh107/VietRAG-Embed")

documents = [
    "Hà Nội là thủ đô của Việt Nam.",
    "Nước đóng băng ở 0 độ C trong điều kiện áp suất tiêu chuẩn.",
    "Sao Mộc là hành tinh lớn nhất trong Hệ Mặt Trời.",
]

document_embeddings = model.encode(
    [f"passage: {text}" for text in documents],
    normalize_embeddings=True,
    convert_to_numpy=True,
).astype(np.float32)

index = faiss.IndexFlatIP(document_embeddings.shape[1])
index.add(document_embeddings)

query_embedding = model.encode(
    ["query: Thủ đô của Việt Nam là gì?"],
    normalize_embeddings=True,
    convert_to_numpy=True,
).astype(np.float32)

scores, indices = index.search(query_embedding, k=2)
for score, index_id in zip(scores[0], indices[0]):
    print(f"{score:.4f}  {documents[index_id]}")

For large collections, encode passages in batches and use an approximate FAISS index or another vector database. Store the mapping between vector IDs and document metadata separately.

Benchmark results

mMARCO-VI shard holdout 04–05

This in-domain retrieval diagnostic contains 4,599 held-out queries and 7,949 candidate passages sampled from mMARCO-VI shards 04–05. Exact normalized query overlap with the training export was removed.

MetricScore
Recall@10.8419
Recall@50.9533
Recall@100.9698
MRR@100.8907
nDCG@100.9102

The median rank of the relevant passage was 1. This benchmark is query-held-out but corpus-shared: 215 passages, or 2.70% of the evaluation corpus, have exact normalized matches in the training corpus. The result should therefore be treated as an in-domain diagnostic rather than a fully independent external benchmark.

Selected VN-MTEB retrieval results

TaskMain retrieval score
SciFact-VN0.6130
TRECCOVID-VN0.6068
Quora-VN0.5652

VN-MTEB results are reported separately from the custom mMARCO-VI benchmark. Evaluation was run on an NVIDIA Tesla T4 using E5 query and passage prefixes.

Reproduction code and detailed benchmark artifacts are available in the project repository.

Training data

The training pipeline uses the following Vietnamese data sources:

DatasetMain role
minhnguyent546/mmarco-vietnamese-splitWeb passage QA
hotchpotch/mmarco-hard-negatives-reranker-scoreReranker-scored hard-negative candidates
nhminh107/VietEmbed-RAG-ScienceScience and technical retrieval
vietgpt/wikipedia_viVietnamese encyclopedic source corpus

The final cleaned supervised retrieval export contains 937,686 query–positive–hard-negative records: 869,119 filtered Vietnamese mMARCO records and 68,567 scientific retrieval records. Wikipedia-VI is used as an additional Vietnamese source corpus in the broader data preparation pipeline.

The pipeline applies text normalization, length and distinctness checks, duplicate control, source tracking, and hard-negative quality filtering.

Benchmark data was not used for model selection. The custom mMARCO diagnostic uses later source shards and rejects every exact normalized query found in the training export.

Training procedure

The model was trained with Sentence Transformers and MultipleNegativesRankingLoss.

SettingValue
ObjectiveMultiple Negatives Ranking Loss
Similarity in lossCosine similarity
Loss scale20.0
Batch size24
Effective passes over the data2
Optimization steps78,142
Learning rate5e-6
Warmup ratio0.1
PrecisionFP16
Seed42
Batch samplerNo-duplicates hashed
Multi-dataset samplerProportional

Training used a single visible NVIDIA Tesla T4 on Kaggle and took approximately 11.2 hours. Query inputs were prefixed with query: ; positive and hard-negative passages were prefixed with passage: .

Architecture

SentenceTransformer(
  Transformer: XLMRobertaModel
  Pooling: mean pooling, dimension 768
  Normalize: L2 normalization
)

Limitations and responsible use

  • The model is optimized primarily for Vietnamese retrieval. Performance on other languages or mixed-language queries has not been established here.
  • Training data is dominated by web passage QA, so retrieval quality can vary across specialized domains and document styles.
  • Inputs longer than 512 tokens are truncated. Long documents should be split into semantically coherent passages before indexing.
  • Dense retrieval can return topically similar but factually incorrect passages. Production RAG systems should retain citations, apply access controls, and evaluate answer grounding.
  • Web-derived and translated training text may contain factual errors, outdated information, or social biases inherited from its sources.
  • The benchmark scores above do not guarantee performance on a private corpus. Evaluate with representative queries and relevance judgments before deployment.

Do not use embedding similarity as the sole basis for high-impact medical, legal, financial, employment, or safety decisions.

Framework versions

Training environment:

  • Python 3.12.13
  • PyTorch 2.10.0 + CUDA 12.8
  • Sentence Transformers 5.4.1
  • Transformers 5.0.0
  • Datasets 5.0.0
  • Tokenizers 0.22.2

The exported Sentence Transformers model was also verified locally with a fully offline load and inference smoke test.

License

The model repository is released under the MIT License. Users are responsible for reviewing and complying with the licenses and terms of the upstream base model and datasets for their use case.

Citation

@misc{vietrag_embed_2026,
  author       = {nhminh107},
  title        = {VietRAG-Embed: Vietnamese Dense Retrieval Embeddings for RAG},
  year         = {2026},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/nhminh107/VietRAG-Embed}}
}

Acknowledgements

VietRAG-Embed builds on intfloat/multilingual-e5-base, Sentence Transformers, Hugging Face Transformers, MTEB, and FAISS.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · sentence-transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
XLMRobertaModel
Ревизия весов
b05cbfe

0 моделей