Distillation Recipe for CPU-Deployable LLM Safety Classifiers

Edson Rodrigues da Cruz Filho, Paulo Ricardo Ferreira Neves, Paulo Henrique Eleuterio Falsetti, Jo\~ao Vitor Pavan, Ian Degaspari, Henrique Vieira Laturrague, Patrick Vieira Laturrague, Guilherme Nielsen Dias, Marccello Wilson Perez Berto, Gustavo Voltani Von Atzingen· August 25, 2026 View original

Key takeaways

  • Knowledge distillation can create efficient, CPU-deployable LLM safety classifiers.
  • These smaller models maintain performance on adversarial text while reducing false alarms.
  • Per-class rebalancing is a critical factor for successful distillation.
  • Fast, cost-effective safety layers are now more accessible for broad deployment.

Who benefits

AI DevelopmentCloud ComputingCybersecurityContent ModerationEdge AI

Summary

This paper presents a reproducible, license-aware knowledge distillation method to create small, CPU-deployable safety classification models for Large Language Models. The distilled models match larger GPU-oriented teachers on adversarial text while reducing false alarms on harmless prompts, achieving fast inference on commodity hardware.

Deploying safety layers for Large Language Models (LLMs) on standard CPU hardware faces significant challenges due to the large size of current open guard models, which are typically optimized for GPUs and incur slow inference times on CPUs. This research introduces a reproducible and license-aware knowledge distillation recipe designed to overcome these constraints, enabling the creation of smaller, CPU-deployable safety classifiers. The process involves using a powerful open guard model to label a large corpus of approximately 97,000 prompts, drawn from 24 public datasets, into seven safety categories based on a public hazard taxonomy. A fleet of smaller "student" models, encompassing lexical, shallow, encoder, and generative architectures, are then trained to replicate this safety signal. A key aspect is the partitioning of the training corpus by license, allowing for a measurable comparison between deployable and research models based solely on data restrictions. Evaluated against an independent gold benchmark of 6,361 rows, the distilled student models demonstrate performance comparable to their larger teachers on adversarial text, within overlapping confidence intervals. Crucially, these smaller models also reduce false alarms on harmless prompts; the smallest generative student achieved a 3.8% false alarm rate compared to 4.8% for the 8-billion-parameter teacher. The encoder model, for instance, classifies requests in roughly 24 milliseconds on a CPU. The study highlights that per-class rebalancing is the most critical ingredient for the recipe's success.

Why it matters

Professionals can now deploy effective LLM safety layers on commodity CPU hardware, significantly reducing inference costs and latency, making safety features more accessible and scalable for various applications.

How to implement this in your domain

  1. 1Adopt knowledge distillation techniques to create lightweight, CPU-deployable versions of large AI models for edge or cost-sensitive deployments.
  2. 2Implement per-class rebalancing in training datasets for classification tasks to improve model robustness and reduce false positives.
  3. 3Evaluate the trade-offs between model size, inference speed, and accuracy when selecting safety layers for LLM applications.
  4. 4Develop internal guidelines for license-aware data partitioning during model training to ensure compliance and reproducibility.

Original post by Edson Rodrigues da Cruz Filho, Paulo Ricardo Ferreira Neves, Paulo Henrique Eleuterio Falsetti, Jo\~ao Vitor Pavan, Ian Degaspari, Henrique Vieira Laturrague, Patrick Vieira Laturrague, Guilherme Nielsen Dias, Marccello Wilson Perez Berto, Gustavo Voltani Von Atzingen

"arXiv:2608.21570v1 Announce Type: new Abstract: Deploying a safety layer for large language models on commodity hardware is constrained by the guards available to do it: current open guard models hold between 1 and 9 billion parameters, are oriented toward the graphics processing…"

View on X

Originally posted by Edson Rodrigues da Cruz Filho, Paulo Ricardo Ferreira Neves, Paulo Henrique Eleuterio Falsetti, Jo\~ao Vitor Pavan, Ian Degaspari, Henrique Vieira Laturrague, Patrick Vieira Laturrague, Guilherme Nielsen Dias, Marccello Wilson Perez Berto, Gustavo Voltani Von Atzingen on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses