Downloads · 30 days
0
fadi77/pl-bert
pl-bert is a machine learning model from fadi77. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model card describes a collection of three Arabic BERT models trained with different objectives and datasets for phoneme-aware language modeling.
Downloads · 30 days
0
Access
Public
Updated Apr 19, 2025
Repo size
854 MB
Likes
2
Public
Click a slice to open those files.
.pth854 MB · 100%
From the Hugging Face model README
This model card describes a collection of three Arabic BERT models trained with different objectives and datasets for phoneme-aware language modeling.
These models are Arabic adaptations of the PL-BERT (Phoneme-aware Language BERT) approach introduced in Ashby et al. (2023). The models incorporate phonemic information to enhance language understanding, with variations in training objectives and data preprocessing.
The collection includes three models:
Developed by: Fadi (GitHub: Fadi987)
Model type: Transformer-based language models (BERT variants)
Language: Arabic
All models were initially trained on a cleaned version of the Arabic Wikipedia dataset. The dataset is available at wikipedia.20231101.ar.
For the mlm_only_with_diacritics model, a random sample of 200,000 entries (out of approximately 1.2 million) was selected from the Wikipedia Arabic dataset and fully diacritized using the state-of-the-art CATT diacritizer (Abjad AI, 2024), introduced in this paper and licensed under CC BY-NC 4.0.
The models follow different training objectives:
mlm_p2g_non_diacritics:
mlm_only_non_diacritics:
mlm_only_with_diacritics:
For the mlm_p2g_non_diacritics model, a notable limitation was the use of subword tokenization. This approach is not ideal for pronunciation modeling because phonemizing parts of words independently loses the context of the word, which heavily affects pronunciation. The authors of the original PL-BERT paper used a word-level tokenizer for English, but a comparable high-quality word-level tokenizer was not available for Arabic. This limitation was addressed in the subsequent models by removing the P2G objective.
Arabic text can be written with or without diacritics (short vowel marks). The mlm_only_with_diacritics model specifically addresses this by training on fully diacritized text, which provides explicit pronunciation information that is typically absent in standard written Arabic.
These models can be used for Arabic natural language understanding tasks where phonemic awareness may be beneficial, such as:
For examples on how these models can be used in code, take a look at: https://github.com/Fadi987/StyleTTS2/blob/main/Utils/PLBERT/util.py
The models are trained on Wikipedia data, which may not represent all varieties of Arabic equally. The diacritization process, while state-of-the-art, may introduce some errors or biases in the training data.
The subword tokenization approach used in the mlm_p2g_non_diacritics model has limitations for phonemic modeling as noted above.
BibTeX:
@article{catt2024,
title={CATT: Character-based Arabic Tashkeel Transformer},
author={Alasmary, Faris and Zaafarani, Orjuwan and Ghannam, Ahmad},
journal={arXiv preprint arXiv:2407.03236},
year={2024}
}
@article{plbert2023,
title={Phoneme-Level BERT for Enhanced Prosody of Text-to-Speech with Grapheme Predictions},
author={Li, Yinghao Aaron and Han, Cong and Jiang, Xilin and Mesgarani, Nima},
journal={arXiv preprint arXiv:2301.08810},
year={2023}
}