Best Text Classification Models for Spam Detection in 2026: fasttext-language-identification

Rankings Last updated  14 min read By Q4KM

Quick Answer

fasttext-language-identification (facebook) is the top pick as of September 2026 because it has the newest listed Hugging Face publication date; the position reflects recency, not demonstrated spam-detection accuracy [1][3][5][6][8][10][12][14]. In order, the ranking is fasttext-language-identification (facebook), roberta-base-go_emotions (SamLowe), roberta-hate-speech-dynabench-r4-target (facebook), twitter-roberta-base-sentiment-latest (cardiffnlp), finbert (ProsusAI), distilbert-base-uncased-finetuned-sst-2-english (distilbert), deberta-xlarge-mnli (microsoft), and deberta-large-mnli (microsoft) [1][3].

Key Takeaways

How do these local text classifiers compare on specifications and benchmarks?

Model Org Params Quant/VRAM Released (date) License Key benchmark (date)
facebook/fasttext-language-identification facebook — — 2023-03-06 [1] CC-BY-NC-4.0 [1] no public benchmark yet
SamLowe/roberta-base-go_emotions SamLowe 125M [14] F32 weights: 0.5 GB [14]; VRAM: not published 2022-09-15 [14] MIT [14] no public benchmark yet
facebook/roberta-hate-speech-dynabench-r4-target facebook 125M [6] F32 weights: 0.5 GB [6]; VRAM: not published 2022-06-10 [6] — no public benchmark yet
cardiffnlp/twitter-roberta-base-sentiment-latest cardiffnlp — — 2022-03-15 [12] CC-BY-4.0 [12] no public benchmark yet
ProsusAI/finbert ProsusAI — — 2022-03-02 [8] — no public benchmark yet
distilbert/distilbert-base-uncased-finetuned-sst-2-english distilbert 67M [10] F32 weights: 0.3 GB [10]; VRAM: not published 2022-03-02 [10] Apache-2.0 [10] no public benchmark yet
microsoft/deberta-xlarge-mnli microsoft — — 2022-03-02 [3] MIT [3] no public benchmark yet
microsoft/deberta-large-mnli microsoft — — 2022-03-02 [5] MIT [5] no public benchmark yet

Which local text classification models should you evaluate for spam detection?

1. fasttext-language-identification

fasttext-language-identification by facebook ranks first under the ordering rule: newest release first, then downloads; its Hugging Face publication date is March 6, 2023.[1] The candidate list falls outside the requested release window, so the newest available entries are included.[1][14] With no public benchmark yet for this comparison, the position does not establish superior spam-detection accuracy.

Use the model to identify message language before passing text to a separate spam classifier. The model carries a CC BY-NC 4.0 license, making its noncommercial restriction a caveat for deployment.[1] Its accompanying paper is “Enriching Word Vectors with Subword Information.”[2]

Local hardware sizing remains an open question: no parameter count, weight footprint, or measured runtime requirement is specified here. A concrete CPU, GPU, or RAM recommendation would therefore be unsupported. Before deployment, measure memory use and throughput on your target machine, and evaluate the complete pipeline on representative spam and legitimate messages.

2. roberta-base-go_emotions

roberta-base-go_emotions by SamLowe ranks second under the ordering rule: newest release first, then downloads.[1][14] Its first Hugging Face publication was 2022-09-15, behind facebook’s fasttext-language-identification, published on 2023-03-06.[14][1] Placement reflects publication order, not demonstrated spam-detection quality: no public benchmark yet establishes its performance for that task.

The model has 125M parameters, a 514-token context length, and F32 weights totaling 0.5 GB.[14] The license is MIT.[14] For local hardware planning, treat that 0.5 GB as the weight footprint, not a total memory requirement.[14] A specific CPU, GPU, or RAM recommendation would require deployment measurements; verify runtime memory use before selecting hardware.

Consider it for evaluating whether emotion classification adds useful signals to your spam workflow. The practical caveat is task suitability: validate spam decisions on representative messages before deployment, paying particular attention to legitimate messages incorrectly flagged as spam.

3. roberta-hate-speech-dynabench-r4-target

roberta-hate-speech-dynabench-r4-target by facebook ranks third under the newest release first, then downloads rule: its Hugging Face publication date of 2022-06-10 falls between SamLowe’s roberta-base-go_emotions and cardiffnlp’s twitter-roberta-base-sentiment-latest.[6][14][12] The placement reflects publication order, not demonstrated spam-detection accuracy: no public benchmark yet.

The model has 125M parameters, a context length of 514 tokens, and F32 weights occupying 0.5 GB.[6] For local deployment, treat the weight size as a starting point for memory planning, rather than a complete hardware requirement. A specific CPU, GPU or RAM configuration cannot be established here; validate runtime memory use on your target machine before committing to deployment.

Use it as a candidate for hate-content screening within a broader spam workflow, consistent with its focus on online hate detection.[7] The practical caveat is task fit: evaluate spam detection separately before using its predictions to block messages.

4. twitter-roberta-base-sentiment-latest

twitter-roberta-base-sentiment-latest by cardiffnlp ranks here under the newest release first, then downloads ordering, with a Hugging Face publication date of March 15, 2022.[12] Its position does not establish spam-detection accuracy: no public benchmark yet. The checkpoint falls outside the requested release window and appears as an available older candidate.[12]

The model has a context length of 514 tokens and a CC-BY-4.0 license.[12] Local deployment needs hardware validation: no weight size, RAM requirement or GPU requirement is specified. A concrete hardware recommendation would therefore require measurement; context length alone cannot establish memory needs.

Use the model for sentiment analysis of Twitter-style text, consistent with its TimeLMs lineage.[12][13] For a spam-filtering workflow, treat sentiment as an auxiliary signal to evaluate against labeled messages. The practical caveat is task alignment: sentiment classification does not establish whether a message is unsolicited or abusive.

5. finbert

finbert by ProsusAI ranks here because ordering follows newest release first, then downloads: its Hugging Face publication date is March 2, 2022 [8], and its 5,019,923 downloads over the preceding 30 days, recorded September 25, 2026, break the tie with candidates published on the same date [8]. Popularity does not establish spam-detection accuracy.

The model supports a context length of 512 tokens [8]. Its intended use is financial sentiment analysis [9]; consider it for sentiment labeling within a financial-message workflow. For spam detection, its status is “no public benchmark yet,” so evaluate it on labeled messages from your own traffic before adopting it.

Local hardware sizing remains unverified: no weight footprint or runtime memory requirement is specified here. Measure memory consumption and latency on your intended machine before choosing hardware, and verify the license before deployment. The central caveat is task fit: financial sentiment is not a spam verdict.

6. distilbert-base-uncased-finetuned-sst-2-english

distilbert-base-uncased-finetuned-sst-2-english by distilbert appears here as an established pick, with placement determined by publication date and downloads breaking date ties. Its Hugging Face publication date is March 2, 2022, and it recorded 3,489,259 downloads over the preceding 30 days as of September 25, 2026.[10] ProsusAI’s finbert shares that publication date and has more downloads, placing it ahead under this ordering.[8][10]

The model has 67M parameters, a context length of 512 tokens, and F32 weights totaling 0.3 GB.[10] Its Apache-2.0 license is stated on the model card.[10] For local deployment, treat the listed weight size as a starting point for memory planning. Budget additional memory for inference and measure peak usage on your target machine; a validated RAM minimum or GPU requirement is not specified.

Use it as a baseline for experiments with labeled spam and legitimate messages. The caveat for spam detection is no public benchmark yet: this placement does not demonstrate spam-filtering accuracy.

7. deberta-xlarge-mnli

deberta-xlarge-mnli by microsoft ranks here under the ordering “newest release first, then downloads.” Its first publication on Hugging Face was March 2, 2022, with 242,210 downloads over the preceding 30 days as of September 25, 2026.[3] The benchmark status is “no public benchmark yet.” Its position therefore does not demonstrate spam-detection accuracy.

The model has a context length of 512 tokens and an MIT license.[3] Local hardware requirements remain unverified: a specific CPU, GPU, RAM capacity or VRAM capacity cannot be recommended without weight-size and runtime-memory measurements. Measure memory use with your intended message lengths and batch settings before selecting hardware.

Consider the model for an evaluation using labeled spam and legitimate messages from your own traffic. Deployment should depend on measured detection quality and false positives. The central caveat is the absence of a public spam benchmark: download counts provide no evidence that the model will reliably distinguish unwanted messages from legitimate mail.

8. deberta-large-mnli

deberta-large-mnli from microsoft ranks here because the ordering follows newest release first, then downloads, with no public benchmark yet. Its first Hugging Face publication date, March 2, 2022, matches microsoft’s deberta-xlarge-mnli, but its 173,058 downloads trail that model’s 242,210 in the reporting window ending September 25, 2026.[3][5] Placement therefore reflects publication date and adoption, not demonstrated spam-detection accuracy.

The model supports a context length of 512 tokens and carries an MIT license.[5] Local hardware requirements remain unverified: no weight footprint, minimum RAM allocation or GPU requirement is specified here. Check memory use with your intended message lengths and batching before committing hardware.

For spam detection, use the model as an evaluation candidate against labeled messages from your deployment. Measure missed spam and legitimate messages incorrectly blocked before selecting a threshold. The key caveat is the absence of a public spam benchmark: the ranking does not establish suitability for production filtering.

Are public spam detection benchmarks available for these models?

No public spam-detection benchmark scores these candidates against one another, so every candidate has “no public benchmark yet” for this comparison.[1][3][5][6][8][10][12][14] No comparative spam score or dated spam evaluation establishes a performance winner.

Task alignment matters. ProsusAI’s finbert (ProsusAI) is associated with financial sentiment analysis, while Facebook’s roberta-hate-speech-dynabench-r4-target (facebook) is associated with hate detection.[8][9][6][7] Results for those tasks would not establish spam-detection accuracy. Any model-card benchmark discussed separately must be labeled self-reported, with its task and evaluation date identified where available.

The ordering basis is newest release first, then downloads, using the listed Hugging Face publication dates. Facebook’s fasttext-language-identification (facebook) takes first place because its listed publication date is the newest among these candidates, not because of demonstrated spam-detection performance.[1][3][5][6][8][10][12][14] The selection falls back to the newest available candidates because qualifying recent releases are too few; the listed publication dates fall outside the requested annual window.[1][3][5][6][8][10][12][14]

For deployment, evaluate candidates on the same held-out collection of spam and legitimate messages. Report spam precision, recall, legitimate-message false positives, and the evaluation date. Measure latency and memory on the intended local hardware. Treat those measurements as a separate deployment evaluation, and keep download popularity out of claims about detection quality.

What hardware requirements can you estimate from the published model specifications?

Published specifications support weight-storage estimates, but do not establish total RAM, VRAM, or a specific GPU requirement: the documented F32 weights occupy 0.3 GB to 0.5 GB.[6][10][14]

Facebook’s roberta-hate-speech-dynabench-r4-target (facebook) has 125M parameters and 0.5 GB of F32 weights.[6] SamLowe’s roberta-base-go_emotions (SamLowe) has the same published parameter count and weight size: 125M parameters and 0.5 GB.[14] For either model, hypothetical 4-bit weight storage is 62.5 MB, estimated (params x 0.5 bytes), using the cited 125M parameters.[6][14] Treat that calculation as a storage estimate, not confirmation that a compatible quantized checkpoint is available.

The distilbert organization’s distilbert-base-uncased-finetuned-sst-2-english (distilbert) has 67M parameters and 0.3 GB of F32 weights.[10] Hypothetical 4-bit weight storage is 33.5 MB, estimated (params x 0.5 bytes), using its 67M parameters.[10] Published context lengths are 512 tokens for that model and 514 tokens for the Facebook and SamLowe models above.[6][10][14] Context limits describe supported input length; they do not specify deployment memory.

For local deployment, use the published weight sizes as a starting point, then measure total memory with your chosen runtime, input lengths, and batch settings. A hardware purchase needs that measurement: neither a weight-file size nor a parameter-based estimate establishes whether a complete inference workload fits on a particular machine.

Which licenses apply to these local text classifiers?

The listed local text classifiers carry MIT, Apache-2.0, CC-BY-4.0 or cc-by-nc-4.0 licenses, depending on the model; license coverage is incomplete for the full candidate list.[1][3][5][10][12][14]

Microsoft’s deberta-xlarge-mnli (microsoft) and deberta-large-mnli (microsoft) carry the MIT license.[3][5] SamLowe’s roberta-base-go_emotions (SamLowe) also carries MIT.[14] Check the license attached to the exact repository you plan to deploy, and retain the applicable license text with your deployment records.

The distilbert organization’s distilbert-base-uncased-finetuned-sst-2-english (distilbert) carries Apache-2.0.[10] Treat its license review separately from the MIT models rather than applying a shared license assumption across your classifier shortlist.

The cardiffnlp organization’s twitter-roberta-base-sentiment-latest (cardiffnlp) carries CC-BY-4.0.[12] The facebook organization’s fasttext-language-identification (facebook) carries cc-by-nc-4.0.[1] Preserve the complete license identifier in your inventory: those labels should not be treated as interchangeable. Review the applicable terms against your intended deployment before selecting either model.

For the facebook organization’s roberta-hate-speech-dynabench-r4-target (facebook) and ProsusAI’s finbert (ProsusAI), confirm the applicable license directly before deployment.[6][8] Do not infer permission from public availability or borrow a license from another model published by the same organization. Make that verification part of model selection, alongside your spam-detection evaluation.

Frequently Asked Questions

Which model heads the spam-detection shortlist, and why?

fasttext-language-identification (facebook) heads the list because its Hugging Face publication date, 2023-03-06, is the newest among the listed candidates.[1][3][5][6][8][10][12][14] Publication recency does not establish spam-detection accuracy. Its status is “no public benchmark yet.” Treat the ordering as a shortlist for evaluation; selecting a production spam classifier requires measuring performance on labeled messages representative of your workload.

How are the models ordered?

Ranking note: no public benchmark scores any candidate, so the rule gives: newest release first, then downloads. Order: fasttext-language-identification (facebook);[1] roberta-base-go_emotions (SamLowe);[14] roberta-hate-speech-dynabench-r4-target (facebook);[6] twitter-roberta-base-sentiment-latest (cardiffnlp);[12] finbert (ProsusAI);[8] distilbert-base-uncased-finetuned-sst-2-english (distilbert);[10] deberta-xlarge-mnli (microsoft);[3] deberta-large-mnli (microsoft).[5] Established picks exempt from recency are finbert (ProsusAI), distilbert-base-uncased-finetuned-sst-2-english (distilbert) and twitter-roberta-base-sentiment-latest (cardiffnlp).[8][10][12] Their exemption cannot confer first place. Downloads break publication-date ties; model size does not determine placement.

Why does a current shortlist include older models?

Ranking scope: admit only text classifiers that label text, from labs with a published paper or leaderboard record, or other publishers above 10,000 downloads in the last 30 days; exclude rerankers, process-reward models and embedding models.[14] The family has too few releases within the preceding year, so the newest available candidates are listed. Their Hugging Face publication dates fall outside that window; inclusion does not imply a recent release.[1][3][5][6][8][10][12][14]

Can I choose a spam classifier from its existing task benchmarks?

No public benchmark yet establishes a spam-detection ranking among these candidates. Financial sentiment and hate detection are distinct tasks represented by the FinBERT and hate-detection papers.[9][7] Evaluate any proposed classifier against your own spam and legitimate-message labels. Track missed spam and legitimate messages incorrectly blocked, and use a separate evaluation set when choosing a decision threshold. Treat any model-card benchmark as self-reported.

How much memory do I need to run these models locally?

Published weight sizes provide a starting point: distilbert-base-uncased-finetuned-sst-2-english (distilbert) has 67M parameters and 0.3 GB of F32 weights.[10] roberta-base-go_emotions (SamLowe) and roberta-hate-speech-dynabench-r4-target (facebook) each have 125M parameters and 0.5 GB of F32 weights.[14][6] Weight storage alone does not establish runtime RAM or GPU memory requirements. Measure memory with your intended runtime, message lengths and batch settings before committing to hardware.

Which licenses should I check before deploying a classifier?

fasttext-language-identification (facebook) carries cc-by-nc-4.0.[1] roberta-base-go_emotions (SamLowe) and both listed microsoft DeBERTa models carry MIT.[14][3][5] distilbert-base-uncased-finetuned-sst-2-english (distilbert) carries Apache-2.0, while twitter-roberta-base-sentiment-latest (cardiffnlp) carries CC-BY-4.0.[10][12] Review the applicable license against your deployment plans, including commercial use and redistribution. Confirm licensing separately for finbert (ProsusAI) and roberta-hate-speech-dynabench-r4-target (facebook) before incorporating either into a deployed service.

Sources

  1. facebook/fasttext-language-identification model card (Hugging Face) — 2026-09-25 · fasttext-language-identification on Q4KM
  2. Enriching Word Vectors with Subword Information — 2016-07-15
  3. microsoft/deberta-xlarge-mnli model card (Hugging Face) — 2026-09-25 · deberta-xlarge-mnli on Q4KM
  4. DeBERTa: Decoding-enhanced BERT with Disentangled Attention — 2020-06-05
  5. microsoft/deberta-large-mnli model card (Hugging Face) — 2026-09-25 · deberta-large-mnli on Q4KM
  6. facebook/roberta-hate-speech-dynabench-r4-target model card (Hugging Face) — 2026-09-25 · roberta-hate-speech-dynabench-r4-target on Q4KM
  7. Learning from the Worst: Dynamically Generated Datasets to Improve Online Hate Detection — 2020-12-31
  8. ProsusAI/finbert model card (Hugging Face) — 2026-09-25 · finbert on Q4KM
  9. FinBERT: Financial Sentiment Analysis with Pre-trained Language Models — 2019-08-27
  10. distilbert/distilbert-base-uncased-finetuned-sst-2-english model card (Hugging Face) — 2026-09-25 · distilbert-base-uncased-finetuned-sst-2-english on Q4KM
  11. DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter — 2019-10-02
  12. cardiffnlp/twitter-roberta-base-sentiment-latest model card (Hugging Face) — 2026-09-25 · twitter-roberta-base-sentiment-latest on Q4KM
  13. TimeLMs: Diachronic Language Models from Twitter — 2022-02-08
  14. SamLowe/roberta-base-go_emotions model card (Hugging Face) — 2026-09-25 · roberta-base-go_emotions on Q4KM

Get these models on a hard drive

Skip the downloads. Browse our catalog of 985+ commercially-licensed AI models, available pre-loaded on high-speed drives.

Browse Model Catalog