/ Модель

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

Лицензия
Своя лицензия
Библиотека
transformers
Опубликована
28 сен 2026

GoiBERT-M

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

GoiBERT-M — компактный вьетнамский энкодер для извлечения векторных представлений текста и дообучения под прикладные задачи.

114скачиваний за 30 дней4лайкавеса обновлены19 ноя 2026

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

GoiBERT-M — компактный вьетнамоязычный энкодер RoBERTa, представленный в работе о двухэтапной дистилляции языковых моделей для вьетнамского языка. Модель содержит около 49,4 млн параметров, использует токенизатор BamiBERT с 20 481 токеном и принимает необработанный текст без предварительной сегментации слов. Это базовый энкодер без пула и голов для конкретных задач; для классификации, распознавания сущностей и других сценариев его требуется дообучить.

Модель предназначена для получения векторных представлений текста и последующего применения в задачах на вьетнамском языке. В опубликованных оценках GoiBERT-M показала наивысший средний результат среди моделей-учеников на восьми бенчмарках и примерно вдвое более высокую пропускную способность при пакетном GPU-инференсе по сравнению с BamiBERT. Длина входа ограничена 256 токенами.

GoiBERT-M получена дистилляцией BamiBERT на очищенном вьетнамском корпусе; веса доступны в формате safetensors. Для доступа к репозиторию нужно принять условия лицензии на странице модели; в метаданных лицензия обозначена как other, поэтому конкретные условия следует сверить там. Среди ограничений — более низкие результаты, чем у BamiBERT, на ViNLI и PhoNER_COVID19; диалекты и новые предметные области не оценивались.

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

  • получение эмбеддингов вьетнамских текстов
  • классификация отзывов и коротких сообщений на вьетнамском языке
  • дообучение классификатора для вьетнамских документов
  • распознавание именованных сущностей после дообучения
  • оценка семантической близости вьетнамских текстов

Ограничения

В базовом репозитории нет голов для прикладных задач, поэтому для классификации или распознавания сущностей требуется дообучение. В тестах модель уступала BamiBERT на ViNLI и PhoNER_COVID19; вход ограничен 256 токенами, а диалекты и новые домены не оценивались.

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

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

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

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

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

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

Открыть на Hugging Face

GoiBERT-M (Medium): a compact Vietnamese encoder

GoiBERT-M (Medium) is the Hugging Face release described in the paper GoiBERT: Compact Vietnamese Language Models via Two-Stage Knowledge Distillation. It is a 49.4M-parameter Vietnamese RoBERTa encoder, under half the size of BamiBERT, distilled from BamiBERT on a cleaned 329M-token Vietnamese corpus. It uses BamiBERT's tokenizer (20,481 tokens) and takes raw text, with no word segmentation needed.

On 8 Vietnamese benchmarks, GoiBERT-M has the highest average among non-teacher models in the paper: 81.13, against 80.71 for PhoBERT-v2 and 80.65 for BamiBERT. It has about 2× BamiBERT's batched GPU throughput and uses about half the GPU memory.

This is the backbone encoder only, with no task head. Fine-tune it for your task.

Paper naming: The paper uses GoiBERT-base for GoiBERT-S (Small) and GoiBERT-large for GoiBERT-M (Medium). The repository IDs and checkpoints are unchanged.

Research overview: English · Tiếng Việt · Code

Model details

Model nameGoiBERT-M (Medium)
ArchitectureRoBERTa encoder: 12 layers, hidden size 512, 8 attention heads, FFN size 2,048
Parameters49,366,016 (encoder, no pooler)
TokenizerBamiBERT tokenizer, vocabulary 20,481; takes raw (unsegmented) Vietnamese text
Recommended max length256 tokens. Distillation used 256-token sequences, so position embeddings beyond 256 are untrained.
TeachersStage 1: BamiBERT (102.4M), used unchanged. Stage 2 (fine-tuning only): CafeBERT out-of-fold soft labels
FamilyGoiBERT-S (Small, 26.4M), GoiBERT-M (Medium, 49.4M)
PaperarXiv:2610.30067

Usage

  1. Sign in to Hugging Face and complete the short access form on this model page. Access is approved automatically after license acceptance.
  2. Authenticate once on your development machine (use a read token or a fine-grained token with access to this model):
pip install -U huggingface_hub
hf auth login

For notebooks, use from huggingface_hub import login; login() instead. For CI, provide HF_TOKEN through your secret manager; never commit a token to source code.

Then run the example below. The saved login is picked up automatically. Access approval does not replace a separate commercial agreement where the license requires one.

from transformers import AutoTokenizer, AutoModel

tokenizer = AutoTokenizer.from_pretrained("TwoheartsTechnologies/GoiBERT-M")
model = AutoModel.from_pretrained("TwoheartsTechnologies/GoiBERT-M")

inputs = tokenizer("Sản phẩm dùng tốt, giao hàng nhanh.", return_tensors="pt",
                   truncation=True, max_length=256)
hidden = model(**inputs).last_hidden_state   # (1, seq_len, 512)

Training

Initialization

  • Word embeddings: PCA projection (768 → 512) of BamiBERT's word embeddings.
  • Transformer layers: random initialization.

General distillation (TinyBERT-style, no labels)

The student learns to match two signals from BamiBERT, one student layer to one teacher layer (mapping [0,1,…,12]):

  • hidden states, through learned linear projections;
  • attention maps, averaged over heads.
SettingValue
Steps120,000
Batch32 sequences × 256 tokens (about 0.98B tokens seen, about 3 passes over the corpus)
OptimizerAdamW, learning rate 1e-4, weight decay 0.01, 1,000 warmup steps, linear decay
Precisionbf16 autocast
Hardware1× NVIDIA L40S

Shape selection. Two 50–60M shapes were distilled with the same recipe and compared on validation (5 tasks, seed 42):

ShapeValidation score
12 × 512 (this model)82.86
6 × 768 (initialized from BamiBERT layers 2, 4, …, 12)82.50

The 6 × 768 variant has about 2× lower single-sequence GPU latency.

Distillation corpus (corpus v2). 328.6M BamiBERT tokens. Documents are shuffled as whole documents, so paragraphs within each document stay in order.

SourceTokensShare
HPLT 3.0 Vietnamese web: bins 7–9, spun and machine-translated text filtered out, at most 2% per host, near- and exact-deduplicated232.9M71%
Vietnamese Wikipedia (articles of at least 300 words)49.4M15%
User-generated and forum text (from HPLT)25.5M8%
Unlabeled train-split text of 8 Vietnamese benchmarks, repeated up to 10×20.9M6%

Decontamination. Any paragraph that shares a 13-gram with the validation or test text of the 8 benchmarks, or matches it exactly (for short texts), was removed: 30,334 paragraphs and 2,630 documents in total. A final scan found 0 exact matches with any validation or test example.

Evaluation

Results are from Table 1 of the paper: test sets, mean of 3 fine-tuning seeds, one metric per task (%).

Protocol

  • 3 seeds per task; epoch and learning rate chosen on validation.
  • Test set evaluated once per model, from a manifest locked before test access.

Fine-tuning recipe

  • 30 epochs, batch size 32, layer-wise learning-rate decay (γ = 0.8).
  • Loss: cross-entropy plus knowledge distillation from out-of-fold CafeBERT soft labels (α = 0.5, T = 2). CafeBERT is used only as a task teacher during fine-tuning; it is not part of the released weights.

BamiBERT baseline. Re-run under the same downstream protocol, with its learning rate tuned on validation and standard cross-entropy fine-tuning.

TaskMetricBamiBERT (102.4M)GoiBERT-S (Small, 26.4M)GoiBERT-M (Medium, 49.4M)
ViNLImacro-F180.1875.8678.52
ViSpamReviewsmacro-F177.5576.5278.13
PhoNER_COVID19 (syllable)entity F194.3292.9793.47
UIT-ABSA Restaurantaspect-sentiment pair F173.5374.1576.00
UIT-ABSA Hotelaspect-sentiment pair F173.9475.0175.67
UIT-VSFC topicmacro-F178.8880.1780.42
UIT-VSFC sentimentmacro-F182.3681.5082.03
UIT-ViSFDaspect-sentiment pair F184.4183.9484.78
Average (8 tasks)80.6580.0281.13
Parameters102.4M26.4M49.4M
GFLOPs per 128-token input22.44.810.1

The paper's Table 1 also reports CafeBERT (task teacher), XLM-R, ViSoBERT and PhoBERT-v2 on the same tasks.

Inference efficiency. Encoder only. GPU: NVIDIA L40S, bf16. CPU: fp32, 8 threads.

BamiBERTGoiBERT-M (Medium)
GPU latency, batch 1 × 1282.93 ms3.26 ms
GPU latency, batch 32 × 1286.09 ms3.28 ms (1.9×)
GPU throughput, batch 32 × 2562,397 seq/s4,827 seq/s (2.0×)
CPU latency, batch 1 × 12831.0 ms19.4 ms (1.6×)
Peak GPU memory, batch 32 × 256801 MB410 MB
Weights (bf16)206 MB99 MB

GoiBERT-M has the same depth as BamiBERT (12 layers). For single sequences on GPU, latency is bound by per-layer overhead, so it matches BamiBERT. The speed-up appears with batched inference and on CPU.

Limitations

As stated in the paper:

  • GoiBERT trails BamiBERT on ViNLI and PhoNER_COVID19; compression is costlier for inference and entity recognition than for sentiment and classification.
  • The comparison with BamiBERT is not a pure architecture comparison: GoiBERT also uses CafeBERT distillation, layer-wise learning-rate decay and benchmark training text in its distillation corpus.
  • General distillation was run once per model, so seed ranges reflect fine-tuning only.
  • Inputs are limited to 256 tokens; dialects and unseen domains have not been evaluated.
  • Efficiency figures exclude tokenization, task heads and the cost of training the teachers.

Citation

@article{goibert2026,
  title   = {GoiBERT: Compact Vietnamese Language Models via Two-Stage Knowledge Distillation},
  author  = {Tran, Quang Anh Kiet and Tran, Nam Anh and Trinh, Manh Hung and Le, Thanh Danh and Vo, Khang Nhat Hoang and Tran, Huynh Dai Nhan},
  journal = {arXiv preprint arXiv:2610.30067},
  year    = {2026}
}

License and commercial use

This release is offered under the GoiBERT Community Model License for Twohearts' licensable contributions. Research and evaluation are royalty-free, subject to the license and applicable upstream terms. Commercial use is royalty-free for an organization group with fewer than 100 personnel AND fewer than 1,000 customers, as defined in the license.

An organization group meeting either threshold needs a separate written commercial agreement before commercial use. Contact nhan@twohearts.vn.

GoiBERT was developed using BamiBERT. Applicable BSD-3-Clause-Clear and Qualcomm Responsible AI License obligations remain in effect; our license does not replace them or authorize exceptions. See NOTICE, BSD-3-Clause-Clear and Qualcomm RAIL.

This release contains the backbone encoder. Task heads, benchmark datasets and the training corpus are not licensed or distributed by this model license. This community license has commercial conditions and is not an OSI-approved open-source license. The license does not waive third-party rights or replace permissions required for training data or upstream materials. It does not retroactively amend an earlier model release.

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

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

GPU в ailist

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

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

Подбираем GPU…

Ревизия весов
1e8e44b

0 моделей