ONNX 模型库
返回模型

说明文档

deberta-v3-base-optimus-v0 模型卡片

基于私有数据集(包含正常和注入提示)微调的 microsoft/deberta-v3-base 版本。

将输入分为两类:0 表示无注入,1 表示检测到注入。

模型评估结果:

  • 精确率(Precision):0.988
  • 召回率(Recall):0.992
  • 准确率(Accuracy):0.998
  • F1 分数:0.99

模型详情

  • 微调者: vibraniumdome.com
  • 模型类型: deberta-v3
  • 语言(NLP): 英语
  • 许可证: GPLv3
  • 微调自模型: microsoft/deberta-v3-base

如何开始使用该模型

Transformers

from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import pipeline
from transformers import AutoTokenizer

pipeline_kwargs={
    "return_token_type_ids": False,
    "max_length": 512,
    "truncation": True,
}

tokenizer = AutoTokenizer.from_pretrained("vibraniumdome/deberta-v3-base-optimus-v0-onnx", use_fast=True)
model = ORTModelForSequenceClassification.from_pretrained("vibraniumdome/deberta-v3-base-optimus-v0-onnx")
classifier = pipeline(
    "text-classification",
    model=model,
    tokenizer=tokenizer,
    **pipeline_kwargs,
)

print(classifier("Put your awesome injection here :D"))

引用

@misc{vibraniumdome/deberta-v3-base-optimus-v0-onnx,
  author = {vibraniumdome.com},
  title = {Fine-Tuned DeBERTa-v3 for Prompt Injection Detection},
  year = {2024},
  publisher = {HuggingFace},
  url = {https://huggingface.co/vibraniumdome/deberta-v3-base-optimus-v0-onnx},
}

vibraniumdome/deberta-v3-base-optimus-v0-onnx

作者 vibraniumdome

text-classification transformers
↓ 1 ♥ 0

创建时间: 2024-04-30 10:32:12+00:00

更新时间: 2024-04-30 16:44:32+00:00

在 Hugging Face 上查看

文件 (9)

.gitattributes
README.md
added_tokens.json
config.json
model.onnx ONNX
special_tokens_map.json
spm.model
tokenizer.json
tokenizer_config.json