Raft Develops Multilabel Guardrail Classifier Detecting 15 Risk Categories with 3x Speed and Cost Gains

Raft has released details on a custom multilabel guardrail classifier designed to scan both incoming prompts and model outputs for 15 distinct risk categories in real time. The system handles Russian and English text while maintaining independent thresholds for each category to balance false positives against critical misses. By switching from a PyTorch baseline to TensorRT inference on NVIDIA RTX 3090 hardware, the team achieved a 2.95x reduction in single-request latency and lowered inference cost to $0.062 per million requests. The architecture uses per-category expert query tokens plus a lightweight interaction transformer to capture correlations such as those between armament and violent content. Training relied on asymmetric loss functions and post-epoch per-class threshold tuning rather than standard binary cross-entropy. Benchmarking against nine open guardrail and toxicity models showed superior macro-F1 on rare but high-impact categories while remaining an order of magnitude cheaper than external LLM judges.

HabrTranslated from Russian

Read at source

Raft has published a detailed technical account of how it built and production-optimized a multilabel guardrail classifier capable of simultaneously evaluating 15 risk categories on both user prompts and model generations.

The classifier addresses regulatory, reputational and operational risks that arise when generative systems produce or receive disallowed content such as child exploitation material, violent crime instructions, weapons, narcotics, self-harm, discrimination, Nazism, financial crime, cybercrime and adult content, as well as thematic categories including profanity, religious offences and LGBT-related material governed by specific Russian legislation.

Unlike binary toxicity detectors or keyword filters, the model outputs 15 independent probability scores, each with its own calibrated threshold. Deploying organisations can therefore enable or disable any subset of categories without retraining.

Performance and Economics

On an NVIDIA RTX 3090, the TensorRT backend delivered 5.9 ms P95 latency for batch-1 requests compared with 17.4 ms for the PyTorch + FlashAttention2 baseline, a 2.95× improvement. At the optimal batch size of 16, throughput reached 1 345 texts per second and cost fell to $0.062 per million requests, 2.9× cheaper than a naïve PyTorch batch-8 configuration.

The model was trained with asymmetric loss to prioritise recall on rare but critical classes and uses a two-layer transformer to model statistical dependencies between categories such as armament and violent actions.

Benchmark Results

In a balanced evaluation of 7 480 examples, HiveTrace Multilabel achieved binary F1 of 0.9588 and macro-F1 of 0.7026 across 14 labels, outperforming Qwen3Guard variants and other open toxicity models on the macro metric that better reflects per-category utility for real moderation workflows.

A second open model, gliner_guard_omni, was also released by the team. Both models are positioned as fast, on-premise ML filters that sit between regex checks and slower external LLM judges in production guardrail pipelines.

Meridian digestThe week's most consequential security stories, distilled into one briefing.See the digest

More in AI Security

Logical Argument Claims Full Alignment of Superintelligent AGI Is Fundamentally Impossible
Claude Account Bans Linked to IP Reputation, Device Environment and Payment Channels, But No Confirmed Formula
Local LLMs in AppSec: What Open Tools and Models Can Handle in Application Security