Small Models for Classification: When the Cheap Model Wins
A practical guide to deciding when a small model is good enough for classification, tagging, and routing—using a labeled eval set, cost per 1,000 calls, and a q
Build the evaluation set first
Before comparing models, you need a set of examples that looks like the traffic you will actually send. Pull a few hundred to a few thousand real inputs from logs or queues, then label them with the correct category. If you do not have labels, have a human annotate a sample; this is the ground truth you will measure against.
Make the set representative: include common cases, rare categories, near-duplicates, and deliberately ambiguous inputs. A set that only contains easy examples will make every model look good. Keep a held-out portion that you do not look at until the final decision, so you do not overfit your prompt to the eval set.
Define the metric before you run anything. For multi-class classification, overall accuracy is a start, but per-class precision and recall matter if some errors are more costly than others. For routing, you may care about the rate at which the model sends a request to the wrong downstream handler.
Accuracy vs cost per 1,000 calls
Run both the small model and the strong model on the same eval set with the same prompt and output schema. Record accuracy, per-class errors, and the number of tokens consumed per call. Token counts vary with input length and output format, so measure them rather than estimating.
To compute cost per 1,000 calls, multiply the average input and output tokens per call by the model's per-token price, then scale to 1,000. Use the live pricing page for the models you are considering; prices and model availability change, so do not rely on remembered numbers. The comparison that matters is not raw price per token but cost per correctly classified call, which accounts for both price and accuracy.
A small model that is slightly less accurate but much cheaper can still win if the errors are cheap to catch. A strong model that is marginally more accurate may not justify the cost if the task is simple and the volume is high. Plot accuracy against cost per 1,000 calls and look for the knee of the curve.
Handling the tail of hard cases
Most classification errors concentrate in a small set of ambiguous or unusual inputs. Instead of forcing one model to handle everything, design a two-stage pipeline: let the small model handle the bulk, and route low-confidence or out-of-distribution cases to a stronger model or a human reviewer.
You can get confidence signals from the model's output if you ask for a probability or a structured rationale, but treat these as heuristics, not calibrated probabilities. A simpler approach is to define rules for the tail: inputs that fail schema validation, contain certain keywords, or fall into a known ambiguous category get escalated.
The cost of the second pass must be included in your cost per 1,000 calls. If only a small fraction of traffic escalates, the blended cost can still be far below running the strong model on everything. Measure the escalation rate on your eval set and monitor it in production.
A rollout plan with a quality gate
- Shadow the small model in production: run it alongside the current model on live traffic, log both outputs, and compare them without affecting users.
- Set a quality gate: define the minimum accuracy or maximum error rate you will accept, measured on a fresh sample of shadow traffic.
- Canary a small percentage of traffic to the small model, with automatic fallback to the strong model if the output fails validation or confidence checks.
- Monitor per-class error rates and escalation rates weekly; if the small model drifts or a new category appears, retrain or adjust the prompt.
- Keep the strong model available as a fallback and for re-labeling hard cases; do not delete the old pipeline until the small model has passed the gate for a sustained period.
Failure modes to watch for
- Eval set leakage: tuning the prompt on the same examples you use to report accuracy inflates results.
- Class imbalance: a model that predicts the majority class can look accurate while failing on rare categories.
- Schema drift: small models may be more likely to produce malformed JSON or extra text; validate outputs strictly.
- Prompt sensitivity: small models can be more sensitive to phrasing; test multiple prompt variants.
- Silent degradation: without monitoring, a model update or data shift can quietly increase errors.
How to apply this with Admesh
Admesh gives you one API key and one balance across multiple model families, so you can compare a small model and a strong model on the same eval set without managing separate accounts. Use the OpenAI-compatible base URL https://api.admesh.ai/v1 for chat completions, or the Anthropic-compatible endpoint https://api.admesh.ai/v1/messages if you prefer that format.
Start by checking the live model catalog at https://admesh.ai/models and the pricing at https://admesh.ai/pricing to pick candidates. Because billing is unified, you can run the same evaluation script against different model names and see the cost impact in one place.
For the two-stage pipeline, route escalated cases to a stronger model through the same Admesh key. Log which model handled each request so you can compute blended cost per 1,000 calls. The console at https://console.admesh.ai shows usage and balance, and docs at https://docs.admesh.ai cover request formats.
FAQ
How many labeled examples do I need for a reliable comparison?
Can I use the small model for everything and skip the strong model?
How do I estimate cost per 1,000 calls without exact token counts?
What if the small model's accuracy is close but not equal to the strong model?
References
Call these models through one gateway
Admesh provides a unified OpenAI-compatible API: one Base URL and one key for Claude, GPT, DeepSeek and more. New accounts get trial credit that never expires.
