Downloads · 30 days
5
2% of all-time downloads
jacpacd/waf-distilbert
waf-distilbert is a machine learning model from jacpacd. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
WAF-DistilBERT is a fine-tuned version of DistilBERT, specifically trained to detect malicious web requests in real-time. This model serves as the core component of a Web Application Firewall (WAF) system.
Downloads · 30 days
5
2% of all-time downloads
All-time downloads
249
Public
Parameters
67M
1.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt1.1 GB · 57%
From the Hugging Face model README
WAF-DistilBERT is a fine-tuned version of DistilBERT, specifically trained to detect malicious web requests in real-time. This model serves as the core component of a Web Application Firewall (WAF) system.
This model is designed for:
This model should not be used as:
The model was trained on the CSIC 2010 HTTP Dataset, which includes:
The model may show bias towards:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("jacpacd/waf-distilbert")
model = AutoModelForSequenceClassification.from_pretrained("jacpacd/waf-distilbert")
# Prepare input
request = "GET /admin?id=1 OR 1=1"
inputs = tokenizer(request, return_tensors="pt", truncation=True, max_length=512)
# Make prediction
with torch.no_grad():
outputs = model(**inputs)
prediction = torch.sigmoid(outputs.logits)
is_malicious = prediction.item() > 0.5
confidence = prediction.item()
If you use this model in your research, please cite:
@misc{waf-distilbert,
author = {jacpacd},
title = {WAF-DistilBERT: Web Application Firewall using DistilBERT},
year = {2025},
publisher = {Hugging Face},
journal = {Hugging Face model repository},
howpublished = {\url{https://huggingface.co/jacpacd/waf-distilbert}}
}
For questions and feedback about the model, please: