GoiBERT-M
Compact Vietnamese encoders that read raw text and outscore models twice their size, distilled from two teachers.
Co-first author · distillation and evaluation · 2026 · Live
GoiBERT-M 169 · GoiBERT-S 132
01 · The problem
The problem
The strongest Vietnamese encoders are expensive to run. CafeBERT has 559M parameters, almost half of them in a multilingual vocabulary; PhoBERT needs an external word segmenter at inference time; even the leanest strong baseline, BamiBERT, carries a 102M-parameter encoder. Teams serving Vietnamese NLP on CPUs, small GPUs or tight latency budgets had no compact, segmentation-free encoder that holds up across tasks.
02 · The data
The data
328.6M tokens of clean, unlabeled Vietnamese text from HPLT 3.0, Wikipedia and benchmark training splits, with every passage that matches validation or test content removed by exact and 13-gram matching. Evaluation on eight benchmarks across text classification, aspect-based sentiment, natural language inference and NER: 15 metrics, three seeds each.
03 · The approach
The approach
Two teachers, two stages, each teacher used where its knowledge can actually transfer. Stage 1: BamiBERT, which shares the student's tokenizer, teaches general representations through layer-wise hidden-state and attention matching on unlabeled text. Stage 2: CafeBERT, whose 250K multilingual vocabulary cannot be aligned token by token, teaches only through task soft labels, generated out of fold by five teachers each trained on four folds, so no example is ever labeled by a model that saw it. The students are RoBERTa encoders (10 × 384 and 12 × 512) with embeddings initialised from the teacher by PCA and layer-wise learning-rate decay.
04 · The results
The results
GoiBERT-large averages 81.13 across eight benchmarks, the best non-teacher model, ahead of PhoBERT-v2 (80.71) and BamiBERT (80.65) with 48% of BamiBERT's parameters, and it beats its 559M-parameter teacher on classification (80.19 vs 79.98). Against BamiBERT it doubles GPU throughput (4,827 vs 2,397 sentences/s), halves memory and cuts CPU latency by 37%. GoiBERT-base keeps 99.2% of BamiBERT's score at a quarter of the size with 3.5× the throughput. Compression is nearly free for sentiment and classification; NLI and NER are where it still costs, and the paper says so.
05 · Why it matters
Why it matters
Shows research judgment, not just training runs: each teacher matched to the stage it can teach, leakage guarded at every step, and measured speed reported next to the tasks where compression still costs.
Gallery
Through the DABM lens
- DData
- 328.6M Vietnamese tokens · 8 benchmarks · 15 metrics
- AAgent
- teams serving Vietnamese NLP on CPUs, small GPUs and tight latency budgets
- BBehavior
- two teachers whose knowledge transfers at different granularities
- MModeling
- two-stage distillation · out-of-fold soft labels · compact RoBERTa students
Stack
- Python
- PyTorch
- Hugging Face
- RoBERTa
- Knowledge Distillation
A fuller case study for this project is coming soon.