Views
No views yet
[!NOTE] This is an Experimental Arabic Model demonstrates how ModernBERT can be adapted to Arabic for tasks like topic classification.
transformers library. Below is an example:1from transformers import pipeline
2
3# Load model from huggingface.co/models using our repository ID
4classifier = pipeline(
5 task="text-classification",
6 model="Omartificial-Intelligence-Space/AraModernBert-Topic-Classifier",
7)
8
9sample = '''
10PUT SOME TEXT HERE TO CLASSIFY ITS TOPIC
11'''
12classifier(sample)
13
14# [{'label': 'health', 'score': 0.6779336333274841}]
15

@misc{modernbert,
title={Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inference},
author={Benjamin Warner and Antoine Chaffin and Benjamin Clavié and Orion Weller and Oskar Hallström and Said Taghadouini and Alexis Gallagher and Raja Biswas and Faisal Ladhak and Tom Aarsen and Nathan Cooper and Griffin Adams and Jeremy Howard and Iacopo Poli},
year={2024},
eprint={2412.13663},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2412.13663},
}