Instructions to use MBZUAI/sentseg-camelbert-NP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MBZUAI/sentseg-camelbert-NP with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="MBZUAI/sentseg-camelbert-NP")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("MBZUAI/sentseg-camelbert-NP") model = AutoModelForTokenClassification.from_pretrained("MBZUAI/sentseg-camelbert-NP", device_map="auto") - Notebooks
- Google Colab
- Kaggle
sentseg-camelbert-NP
Model Description
sentseg-camelbert-NP is an Arabic sentence segmentation model built by fine-tuning CAMeLBERT-MSA on the No-Paragraph (NP) 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
No-Paragraph (NP): Punctuation is kept; paragraph boundaries are removed, so each document is one stream of tokens.
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 theNPconfig 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 | 94.1 | 93.2 | 93.4 |
| Test | 94.0 | 93.0 | 93.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-NP
Base model
CAMeL-Lab/bert-base-arabic-camelbert-msa