jackhhao/jailbreak-classification
Viewer • Updated • 1.31k • 3.28k • 77
ONNX export of protectai/deberta-v3-base-prompt-injection-v2 for use with Sovraine Guard.
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]
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.
| File | Description |
|---|---|
model.onnx |
ONNX model weights (int4 quantized) |
tokenizer.json |
HuggingFace tokenizer |
spm.model |
SentencePiece model |
config.json |
Model configuration |
Base model
microsoft/deberta-v3-base