LIVE · Thursday 3 December

Can a Distilled Small Classifier Replace a GPT-4o-mini Moderation Judge? Cheaper and Faster, Yes

A BERT-class classifier trained on GPT-4o-mini's own labels can cut a $9,000-a-month moderation bill to hundreds of dollars and 800 ms to milliseconds. Whether it matches accuracy depends on how you define "the same".

By Thomas10 min read

A small classifier distilled from GPT-4o-mini's moderation labels will almost certainly be cheaper and faster: a $9,000-a-month judge on 30 million messages can become a few hundred dollars of CPU serving, and published CPU benchmarks put DistilBERT-class latency at 1 to 4 milliseconds for short messages, against 800 ms per GPT-4o-mini call. Whether it keeps the same accuracy has not been measured for any public moderation setup that matches this one, so it has to be proven on your own human-labelled test set. The design most likely to hold accuracy is a cascade, where the classifier decides the confident majority and an LLM judges the uncertain rest. That LLM will not be GPT-4o-mini for long: OpenAI shuts it down on January 14, 2027.

Where the $9,000 goes

An LLM judge bills by the token, and the bill reveals what each call carries. OpenAI's pricing page lists GPT-4o-mini at $0.15 per million input tokens and $0.60 per million output. Thirty million messages for $9,000 is $0.0003 a message. If each verdict is about 50 output tokens, that leaves roughly 1,800 input tokens per call. A typical chat message is far shorter than that, so most of those tokens are almost certainly the moderation policy itself, sent again with every message.

That observation is the whole case for distillation. The policy is the part that never changes, and an LLM judge pays to read it 30 million times a month. A trained classifier carries the policy in its weights instead, and reads only the message.

There are two cheaper ways to keep an LLM judge, and neither fixes latency. OpenAI's prompt caching "is enabled by default for supported OpenAI models," and its guide says to "put stable developer instructions and shared reference material first." If 1,500 of the 1,800 input tokens were billed at GPT-4o-mini's $0.075 cached rate, the bill would fall to about $5,625. The Batch API, at $0.075 in and $0.30 out, would make it about $4,500, but batch jobs return later, which rules them out for moderation that has to decide before a message is shown. OpenAI's caching guide is also explicit that caching "does not guarantee that every request reuses stored KV tensors or has lower latency."

How a distilled classifier works

Distillation here means using the expensive judge as a labeller rather than as the production model. You send a large, representative sample of real traffic through GPT-4o-mini once, keep its verdicts as training labels, and fine-tune a small encoder model to reproduce them. The encoder is a model of the BERT family that reads the whole message at once and outputs a score per category. It does not generate text, so a call is one forward pass.

The candidates are small. ModernBERT-base has 149 million parameters and ModernBERT-large 395 million, according to its model card, which also says it is Apache 2.0 licensed and trained primarily on English and code, "so performance may be lower for other languages." For multilingual traffic, Microsoft's mDeBERTa-v3-base was trained on the multilingual CC100 corpus and is MIT licensed. The TnT-LLM paper, from March 2024 work applied to Bing Copilot, describes the general pattern: the LLM produces labels so that "lightweight supervised classifiers can be reliably built, deployed, and served at scale."

The labelling cost is small next to the current bill. At the $0.0003 a message you already pay, labelling 100,000 messages costs about $30 and 300,000 about $90, or about $45 through the Batch API, where waiting is fine.

OpenAI's contract carves out this specific use. Its Services Agreement, version dated January 1, 2026, bars using Output "to develop artificial intelligence models that compete with OpenAI's products," except for a Permitted Exception that covers models "primarily intended to categorize, classify, or organize data (e.g., embeddings or classifiers), if these models are not distributed or made commercially available to third parties." An in-house moderation classifier fits that wording. Selling the classifier to others would not.

Why it is faster and cheaper to serve

The speed gap is a difference in kind. Hugging Face's case study of an optimised DistilBERT classifier on AWS C6i instances, published in January 2022, reported "down to 1-4ms latency for sequence lengths up to 64 tokens." On two physical cores at batch size one, it measured 97 requests a second at 64 tokens and 12 a second at 512 tokens with its optimised runtime, against 28 and 4 for plain Hugging Face Transformers. That runtime, Infinity, is no longer sold, so the plain-Transformers figures are the safer planning numbers until you have applied your own optimisation.

Thirty million messages a month is an average of 11.6 a second. Planning for ten times that at peak means about 116 a second. An AWS c6i.xlarge has exactly two physical cores and costs $0.17 an hour on demand in US East, or $122.40 for a 30-day month. At 64-token messages, two optimised instances cover the peak and a third gives a spare, for about $367 a month. At plain-Transformers speed it takes six, about $734. Message length is what moves this: at 512 tokens, plain Transformers would need 29 instances, about $3,550, which is where a GPU becomes worth pricing. An AWS g6.xlarge with one NVIDIA L4 lists at $0.8048 an hour, about $579 a month. How many messages a second a ModernBERT classifier sustains on that GPU has not been published.

Those benchmarks are for DistilBERT, not for the newer encoders, and none were run on moderation text. The closest moderation-specific latency figure comes from the June 2026 paper "Do Encoders Suffice?", which measured a 150-million-parameter Ettin encoder at a 15.7 ms median on V100 GPUs, against 917 ms for the 12-billion-parameter LlamaGuard 4.

What "the same accuracy" means

This is where the question needs care, because there are two different answers.

If accuracy means agreement with GPT-4o-mini, the student can at best approach its teacher, because the teacher's labels define correct. If accuracy means agreement with human moderators, a student can in principle beat its teacher. Both should be reported separately on the same human-labelled test set. A team that only measures agreement with the teacher will never learn whether the teacher was right.

The published evidence is encouraging but indirect. SLM-Mod, a NAACL 2025 paper on 150,000 comments from 15 Reddit communities, found fine-tuned models under 15 billion parameters beat zero-shot LLMs by 11.5% in accuracy and 25.7% in recall on average. Its small models are still LLMs, far larger than an encoder, and its baseline was not GPT-4o-mini. CoPE, a 9-billion-parameter model from Zentropi and Stanford published in December 2025, matched or beat GPT-4o's F1 in the categories it reports, for example 73 against 30 on harassment, but all its test sets except one hate-speech benchmark are internal.

The encoder paper is the closest match and the most sobering. Its Ettin encoders, trained on majority-vote labels from several LLM judges, reached an F1 of 0.547 (150M) on an out-of-distribution adversarial holdout, ahead of LlamaGuard 4 at 0.385 but behind the best LLM judge at 0.767. On the high-confidence subset, where the judges largely agreed, the 400M encoder reached about 0.90. The judges themselves agreed poorly overall, with a Fleiss' kappa of 0.232. The authors' own conclusion is that encoders work best as a cheap first-pass filter that escalates hard cases.

No published study has distilled GPT-4o-mini moderation labels into a BERT-class model and scored the result per category against human labels, on public sets such as Civil Comments or OpenAI's own 1,680-sample moderation evaluation set. Until someone does, the per-category F1 you can expect has not been measured.

Where students fail

The failure cases are predictable even where their size is not. Rare categories get few training examples, and overall accuracy hides them, so per-category precision and recall are the only numbers worth trusting. Sarcasm and messages that only make sense in a conversation are hard for a model that sees one message at a time; the encoder paper's 150M model missed half of harmful cases in its "decomposition" multi-turn attacks. English-trained encoders such as ModernBERT will be weaker on other languages, by their own card's admission. Deliberate misspellings meant to slip past a filter are another gap, and no published test measures how distilled encoders handle them.

The cost that most often surprises teams is policy change. With an LLM judge you edit a prompt. With a classifier you relabel, retrain and re-validate. The labels are cheap, but the labour, wall-clock time and number of new labels needed to add or redefine a category have not been measured in any public test. CoPE's design is a direct answer to this: it takes the policy text as an input at inference, so changing the policy needs no retraining, at the cost of being a 9B model on a GPU rather than an encoder on a CPU.

The free baseline, and its limit

OpenAI's moderation endpoint costs nothing, and its guide lists 13 fixed categories from harassment to violence/graphic, each with a score between 0 and 1. It is worth a test if your policy maps onto those categories. It cannot learn yours, and OpenAI warns that "custom policies that rely on category_scores may need recalibration over time" because it plans "to continuously upgrade the moderation endpoint's underlying model." Its guide does not address multilingual performance.

The cascade, and the deadline that forces it

A cascade combines the two. The classifier scores every message in milliseconds and acts on its confident decisions; the uncertain band goes to an LLM. The share escalated sets both the bill and the accuracy, and the threshold at which end-to-end accuracy matches the LLM-only baseline is specific to each policy and dataset. It has not been measured on public moderation data.

The LLM in that band needs replacing anyway. OpenAI's deprecations page gave notice on October 14, 2026 that GPT-4o-mini shuts down on January 14, 2027, and names gpt-6-luna as the replacement. Luna lists at $0.10 per million input tokens, $0.01 cached and $0.50 output. It defaults to medium reasoning effort, which would add output tokens to every verdict, so a judge should set effort to none. Its model page gives no latency figures. The deadline also limits the evaluation: GPT-4o-mini's own score on a human-labelled test set, the baseline any replacement has to match, can only be measured while it still answers.

Setup at 30M messages a month Monthly cost Assumptions
GPT-4o-mini judge, today $9,000 1,800 in, 50 out per call
GPT-6 Luna judge, policy cached $2,100 1,500 of 1,800 input tokens cached
Classifier only, CPU $367 to $734 64-token messages, 3 to 6 c6i.xlarge
Cascade, 10% to Luna about $577 3 c6i.xlarge plus $210 of Luna
Cascade, 20% to Luna about $787 3 c6i.xlarge plus $420 of Luna

These are list-price calculations, not measured bills. Engineering time and human labelling of a test set are not included.

A managed option

Parsec, a small language model lab, offers this loop as a managed service: its inference page describes tracing production requests, building datasets and evaluations the customer approves, training with SFT or LoRA, serving, and sending requests to a closed frontier model when the customer's model is not confident. Its routers page claims "savings on real workloads: 60%" and a first post-trained model "in about 4 weeks," without defining a workload or baseline. It publishes no price for the service, says models run on a shared cluster, does not mention VPC hosting for it, and its only code sample uses the Anthropic SDK.

Bottom line

If your policy fits OpenAI's 13 categories, test the free moderation endpoint first. If it doesn't and most decisions must be instant, build a cascade: label 100,000 to 300,000 real messages with GPT-4o-mini before January 14, have humans label a few thousand as a test set with the rare categories oversampled, fine-tune ModernBERT (or mDeBERTa for multilingual traffic), and escalate the uncertain band to a cached GPT-6 Luna prompt. If your policy changes weekly, either budget for retraining or keep an LLM judge, now on Luna at roughly a quarter of today's bill. In every case, judge the switch by per-category precision and recall against humans, not by agreement with the model you are replacing.

Sources

More in Models

All Models →