玩模型开放模型 · 清晰来源 · 自主选择
返回模型目录
llm-semantic-router /

mmbert32k-jailbreak-detector-lora

HF 源站

llm-semantic-router/mmbert32k-jailbreak-detector-lora is an uncensored open-source model hosted on Hugging Face.

safetensorsEnglishLicense: apache-2.0peftjailbreak-detectionsecuritytext-classificationloradataset:lmsys/toxic-chatdataset:OpenSafetyLab/Salad-Data
README.md说明 / 使用方法

license: apache-2.0 base_model: llm-semantic-router/mmbert-32k-yarn tags:

  • jailbreak-detection
  • security
  • text-classification
  • lora
  • peft datasets:
  • lmsys/toxic-chat
  • OpenSafetyLab/Salad-Data language:
  • en metrics:
  • accuracy
  • f1

mmBERT-32K Jailbreak Detector (LoRA)

LoRA adapter for jailbreak/prompt injection detection based on mmBERT-32K-YaRN.

Model Details

  • Base Model: llm-semantic-router/mmbert-32k-yarn
  • LoRA Rank: 48
  • LoRA Alpha: 96
  • Training: 8 epochs with heavy short-pattern augmentation

Performance

  • Validation Accuracy: 98.16%
  • F1 Score: 98.15%
  • Precision: 98.36%
  • Recall: 97.95%

Key Improvements

This model includes heavy oversampling of short jailbreak patterns to improve generalization:

  • Detects short patterns like "DAN", "jailbreak", "Developer mode" with 100% confidence
  • Properly handles both short and long jailbreak attempts

Usage

from transformers import AutoTokenizer, AutoModelForSequenceClassification
from peft import PeftModel

base_model = "llm-semantic-router/mmbert-32k-yarn"
lora_path = "llm-semantic-router/mmbert32k-jailbreak-detector-lora"

tokenizer = AutoTokenizer.from_pretrained(lora_path)
base = AutoModelForSequenceClassification.from_pretrained(base_model, num_labels=2)
model = PeftModel.from_pretrained(base, lora_path)
HUGGING FACE

上游数据

HF 下载量28
HF 点赞量0

HF 下载量为源站最近 30 天统计,与本站点击分开。

SITE STATS

本站统计

下载点击—
请求数—
匿名去重—最近 7 天—

本站下载量记录按钮点击,不代表下载完成;短时连点会去重。

来源与版本

作者
llm-semantic-router
最近更新
2026/02/01
最新创建
2026/01/31
HF 趋势
未知
数据快照
2026/09/17
版本
未知
许可证
apache-2.0