Sovraine Prompt Injection Detection (ONNX)

ONNX export of protectai/deberta-v3-base-prompt-injection-v2 for use with Sovraine Guard.

Model Details

  • Architecture: DeBERTa-v3-base fine-tuned for prompt injection detection
  • Parameters: 184 million
  • Format: ONNX (runs on onnxruntime, no PyTorch required)
  • Task: Binary classification (safe vs. injection)
  • Language: English
  • License: Apache 2.0

Usage

import onnxruntime as ort
from tokenizers import Tokenizer

session = ort.InferenceSession("model.onnx")
tokenizer = Tokenizer.from_file("tokenizer.json")
tokenizer.enable_padding(length=512)
tokenizer.enable_truncation(max_length=512)

enc = tokenizer.encode("your text here")
outputs = session.run(None, {
    "input_ids": [enc.ids],
    "attention_mask": [enc.attention_mask],
})
# outputs[0] shape: (1, 2) — [safe_score, injection_score]

Attribution

Derived from protectai/deberta-v3-base-prompt-injection-v2 (Apache 2.0). ONNX conversion by llmware (int4 quantized). Redistributed by SOVRAINE PTE.LTD. No fine-tuning applied.

Files

File Description
model.onnx ONNX model weights (int4 quantized)
tokenizer.json HuggingFace tokenizer
spm.model SentencePiece model
config.json Model configuration
Downloads last month
29
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Sovraine/prompt-injection-onnx

Datasets used to train Sovraine/prompt-injection-onnx