Accuracy vs. Efficiency: Benchmarking Lightweight CPU-Only Models for Egyptian Arabic Sentiment Analysis
Pre-trained Arabic language models dominate sentiment analysis benchmarks, but many real deployments must run on commodity CPUs without a GPU. We benchmark eleven lightweight models on two Egyptian-dialect tweet datasets: ASTD (four classes) and the Egyptian subset of ArSarcasm-v2 (three classes). The models are sparse linear classifiers over word and character n-grams, fastText, and small neural networks trained from scratch. For each model we measure macro-F1 together with model size, memory, single-thread latency and throughput. Character n-gram linear models are the most accurate on both datasets (macro-F1 0.451 on the ASTD test set and 0.594±0.015 in 5-fold cross-validation on the Egyptian ArSarcasm-v2 subset). They classify a tweet in about 0.5 ms with a 2.7 MB model. Neural models trained from scratch are less accurate and have lower throughput at this data scale. fastText answers up to 24× faster than the character models. Product quantization shrinks it to 11.5 MB and, for the word-level model, raises macro-F1 from 0.370 to 0.414 (mean of five seeds). Dialect-oriented preprocessing improves word-level models by up to 5.8 macro-F1 points but character-level models by at most 1.8. All models lose 0.13–0.22 macro-F1 on sarcastic tweets. On the official ArSarcasm-v2 test split, macro-F1 drops from 0.53–0.61 on validation data to 0.28–0.38, which reveals a strong distribution shift. We release code that reproduces all results.
Authors
- Mohamed Adel Salah Al-Sayed
Institutions
- Mansoura University (EG)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-03
- DOI
- https://doi.org/10.5281/zenodo.24778538
- Primary Topic
- Sentiment Analysis and Opinion Mining
- Type
- preprint