Abstract
Arabic social-media text is classified at national scale, yet the computing cost of Arabic text classifiers is rarely reported. We benchmark twelve model configurations from five families (sparse linear, fastText, convolutional, recurrent and Transformer encoders, with product-quantized, feature-hashed and INT8 variants) on five Arabic dialectal tasks, with three pretrained Arabic BERT encoders as a reference. All models were trained and profiled on one core of a server CPU at batch sizes from 1 to 512, measuring CPU time end to end and for the model computation alone. Because the host exposes no energy counters, energy is reported as a first-order estimate from CPU time at an assumed 12 W per core. The encoders’ CPU costs are proxy estimates from architecture-matched networks, and neural costs are reported both with inputs padded to 64 tokens and at their true length. Among models trained only on the task data, a character n-gram linear SVM, with exact or hashed features, gave the best macro-F1 on every task (0.407–0.861). fastText was the cheapest model for single requests (0.34–0.52 J per 1000 predictions), 9–15 times below every neural model with padded inputs and 6–9 times at true length, and word-level linear models were the cheapest once requests were batched. Compact neural encoders trained from scratch on word or subword tokens were significantly less accurate than the character SVM on every task and never reached the accuracy–cost Pareto front. The pretrained encoder MARBERT was the most accurate model, 7–12 macro-F1 points above the SVM on four of five tasks, at a proxy cost of 121–198 times the SVM’s CPU time per single prediction (true length to padded). Each additional macro-F1 point it bought cost 47–202 J per 1000 predictions, against 0.55–3.5 J for the reliable steps between lightweight models. Profiling showed three cost regimes: sparse linear models were dominated by text preprocessing and fixed per-call overhead, fastText by per-text latency, and neural encoders by fixed per-call costs at batch size 1 and by arithmetic only when batched. Product quantization cut fastText’s memory 15-fold but raised its CPU time, and dynamic INT8 quantization saved 5–11% only in batched inference, and only for the CNN and Transformer. In an assumed scenario in which each model family draws between 8 and 16 W, family-level rankings (fastText for single requests, linear models when batched, no from-scratch neural model on any front, pretrained encoders at the accurate, expensive end) were unchanged in every draw, whereas rankings between individual models of similar cost at batch size 128 were not. Absolute energy and low-power hardware remain to be measured.
1. Introduction
The computing cost of natural language processing (NLP) has become a reportable quantity. Strubell et al. [1] estimated the energy and carbon cost of training large language models, and Schwartz et al. [2] argued that efficiency should be reported alongside accuracy. Attention has since shifted to deployment, where every prediction costs computation: Luccioni et al. [3] showed that task-specific models use far less energy per query than general-purpose generative models, and Desislavov et al. [4] showed that inference energy grows with deployment volume. Surveys of efficient NLP now treat model choice, compression and batching as cost decisions as much as accuracy decisions [5].
This evidence comes almost entirely from English and a few other high-resource languages. For Arabic, the only published energy assessment we are aware of concerns the training of Noor, a 13-billion-parameter model [6]. A recent comparison of energy and accuracy in text classification inference covered German and English benchmarks only [7]. Yet Arabic text classification at national scale is a practical workload: social platforms and public agencies moderate offensive and hateful content, track sentiment and identify dialects in millions of posts a day. Arabic is also a demanding case. It has rich morphology, many dialects that differ from Modern Standard Arabic (MSA), and inconsistent spelling on social media, which inflate vocabularies and favor subword or character features. Pretrained Arabic transformers such as AraBERT, MARBERT and CAMeLBERT [8,9,10] improve accuracy on these tasks, but little is known about what each Arabic model family costs per prediction.
Model families also differ in where their cost goes. Moving data from memory costs far more energy than arithmetic on it [11], so a model whose speed is limited by memory traffic behaves differently from one limited by computation. The roofline model [12] makes this distinction through arithmetic intensity—the ratio of operations to bytes moved. Sparse linear classifiers perform a few operations per weight they read; convolutional networks reuse their weights across positions and across a batch; generative transformers at small batch sizes are dominated by weight and cache traffic [13]. Real implementations add a third cost that the roofline does not capture: fixed per-call overhead from tokenization, framework dispatch and memory allocation. Batch size therefore changes which models are efficient: a service answering one request at a time pays every per-call cost on every prediction, while a service that groups requests amortizes them.
This paper measures these trade-offs for Arabic dialectal text classification on one CPU core, the smallest unit of a commodity server and the setting in which a lightweight classifier is typically deployed alongside other services. The core is a server core, not an embedded processor, and energy is estimated from CPU time rather than measured (Section 3.4); we return to what this implies for low-power hardware in Section 5.4. The paper asks four questions:
- RQ1—How do sparse linear, embedding-bag, convolutional, recurrent and attention-based models compare in accuracy, in training cost and in the cost of 1000 predictions across five Arabic tasks, and where do pretrained Arabic encoders fall on the same scale?
- RQ2—What dominates each family’s inference cost (arithmetic, memory traffic, preprocessing or fixed per-call overhead) and how does batch size change it?
- RQ3—How much cost and memory do compression techniques save (product quantization, feature hashing, dynamic INT8 quantization) and at what accuracy cost?
- RQ4—How much additional cost does each statistically reliable macro-F1 point require when moving from a cheaper model to a more accurate one, how does the answer change between single and batched requests, and how robust are these conclusions to workload-dependent power?
The contributions are:
- A cost and accuracy benchmark of twelve model configurations from five families on five public Arabic tasks, trained from scratch with tuned hyperparameters and three seeds, together with the accuracy of three fine-tuned pretrained Arabic BERT encoders and proxy estimates of their CPU cost on the same core.
- A profiling analysis that separates end-to-end from model-only time, places each family on a measured FP32 and INT8 roofline, and quantifies fixed per-call overhead, so that each family’s dominant cost is identified rather than inferred from arithmetic intensity alone.
- An evaluation of three compression techniques for CPU time, estimated energy, memory footprint and accuracy.
- A marginal-cost measure, the estimated energy of 1000 predictions per additional macro-F1 point, reported with uncertainty and paired significance tests, and a sensitivity analysis of all cost rankings to workload-dependent power. Code, per-run predictions and timing logs are released (Data Availability Statement).
2. Related Work
2.1. Energy Accounting in NLP
After Strubell et al. [1] and Schwartz et al. [2], Henderson et al. [14] released a framework for systematic energy and carbon reporting, and Patterson et al. [15] showed that hardware, data-center efficiency and grid carbon intensity change emissions by orders of magnitude. Bannour et al. [16] compared software tools for measuring the carbon footprint of NLP experiments and found large disagreements between them, a reminder that software energy estimates depend on what each tool can observe. On inference, Luccioni et al. [3] measured energy per query across tasks and model types. Zschache and Hartwig [7] compared classical classifiers with large language models for text classification: linear models on embeddings were the most accurate and used about six orders of magnitude less energy than the largest models, and energy correlated strongly with runtime on their hardware. For Arabic, Lakim et al. [6] assessed the full carbon footprint of training and serving the Noor model, but no study has compared the cost of Arabic task models.
2.2. Arabic Dialectal Text Classification
Arabic social-media text mixes MSA with regional dialects, and dialect identification is itself a hard task in which character n-gram features remain strong [17]. Shared tasks have established benchmarks for offensive language [18], sarcasm and sentiment [19], and dialect, and Arabic transformers pretrained on dialectal tweets lead most of them [8,9,10]. Compact pretrained Arabic encoders with four to eight layers are also available [20]. Saudi dialect hate speech has been studied with classical classifiers on a dedicated, publicly released dataset [21,22]. A systematic review of 24 studies on Arabic Twitter hate speech found that classical classifiers with n-gram features are the most common approach and that accuracy, precision, recall and F1 are the standard measures of success [23]. These studies report accuracy and F1 only; none report the computing cost of reaching them.
2.3. Efficient Text Models and Compression
fastText [24] showed that a linear classifier over averaged word and subword embeddings can match deep models on many text classification tasks at a fraction of the cost, and product quantization shrinks such models by up to two orders of magnitude with little accuracy loss [25]. Integer quantization reduces the memory and arithmetic cost of neural inference [26]; dynamic quantization, which stores weights in 8-bit integers and quantizes activations on the fly, is the variant available without retraining. Convolutional [27], recurrent [28] and attention-based [29] encoders differ in how much computation they perform per weight read, which determines where they sit on the roofline [12] and how they respond to batching. Treviso et al. [5] survey these efficiency methods but note that their energy effects are rarely measured end to end. Efficiency can also be designed into a model rather than added by compression: compact architectures with few parameters, such as SleepStageNet for multi-channel physiological signals [30], target accurate inference on limited hardware. Whether such small neural models pay off for short, noisy Arabic texts, relative to linear models, is one of the questions examined here.
3. Methodology
Figure 1 summarizes the study: five tasks are normalized identically, twelve configurations are trained on each, and every model is measured for accuracy, CPU time and roofline position on the same single core. Three pretrained Arabic BERT encoders are added as an external reference (Section 3.3).
Figure 1.
Study workflow.
3.1. Tasks and Data
Five classification tasks were built from four public datasets (Table 1). L-HSAB [31] contains Levantine political tweets labeled normal, abusive or hate. It has no official split, so a stratified 80/20 split was drawn with scikit-learn’s train_test_split (random_state = 42); three of the 5849 lines in the released file have no label and were dropped, leaving the 5846 tweets described by the authors. Because a single split can favor one model, L-HSAB was also re-split with five further seeds (0–4) for the non-neural models (Section 4.1). ArSarcasm-v2 [19] provides two tasks on the same tweets with an official split: sarcasm detection and dialect identification. Maghrebi tweets (43 training, 2 test) were too few to evaluate and were excluded from the dialect task. ASTD [32] contains Egyptian tweets in four sentiment classes; its official unbalanced split was used. The official validation identifiers were merged into the training set, as in the original release, and the 1999 test identifiers were checked to be disjoint from them and were not used for any decision. AJGT [33] contains 1800 Jordanian tweets labeled positive or negative; it widens the dialect coverage and adds a small-data regime, and it was split like L-HSAB (stratified 80/20, seed 42, plus five re-splits).
Table 1.
Tasks, sources and split sizes.
All texts received the same normalization, a fixed per-text function with no fitted state: URLs and user mentions removed, hashtag symbols removed and underscores replaced by spaces, diacritics and tatweel removed, alef variants unified, alef maqsura mapped to ya and ta marbuta to ha, and characters repeated three or more times reduced to two. Every learned component (vocabularies, TF-IDF statistics, fastText dictionaries, neural vocabularies and class weights) was fitted on the training split only, because information leaking from the test data into fitting or model selection inflates reported accuracy [34]. Neural model selection used a stratified 10% validation split carved from the training data (random_state = 0); the test set was used once per trained model, for the reported scores.
3.2. Models
Twelve configurations from five families were trained from scratch on each task (Table 2; full settings in Appendix B, Table A1). Class-balanced training was used for every learner: class_weight = “balanced” for logistic regression and the SVMs, balanced sample weights for naive Bayes, and inverse-frequency weights in the cross-entropy loss of the neural models. fastText has no class-weight option, so each minority class was randomly oversampled to the size of the majority class before training; an unbalanced fastText run is reported for comparison.
Table 2.
Model configurations (complete settings in Appendix B).
Neural training and tuning. Neural models used a vocabulary of up to 30,000 training-set tokens seen at least twice (index 0 = padding, 1 = unknown), inputs padded or truncated to 64 tokens, Adam with batch size 64, and early stopping on validation macro-F1. A grid of learning rate {10−3, 3·10−3} × classifier dropout {0.25, 0.5} was searched for every architecture and task, with up to 20 epochs and patience 3. The configuration with the best validation macro-F1 was retrained with three seeds (0, 1, 2), and the restored best-validation checkpoint of each seed was evaluated on the test set. To show how much tuning matters, we also report, for seed 0, the checkpoint that a fixed protocol (learning rate 10−3, dropout 0.5, at most 8 epochs, patience 2) would have selected from the same training run. The Transformer used learned position embeddings, two post-norm encoder layers (4 heads, FFN width 256, internal dropout 0.1, ReLU) and masked mean-pooling; the BiLSTM used masked max-pooling over the bidirectional outputs; the CNN used ReLU and max-over-time pooling. Dynamic INT8 quantization (PyTorch quantize_dynamic, x86 engine, per-tensor qint8 weights) converted the nn.Linear and nn.LSTM modules of each trained network. Convolutions and embeddings stay in FP32 under this scheme, and so do the Transformer’s attention input and output projections, which PyTorch does not quantize dynamically; only the feed-forward and output layers become INT8. PyTorch’s fused attention fast path cannot run quantized layers, so it was disabled for Transformer-INT8; the FP32 Transformer is reported with the fast path enabled (the default) and, as a control, disabled (Transformer-noFP).
Subword control. The three neural architectures use word tokens, whereas the most accurate sparse models use character n-grams. To test whether the neural models’ accuracy gap comes from word-level tokenization rather than from the architectures, the CNN was retrained on WordPiece subword tokens with its selected learning rate and dropout and three seeds, using two vocabularies trained on each task’s training text—the per-task WordPiece vocabulary of the encoder cost measurements (Section 3.3; 9 k–65 k entries, so that unseen words are split into subword pieces; CNN-WP), and an 8 k entry vocabulary (3.4 k on AJGT, limited by the minimum frequency of 2) that also splits frequent words (CNN-WP8k). On the test sets, these tokenizations produced on average 1.2–1.5 and 1.4–1.7 times as many tokens as the word tokenizer.
Software: Python 3.13, scikit-learn 1.9.1 [35], PyTorch 2.14.1 [36], fastText 0.9.3 [24] and Hugging Face Transformers 5.20.2 [37].
3.3. Pretrained Arabic Encoders
To place the from-scratch models against what practitioners deploy, three pretrained Arabic BERT encoders of increasing size were added: BERT-mini-Arabic (4 layers, hidden size 256), BERT-medium-Arabic (8 layers, 512) [20], and MARBERT (12 layers, 768; 163 M parameters) [9]. Each was fine-tuned on every task with the same protocol, fixed in advance (maximum length 64, batch 32, AdamW, 3 epochs, 10% linear warm-up, class-balanced cross-entropy, learning rate 5·10−5 for the compact models and 2·10−5 for MARBERT, seeds 0–2) on an NVIDIA T4 GPU. The released checkpoints could not be downloaded to the measurement host, so their CPU cost was not measured directly. It was estimated on the same core and protocol as all other models with architecture-matched proxies: networks with identical architecture (layer count, hidden and FFN width, attention heads, vocabulary size, padded length 64) and random weights, each with a WordPiece tokenizer trained on the task’s training text in place of the checkpoint’s own tokenizer. Throughout the paper, the encoders’ CPU times, energies, cost ratios and marginal energies are these proxy estimates, and accuracies are those of the real fine-tuned checkpoints.
The approximation affects the two parts of the cost differently. The model computation is the same; dense inference executes the same matrix shapes and nonlinearities whatever the weight values, and with inputs padded to 64 tokens the sequence length, and therefore every tensor shape, is identical for any tokenizer. Tokenization differs, but it took only 0–8% of the proxies’ end-to-end time at batch size 1 (end-to-end versus model-only time), so even a released tokenizer twice as slow would change the padded costs by less than 8%. The approximation matters more for unpadded inference (Section 4.7), where cost follows the number of tokens: a tokenizer trained on the task text keeps most task words whole, whereas the released tokenizers were trained on general Arabic text and probably split more of them, so the proxies’ unpadded costs are likely to be underestimates. The cost of the classification head, which differs only in the number of classes, is negligible. CPU fine-tuning cost was measured with the proxies on a subset with fixed-length padding, where cost per example is constant, and scaled to three epochs of the full training set.
3.4. Cost Measurement
All measurements ran on one core of an Intel Xeon processor (KVM guest, Linux 6.18, 7 GB of memory). The guest reports CPU model 207 (5th-generation Xeon Scalable, Emerald Rapids, the successor of Sapphire Rapids with the same core design), AVX-512 with VNNI, a base frequency of 2.1 GHz, a 2 MB L2 cache per core and a 260 MB L3 cache, which matches the 48-core Xeon Platinum 8558 (330 W thermal design power, up to 4.0 GHz turbo [38]); the hypervisor does not expose the exact SKU. Every library was limited to one thread and each process was pinned to a core with taskset. The guest exposes no frequency-scaling or turbo controls, so frequency could not be fixed; instead, the calibration kernels of Section 3.5 were run before and after all cost measurements, and their spread is reported as a stability check. Training jobs ran two at a time, one per core; all inference measurements and calibrations ran strictly one at a time on core 1 with the other core idle. To check the effect of concurrent training, eight training runs (SVM-char, fastText, CNN and Transformer on two tasks) were repeated in isolation: concurrent runs took 4–19% more CPU time (fastText most, the Transformer least), so the training costs reported in Section 4.2 are slight overestimates; no conclusion depends on differences of this size.
Training cost is the CPU time of fitting, including vectorization and, for neural models, all epochs actually run. Inference cost was measured in two ways. End-to-end time runs from raw text to label and includes tokenization or vectorization; it is the quantity a deployment pays and is used for energy. Model-only time starts from precomputed features (sparse matrices or token-id tensors) and is used for the roofline analysis, where it matches the analytical FLOP and byte counts; fastText’s C++ predict call fuses tokenization and inference, so only end-to-end time is available for it. For each batch size b ∈ {1, 8, 32, 128, 512}, a pool of test texts (cycled where the test set is smaller) was classified in batches of b after a warm-up of at least 256 predictions. The pool was 2048 texts for b ≤ 8 and 4096 texts for b ≥ 32, so batch size 512 gives eight batches per pass. Each pass was repeated five times, and we report the mean CPU time per prediction and its coefficient of variation across passes. Seeds 1 and 2 of each neural architecture were additionally timed at b = 1 and b = 128.
Energy. Energy could not be measured directly. The guest operating system lists a RAPL platform-energy event (energy-psys), but it reads zero under the hypervisor, and no CPU hardware performance-counter unit is exposed, so neither RAPL nor perf counters were available; no external meter or second machine was available to the authors. We therefore report CPU time as the primary measured quantity and convert it to a first-order energy estimate with a constant active power per core:
The value of 12 W is an assumption, not a measurement. The processor’s thermal design power divided by its core count is 330 W/48 = 6.9 W per core [38]. That figure is an average over a fully loaded package and includes each core’s share of the uncore (mesh, L3 cache and memory controllers). A single active core runs at a higher frequency and voltage than under an all-core load, up to the 4.0 GHz turbo, so its power is higher than this average; we therefore chose 12 W, about 1.7 times the per-core average. Pcore is intended to cover the active core and a proportional share of uncore power. It excludes the idle power of the guest’s second core and of the other cores in the package, DRAM, and platform power (fans, power supply, storage). Because Pcore is one constant, it scales every energy in the paper by the same factor: with 6.9 W instead of 12 W, all energies would be 42% lower, and no ranking, ratio or significance result would change.
Throughout the paper “energy” and “J per 1000 predictions” denote this estimate, and the cost tables of Section 4 report the measured CPU time per 1000 predictions next to it; any energy in the paper converts back to CPU seconds by dividing by 12 W. Because Equation (1) applies one constant to every model, rankings and ratios under it are rankings and ratios of CPU time; they would coincide with energy rankings only if all workloads drew the same power. That assumption is not guaranteed: compute-bound AVX-512 kernels typically draw more package power than latency-bound scalar code, and DRAM energy is not represented. Section 4.6 therefore tests how far the conclusions survive workload-dependent power under an assumed scenario in which each model family draws an independent power between 8 and 16 W (12 W ± 33%). This range was chosen as a plausible spread around the nominal value, not measured. The section also reports, for every “cheapest model” claim, the power ratio at which the claim would reverse.
3.5. Roofline Profiling
For each model and batch size, the floating-point operations (FLOPs) and the bytes moved per prediction were computed analytically for the model computation only (formulas and assumptions in Appendix A). Bytes include weights read (amortized over the batch), the sparse input matrix for the linear models, embedding rows gathered, and every intermediate activation tensor written and read once; tokenization is excluded because model-only time excludes it. Arithmetic intensity is I = FLOPs/bytes, and achieved throughput is FLOPs per prediction divided by model-only time per prediction (end-to-end time for fastText, which therefore gives a lower bound). The FP32 compute ceiling π was measured as the throughput of a 1024 × 1024 × 1024 FP32 matrix multiplication (torch.mm, one warm-up call followed by ten timed repetitions of ten calls). The INT8 ceiling π8 was measured as the throughput of a dynamically quantized 1024 × 1024 linear layer on a 1024-row input, the same kernel path the INT8 models use. Sustained bandwidth β was measured with a STREAM-style triad a = b + 3c on three 256 MB FP32 arrays (torch.add, 12 bytes per element counted), larger than the 260 MB last-level cache in total traffic. FP32 models are compared with π and INT8 models with π8. The attainable throughput at intensity I is bounded by Equation (2):
A model below the ridge point I* = π/β is memory-bound in the roofline sense. Because hardware counters were unavailable, we do not infer a bound from intensity alone. We additionally decompose each model’s model-only time per call as T(b) = a + c·b. Here, a is the fixed per-call cost that does not grow with the batch (framework dispatch, Python, memory allocation and, for the BiLSTM, the sequential time steps), and c is the per-prediction cost. The fit uses batch sizes 1 and 8, where per-call costs matter most; over the full range per-prediction cost is not linear in b because efficiency rises and then falls again at b = 512. We report a/T(1), the share of batch-1 model time that is fixed per call. For fastText, whose time cannot be split, we instead varied the number of hash buckets from 2·104 to 2·106 (embedding table 30 MB to 822 MB) on the sarcasm task and timed inference at b = 1 and 128 (Section 4.3).
3.6. Accuracy, Statistical Testing and Marginal Energy
Accuracy is macro-F1 on the held-out test set, used rather than accuracy because all tasks except AJGT are imbalanced. Two kinds of uncertainty are reported separately. Test-set sampling uncertainty is a 95% percentile bootstrap interval over 1000 resamples of the test set. Training uncertainty is the standard deviation over seeds (three seeds for neural models and fastText; the sparse models are deterministic given the split) and, for L-HSAB and AJGT, the standard deviation over six stratified splits. Models were compared with paired tests on the same test items: a paired bootstrap of the macro-F1 difference (1000 resamples) and an exact McNemar test on per-item correctness, with Holm correction within each task. Overlap of individual confidence intervals is no longer used as a test.
To relate energy to accuracy, the marginal energy of moving from a cheaper model A to a more accurate model B on the macro-F1 Pareto front is defined in Equation (3), where E is the estimated energy of 1000 predictions and F1 is expressed in points (0–100):
M is computed between consecutive models on each task’s Pareto front, separately at batch sizes 1 and 128. Its 95% interval combines the paired-bootstrap distribution of the F1 gain with the pass-to-pass variability of both energies, and a step is marked as not significant when the paired-bootstrap interval of its F1 gain includes zero.
3.7. Code and Data Availability
All code, per-run predictions and logs, timing records and figure data are publicly available at https://doi.org/10.5281/zenodo.23929107.
4. Results
4.1. Accuracy
Among the models trained on the task data, character n-gram linear SVMs were the most accurate on all five tasks (Table 3; pretrained encoders are compared in Section 4.2). SVM-char was best on hate speech (macro-F1 0.700), ASTD sentiment (0.457) and AJGT sentiment (0.861), and its hashed variant SVM-hash on sarcasm (0.666) and dialect identification (0.407). The two never differed significantly in macro-F1 (paired bootstrap, Holm-adjusted p ≥ 0.29), although McNemar’s test, which compares accuracy rather than macro-F1, separated them on sarcasm and dialect. fastText came close: it was statistically indistinguishable from SVM-char on hate speech (Δ = 0.009, p = 0.87), dialect (0.023, p = 0.08) and AJGT (0.008, p = 1.0), and significantly worse on sarcasm (0.022, p = 0.018) and ASTD (0.036, p = 0.012). With class-balanced oversampling and the training settings of Appendix B, it predicted all four ASTD classes (macro-F1 0.421; 0.437 without oversampling).
Table 3.
Macro-F1 on the test set. Seed-0 run with 95% bootstrap confidence interval (test-set uncertainty); after the semicolon, for models trained with three seeds, mean ± standard deviation over seeds (training uncertainty). The sparse models are deterministic given the split. Bold marks the best model per task.
Every neural model was significantly less accurate than SVM-char on every task (paired bootstrap, Holm-adjusted p ≤ 0.012), by 0.044–0.149 macro-F1 for the FP32 models. McNemar’s test agreed except for the BiLSTM and Transformer on sarcasm (p = 0.61), whose lower macro-F1 comes from a different balance between the two classes rather than from more errors overall. The gap is not an artifact of one initialization or of the hyperparameters. Seed standard deviations were 0.004–0.050, and even the best of the nine neural runs on each task (three architectures × three seeds) trailed the best character SVM by 0.017 on AJGT, 0.041 on sarcasm, 0.044 on ASTD, 0.047 on dialect and 0.064 on hate speech. Tuning learning rate and dropout and allowing up to 20 epochs changed seed-0 test macro-F1 by −0.039 to +0.055 relative to the fixed protocol (Table A2) and never closed the gap; every grid run stopped by patience before the 20-epoch limit (4–18 epochs), so the models had converged on validation macro-F1. Dynamic INT8 quantization changed macro-F1 by at most 0.003.
Because L-HSAB and AJGT have no official split, the non-neural models were also evaluated on five further stratified splits (Table A3). Mean macro-F1 over the six splits was 0.691 ± 0.025 for SVM-char on L-HSAB and 0.862 ± 0.013 on AJGT; a character SVM was best on five of six L-HSAB splits and four of six AJGT splits, and fastText on the others. The ranking in Table 3 is therefore not a property of one split, but the differences among the three best non-neural models are within split-to-split variation on these two small datasets.
The absolute scores are modest, so they were compared with published results using each benchmark’s own metric. On ArSarcasm-v2 sarcasm, SVM-char reached an F1 of 0.517 on the sarcastic class, against 0.6225 for the best system in the WANLP 2021 shared task [19], which used pretrained transformers. On ASTD, published results use the three-class or balanced versions with the F1 averaged over the positive and negative classes (F1-PN), for which MARBERT reports 0.78 [9]; on the harder four-class split used here, SVM-char reached an F1-PN of 0.410. On L-HSAB, the dataset authors reported an accuracy of 88.4% and an F1 of 74.4% for naive Bayes, on a different, unstratified split, with the F1 averaging unspecified and the best of several n-gram settings reported [31]; SVM-char reached 81.5% accuracy and 0.700 macro-F1. Dialect identification on ArSarcasm-v2 is strongly skewed (78% of test tweets are MSA, and only 47 are Levantine), which caps macro-F1; on the five-class dialect labels of the earlier ArSarcasm release, pretrained Arabic encoders reach F1 of 0.44–0.55 [9]. Our from-scratch models therefore sit below pretrained encoders, as expected, and in the range of classical baselines on the same data; Section 4.2 places pretrained encoders on the cost scale.
4.2. Training and Inference Cost (RQ1)
Training cost differed by up to three orders of magnitude between families (Table 4). The sparse linear models trained in 0.4–33 J (estimated), fastText in 9–381 J, and the neural models in 196–3635 J. Relative to SVM-char, the CNN took 30–82 times, the BiLSTM 53–104 times and the Transformer 84–236 times its training CPU time, depending on the task. Product quantization added the largest relative training cost: its quantize-and-retrain step raised fastText’s training cost three- to fifty-fold.
Table 4.
Model size, measured CPU time and estimated energy (Equation (1), J in square brackets), mean over the five tasks with the range over tasks in parentheses. Training cost is the range over tasks (mean of three seeds for neural models and fastText; INT8 models are quantized from the trained FP32 models). Inference costs are end-to-end, with neural inputs padded to 64 tokens (unpadded costs in Section 4.7). Batch-1/batch-512 is the ratio of cost per prediction at the two batch sizes.
At batch size 1, a single request at a time, fastText was the cheapest model on every task (0.34–0.52 J per 1000 predictions); it was 12–19 times cheaper than the cheapest sparse linear model and 9–15 times cheaper than the cheapest neural model on each task. Plotting macro-F1 against this cost (Figure 2) shows that below the pretrained encoders, every task’s Pareto front consists only of fastText and sparse linear models; no from-scratch neural model, quantized or not, lies on any front. The pretrained encoders occupy the expensive, accurate end of the fronts (Section 4.5). Pass-to-pass variation was small (median coefficient of variation 4.6%, 90th percentile 9.1%), and inference cost did not depend on the training seed (median coefficient of variation across seeds 3.8%).
Figure 2.
Macro-F1 versus estimated energy per 1000 predictions at batch size 1 for the five tasks (log scale). Markers show the seed-0 run whose cost was measured; vertical bars show the standard deviation over three seeds. The gray step line is each task’s Pareto front; open markers are compressed variants; hexagons and the star are the pretrained encoders, whose CPU cost is a proxy estimate (Section 3.3).
Batch size changes this ranking (Figure 3; the pattern holds on all tasks, Table 4). The word-level linear models gained most from batching: their cost per prediction fell 27–42-fold between batch sizes 1 and 512, so that at batch 128 LR-word (0.17–0.34 J per 1000) or NB-word, which differ by at most 13%, became the cheapest model on every task, 1.1–1.6 times below fastText. fastText and fastText-Q gained 1.1–1.3-fold from batching (1.8-fold for fastText on the short AJGT texts). The FP32 neural models gained 1.4–3.7-fold, with their cost per prediction lowest at batch 8 (Transformer) or 32–128 (CNN, BiLSTM) and rising again at batch 512 on every task (Section 4.3). The batch-128 fronts are shown in Figure A1 (Appendix C).
Figure 3.
Estimated energy per 1000 predictions versus batch size for all twelve models on the sarcasm task (log–log scale). Dashed lines and open markers are compressed variants.
Pretrained Arabic encoders. Table 5 places three pretrained Arabic BERT encoders on the same scale, with CPU costs estimated by the architecture-matched proxies of Section 3.3. On one core at batch size 1, with inputs padded to 64 tokens, the proxy estimates were 76 J per 1000 predictions for BERT-mini-Arabic, 450 J for BERT-medium-Arabic and 1422 J for MARBERT; this was 9–11, 54–65 and 172–198 times the cost of SVM-char, and 6–7, 39–43 and 119–136 times the cost of the from-scratch Transformer. Fine-tuning for three epochs on the CPU would, by the same proxy estimate, cost 230–390, 1300–2200 and 4200–7500 times the training cost of SVM-char. Parameter counts would be a poor guide to these ratios—72% of BERT-mini’s, 40% of BERT-medium’s and 47% of MARBERT’s parameters are embeddings, which add memory but almost no arithmetic, so cost must be measured rather than scaled from model size. Fine-tuned on a GPU with the protocol of Section 3.3, MARBERT was the most accurate model on every task (Table 5; means over three seeds: 0.798 on hate speech, 0.736 on sarcasm, 0.449 on dialect, 0.585 on ASTD and 0.936 on AJGT). It was significantly more accurate than SVM-char on four tasks (paired bootstrap, Holm-adjusted p < 0.01; seed-0 gains of 7.0–11.9 points) but not on dialect identification (3.4 points, p = 0.11). Its F1 of 0.622 on the sarcastic class of ArSarcasm-v2 matches the best WANLP 2021 system (0.6225 [19]), which indicates that the fine-tuning protocol is sound. The compact encoders were not more accurate than the character SVM: BERT-mini was statistically indistinguishable from SVM-char on four tasks and 8.2 points worse on hate speech, and BERT-medium was indistinguishable on four tasks and 2.2 points better on sarcasm (p = 0.042).
Table 5.
Pretrained Arabic BERT encoders: CPU time and estimated energy (in square brackets) per 1000 predictions on the same core and protocol as Table 4 (mean over tasks; inputs padded to 64 tokens), CPU fine-tuning cost (range over tasks), and test macro-F1 of the real checkpoints after GPU fine-tuning (mean ± standard deviation over three seeds). All CPU costs are proxy estimates from architecture-matched networks with random weights and task-trained tokenizers (Section 3.3), not measurements of the released checkpoints. Embedding parameters in parentheses.
4.3. What Dominates Each Family’s Cost (RQ2)
The calibrated core reached 157.7 GFLOP/s in FP32 matrix multiplication (three calibration runs, 156.3–158.8 GFLOP/s), 376.6 GOP/s for dynamically quantized INT8 matrix multiplication (364–394 GOP/s), and a sustained triad bandwidth of 12.6 GB/s (12.1–12.9 GB/s), placing the FP32 ridge point at 12.5 FLOP/byte. The spread between calibrations before and after all measurements was below 2% for FP32, 7% for bandwidth and 8% for INT8, so frequency was stable enough for the comparisons below. Figure 4 shows the roofline for the sarcasm task using model-only time, and Figure 5 splits end-to-end time into text-to-feature conversion and model computation. Together, they show three cost regimes.
Figure 4.
Roofline of the twelve models on the sarcasm task, using model-only time (end-to-end time for fastText). The solid line is the FP32 roof and the dashed line the measured INT8 roof; arrows run from batch size 1 to batch size 128 and markers show batch 128.
Figure 5.
CPU time per prediction on the sarcasm task, split into text-to-feature conversion (gray) and model computation, at batch sizes 1 and 128. Percentages are the shares spent on text-to-feature conversion. Model computation is colored by model family (blue, sparse linear; yellow, CNN; orange, BiLSTM; pink, Transformer), as in Figure 2 and Figure 3. fastText is omitted because its predict call fuses the two.
Sparse linear models: preprocessing and per-call overhead. Turning text into sparse features took 56–83% of their end-to-end time at batch size 1 and 90–99% at batch 128 across the five tasks (Figure 5). The classifier’s own time at batch size 1 was 0.12–0.32 ms per call, and 97–100% of it was a fixed per-call cost that did not grow with the batch (input validation and dispatch in scikit-learn); its arithmetic, 2·nnz·C′ = 102–103 FLOPs, is negligible. Once batched, the character SVMs’ classifier reached 12–33% of the memory roof at batch 128 (35% at batch 512 on sarcasm), so the weight lookups became bandwidth-limited only after the per-call overhead had been amortized. Batching therefore helps the word-level models so much because it amortizes fixed per-call overhead in both vectorization and classification; character n-gram extraction scales with text length and remains, which is why the character SVMs gained only 5–14-fold from batching.
fastText: per-text latency. fastText’s analytical intensity (0.5 FLOP/byte; 3.8 after quantization) lies far below the ridge point, and its end-to-end throughput was 23–32% of the memory roof at batch 128, and nearly identical at batch 1, because its C++ predict call processes each text separately. The table-size experiment shows that memory traffic is only part of its cost: enlarging the embedding table 27-fold, from 30 MB (inside the 260 MB last-level cache) to 822 MB, raised time per prediction from 28 to 48 µs at batch size 1, a 1.7-fold increase. Most of fastText’s time is therefore a per-text cost of tokenization, n-gram hashing and dependent row lookups, with a cache-miss component on top that grows with the table. This latency-bound behavior explains why batching cannot help it, and why product quantization, which shrinks the table but adds a decoding step per row, made it slower (Section 4.4).
Neural encoders: fixed per-call costs at batch 1, arithmetic when batched. The neural models have analytical intensities above the ridge point even at batch size 1 (21–25 FLOP/byte for the FP32 models), because each weight is applied at all 64 positions, but this does not make them compute-bound in practice. At batch size 1 they reached 20–42% of the FP32 peak. The two-point fit attributes 25–30% of the CNN’s, 50–53% of the Transformer’s and 74–78% of the BiLSTM’s model-only time to costs that do not grow with the batch: operator dispatch, memory allocation and, for the BiLSTM, 64 sequential time steps of small matrix products. Only when batched did arithmetic dominate; at batch 128 the CNN reached 51–54%, the BiLSTM 66–75% and the Transformer 33–45% of peak, which is why their cost per prediction fell 1.4–3.7-fold. At batch 512 throughput fell again (BiLSTM 43–51%, Transformer 25–28% of peak) and cost per prediction rose on every task. Intermediate tensors at that batch size reach 16–34 MB each (for example, the Transformer’s attention scores, 512 × 4 × 64 × 64 values), far larger than the 2 MB per-core L2 cache, so the drop is consistent with activations spilling from cache, although without hardware counters we cannot confirm the mechanism. Inputs averaged only 9–19 tokens, so 70–86% of the 64 padded positions carried no information; Section 4.7 measures how much of this cost unpadded inference and length-bucketed batching recover.
4.4. Compression (RQ3)
None of the three compression techniques reduced cost at batch size 1 (Table 6). Product quantization shrank fastText 15-fold (93.9 to 6.2 MB) for a macro-F1 change of −0.043 to +0.006, but raised its cost per prediction by 35% at batch size 1 and 62% at batch 128, because each of the 150–300 rows read per text must now be decoded from its codebook. Feature hashing did not save memory here, because the pruned character vocabulary was already smaller than the 218-bucket weight matrix, but it cut cost at batch 128 by 7% on average (up to 21%) by replacing vocabulary lookups with hashing, at a macro-F1 change within ±0.006. Dynamic INT8 quantization left macro-F1 unchanged (within ±0.003) and barely reduced model size because the embedding table and, for the Transformer, the attention projections stay in FP32. It raised batch-1 cost by 13% (CNN), 19% (Transformer) and 65% (BiLSTM), because quantizing and dequantizing activations adds fixed work to every call: the fixed share of batch-1 time rose to 63–67% for Transformer-INT8 and 82–87% for BiLSTM-INT8. It saved cost only when batched and only for two architectures: 5% for the CNN and 11% for the Transformer at batch 128 (28% at batch 32), and never for the BiLSTM. Comparing INT8 with an FP32 Transformer that also has the fused attention path disabled gives the same picture (17% more at batch 1, 10% less at batch 128), and the fused path itself changed FP32 Transformer cost by only −2% to +2%.
Table 6.
Effect of compression relative to the uncompressed base model (mean over the five tasks; range over tasks in parentheses; ratios below 1 are savings).
4.5. Marginal Cost of Accuracy (RQ4)
Table 7 lists every step along each task’s Pareto front with its uncertainty. Most steps are not statistically reliable: of 46 steps, 18 have a macro-F1 gain whose paired-bootstrap interval excludes zero, and M is reported only for those. Two price levels appear. Among lightweight models, the reliable steps cost 0.55–3.46 J per 1000 predictions per macro-F1 point at batch size 1 (fastText → SVM-char on sarcasm, LR-word → SVM-char on ASTD). At batch 128 they cost 0.01–0.30 J, because batching makes the sparse models cheap. On hate speech, dialect and AJGT, no step from fastText to a more accurate lightweight model is significant; within the resolution of these test sets, the cheapest model is as accurate as any lightweight one. Steps into the pretrained encoders, priced with their proxy costs and padded inputs, cost one to two orders of magnitude more: 99–269 J per point at batch size 1 and 80–230 J at batch 128, for reliable gains of 2.8–9.2 points. Moving directly from SVM-char to MARBERT costs 121–202 J per point at batch size 1 and 97–169 J at batch 128 on the four tasks where the gain is significant. Without padding, these encoder steps cost about a third less at batch size 1 and half at batch 128 (Section 4.7)—still one to two orders of magnitude above the lightweight steps. No from-scratch neural model is on any front, so M is undefined for them: they cost more for lower macro-F1 than some linear or fastText models.
Table 7.
Marginal energy along each Pareto front (Equation (3)). Gains are in macro-F1 points with 95% paired-bootstrap intervals; M is reported with its 95% interval only when the gain is significant (n.s. otherwise). Energies are CPU-time estimates (Equation (1)); dividing any value by 12 W gives CPU seconds per 1000 predictions, so an M of 12 J per point is 1 CPU second per 1000 predictions per point. Steps into the pretrained encoders use their proxy cost estimates and padded inputs (unpadded fronts in Section 4.7).
4.6. Sensitivity to Workload-Dependent Power
Because Equation (1) converts CPU time with one constant, we tested whether the conclusions survive if model families draw different power. The test uses an assumed scenario, not measured powers: in 2000 random draws per task, each of six families (sparse linear, fastText, CNN, recurrent, attention, pretrained encoders) was assigned an independent power between 8 and 16 W. At batch size 1, every task’s Pareto front was identical to the constant-power front in all 10,000 draws: the cost gaps between families (fastText at least nine times below every other non-fastText model) are far larger than any plausible difference in per-core power. At batch 128 the front was unchanged in 75% of draws; the changes were swaps between LR-word and NB-word, whose costs differ by 1–13%, and occasionally between LR-word and fastText on AJGT, whose costs differ by 12%. No draw placed a from-scratch neural model on a front, and none removed MARBERT from the accurate end of a front. The break-even power ratios make the same point: a neural model would have to draw 9–15 times more power per core than fastText to match its batch-1 cost, while the batch-128 choice between the two word-level linear models is within the precision of a CPU-time estimate. The results therefore separate two kinds of conclusions. Family-level rankings are robust within the scenario: fastText is cheapest for single requests, word-level linear models are cheapest when batched, no from-scratch neural model reaches a front, and the pretrained encoders occupy its expensive, accurate end. Individual rankings between models whose costs differ by less than about 15% are not robust, namely LR-word versus NB-word, and LR-word versus fastText on AJGT, at batch 128. The analysis does not cover DRAM energy, which is not counted at all, nor hardware other than this core, and it does not establish that real power differences between families stay within ±33%.
4.7. Unpadded Inference and Subword Tokens
All costs above use inputs padded to 64 tokens, the same input for every neural model. Real inputs averaged only 9–20 word tokens, however, and a service answering one request at a time has nothing to pad against. We therefore re-timed every neural model and every encoder proxy on core 1 under two further settings. At batch size 1, each text was run at its true length (truncated at 64; the CNN needs at least five positions for its widest filter). At batch size 128, a length-bucketed service was simulated: the pool was sorted by length and each batch was padded only to its longest text, with sorting included in the timed end-to-end cost. Padded and true-length batch-1 timings were interleaved in the same process, and the ratios in Table 8 compare these same-run measurements. Accuracy was re-evaluated at true length for all three seeds.
Table 8.
Neural models and pretrained-encoder proxies at padded and true input length: end-to-end CPU time per 1000 predictions (mean over the five tasks) and ratio of unpadded to padded cost (mean, with range over tasks). Padded costs are those of Table 4 and Table 5. Batch-1 ratios compare padded and true-length timings interleaved in the same run; batch-128 ratios compare length-bucketed timings with the padded costs of Table 4 and Table 5, measured in separate runs on the same core. Macro-F1 change is the true-length minus the padded macro-F1, mean over three seeds and tasks. Encoder costs are proxy estimates (Section 3.3).
Removing padding lowered every neural model’s cost, but by less than the share of padded positions (Table 8). At batch size 1, CPU time fell to 0.55–0.57 of its padded value for the FP32 CNN, BiLSTM and Transformer (0.32–0.77 for the INT8 variants), not to the 0.14–0.31 that the share of real tokens would suggest. The fixed per-call costs identified in Section 4.3 do not shrink with the input. Length-bucketed batching helped more: at batch 128 it cut cost to 0.29–0.40 of the padded value, because batched cost is dominated by arithmetic, which scales with length. The encoder proxies fell to 0.59–0.64 of their padded cost at batch size 1 and to 0.50–0.57 at batch 128. Accuracy did not depend on padding for the CNN (−0.002 macro-F1 on average) or the Transformer (no change), whose pooling masks padded positions. The BiLSTM, trained on padded inputs, lost 0.022 on average (up to 0.053 on ASTD) at true length, because its backward direction no longer starts from padding.
The cost ratios shrink accordingly, but the conclusions do not change. At batch size 1, fastText was 6.0–9.1 times cheaper than the cheapest unpadded neural model on each task (9–15 times with padding). The MARBERT proxy cost 121–133 times as much as SVM-char per single prediction (172–198 times padded), and 413–678 times once both were batched with length bucketing (740–1680 times padded). BERT-mini and BERT-medium cost about 6 and 38–43 times as much as SVM-char at batch size 1. Recomputing the Pareto fronts with unpadded costs and true-length accuracy left every front at batch sizes 1 and 128 identical to its padded counterpart: no from-scratch neural model joined a front, and MARBERT stayed at its accurate end. The marginal cost of the encoders fell by about a third at batch size 1 and by about half at batch 128. Moving from SVM-char to MARBERT cost 80–137 J per 1000 predictions per macro-F1 point at batch size 1 (121–202 J padded) and 47–94 J at batch 128 (97–169 J padded) on the four tasks with a significant gain. The reliable steps into the encoders cost 73–181 J per point at batch size 1 and 42–89 J at batch 128, still one to two orders of magnitude above the reliable steps among lightweight models. Under the assumed 8–16 W scenario of Section 4.6 with unpadded costs, the batch-1 fronts were again unchanged in every draw, the batch-128 fronts in 75%, and no draw placed a neural model on a front or removed MARBERT from one. Because the encoder proxies use task-trained tokenizers, which produced 15–27 tokens per text, and the released tokenizers probably split the text more finely, the unpadded encoder costs are probably underestimates.
Subword tokens. Table 9 tests whether the from-scratch models’ accuracy gap is caused by their word-level tokenization. Neither WordPiece vocabulary closed the gap. CNN-WP and CNN-WP8k were within one seed standard deviation of the word-level CNN on most tasks, 0.015–0.018 better on hate speech and dialect and 0.010–0.024 worse on AJGT. The better subword CNN on each task remained significantly below SVM-char, by 0.046–0.105 macro-F1, with paired-bootstrap intervals that exclude zero on every task. Subword segmentation therefore does not explain the gap for this architecture. A character-level CNN, or a model that combines character n-grams with neural layers, was not tested, so the conclusion is limited to neural encoders over word and WordPiece tokens trained from scratch on these data sizes.
Table 9.
Macro-F1 of the CNN with word and WordPiece tokens (mean ± standard deviation over three seeds) against SVM-char (seed 0). The last column compares the subword CNN with the higher mean against SVM-char on the same test items (seed 0, paired bootstrap).
5. Discussion
5.1. Lightweight Models Dominate Among Models Trained on the Task Data
On all five Arabic tasks, the efficient choices were lightweight: fastText when requests arrive one at a time, a word-level linear model when they can be batched, and a character n-gram SVM when the last few macro-F1 points matter. Compact neural encoders trained from scratch were never on a Pareto front: they were significantly less accurate than the character SVM on every task, cost 9–15 times more than fastText per single request with padded inputs and 6–9 times more at true length, and took 30–236 times the SVM’s training CPU time. Tuning, longer training, three seeds and WordPiece subword tokens did not change this. The result agrees with the finding of Zschache and Hartwig [7] that linear models offer the best accuracy per unit of energy in text classification, and extends it to Arabic dialects, where character n-grams capture spelling variation and morphology. That subword tokens did not help the CNN suggests that the advantage lies in the character n-gram representation with a linear classifier, rather than in avoiding word-level tokenization alone, for training sets of a few thousand tweets [17]. Character-level neural models were not tested, so this conclusion covers neural encoders over word and WordPiece tokens.
Pretrained encoders change the accuracy side of this comparison but not the cost side. By the proxy estimates of Section 3.3, their CPU cost per prediction was 9–198 times that of the character SVM on the same core with padded inputs (6–133 times at true length), and fine-tuning them on a CPU would cost two to four orders of magnitude more than training the SVM. MARBERT was 7–12 macro-F1 points more accurate than the character SVM on four of five tasks (mean macro-F1 over seeds and tasks 0.701 against 0.617). Its proxy cost was 172–198 times the SVM’s CPU time per single prediction with padded inputs and 121–133 times at true length, and 740–1680 (padded) or 413–678 times (length-bucketed) once both are batched. Each additional point cost 97–202 J per 1000 predictions with padded inputs and 47–137 J without, one to two orders of magnitude more than a point among lightweight models. The compact pretrained encoders did not buy accuracy: BERT-mini (mean 0.602) and BERT-medium (0.639) matched the SVM on four of five tasks at 9–65 times its cost. Whether that price is worth paying depends on the application: for moderation decisions with legal or safety consequences, a few macro-F1 points may justify a pretrained encoder, while for high-volume monitoring the lightweight models deliver most of the accuracy at a small fraction of the cost.
The absolute amounts are small on one core. Classifying one million posts a day one at a time costs about 0.12 Wh with fastText, 2.1 Wh with SVM-char, 3.1 Wh with the from-scratch Transformer (1.9 Wh at true length), 21 Wh with BERT-mini-Arabic and 395 Wh with MARBERT (about 270 Wh at true length) on this core, under the estimate of Equation (1) and the encoders’ proxy costs. The relative differences matter because they multiply with volume and with the number of services deployed, and because CPU time is also latency and hardware cost.
5.2. What Dominates the Cost of Each Family
The principle that an efficient system should minimize its dominant cost applies here, but the dominant cost differs by family, and for two of the three families it is neither arithmetic nor memory traffic:
- Sparse linear models are preprocessing- and overhead-bound. Their arithmetic is negligible; 56–99% of their time goes into turning text into features, and almost all of the classifier’s batch-1 time is fixed per-call overhead. The effective optimizations are compiled tokenizers, feature caching and batching, not model compression.
- fastText is latency-bound. Its cost is a per-text chain of tokenization, hashing and dependent row lookups; a 27-fold larger table raised it only 1.7-fold. Batching does not help, and product quantization, which shrinks memory but adds decoding work per row, made it slower.
- Neural encoders are bound by fixed per-call costs at batch size 1 and by arithmetic only when batched. Their analytical intensity is above the ridge point at every batch size, yet at batch size 1 a quarter (CNN) to three-quarters (BiLSTM) of their time does not scale with the batch. Batching to 8–128 recovers most of the arithmetic efficiency; beyond that, activations outgrow the cache. Running at the true input length cut their batch-1 cost only to about 0.55–0.6 of the padded value, because the fixed per-call costs remain, whereas length bucketing at batch 128 cut it to 0.29–0.40 (Section 4.7).
Dynamic INT8 quantization illustrates why the dominant cost matters. At batch size 1 the neural models’ time is dominated by fixed per-call costs, to which dynamic quantization adds activation quantization, so it made every model slower. When batched, arithmetic dominates and the faster INT8 matrix kernels (a measured ceiling 2.4 times the FP32 one) pay off for the CNN and Transformer, but not for the BiLSTM, whose sequential steps keep it overhead-bound. The saving is therefore a compute saving at large batch sizes, not a memory-traffic saving: at batch 128 the weights are read once for 128 predictions, so the bytes INT8 saves are already negligible.
5.3. Deployment Guidance
Table 10 turns these results into recommendations for CPU deployment of Arabic content classifiers. They are measured on one server core and should be read as relative guidance; Section 5.4 explains what may change on other hardware.
Table 10.
Recommended models by deployment setting, with mean estimated energy and mean macro-F1 over the five tasks.
Two cautions apply. First, a cheap model is only cheap if it is usable. fastText needs class balancing on imbalanced tasks, and the recommendations rest on macro-F1, which hides weak minority classes (Table A4). The recommended models agree in which classes are hard, and across all twelve configurations and seeds, no model exceeded an F1 of 0.50 on the hate class of L-HSAB, 0.31 on Gulf and 0.17 on Levantine dialect, or 0.27 on neutral ASTD tweets. For applications that act on those classes, none of these models is adequate as a stand-alone classifier, and the cost comparison should be repeated against the accuracy that application requires. Second, compression should be chosen for the resource that is actually scarce. Product quantization is a memory technique that costs CPU time; feature hashing and INT8 quantization saved CPU time only in batched inference, and INT8 only for the CNN and Transformer.
5.4. Limitations
Seven limitations bound these findings:
- Estimated energy. Energy was estimated from single-core CPU time with an assumed 12 W per core (Equation (1)) because the host exposes no working energy counters. The value is not measured; it sits above the processor’s thermal-design-power share of 6.9 W per core to allow for single-core turbo operation, and it scales every energy by the same factor. Rankings under the estimate are rankings of CPU time. Under the assumed scenario of Section 4.6, family-level rankings were unchanged, but rankings between individual models of similar cost at batch 128 were not. DRAM, idle-core and platform power are not represented, and absolute joules should be confirmed with RAPL or an external meter.
- One server core, no dedicated low-power hardware. All measurements used one core of an AVX-512 server processor with a 2 MB L2 cache and a large shared L3 cache. An ARM Cortex-A core or a Raspberry Pi-class board has narrower vector units, no VNNI, smaller caches and lower memory bandwidth. The neural models’ arithmetic-bound regime and the INT8 results would likely shift there, and fastText’s 94 MB table would exceed the cache, making fastText-Q more attractive. The preprocessing- and overhead-dominated costs of the lightweight models are implementation properties that should persist, but this must be measured. We therefore make no claims about specific edge devices.
- Pretrained encoders. Their CPU costs are proxy estimates from architecture-matched networks with random weights and a WordPiece tokenizer trained on each task’s data, because the released checkpoints could not be loaded on the measurement host. With inputs padded to 64 tokens, the proxies execute exactly the same model computation, and tokenization is 0–8% of their time. Their unpadded costs (Section 4.7), however, depend on how finely the released tokenizers segment the text and are probably underestimates. Their accuracy comes from GPU fine-tuning of the real checkpoints with a fixed, untuned protocol. Distilled or quantized pretrained models were not evaluated.
- Limited tuning. The neural grid had four configurations per architecture and task, and the sparse and fastText models used fixed settings; broader searches would raise every model’s accuracy and the neural models’ training cost.
- Analytical FLOP and byte counts. Arithmetic intensity was computed from formulas (Appendix A), not hardware counters, and the attribution of fixed per-call cost rests on a two-point fit; the cache explanation for the batch-512 slowdown is consistent with the data but not confirmed.
- Implementation effects. The sparse models’ costs are dominated by Python-level preprocessing in scikit-learn, and the neural models run in eager PyTorch; compiled tokenizers, ONNX or graph-compiled runtimes would lower fixed per-call costs for both, which could narrow the gap between fastText and the other families at batch size 1.
- Data. Five tasks from four Twitter datasets with 1440–12,548 training texts cover Levantine, Egyptian, Gulf and Jordanian dialects and MSA, but not Maghrebi Arabic or other domains such as news comments or product reviews.
6. Conclusions
Across five public Arabic dialectal classification tasks, lightweight models were the most accurate and the cheapest of the models trained on the task data. Among these models, a character n-gram SVM gave the best macro-F1 on every task. fastText gave the lowest cost for single requests (0.34–0.52 J per 1000 predictions under a CPU-time estimate) and was statistically as accurate as the SVM on three tasks. Word-level linear models became the cheapest on every task once requests were batched. Compact neural encoders trained from scratch on word or WordPiece tokens were significantly less accurate than the character SVM on every task, took 30–236 times its training CPU time, and were never on an accuracy–cost Pareto front, whether their inputs were padded to 64 tokens or run at true length. The pretrained encoder MARBERT was the most accurate model, 7–12 points above the SVM on four tasks. By architecture-matched proxy estimates, it cost 172–198 times the SVM’s CPU time per single prediction with padded inputs and 121–133 times at true length, and each additional macro-F1 point cost about 50–200 J per 1000 predictions. Compact pretrained encoders were no more accurate than the SVM on most tasks.
Profiling shows why no single optimization fits all models. Sparse linear models were bound by text preprocessing and fixed per-call overhead, fastText by per-text latency, and neural encoders by fixed per-call costs at batch size 1 and by arithmetic only when batched. Compression helped only when it targeted the dominant cost: product quantization cut fastText’s memory 15-fold but raised its CPU time, and dynamic INT8 quantization saved 5–11% only in batched inference. Two kinds of ranking should be distinguished. Under an assumed scenario of 8–16 W per model family, the family-level rankings (fastText for single requests, word-level linear models when batched, no from-scratch neural model on any front, pretrained encoders at the accurate, expensive end) held in every draw, with and without padding. Rankings between individual models of similar cost, namely LR-word versus NB-word and LR-word versus fastText on AJGT at batch 128, did not, and should be treated as ties within the precision of a CPU-time estimate.
Future work should measure energy directly with RAPL or an external meter, time the released encoder checkpoints with their own tokenizers, repeat the protocol on ARM and Raspberry Pi-class hardware and on dedicated accelerators, add distilled and quantized pretrained Arabic encoders and character-level neural models, and test compiled preprocessing, which the results identify as the main remaining cost of the most efficient Arabic classifiers.
Author Contributions
Conceptualization, A.A.; methodology, A.A.; software, A.A.; validation, N.A.A.; formal analysis, A.A.; investigation, N.A.A.; data curation, N.A.A.; writing—original draft preparation, A.A.; writing—review and editing, N.A.A.; visualization, A.A. All authors have read and agreed to the published version of the manuscript.
Funding
The authors extend their appreciation to the Deanship of Graduate Studies and Scientific Research at Jazan University for funding this research work through the Project number “JU-RSP2026”.
Institutional Review Board Statement
Not applicable. The study involved no recruitment of, interaction with or intervention on human participants and collected no new data. It analyzed only four previously published, publicly released research datasets of social-media posts (L-HSAB [31], ArSarcasm-v2 [19], ASTD [32] and AJGT [33]), used under their published terms (ArSarcasm-v2: MIT license; ASTD: GNU GPL v2; AJGT: Academic Free License 3.0; L-HSAB: released by its authors for research use with citation). User mentions and URLs were removed during normalization, no attempt was made to identify or contact any author of a post, and no tweet text is redistributed: the released materials contain code, label indices, timing records and aggregate results only, and the datasets must be obtained from their original sources.
Informed Consent Statement
Not applicable.
Data Availability Statement
The datasets analyzed in this study are publicly available: L-HSAB [31] (https://github.com/Hala-Mulki/L-HSAB-First-Arabic-Levantine-HateSpeech-Dataset, accessed on 3 November 2026), ArSarcasm-v2 [19] (https://github.com/iabufarha/ArSarcasm-v2, accessed on 3 November 2026), ASTD [32] (https://github.com/mahmoudnabil/ASTD, accessed on 3 November 2026) and AJGT [33] (https://github.com/komari6/Arabic-twitter-corpus-AJGT, accessed on 3 November 2026). The code, exact data splits (as row indices), per-run predictions, tuning logs, timing records, calibration results and figure data are available at https://doi.org/10.5281/zenodo.23929107.
Acknowledgments
The authors extend their appreciation to the Deanship of Graduate Studies and Scientific Research at Jazan University for funding this research work through the Project number “JU-RSP2026”. Claude Opus 5.5 (Anthropic), a large language model, was used to assist with drafting and editing the manuscript, developing and executing experimental code, and preparing tables and figures. All study design decisions, code, analyzes, results, and manuscript content were independently reviewed and verified by the authors, who take full responsibility for the final content.
Conflicts of Interest
The authors declare no conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| BERT | Bidirectional encoder representations from transformers |
| BiLSTM | Bidirectional long short-term memory |
| CI | Confidence interval |
| CNN | Convolutional neural network |
| CPU | Central processing unit |
| FFN | Feed-forward network |
| FLOP | Floating-point operation |
| INT8 | 8-bit integer |
| LR | Logistic regression |
| MSA | Modern Standard Arabic |
| NB | Naive Bayes |
| NLP | Natural language processing |
| PQ | Product quantization |
| RAPL | Running Average Power Limit |
| SVM | Support vector machine |
| TF-IDF | Term frequency–inverse document frequency |
Appendix A. FLOP and Byte Counts
All counts are per prediction for the model computation only, from precomputed features to label (tokenization and vectorization excluded, matching model-only timing). Inputs are padded or truncated to L = 64 positions and all positions are computed, because the implementations do not skip padding; E = 128 is the embedding width, C the number of classes, b the batch size and w the bytes per weight (4 for FP32, 1 for INT8). One multiply–add counts as two FLOPs. Bytes count (i) weights read, divided by b because one read serves the whole batch; (ii) inputs read; and (iii) every intermediate activation tensor written once and read once, in FP32. Caching effects are not modeled, so byte counts are compulsory-traffic estimates: an upper bound on DRAM traffic for tensors that do not fit in cache and a lower bound on total memory-hierarchy traffic.
- Sparse linear. With nnz the measured mean number of non-zero features per test text and C′ the number of weight vectors (C′ = 1 for binary SVM and logistic regression, C′ = C otherwise): FLOPs = 2·nnz·C′. Bytes = nnz·(8C′ + 12) + 8C′: for each non-zero, C′ float64 weights plus the CSR value (8 bytes) and column index (4 bytes), plus the output scores. The weight matrix is not amortized over the batch because each non-zero selects different weight rows.
- fastText. With r the measured mean number of embedding rows per text (in-vocabulary words, their character 2–5-g buckets, word-bigram buckets and the end-of-sentence token) and d = 100: FLOPs = 2rd + 2dC. Bytes = r·d·4 + 4dC for fastText and r·d/2 + 4dC for fastText-Q, whose product quantizer stores one byte per two-dimensional sub-vector (dsub = 2). fastText predicts each text separately, so nothing is amortized over the batch.
- CNN. FLOPs = Σ_k 2(L − k + 1)·k·E·128 + 2·384·C for k ∈ {3, 4, 5}. Weight bytes = 4·Σ_k k·E·128 + w·384·C (convolutions stay FP32 under dynamic quantization). Activation bytes = 2·4LE (gathered embeddings and their transposed copy) + 4·Σ_k (L − k + 1)·128 (convolution outputs).
- BiLSTM. With H = 128: FLOPs = 2·L·2·4H(E + H) + 4HC. Weight bytes = w·(2·4H(E + H) + 2HC). Activation bytes = 4LE (embeddings) + 2·4L·2H (outputs, written and read by pooling) + 4L·2·4H (gate pre-activations).
- Transformer. With F = 256 and two layers: FLOPs = 2·[2L(4E2 + 2EF) + 4L2E] + 2EC, i.e., the Q, K, V and output projections, the two feed-forward layers, and the attention score and value products. Weight bytes = 2·(4·4E2 + w·2EF) + w·EC: the attention projections stay FP32 and only the feed-forward and output layers are INT8 under dynamic quantization. Activation bytes = 2·4LE (token and position embeddings) + 2·4L(3E + E + E + F + E) (projections, attention output, residual, feed-forward) + 2·4·4L2 (attention scores for four heads, written and read).
INT8 counts integer multiply–adds as operations and compares them with the measured INT8 ceiling π8; dynamic quantization also quantizes each activation tensor on the fly, which adds a pass over each quantized activation tensor that is included in neither count.
Appendix B. Complete Model and Training Settings
Table A1.
Settings for every model (Python 3.13, scikit-learn 1.9.1, fastText 0.9.3, PyTorch 2.14.1).
Appendix C. Additional Results
Table A2.
Hyperparameter selection for the neural models (seed 0). The validation split is part of the training data; test scores are shown only to quantify the effect of tuning and were not used for selection.
Table A3.
Macro-F1 of the non-neural models over six stratified splits of the datasets without an official split (seed 42 of Table 3 and seeds 0–4), mean ± standard deviation.
Table A4.
Per-class F1 of the recommended models (seed 0; test-set support in parentheses).
Figure A1.
Macro-F1 versus estimated energy per 1000 predictions at batch size 128 (otherwise as Figure 2).
References
- Strubell, E.; Ganesh, A.; McCallum, A. Energy and policy considerations for deep learning in NLP. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics; Association for Computational Linguistics: Stroudsburg, PA, USA, 2019; pp. 3645–3650. [Google Scholar] [CrossRef] [Scilit]
- Schwartz, R.; Dodge, J.; Smith, N.A.; Etzioni, O. Green AI. Commun. ACM 2020, 63, 54–63. [Google Scholar] [CrossRef] [Scilit]
- Luccioni, A.S.; Jernite, Y.; Strubell, E. Power hungry processing: Watts driving the cost of AI deployment? In Proceedings of the 2024 ACM Conference on Fairness, Accountability, and Transparency (FAccT ’24); ACM: New York, NY, USA, 2024; pp. 85–99. [Google Scholar]
- Desislavov, R.; Martínez-Plumed, F.; Hernández-Orallo, J. Trends in AI inference energy consumption: Beyond the performance-vs-parameter laws of deep learning. Sustain. Comput. Inform. Syst. 2023, 38, 100857. [Google Scholar] [CrossRef] [Scilit]
- Treviso, M.; Lee, J.-U.; Ji, T.; van Aken, B.; Cao, Q.; Ciosici, M.R.; Hassid, M.; Heafield, K.; Hooker, S.; Raffel, C.; et al. Efficient methods for natural language processing: A survey. Trans. Assoc. Comput. Linguist. 2023, 11, 826–860. [Google Scholar] [CrossRef] [Scilit]
- Lakim, I.; Almazrouei, E.; Abualhaol, I.; Debbah, M.; Launay, J. A holistic assessment of the carbon footprint of Noor, a very large Arabic language model. In Proceedings of BigScience Episode #5—Workshop on Challenges & Perspectives in Creating Large Language Models; Association for Computational Linguistics: Stroudsburg, PA, USA, 2022; pp. 84–94. [Google Scholar]
- Zschache, J.; Hartwig, T. Comparing energy consumption and accuracy in text classification inference. Sci. Rep. 2026, 16, 12717. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Antoun, W.; Baly, F.; Hajj, H. AraBERT: Transformer-based model for Arabic language understanding. In Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools (OSACT); European Language Resources Association: Paris, France, 2020; pp. 9–15. [Google Scholar]
- Abdul-Mageed, M.; Elmadany, A.; Nagoudi, E.M.B. ARBERT & MARBERT: Deep bidirectional transformers for Arabic. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (ACL-IJCNLP); Association for Computational Linguistics: Stroudsburg, PA, USA, 2021; pp. 7088–7105. [Google Scholar]
- Inoue, G.; Alhafni, B.; Baimukan, N.; Bouamor, H.; Habash, N. The interplay of variant, size, and task type in Arabic pre-trained language models. In Proceedings of the 6th Arabic Natural Language Processing Workshop (WANLP); Association for Computational Linguistics: Stroudsburg, PA, USA, 2021; pp. 92–104. [Google Scholar]
- Horowitz, M. Computing’s energy problem (and what we can do about it). In Proceedings of the IEEE International Solid-State Circuits Conference (ISSCC); IEEE: Piscataway, NJ, USA, 2014; pp. 10–14. [Google Scholar]
- Williams, S.; Waterman, A.; Patterson, D. Roofline: An insightful visual performance model for multicore architectures. Commun. ACM 2009, 52, 65–76. [Google Scholar] [CrossRef] [Scilit]
- Pope, R.; Douglas, S.; Chowdhery, A.; Devlin, J.; Bradbury, J.; Heek, J.; Xiao, K.; Agrawal, S.; Dean, J. Efficiently scaling transformer inference. Proc. Mach. Learn. Syst. 2023, 5, 606–624. [Google Scholar]
- Henderson, P.; Hu, J.; Romoff, J.; Brunskill, E.; Jurafsky, D.; Pineau, J. Towards the systematic reporting of the energy and carbon footprints of machine learning. J. Mach. Learn. Res. 2020, 21, 1–43. [Google Scholar]
- Patterson, D.; Gonzalez, J.; Le, Q.; Liang, C.; Munguia, L.-M.; Rothchild, D.; So, D.; Texier, M.; Dean, J. Carbon emissions and large neural network training. arXiv 2021, arXiv:2104.10350. [Google Scholar]
- Bannour, N.; Ghannay, S.; Névéol, A.; Ligozat, A.-L. Evaluating the carbon footprint of NLP methods: A survey and analysis of existing tools. In Proceedings of the 2nd Workshop on Simple and Efficient Natural Language Processing (SustaiNLP); Association for Computational Linguistics: Stroudsburg, PA, USA, 2021; pp. 11–21. [Google Scholar]
- Salameh, M.; Bouamor, H.; Habash, N. Fine-grained Arabic dialect identification. In Proceedings of the 27th International Conference on Computational Linguistics (COLING); Association for Computational Linguistics: Stroudsburg, PA, USA, 2018; pp. 1332–1344. [Google Scholar]
- Mubarak, H.; Darwish, K.; Magdy, W.; Elsayed, T.; Al-Khalifa, H. Overview of OSACT4 Arabic offensive language detection shared task. In Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools (OSACT); European Language Resources Association: Paris, France, 2020; pp. 48–52. [Google Scholar]
- Abu Farha, I.; Zaghouani, W.; Magdy, W. Overview of the WANLP 2021 shared task on sarcasm and sentiment detection in Arabic. In Proceedings of the 6th Arabic Natural Language Processing Workshop (WANLP); Association for Computational Linguistics: Stroudsburg, PA, USA, 2021; pp. 296–305. [Google Scholar]
- Safaya, A.; Abdullatif, M.; Yuret, D. KUISAIL at SemEval-2020 Task 12: BERT-CNN for offensive speech identification in social media. In Proceedings of the Fourteenth Workshop on Semantic Evaluation; International Committee for Computational Linguistics: Barcelona, Spain, 2020; pp. 2054–2059. [Google Scholar] [CrossRef] [Scilit]
- Alhazmi, A.; Mahmud, R.; Idris, N.; Mohamed Abo, M.E.; Eke, C.I. Code-mixing unveiled: Enhancing the hate speech detection in Arabic dialect tweets using machine learning models. PLoS ONE 2024, 19, e0305657. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Alhazmi, A. Twitter Hate Speech Dataset for the Saudi Dialect, Version 4, Mendeley Data 2024; Elsevier: Amsterdam, The Netherlands, 2024. [Google Scholar] [CrossRef]
- Alhazmi, A.; Mahmud, R.; Idris, N.; Abo, M.E.M.; Eke, C. A systematic literature review of hate speech identification on Arabic Twitter data: Research challenges and future directions. PeerJ Comput. Sci. 2024, 10, e1966. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Joulin, A.; Grave, E.; Bojanowski, P.; Mikolov, T. Bag of tricks for efficient text classification. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics (EACL); Association for Computational Linguistics: Stroudsburg, PA, USA, 2017; pp. 427–431. [Google Scholar]
- Joulin, A.; Grave, E.; Bojanowski, P.; Douze, M.; Jégou, H.; Mikolov, T. FastText.zip: Compressing text classification models. arXiv 2016, arXiv:1612.03651. [Google Scholar]
- Jacob, B.; Kligys, S.; Chen, B.; Zhu, M.; Tang, M.; Howard, A.; Adam, H.; Kalenichenko, D. Quantization and training of neural networks for efficient integer-arithmetic-only inference. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR); IEEE: Piscataway, NJ, USA, 2018; pp. 2704–2713. [Google Scholar]
- Kim, Y. Convolutional neural networks for sentence classification. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP); Association for Computational Linguistics: Stroudsburg, PA, USA, 2014; pp. 1746–1751. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. In Advances in Neural Information Processing Systems 30 (NeurIPS 2017); Curran Associates: Red Hook, NY, USA, 2017; pp. 5998–6008. [Google Scholar]
- Alhazmi, A. SleepStageNet: A lightweight and explainable deep learning architecture for multi-channel sleep staging. Brain Sci. 2026, 16, 860. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Mulki, H.; Haddad, H.; Bechikh Ali, C.; Alshabani, H. L-HSAB: A Levantine Twitter dataset for hate speech and abusive language. In Proceedings of the 3rd Workshop on Abusive Language Online (ALW3); Association for Computational Linguistics: Stroudsburg, PA, USA, 2019; pp. 111–118. [Google Scholar]
- Nabil, M.; Aly, M.; Atiya, A. ASTD: Arabic sentiment tweets dataset. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing (EMNLP); Association for Computational Linguistics: Stroudsburg, PA, USA, 2015; pp. 2515–2519. [Google Scholar]
- Alomari, K.M.; ElSherif, H.M.; Shaalan, K. Arabic tweets sentimental analysis using machine learning. In Advances in Artificial Intelligence: From Theory to Practice (IEA/AIE 2017); Springer: Cham, Switzerland, 2017; pp. 602–610. [Google Scholar] [CrossRef] [Scilit]
- Alhazmi, A. Leakage-controlled classification of dataset-derived ordinal p53-signature size categories in fallopian-tube immunohistochemistry. Diagnostics 2026, 16, 2869. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
- Paszke, A.; Gross, S.; Massa, F.; Lerer, A.; Bradbury, J.; Chanan, G.; Killeen, T.; Lin, Z.; Gimelshein, N.; Antiga, L.; et al. PyTorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems 32 (NeurIPS 2019); Curran Associates: Red Hook, NY, USA, 2019; pp. 8024–8035. [Google Scholar]
- Wolf, T.; Debut, L.; Sanh, V.; Chaumond, J.; Delangue, C.; Moi, A.; Cistac, P.; Rault, T.; Louf, R.; Funtowicz, M.; et al. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations; Association for Computational Linguistics: Stroudsburg, PA, USA, 2020; pp. 38–45. [Google Scholar] [CrossRef] [Scilit]
- Intel Corporation. Intel® Xeon® Platinum 8558 Processor (260M Cache, 2.10 GHz): Specifications. Available online: https://www.intel.com/content/www/us/en/products/sku/237255/intel-xeon-platinum-8558-processor-260m-cache-2-10-ghz/specifications.html (accessed on 3 November 2026).
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.





