Skip to content

Back to the catalog

knowledgator/opir-multitask-large-v1.0 · Hugging Face
huggingface.cotool

knowledgator/opir-multitask-large-v1.0 · Hugging Face

Opir-multitask-large is an English encoder-based GLiClass zero-shot classifier for real-time LLM safety filtering, supporting binary safe/unsafe decisions, toxicity classification, jailbreak/prompt-injection detection, and categorization over a 996-label hierarchical safety taxonomy (16 top-level, 126 mid-level, 854 leaf labels). It was trained with taxonomy-derived unsafe-prompt generation, evolutionary hard-negative mining against existing safety models, LLM-as-judge annotation (DeepSeek-V3.1, MiniMax-M2.5, Llama-3.3-70B), and replay training on the gliclass-v3-logic-dataset, and is benchmarked against WildGuard, PolyGuard, Nemotron Safety Guard and Qwen3Guard across datasets like Aegis2, HarmBench, WildGuardMix, ToxicChat, and JBB-Behaviors, reporting ~25ms p50 latency at 1024 tokens for real-time deployment as an input/output moderation layer.

TL;DR Open GLiClass zero-shot guardrail model for real-time LLM jailbreak, prompt-injection, toxicity, and harmful-content classification.
Document

What it is

knowledgator/opir-multitask-large-v1.0 — the English, highest-accuracy multi-task checkpoint in Knowledgator's Opir GLiClass guardrail family for real-time LLM safety filtering. The page is the model card: it gives the actual integration path, the pipeline modes, and the threshold guidance the summary omits. The Opir paper reportedly ships three companion checkpoints for other deployment profiles (not named on this page).

How it works

It's an encoder model that jointly encodes input text and candidate labels via GLiClass, rather than generating a verdict token by token. You supply candidate labels at inference time, so policy changes need no retraining. Two modes matter:

  • classification_type="single-label" → binary safe/unsafe.
  • classification_type="multi-label" → taxonomy, toxicity, jailbreak, or custom policy labels, scored independently against a threshold.

Labels can be plain strings, dot-notation, hierarchical dicts, or carry a prompt= task instruction. For prompt-response evaluation, the page's approach is to serialize the turn into one text field (f"Prompt: {prompt}\nResponse: {response}") and classify labels like ["safe response", "unsafe response", "refusal", "compliance"] — GLiClass has no native pair input.

What to do

pip install gliclass transformers

Binary decision:

from gliclass import GLiClassModel, ZeroShotClassificationPipeline
from transformers import AutoTokenizer
MODEL_ID = "knowledgator/opir-multitask-large-v1.0"
model = GLiClassModel.from_pretrained(MODEL_ID)
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
binary_classifier = ZeroShotClassificationPipeline(
    model=model, tokenizer=tokenizer,
    classification_type="single-label", device="cuda:0")
result = binary_classifier(text, ["safe", "unsafe"])[0]
print(max(result, key=lambda x: x["score"]))

Multi-label runs the same pipeline with classification_type="multi-label" and a threshold= arg. The page lists concrete label sets for the 16 top-level categories, toxicity (6 labels), and jailbreak/prompt-injection (10 labels including instruction hierarchy attack, indirect prompt injection, secret or context exfiltration, tool and connector abuse).

Caveats

  • The paper's default threshold=0.5 is explicitly a starting point — the card says calibrate thresholds on representative traffic before production.
  • Label descriptions are conditional: "include descriptions if your GLiClass version/configuration supports them" — feature availability depends on your installed version.
  • device="cuda:0" in examples; the card notes CPU is possible but this is the large/highest-accuracy checkpoint, so weigh latency for real-time use.
  • Benign-sensitive contrast categories (defensive cybersecurity, counterspeech, harm prevention, appropriate refusal) exist to cut over-refusal, but you must actually include those labels in your schema to benefit.

Organisations named here

  • JBB-Behaviors
  • Opir
  • PAN12

Technologies named here

  • Opir-multitask-large-v1.0
  • GLiClass
  • Opir-edge
  • Opir-multitask-multilang
  • gliclass-v3-logic-dataset
  • Aegis2
  • WildGuardMix
  • Qwen3-4B
  • DeepSeek-V3.1, MiniMax-M2.5, Meta-Llama-3.3-70B-Instruct
  • WildGuard
  • PolyGuard
  • Nemotron Safety Guard
  • Qwen3Guard
  • Hugging Face
  • Python
  • HarmBench

Techniques named here

  • Prompt injection / instruction hierarchy attack
  • Indirect prompt injection
  • Secret or context exfiltration
  • Tool and connector abuse
  • Obfuscation and prompt smuggling
  • Social engineering attack
  • Automation abuse
  • Unsafe autonomy
  • Tool use risk
  • Robustness or monitoring failure
  • Phishing email generation
  • Account theft instruction solicitation
  • Evolutionary hard-negative mining

Threat actors named here

  • BeaverTail