Skip to page content
SAVRN
Search Plan a project

Open-weight model · Text classification

phishing-scam-detector-base-ONNX

by ONNX Community onnx-community/phishing-scam-detector-base-ONNX

phishing-scam-detector-base-ONNX is an open-weight model for text classification from ONNX Community, released under Apache License 2.0. It has 8,192-token context. Its published files total 5.0 GB.

This is an ONNX version of Horizon-Labs/phishing-scam-detector-base. It was automatically converted and uploaded using this Hugging Face Space.

Parameters—
Context8,192
Weights4.9 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads—

Model Card

By ONNX Community, published under apache-2.0, revision 56c77405dd5f.

This is an ONNX version of Horizon-Labs/phishing-scam-detector-base. It was automatically converted and uploaded using this Hugging Face Space. See the pipeline documentation for text-classification: https://huggingface.co/docs/transformers.js/api/pipelines#modulepipelines.TextClassificationPipeline Flags phishing, scams and spam in emails, SMS, chat and social-media messages in many languages. Three labels: - fraud: phishing (fake bank, delivery, account or tax messages with links), scams (prizes, investment and crypto schemes, fake jobs, "hi mum, new number", romance, advance fee), requests for passwords, one-time codes or payment details, malware lures; - spam: unwanted advertising and…

Read ONNX Community's full model card

This is an ONNX version of Horizon-Labs/phishing-scam-detector-base. It was automatically converted and uploaded using this Hugging Face Space.

Usage with Transformers.js

See the pipeline documentation for text-classification: https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.TextClassificationPipeline


Phishing & Scam Detector (base, 307M): multilingual

Flags phishing, scams and spam in emails, SMS, chat and social-media messages in many languages. Three labels:

  • fraud: phishing (fake bank, delivery, account or tax messages with links), scams (prizes, investment and crypto schemes, fake jobs, "hi mum, new number", romance, advance fee), requests for passwords, one-time codes or payment details, malware lures;
  • spam: unwanted advertising and bulk marketing that is not trying to steal anything;
  • legitimate: everything else, including genuine notifications that look similar (real one-time codes, delivery updates, bank alerts).

Built on mmBERT-base, Apache-2.0, ONNX files for CPU and the browser (transformers.js) included. Useful for message filtering and moderation, and for AI agents that read email or chats (see also our prompt-injection guard for attacks on the agent itself).

  • Score: P(fraud) + P(spam) for "unwanted", or P(fraud) alone if marketing is acceptable. The default threshold is 0.5; raise it to cut false positives (see the false-positive rates below).
  • onnx/model_quantized.onnx (int8 embeddings, 641 MB) gives the same top label as fp32 for 99.8% of 520 benchmark texts.

Usage

from transformers import pipeline

clf = pipeline("text-classification", model="Horizon-Labs/phishing-scam-detector-base", top_k=None)
print(clf("Your parcel could not be delivered. Pay the 1.99 EUR customs fee within 24h: dhl-redelivery.example.com"))
# [[{'label': 'fraud', 'score': ...}, {'label': 'legitimate', 'score': ...}, {'label': 'spam', 'score': ...}]]

transformers.js:

import { pipeline } from "@huggingface/transformers";
const clf = await pipeline("text-classification", "Horizon-Labs/phishing-scam-detector-base", { dtype: "q8" });
console.log(await clf("Ihr Konto wurde gesperrt. Bestätigen Sie Ihre Daten: sparkasse-sicher.example.de", { top_k: null }));

Evaluation

Public spam / phishing / smishing test sets, used only for evaluation. Every model is scored the same way (code/): AUC of its "unwanted" probability (for this model P(fraud) + P(spam)), and F1 and false-positive rate at 0.5.

model licence real smishing, 3 languages: AUC F1 @ 0.5 false-positive rate @ 0.5 phishing & spam emails (English): AUC SMS spam (English): AUC SMS spam, 21 languages (machine-translated): AUC note
this model (307M) Apache-2.0 0.925 0.768 0.110 0.978 0.978 0.950 multilingual
cybersectony/phishing-email-detection-distilbert_v2.4.1 (67M) Apache-2.0 0.606 0.715 0.880 0.999 0.759 0.664 English emails and URLs
ptouch/phishing-distilbert-cyber207 (67M) none given 0.485 0.664 0.738 0.991 0.892 0.720 English
ealvaradob/bert-finetuned-phishing (110M) Apache-2.0 0.797 0.763 0.672 1.000 0.999 0.965 English emails, SMS, URLs, websites
mshenoda/roberta-spam (125M) MIT 0.803 0.823 0.332 0.996 0.999 0.974 English spam messages
mrm8488/bert-tiny-finetuned-sms-spam-detection (4M) none given 0.834 0.779 0.541 0.450 0.994 0.964 trained on the UCI SMS set (in-domain)
mrm8488/bert-tiny-finetuned-enron-spam-detection (4M) Apache-2.0 0.735 0.709 0.959 0.983 0.735 0.785 trained on Enron spam (in-domain)
Qwen/Qwen3.8-27B (teacher, prompted) (27B) Apache-2.0 0.945 0.878 0.128 0.996 0.986 0.969 our teacher, for reference
  • The table shows the released checkpoint. Two training seeds: real-smishing AUC 0.916 / 0.925, false-positive rate 0.122 / 0.110.
  • On real smishing in Bengali, Portuguese and Korean this model ranks messages much better (AUC) and flags far fewer normal messages than the English models (their false-positive rates there: 0.33-0.96). Its F1 at 0.5 is lower than roberta-spam's because it is conservative at 0.5: on the Portuguese set it catches only 32% of smishing messages at 0.5 (Bengali 95%, Korean 93%). Lower the threshold if missed scams cost more than false alarms.
  • On the classic English sets it is slightly behind models trained on them.
  • Machine-translated SMS by language (AUC): ar 0.952, bn 0.924, de 0.967, es 0.974, fr 0.975, hi 0.940, id 0.965, ja 0.949, jv 0.911, ko 0.937, mr 0.924, no 0.968, pa 0.881, pt 0.971, ru 0.958, sv 0.972, tr 0.962, uk 0.957, ur 0.947, zh 0.959.
  • The spam / fraud split comes from our teacher; the public sets only distinguish wanted from unwanted, so only that is measured.

Per set:

set AUC F1 @ 0.5 false-positive rate recall
Bengali / Banglish / English SMS (smishing + promotions) 0.979 0.946 0.112 0.952
Mozambican Portuguese SMS and Facebook (smishing) 0.840 0.450 0.096 0.319
Korean SMS (smishing) 0.957 0.909 0.120 0.934
phishing vs safe emails (English) 0.978 0.916 0.112 0.943
Enron spam vs ham (English) 0.978 0.934 0.076 0.944
UCI SMS spam (English) 0.978 0.900 0.063 0.872

Training

  • Messages: 98,379 synthetic SMS, emails, chat, social-media and push messages in about 70 languages written by Qwen3.8-27B (Apache-2.0): per prompt 4 legitimate (half of them genuine notifications that resemble phishing), 2 spam and 4 fraud of one of 20 scam types (parcel fees, bank verification, tax refunds, prizes, fake jobs, crypto, romance, "new number", CEO fraud, fake login alerts, OTP theft, toll fines, ...). Plus 59,403 ordinary web snippets in 92 languages from FineWeb-2 / FineWeb (ODC-BY), so normal text stays normal. No test-set messages were used.
  • Labels: Qwen3.8-27B (prompted) scored every text as legitimate / spam / fraud; the model learns the teacher's probabilities (soft labels). Checkpoint chosen on held-out teacher-labelled data.
  • mmBERT-base, max length 384 tokens, learning rate 3e-5. Code: code/ in this repository.

Limitations

  • Not a complete security product: it sees only the text, not sender reputation, links, attachments or headers. Use it as one signal among others, and review decisions that matter.
  • False positives remain (about 11% of normal messages on the smishing test sets at 0.5), especially for genuine notifications with links and for promotions; tune the threshold on your own traffic.
  • Trained on synthetic messages: new scam scripts, very long emails (truncated at 384 tokens) and rare languages are weaker. The Portuguese smishing set is the hardest here (AUC 0.840; at 0.5 it misses most of those messages).

Configuration

Architecture
ModernBertForSequenceClassification
Context length (tokens)
8,192
Layers
22
Hidden size
768
Feed-forward size
1,152
Attention heads
12
Vocabulary size
256,000
Model type
modernbert

Identity and Version

Repository
onnx-community/phishing-scam-detector-base-ONNX
Publisher
ONNX Community
Task
Text classification
Modality
Text
Library
transformers.js
Parameters
Not stated by the source
Languages
en, de, fr, es, pt, it, nl, pl
Revision
56c77405dd5ff83f16e895a9b6e65ea4903be0a0
First published
2026-10-10
Last updated
2026-10-10

Files and Weights

14 files, 5.0 GB in total. The weights are 8 files totalling 4.9 GB in onnx.

Weights8 files · 4.9 GB
Configuration2 files · 3.2 KB
Tokenizer2 files · 34.4 MB
Documentation1 file · 9.9 KB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
onnx/model.onnxWeights1.2 GB f1dc7793bf1d
onnx/model_bnb4.onnxWeights849.5 MB bb41f565ddd9
onnx/model_fp16.onnxWeights615.8 MB bc54f944a7bd
onnx/model_int8.onnxWeights308.5 MB 19cdcc308b7b
onnx/model_q4.onnxWeights856.5 MB fa0213a5476d
onnx/model_q4f16.onnxWeights456.3 MB 15e0937f1665
onnx/model_quantized.onnxWeights308.5 MB 19cdcc308b7b
onnx/model_uint8.onnxWeights308.5 MB a0112b5082df
config.jsonConfiguration2.1 KB —
special_tokens_map.jsonConfiguration1.1 KB —
README.mdDocumentation9.9 KB —
.gitattributesRepository1.6 KB —
tokenizer.jsonTokenizer34.4 MB e7322a5d841f
tokenizer_config.jsonTokenizer46.6 KB —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
4.9 GB
Download from ONNX Community

Released by ONNX Community through its official repository on Hugging Face. Read the license.

Built From

  • Derived from Horizon-Labs/phishing-scam-detector-base
  • Quantized from Horizon-Labs/phishing-scam-detector-base

Memory Requirements

PrecisionWeights in memory
As published4.9 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About phishing-scam-detector-base-ONNX

Can I use phishing-scam-detector-base-ONNX commercially?

Yes. phishing-scam-detector-base-ONNX is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

What is phishing-scam-detector-base-ONNX's context length?

8,192 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Text classification

twitter-roberta-base-sentiment-latest

Cardiff NLP

This is a RoBERTa-base model trained on ~124M tweets from January 2018 to December 2021, and finetuned for sentiment analysis with the TweetEval benchmark. The original Twitter-based RoBERTa model can be found here and the original reference paper is TweetEval. This model is suitable for English. 0 -> Negative; 1 -> Neutral; 2 -> Positive This sentiment analysis model has been integrated into TweetNLP. You can access the demo here.

Open weights cc-by-4.0 514 tokens transformers

Model · Text classification

finbert-tone

Yi

FinBERT is a BERT model pre-trained on financial communication text. The purpose is to enhance financial NLP research and practice. It is trained on the following three financial communication corpus. The total corpora size is 4.9B tokens. More technical details on FinBERT: Click Link This released finbert-tone model is the FinBERT model fine-tuned on 10,000 manually annotated (positive, negative, neutral) sentences from analyst reports. This model achieves superior performance on financial tone analysis task. If you are simply interested in using FinBERT for financial tone analysis, give it a try. If you use the model in your academic work, please cite the following paper: Huang, Allen H.…

Open weights 512 tokens transformers

Model · Text classification

ms-marco-MiniLM-L-6-v2

Joshua

https://huggingface.co/cross-encoder/ms-marco-MiniLM-L-6-v2 with ONNX weights to be compatible with Transformers.js. If you haven't already, you can install the Transformers.js JavaScript library from NPM using: Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).

Open weights 512 tokens transformers.js

Model · Text classification

twitter-xlm-roberta-base-sentiment

Cardiff NLP

This is a multilingual XLM-roBERTa-base model trained on ~198M tweets and finetuned for sentiment analysis. The sentiment fine-tuning was done on 8 languages (Ar, En, Fr, De, Hi, It, Sp, Pt) but it can be used for more languages (see paper for details). This model has been integrated into the TweetNLP library.

Open weights 514 tokens transformers

Model · Text classification

unbiased-toxic-roberta

Unitary

The huggingface models currently give different results to the detoxify library (see issue here). For the most up to date models we recommend using the models from https://github.com/unitaryai/detoxify Trained models & code to predict toxic comments on 3 Jigsaw challenges: Toxic comment classification, Unintended Bias in Toxic comments, Multilingual toxic comment classification. Built by Laura Hanu at Unitary, where we are working to stop harmful content online by interpreting visual content in context. Score not directly comparable since it is obtained on the validation set provided and not on the test set. To update when the test labels are made available. It is also noteworthy to mention…

Open weights apache-2.0 514 tokens transformers

Model · Text classification

emotion-english-distilroberta-base

Hartmann

With this model, you can classify emotions in English text data. The model was trained on 6 diverse datasets (see Appendix below) and predicts Ekman's 6 basic emotions, plus a neutral class: 1) anger 2) disgust 3) fear 4) joy 5) neutral 6) sadness 7) surprise The model is a fine-tuned checkpoint of DistilRoBERTa-base. For a 'non-distilled' emotion model, please refer to the model card of the RoBERTa-large version. a) Run emotion model with 3 lines of code on single text example using Hugging Face's pipeline command on Google Colab: b) Run emotion model on multiple examples and full datasets (e.g.,.csv files) on Google Colab: Please reach out to [email protected] if you have any…

Open weights 514 tokens transformers