← 开源
VinAIResearch

PhoBERT

PhoBERT: Pre-trained language models for Vietnamese (EMNLP-2020 Findings)

ModelsLanguage-specific models
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
809
Star
113
Fork
+0
本周
1
贡献者
创建于 2020-03-03 · 更新于 2026-10-04 · 今日第 13598 名
主要开发者

VinAIResearch/PhoBERT 排名第 13,598,有 809 个星标。

同类别比较

VinAIResearch/PhoBERT 排名第 13,598,此处有 8 个同类条目;OpenTexture/Paint3D 排名第 13,597。

同类别比较
名称排名指标
ByteDance-Seed/Seed-Thinking-v1.513,563
星标数:
812
分叉数:
19
openseg-group/OCNet.pytorch13,574
语言:
Python
星标数:
812
分叉数:
125
简介:
Please choose the openseg.pytorch project for the updated code that achieve SOTA on 6 benchmarks!
HazyResearch/hyena-dna13,587
语言:
Assembly
星标数:
810
分叉数:
112
简介:
Official implementation for HyenaDNA, a long-range genomic foundation model built with Hyena
OpenTexture/Paint3D13,597
语言:
Python
星标数:
809
分叉数:
44
简介:
[CVPR 2024] Paint3D: Paint Anything 3D with Lighting-Less Texture Diffusion Models, a no lighting baked texture generative model
OrionStarAI/Orion13,608
语言:
Python
星标数:
808
分叉数:
60
简介:
Orion-14B is a family of models includes a 14B foundation LLM, and a series of models: a chat model, a long context model, a quantized model, a RAG fine-tuned model, and an Agent fine-tuned model. Orion-14B 系列模型包括一个具有140亿参数的多语言基座大模型以及一系列相关的衍生模型,包括对话模型,长文本模型,量化模型,RAG微调模型,Agent微调模型等。
facebookresearch/metamotivo13,667
语言:
Python
星标数:
802
分叉数:
77
简介:
The first behavioral foundation model to control a virtual physics-based humanoid agent for a wide range of whole-body tasks.
ChenRocks/UNITER13,680
语言:
Python
星标数:
801
分叉数:
111
简介:
Research code for ECCV 2020 paper "UNITER: UNiversal Image-TExt Representation Learning"
facebookresearch/GENRE13,687
语言:
Python
星标数:
800
分叉数:
99
简介:
Autoregressive Entity Retrieval
关键参数与规格
关键参数与规格
参数值
类别Models
子类别Language-specific models
关键词Vietnamese
星标数809
分叉数113
贡献者1
创建日期2020-03-03
更新日期2026-10-04
1 天星标数0
7 天星标数0
排名13,598
上次排名13,491
排名变化-107
7 天星标排名14,021
上次 7 天星标排名14,039
7 天星标排名变化18
总星标排名13,223
上次总星标排名13,202
总星标排名变化-21
国家Vietnam
README 摘录

Notes PhoBERT: Pre-trained language models for Vietnamese Pre-trained PhoBERT models are the state-of-the-art language models for Vietnamese (Pho, i. "Phở", is a popular food in Vietnam): Two PhoBERT versions of "base" and "large" are the first public large-scale monolingual language models pre-trained for Vietnamese. PhoBERT pre-training approach is based on RoBERTa which optimizes the BERT pre-training procedure for more robust performance. PhoBERT outperforms previous monolingual and multilingual approaches, obtaining new state

-of-the-art performances on four downstream Vietnamese NLP tasks of Part-of-speech tagging, Dependency parsing, Named-entity recognition and Natural language inference. The general architecture and experimental results of PhoBERT can be found in our paper: **Please CITE** our paper when PhoBERT is used to help produce published results or is incorporated into other software. _Users may also want to use BamiBERT, our new BERT-based pretrained language model for Vietnamese that addresses key limitations of PhoBERT. Trained

from scratch on a 129 GB corpus of general-domain Vietnamese text for 20 epochs, BamiBERT supports an extended context length of up to 2,048 tokens and operates directly on raw input, eliminating the need for external word segmentation. Across eight Vietnamese benchmarks, it achieves the best performance on 11 of 15 metrics and the second-best performance on three others, setting a new state of the art among "base"-sized Vietnamese encoders and demonstrating strong cross-domain generalization

. _ Using PhoBERT with Installation Install with pip: , or install from source. Note that we merged a slow tokenizer for PhoBERT into the main branch. The process of merging a fast tokenizer for PhoBERT is in the discussion, as mentioned in this pull request. If users would like to utilize the fast tokenizer, the users might install as follows: Install with pip: Pre-trained models Model | #params | Arch. without word segmentation, a word segmenter must be applied to produce word-segmented

texts before feeding to PhoBERT. As PhoBERT employed the RDRSegmenter from VnCoreNLP to pre-process the pre-training data (including Vietnamese tone normalization and word and sentence segmentation), it is recommended to also use the same word segmenter for PhoBERT-based downstream applications w.

常见问题

记录了多少星标和分叉?

VinAIResearch/PhoBERT 有 809 个星标和 113 个分叉。

仓库排名是多少?

VinAIResearch/PhoBERT 排名第 13,598。

哪个仓库排名最接近?

VinAIResearch/PhoBERT 与 OpenTexture/Paint3D 比较,后者排名第 13,597,有 809 个星标。

README

Table of contents

  1. Introduction
  2. Using PhoBERT with transformers
  3. Using PhoBERT with fairseq
  4. Notes

PhoBERT: Pre-trained language models for Vietnamese

Pre-trained PhoBERT models are the state-of-the-art language models for Vietnamese (Pho, i.e. "Phở", is a popular food in Vietnam):

  • Two PhoBERT versions of "base" and "large" are the first public large-scale monolingual language models pre-trained for Vietnamese. PhoBERT pre-training approach is based on RoBERTa which optimizes the BERT pre-training procedure for more robust performance.
  • PhoBERT outperforms previous monolingual and multilingual approaches, obtaining new state-of-the-art performances on four downstream Vietnamese NLP tasks of Part-of-speech tagging, Dependency parsing, Named-entity recognition and Natural language inference.

The general architecture and experimental results of PhoBERT can be found in our paper:

@inproceedings{phobert,
title     = {{PhoBERT: Pre-trained language models for Vietnamese}},
author    = {Dat Quoc Nguyen and Anh Tuan Nguyen},
booktitle = {Findings of the Association for Computational Linguistics: EMNLP 2020},
year      = {2020},
pages     = {1037--1042}
}

Please CITE our paper when PhoBERT is used to help produce published results or is incorporated into other software.

Users may also want to use BamiBERT, our new BERT-based pretrained language model for Vietnamese that addresses key limitations of PhoBERT. Trained from scratch on a 129 GB corpus of general-domain Vietnamese text for 20 epochs, BamiBERT supports an extended context length of up to 2,048 tokens and operates directly on raw input, eliminating the need for external word segmentation. Across eight Vietnamese benchmarks, it achieves the best performance on 11 of 15 metrics and the second-best performance on three others, setting a new state of the art among "base"-sized Vietnamese encoders and demonstrating strong cross-domain generalization.

Using PhoBERT with transformers

Installation

Note that we merged a slow tokenizer for PhoBERT into the main transformers branch. The process of merging a fast tokenizer for PhoBERT is in the discussion, as mentioned in this pull request. If users would like to utilize the fast tokenizer, the users might install transformers as follows:

git clone --single-branch --branch fast_tokenizers_BARTpho_PhoBERT_BERTweet https://github.com/datquocnguyen/transformers.git
cd transformers
pip3 install -e .
  • Install tokenizers with pip: pip3 install tokenizers

Pre-trained models

Model #params Arch. Max length Pre-training data License
vinai/phobert-base-v2 135M base 256 20GB of Wikipedia and News texts + 120GB of texts from OSCAR-2301 GNU Affero GPL v3
vinai/phobert-base 135M base 256 20GB of Wikipedia and News texts MIT License
vinai/phobert-large 370M large 256 20GB of Wikipedia and News texts MIT License

Example usage

import torch
from transformers import AutoModel, AutoTokenizer

phobert = AutoModel.from_pretrained("vinai/phobert-base")
tokenizer = AutoTokenizer.from_pretrained("vinai/phobert-base")

# INPUT TEXT MUST BE ALREADY WORD-SEGMENTED!
sentence = 'Chúng_tôi là những nghiên_cứu_viên .'  

input_ids = torch.tensor([tokenizer.encode(sentence)])

with torch.no_grad():
    features = phobert(input_ids)  # Models outputs are now tuples

## With TensorFlow 2.0+:
# from transformers import TFAutoModel
# phobert = TFAutoModel.from_pretrained("vinai/phobert-base")

Using PhoBERT with fairseq

Please see details at HERE!

Notes

In case the input texts are raw, i.e. without word segmentation, a word segmenter must be applied to produce word-segmented texts before feeding to PhoBERT. As PhoBERT employed the RDRSegmenter from VnCoreNLP to pre-process the pre-training data (including Vietnamese tone normalization and word and sentence segmentation), it is recommended to also use the same word segmenter for PhoBERT-based downstream applications w.r.t. the input raw texts.

Installation

pip install py_vncorenlp

Example usage

import py_vncorenlp

# Automatically download VnCoreNLP components from the original repository
# and save them in some local machine folder
py_vncorenlp.download_model(save_dir='/absolute/path/to/vncorenlp')

# Load the word and sentence segmentation component
rdrsegmenter = py_vncorenlp.VnCoreNLP(annotators=["wseg"], save_dir='/absolute/path/to/vncorenlp')

text = "Ông Nguyễn Khắc Chúc  đang làm việc tại Đại học Quốc gia Hà Nội. Bà Lan, vợ ông Chúc, cũng làm việc tại đây."

output = rdrsegmenter.word_segment(text)

print(output)
# ['Ông Nguyễn_Khắc_Chúc đang làm_việc tại Đại_học Quốc_gia Hà_Nội .', 'Bà Lan , vợ ông Chúc , cũng làm_việc tại đây .']
排名相邻
同类项目