ayoubkirouane/Algerian-Darija
Viewer • Updated • 171k • 67 • 14
How to use messalti/MagharibiBERT-v1 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("fill-mask", model="messalti/MagharibiBERT-v1") # Load model directly
from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("messalti/MagharibiBERT-v1")
model = AutoModelForMaskedLM.from_pretrained("messalti/MagharibiBERT-v1", device_map="auto")
MagharibiBERT-v1 is a Transformer-based language model pre-trained for Maghrebi Arabic dialects (Algerian, Moroccan, Tunisian).
It is initialized from MARBERT and further adapted using Masked Language Modeling (MLM) on large-scale social media text.
The model is designed for downstream NLP tasks such as hate speech detection, sentiment analysis, and dialect classification.
from transformers import pipeline
pipe = pipeline("fill-mask", model="messalti/MagharibiBERT-v1")
Base model
UBC-NLP/MARBERT