OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Phobert

PhoBERT is a family of pretrained Vietnamese language models, with base and large variants and documented usage through Transformers and fairseq.

Independent OpenViST project profile, based on linked sources.

Phobert — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use PhoBERT when a project needs pretrained Vietnamese language representations and can prepare text in the expected word-segmented format.

Who it is for

  • Developers building Vietnamese-language NLP applications.
  • Researchers working on Vietnamese named-entity recognition, natural-language inference, part-of-speech tagging or dependency parsing.

Documented uses

  • Load pretrained Vietnamese model features in a Transformers application.
  • Use PhoBERT in a fairseq workflow.
  • Prepare raw Vietnamese text for model input through word segmentation.
  • Build downstream Vietnamese NLP tasks around the pretrained models.
Before you choose

Requirements & limits

  • Transformers examples use vinai/phobert-base and require word-segmented input.
  • The listed model variants have a maximum length of 256.
  • The base and large checkpoints are listed with MIT terms; base-v2 is listed with GNU AGPL v3 terms.
  • The repository asks users to cite the paper when PhoBERT contributes to published results or is incorporated into software.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Load a word-segmented Vietnamese sentence with Transformers

Prepare a segmented sentence and obtain PhoBERT model features using the repository’s Transformers example.

Before you start

  • Install transformers and tokenizers.
  • Use the vinai/phobert-base checkpoint.
  • Provide Vietnamese text that is already word-segmented.

Steps

  1. Load AutoModel and AutoTokenizer from transformers using vinai/phobert-base.

  2. Encode a word-segmented sentence with the tokenizer.

  3. Pass the encoded input to the model under torch.no_grad() to obtain features.

Expected outcome

The example returns model features for the encoded sentence.

Guide limitations

  • Raw Vietnamese input must first be word-segmented.
  • The example uses a 256-token maximum-length model variant.
  • The documented integration does not establish compatibility with every Transformers version or application.
Source-based practical guide

Segment raw Vietnamese text with VnCoreNLP

Convert raw Vietnamese text into word-segmented sentences for a PhoBERT workflow.

Before you start

  • Install py_vncorenlp.
  • Provide a local directory path for downloaded VnCoreNLP components.

Steps

  1. Download VnCoreNLP components with py_vncorenlp.download_model and a local save directory.

  2. Load VnCoreNLP with the wseg annotator and that directory.

  3. Pass raw Vietnamese text to word_segment.

Expected outcome

The example produces word-segmented sentences that can be used as PhoBERT input.

Guide limitations

  • The repository recommends the RDRSegmenter used in PhoBERT preprocessing; other segmenters are not evaluated in this guidance.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
14 October 2026
Original website title
VinAIResearch/PhoBERT · Official homepage title · retained in its source language