CrabInHoney/urlbert-tiny-v6
is a lightweight URL encoder based on the ModernBERT architecture, designed for malicious URL detection, phishing classification, and URL feature extraction.
With only 2.03M parameters and a hidden dimension of 128, the model executes very fast simply due to its small footprint and compact embedding size, while remaining competitive on detection tasks.
The base model was trained via knowledge distillation of hidden representations from an ensemble of multiple teacher models, which were intentionally trained specifically for this purpose. Please note that this model is designed to process and analyze URL strings exclusively.
The repository contains the base encoder alongside 10 pre-trained classification heads trained on various public cybersecurity datasets.
The benchmark contains 3M URLs with a strict 9:1 benign-to-malicious ratio. Evaluation was conducted using site-aware 5-fold cross-validation, ensuring that no second-level domain or IP address appears in more than one fold to eliminate data leakage.
from transformers import AutoModel, AutoTokenizer
import torch
REPO = "CrabInHoney/urlbert-tiny-v6"
tok = AutoTokenizer.from_pretrained(REPO)
model = AutoModel.from_pretrained(REPO)
text = "http://example.com/login-verify-account"
inputs = tok(text, return_tensors="pt")
with torch.no_grad():
out = model(**inputs)
print(out.last_hidden_state.shape)
Output:
torch.Size([1, 15, 128])
Important Note on Pooling:
For optimal downstream performance, it is highly recommended to use a combination of
CLS + MEAN pooling
(concatenating the
[CLS]
token representation with the mean representation of all tokens). This strategy yields the most robust and useful signal for feature extraction.
Pretrained Classification Heads
Trained classification heads are stored in the
heads/
directory:
urlbert-tiny-v6 huggingface.co is an AI model on huggingface.co that provides urlbert-tiny-v6's model effect (), which can be used instantly with this CrabInHoney urlbert-tiny-v6 model. huggingface.co supports a free trial of the urlbert-tiny-v6 model, and also provides paid use of the urlbert-tiny-v6. Support call urlbert-tiny-v6 model through api, including Node.js, Python, http.
urlbert-tiny-v6 huggingface.co is an online trial and call api platform, which integrates urlbert-tiny-v6's modeling effects, including api services, and provides a free online trial of urlbert-tiny-v6, you can try urlbert-tiny-v6 online for free by clicking the link below.
CrabInHoney urlbert-tiny-v6 online free url in huggingface.co:
urlbert-tiny-v6 is an open source model from GitHub that offers a free installation service, and any user can find urlbert-tiny-v6 on GitHub to install. At the same time, huggingface.co provides the effect of urlbert-tiny-v6 install, users can directly use urlbert-tiny-v6 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.