Instructions to use MBZUAI/sentseg-camelbert-PA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MBZUAI/sentseg-camelbert-PA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="MBZUAI/sentseg-camelbert-PA")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("MBZUAI/sentseg-camelbert-PA") model = AutoModelForTokenClassification.from_pretrained("MBZUAI/sentseg-camelbert-PA", device_map="auto") - Notebooks
- Google Colab
- Kaggle
sentseg-camelbert-PA
Model Description
sentseg-camelbert-PA is an Arabic sentence segmentation model built by fine-tuning CAMeLBERT-MSA on the Paragraph-Aware (PA) variant of AraSeg, a manually annotated, genre-diverse Arabic sentence segmentation benchmark covering 8 genres.
Sentence segmentation is framed as binary token classification: for every word, the model predicts whether a sentence boundary follows it.
Task Variant
Paragraph-Aware (PA): Punctuation and paragraph boundaries are kept; each paragraph is segmented on its own.
AraSeg defines four task variants, each with its own model:
| Model | Variant | Paragraph boundaries | Punctuation |
|---|---|---|---|
sentseg-camelbert-NP |
No-Paragraph (NP) | โ | โ |
sentseg-camelbert-PA |
Paragraph-Aware (PA) | โ | โ |
sentseg-camelbert-NoPnx-NP |
No-Punctuation No-Paragraph (NoPnx-NP) | โ | โ |
sentseg-camelbert-NoPnx-PA |
No-Punctuation Paragraph-Aware (NoPnx-PA) | โ | โ |
Labels
| ID | Label | Meaning |
|---|---|---|
| 0 | O |
no sentence boundary after this word |
| 1 | EOS |
a sentence ends after this word |
The label of a word is predicted on its last subtoken.
Training
- Base model:
CAMeL-Lab/bert-base-arabic-camelbert-msa(the tokenizer is unchanged). - Data: the
trainsplit of thePAconfig ofMBZUAI/AraSEG. - Hyperparameters: effective batch size 32, 5 epochs, learning rate 3e-5.
- Long inputs: sequences are processed in 512-token windows with a stride of 64; logits of overlapping windows are averaged.
Evaluation
Boundary precision (P), recall (R) and F1 on AraSeg. A predicted boundary is correct only if it exactly matches a gold boundary; scores are computed per document and macro-averaged over documents.
| Split | P | R | F1 |
|---|---|---|---|
| Dev | 96.3 | 95.3 | 95.6 |
| Test | 96.1 | 94.7 | 95.2 |
Citation
If you use this model in your work, please cite the following paper:
@inproceedings{elkholy-etal-2026-arabic-sentence-segmentation,
title = "{A}rabic Sentence Segmentation Across Genres and Punctuation Conditions",
author = "Elkholy, Mohammed and
Elmadani, Khalid N. and
Habash, Nizar and
Alhafni, Bashar",
booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2026",
month = oct,
year = "2026",
address = "Budapest, Hungary",
publisher = "Association for Computational Linguistics"
}
- Downloads last month
- -
Model tree for MBZUAI/sentseg-camelbert-PA
Base model
CAMeL-Lab/bert-base-arabic-camelbert-msa