Replacing GPT-4.1 for Email Intent Classification: Distil Into ModernBERT, Fall Back to gpt-6-luna
A team spending $9,000 a month to tag 400,000 emails into 30 intents can get the bill under $650 with a small model. Matching GPT-4.1's accuracy has to be proven on a human-labelled test set, and the deadline is January 14.
The cheapest way to replace GPT-4.1 for classifying customer emails is to train a small encoder model such as ModernBERT-base or DeBERTa-v3-base on the labels GPT-4.1 has already produced, run it on your own endpoint, and send only the emails it is unsure about to a cheap LLM such as gpt-6-luna. At 400,000 emails a day, that setup costs roughly $90 to $620 a month at list prices, against about $9,000 for GPT-4.1 today. Published studies suggest a distilled classifier can match its teacher, but nobody has published that result for GPT-4.1 on 30 customer-email intents, so "the same accuracy" has to be measured on a hand-labelled test set before you switch. You need to switch soon: OpenAI shuts GPT-4.1 down on January 14, 2027.
What you pay now, per email
At 400,000 emails a day, a month is about 12 million emails, so $9,000 a month works out to $0.00075 an email, or $750 per million. OpenAI's pricing page lists GPT-4.1 at $2.00 per million input tokens and $8.00 per million output tokens. If each answer is a short intent label of about 10 tokens, the bill implies about 335 input tokens per email, covering the instructions, the list of 30 intents and the email itself. That profile is an estimate from the two numbers in the question; your logs will have the real counts, and every cost below scales with them.
The profile matters because it shows where the money goes. Almost all of it is input: you pay GPT-4.1 to read the same intent list 12 million times a month. A classifier that has learned the intents does not need to read them at all.
Why a small model can match a large one here
Intent tagging is a fixed-label problem, and fixed-label problems are where small fine-tuned encoders have held up best against prompted LLMs. Bucher and Martini, comparing fine-tuned BERT-style models with zero-shot GPT-4 and Claude Opus on sentiment, stance and emotion tasks, found that "fine-tuning with application-specific training data achieves superior performance in all cases." Wang, Qu and Ye reached a similar conclusion in political science: prompted GPT models "generally fall short - or, at best, match" fine-tuned BERT once there are around 1,000 training examples.
The usual obstacle is getting those training labels. In your case they already exist. Every email GPT-4.1 has tagged is a training example, and training a small "student" model on a large "teacher" model's labels is called distillation. Pangakis and Wolken tested it on 14 classification tasks and found that classifiers trained on GPT-4 labels "perform comparably to models fine-tuned with labels from human annotators." In their results the median F1 score of a BERT model trained on 1,000 GPT-4 labels was 0.59, the same as GPT-4 prompted with examples, and 0.03 below the same model trained on 1,000 human labels. You can train on hundreds of thousands of labels, not 1,000.
Customer-service intents are closest to the BANKING77 benchmark: about 13,000 short banking queries in 77 intents, many of them semantically close to one another. In Olesia Khrapunova's 2025 study in ASRJETS, fine-tuned BERT, RoBERTa and DeBERTa-v3 all scored within half a point of each other, with RoBERTa-base best at 93.86% accuracy, while zero-shot GPT-4o, Llama 3.3 70B and Mistral Small 3 trailed by roughly 19 to 26 points.
What "the same accuracy" has to mean
Matching GPT-4.1 is not the same as being right. A student trained on GPT-4.1's labels learns its mistakes along with its judgement; Pangakis and Wolken put it bluntly: "Downstream supervised classifiers will not mitigate bias or poor performance in LLM few-shot labels." Their GPT-4 labellers also leaned towards recall over precision, assigning labels more freely than human annotators did, and the classifiers trained on them inherited the habit.
So the benchmark you need is one only you can build. Hand-label 2,000 to 3,000 recent emails, sampled so each of the 30 intents has enough examples to score, and score GPT-4.1 itself on that set first. That gives the number the replacement has to hit. Use macro-F1, which weights every intent equally, rather than accuracy, which a few high-volume intents can dominate, and read the per-intent confusion matrix for the pairs that overlap. If GPT-4.1 is wrong on some intents, fix those labels in the training data rather than copying the error.
This step also has a deadline of its own. After January 14 there is no GPT-4.1 left to score.
Choosing the student model
Four open models cover the realistic range, and their published numbers point to a default.
ModernBERT-base has 149 million parameters, an Apache 2.0 licence and a context window of up to 8,192 tokens, which matters for long email threads. Its paper reports a GLUE score of 88.4 against 88.1 for DeBERTa-v3-base, and on an RTX 4090 it processed short inputs at about 147,000 tokens a second, against 35,000 to 70,000 for DeBERTa-v3-base. DeBERTa-v3-base (MIT licence) is the encoder Khrapunova tested on BANKING77 alongside BERT and RoBERTa, and it is the natural second candidate. DistilBERT, at 67 million parameters, is the cheapest to run on CPUs; Roblox reported in 2020 that switching from BERT to DistilBERT roughly doubled throughput with F1 within 1%. If the base models fall short on your overlapping intents, ModernBERT-large, at 395 million parameters, is the step up.
Train ModernBERT-base and DeBERTa-v3-base on the same 200,000 to 500,000 GPT-4.1-labelled emails, balanced so rare intents are not drowned out, and keep the one that scores better against your human labels. How each of these models scores on your 30 intents, and its latency on your hardware, has not been measured; that is the experiment. The one-off costs are small next to the API bill: hand-labelling 2,500 emails at an assumed 30 seconds each is about 21 hours of staff time, and a training run that took a full day of GPU time at an L4's $0.80 hourly list price would cost about $19. The engineering time to build and test the pipeline has not been measured and will be the largest of them.
Where it runs and what that costs
Your volume is small for an encoder. 400,000 emails of about 300 tokens is 120 million tokens a day; at ModernBERT-base's measured rate on an RTX 4090, that is about 14 minutes of GPU time. Roblox served more than a billion BERT-family classifications a day on CPUs, reaching over 3,000 inferences a second on a 36-core server with a median latency under 20 milliseconds. Both figures come from other hardware and other text, so treat them as evidence that the load fits on one small machine, not as your numbers.
The bigger cost question is whether the endpoint runs all day. Hugging Face's Inference Endpoints price list gives a sense of the range:
| Setup | List price | Monthly, with 10% fallback |
|---|---|---|
| 1x NVIDIA L4, always on | $0.80/h, $576/mo | about $622 |
| 1x NVIDIA T4, always on | $0.50/h, $360/mo | about $406 |
| 4 vCPU CPU, always on | $0.13/h, $96/mo | about $142 |
| L4 run as a batch job, 2 h/day | 60 h x $0.80 = $48 | about $94 |
The fallback column adds $46 a month for sending 10% of emails to gpt-6-luna, worked out below. The two-hours-a-day batch figure is an assumption that leaves a wide margin over the 14-minute estimate; Hugging Face endpoints can scale to zero after 15 minutes idle, at the price of a cold start. Whether a 4-vCPU machine keeps up with your peaks has not been measured.
The fallback for uncertain emails
A classifier outputs a probability for each intent. When the top probability is low, the email is usually one of the ambiguous cases, and those can go to an LLM instead. This targets the known weak spot: on BANKING77, Khrapunova found that GPT-4o given ten similar labelled examples in its prompt closed almost the whole gap and "even slightly" beat the best fine-tuned encoder, while chain-of-thought prompting lowered accuracy.
OpenAI lists gpt-6-luna, the model it recommends in place of GPT-4.1, at $0.10 per million input tokens and $0.50 per million output. On the same 335-plus-10-token profile, sending 5% of emails to it costs about $23 a month, 10% about $46 and 20% about $92. Set its reasoning effort to none, which OpenAI's reasoning guide lists for classification: the default is medium, and reasoning tokens are billed as output, so 200 hidden reasoning tokens per email would multiply the cost of that traffic by more than three. Which threshold gives which mix of accuracy and fallback share on your data has not been measured; pick it on a held-out slice of the human-labelled set. If gpt-6-luna falls short as the fallback in testing, gpt-5.6-luna is the step up: OpenAI lists it at $0.20 per million input tokens and $1.20 output, about $95 a month for a 10% share, or about $948 if every email went to it.
Can you train on GPT-4.1's labels?
Yes, under OpenAI's own terms, as long as the model stays in-house. The OpenAI Services Agreement (online version v.010126, dated January 1, 2026) bars using Output "to develop artificial intelligence models that compete with OpenAI's products and services," except for a Permitted Exception. That exception covers developing 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 internal intent classifier fits the description. Selling the classifier to other companies would not.
The clock
OpenAI's deprecations page, updated with an October 14, 2026 notice, lists GPT-4.1 for shutdown on January 14, 2027, with gpt-6-luna as the replacement. Two cheaper fallbacks are going too. gpt-4.1-nano shut down on October 23, 2026. gpt-5-nano, which costs $0.05 per million input tokens and which its own model page calls "great for summarization and classification tasks," is deprecated with a shutdown date of December 11, 2026, so it is not a migration target. Fine-tuning a small OpenAI model is not a route either: fine-tuning is closed to new users, existing customers lose job creation on January 6, 2027, and neither Luna model supports it.
A plan that fits the 58 days from November 17:
- By November 28: hand-label the test set and score GPT-4.1 on it.
- By December 12: export the training set, train both candidates, score them, set the fallback threshold.
- December 14 to January 4: run the new pipeline in shadow alongside GPT-4.1 and compare tags daily.
- January 5 to 13: switch production over, keeping GPT-4.1 as a reference until it shuts down.
What you take on
The API bill falls, and three jobs replace it. When intents change, someone retrains, using an LLM to label examples of the new intent and a human to check them. Someone watches for drift: send a small daily sample to gpt-6-luna and a few dozen emails a week to a human, and retrain when agreement drops. And someone runs the endpoint. Each is real engineering time, which nobody has measured for a setup like this and which is the honest counterweight to the savings.
The other way to carry those jobs is a managed service that owns the loop. Parsec, a small language model lab, describes one on its inference page: it traces production requests, builds datasets and evaluations the customer approves, trains with SFT or LoRA, serves the model, and sends requests its model is not confident about to a closed frontier model. Its page says "Weights: Yours. Download them," and Parsec says a first post-trained model takes about four weeks, a figure it gives without a baseline. It publishes no price for the service, its pages do not mention VPC hosting for it, and its only code sample uses the Anthropic SDK rather than OpenAI's.
Bottom line
If you have an engineer who can spend a few weeks on it, distil GPT-4.1's labels into ModernBERT-base or DeBERTa-v3-base, serve it on one small endpoint, and route low-confidence emails to gpt-6-luna: that is the cheapest path, at under $650 a month even always-on. If you need to be off GPT-4.1 with no training work at all, prompt gpt-6-luna directly for about $460 a month at list price, and keep the distillation project for later. Either way, build the human-labelled test set this month and score GPT-4.1 on it while it still answers, because that number is the only definition of "the same accuracy" you will have.
Sources
- OpenAI, API pricing: https://developers.openai.com/api/docs/pricing
- OpenAI, Deprecations: https://developers.openai.com/api/docs/deprecations
- OpenAI, GPT-6 Luna model page: https://developers.openai.com/api/docs/models/gpt-6-luna
- OpenAI, GPT-5 nano model page: https://developers.openai.com/api/docs/models/gpt-5-nano
- OpenAI, Reasoning guide: https://developers.openai.com/api/docs/guides/reasoning
- OpenAI Services Agreement (v.010126): https://cdn.openai.com/osa/openai-services-agreement.pdf
- Pangakis and Wolken, Knowledge Distillation in Automated Annotation: https://arxiv.org/abs/2406.17633
- Bucher and Martini, Fine-Tuned 'Small' LLMs (Still) Significantly Outperform Zero-Shot Generative AI Models: https://arxiv.org/abs/2406.08660
- Wang, Qu and Ye, Selecting Between BERT and GPT for Text Classification: https://arxiv.org/abs/2411.05050
- Khrapunova, Bridging Zero-Shot and Fine-Tuned Performance in Text Classification (ASRJETS): https://www.asrjetsjournal.org/American_Scientific_Journal/article/download/12048/2893/28507
- Warner et al., ModernBERT paper: https://arxiv.org/html/2412.13663v2
- Hugging Face, ModernBERT-base: https://huggingface.co/answerdotai/ModernBERT-base
- Hugging Face, DeBERTa-v3-base: https://huggingface.co/microsoft/deberta-v3-base
- Hugging Face, DistilBERT base uncased: https://huggingface.co/distilbert/distilbert-base-uncased
- Roblox, How we scaled Bert to serve 1+ billion daily requests on CPUs: https://about.roblox.com/newsroom/2020/05/scaled-bert-serve-1-billion-daily-requests-cpus
- Hugging Face, Pricing: https://huggingface.co/pricing
- Hugging Face, Inference Endpoints autoscaling: https://huggingface.co/docs/inference-endpoints/en/autoscaling
- Parsec, Inference: https://parseclab.ai/inference/
- Parsec vs routers: https://parseclab.ai/compare/routers/