← Latest papers
🤖 AI

A Reproducible, License-Aware Distillation Recipe for CPUDeployable Safety Classification

This paper presents a reproducible, license-aware knowledge-distillation recipe that trains small, CPU-efficient safety classifiers to match the performance of larger GPU-oriented guard models on adversarial text while significantly reducing false alarms on harmless prompts through per-class rebalancing.

Original authors: Edson Rodrigues da Cruz Filho, Paulo Ricardo Ferreira Neves, Paulo Henrique Eleuterio Falsetti, João Vitor Pavan, Ian Degaspari, Henrique Vieira Laturrague, Patrick Vieira Laturrague, Guilherme Nielse
Published 2026-08-25
📖 4 min read☕ Coffee break read

Original authors: Edson Rodrigues da Cruz Filho, Paulo Ricardo Ferreira Neves, Paulo Henrique Eleuterio Falsetti, João Vitor Pavan, Ian Degaspari, Henrique Vieira Laturrague, Patrick Vieira Laturrague, Guilherme Nielsen Dias, Marccello Wilson Perez Berto, Gustavo Voltani Von Atzingen

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Large language models are powerful tools that can write, reason, and converse, but they are not inherently safe. Without a filter, they might generate harmful instructions, hate speech, or dangerous advice. To prevent this, developers place a safety layer in front of these models, a dedicated system that acts as a gatekeeper. This gatekeeper reads every message and decides if it violates a policy. Currently, the best gatekeepers are massive computer programs that require specialized, expensive graphics hardware to run quickly. If you try to run them on a standard computer processor, they become painfully slow, taking several seconds to answer a single question. This creates a problem for many applications that need to run on ordinary, affordable hardware or require instant responses. The question researchers asked was whether it is possible to shrink these massive safety systems down to a size that fits on a regular computer without losing their ability to spot danger.

A team of researchers set out to solve this by creating a new method to train smaller safety systems. They started with a very large, powerful safety model that they trusted to be accurate. This large model acted as a teacher, reading a massive collection of roughly 97,000 different prompts and labeling them into seven specific categories of harm, such as physical violence, hate speech, or dangerous advice. The researchers then trained a fleet of much smaller models to mimic the teacher's judgments. These smaller models were designed to be lightweight enough to run on standard computer processors. The team was careful to ensure their training data was legally usable for commercial products, separating the data into two groups: one that could be used for public software and another reserved only for research. This allowed them to measure exactly how much the legal restrictions cost in terms of performance.

The results showed that the smaller models could indeed learn to be effective safety guards. When tested on difficult, adversarial text designed to trick the system, the smallest generative model performed just as well as the massive teacher, matching its ability to spot danger. More surprisingly, the small generative model was better at avoiding false alarms. While the large teacher sometimes blocked harmless messages by mistake, the small generative model made this error less often, flagging only about 3.8 percent of safe prompts as dangerous, compared to 4.8 percent for the large teacher. However, the other small models, such as the encoders and shallow networks, were actually worse than the teachers at avoiding these false alarms. The most efficient solution, however, was not a generative model but a specialized encoder, a type of system designed specifically for classification. This encoder could process a request in about 24 milliseconds on a standard computer, making it nearly instant for a human user. In contrast, the large teacher would take seconds to do the same job on the same hardware.

The study also revealed that the limits of these systems are not due to the size of the computer model, but rather the definitions of the problems they are trying to solve. The researchers found that all models, from the tiny ones to the massive teacher, struggled equally with a specific category: harmful advice. Whether the model had millions or billions of parameters, it often failed to distinguish between helpful advice and advice that could lead to harm. This suggests that the difficulty lies in how the categories are defined, not in the computing power available. The researchers concluded that the best approach for most real-world applications is to use these distilled, small models. They offer a balance of speed and accuracy that makes safety layers feasible on everyday hardware, provided the definitions of what constitutes harm are clear and consistent. The work serves as a practical guide for building safer, faster, and more accessible artificial intelligence systems without relying on expensive, specialized equipment.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →