Book a free call

Small Language Model Best Practices for Real Products

Small language models work best when the task is narrow, the data is clean and the limits are known. These practices help you ship them safely.

Hertiv engineering teamReviewed by a senior engineer
6 min read
Small Language Model Best Practices for Real Products
On this page

Short answer

Small language model best practices are the habits that make compact models useful in products: pick a model sized to the task, fine-tune on clean examples, run it where the data lives, test it against a larger model, and know exactly what it should refuse to do.

What are small language model best practices?

Small language model best practices are the working habits that make compact models reliable in real products. They cover how you choose a model, how you adapt it to your task, how you run it, and how you test it before users depend on it.

A small language model is a language model with far fewer parameters than a large one, small enough to run on a single server, a laptop or even a phone. It cannot do everything a large model can, but for a narrow task with clear inputs and outputs, it is often fast, cheap and private enough to win.

The practices matter because a small model fails quietly. It will answer confidently even when it is guessing, so you need tests, limits and a fallback plan before you ship. The explainer what is a small language model covers the basics.

How do you pick the right small model?

Pick the model by testing candidates on your task, not by comparing parameter counts. A 3-billion-parameter model tuned for your domain can beat a 7-billion-parameter general model on your data, and a smaller model that fits your hardware beats a larger one you cannot run.

What to checkWhy it mattersWhat good looks like
Task fitModels differ by strengthStrong on your task type
Size and speedMust run where you need itFits memory, answers in time
LicenceSome models limit commercial useLicence allows your product
Context lengthLong inputs need long contextHandles your longest input
LanguageSome models favour one languageTested on your languages
Tool supportFine-tuning needs toolingWorks with your stack

Test three or four candidates on the same 100 examples from your task and compare the results by hand. Keep the test set fixed so later changes are measured fairly. The listicle top small language models names models that teams use in products today.

How do you fine-tune a small model?

Fine-tune a small model on clean examples of the exact task, not on a pile of loosely related text. A few hundred well-chosen examples usually teach more than thousands of noisy ones, because the model is small and learns the patterns in the data quickly.

Write the examples in the format the model will see in production: the same instructions, the same input shape and the same output style. If the production input includes a customer message and a short history, the training examples should look exactly like that.

Keep a held-out test set that the model never sees during training, and check the fine-tuned model against it. If accuracy on the test set stops improving while training accuracy keeps rising, the model is memorising the training data, so stop and use the earlier version. For the tuning itself, see LLM fine-tuning.

How do you run a small model on device?

Run a small model on device by first checking that the model fits the hardware with room to spare. A phone or a single server has limited memory, so pick a quantised version of the model that trades a little accuracy for a much smaller size, and test it on the actual device.

Measure speed on real inputs, not on a benchmark. A model that answers in half a second on a server can take several seconds on a phone, which is too slow for a live chat. If the first answer is too slow, try a smaller model, a shorter context or a simpler prompt before you buy more hardware.

Plan for updates. Models on devices cannot be patched from the server in the same way, so version the model, ship updates with your app release, and keep a fallback that calls a server model when the device model is unsure or out of date.

How do you test a small model before you ship?

Test a small model by comparing it with a larger model on the same task, using the same test set. The gap between them tells you what the small model costs you, and it tells you which cases need a fallback to the larger model.

Test the cases that break small models first: long inputs, ambiguous requests, rare terms and multi-step reasoning. A small model will handle the easy cases well, so spend your testing time on the hard ones where it is most likely to fail quietly.

Test with real users before launch, not just with your team. Give a small group the product and watch where they rephrase, retry or give up, because those are the places the model is failing. Fix the worst failures first, and keep the test set growing with each new failure you find.

What should a small model refuse to do?

A small model should refuse tasks outside its job, and it should say so clearly instead of guessing. Write down the limits before you ship: which questions it answers, which it passes to a person, and which it must never attempt, such as medical advice or legal decisions.

Build the refusal into the product, not just into the prompt. A prompt can be bypassed or forgotten, so add checks in your code that route risky requests to a human or a larger model. Log every refusal so you can see whether the limits are set right.

Review the refusals regularly. If users keep asking for something the model refuses, that is either a missing feature or a sign the limits are too tight. Adjust the limits deliberately, with a test each time, rather than loosening them quietly. For safety design, see AI security.

Example (hypothetical): a support-ticket router

Example (hypothetical): a software company receives 1,000 support tickets a day and wants a small model to route each ticket to the right team. The teams are billing, technical and account, and each ticket has a short subject and a message.

The team fine-tunes a small model on 800 labelled tickets and tests it on 200 held-out tickets. It routes 170 of the 200 correctly, which is 85 percent accuracy. In production, that means about 850 of 1,000 tickets go to the right team on the first try, and about 150 need a human to re-route them.

Re-routing 150 tickets at 3 minutes each takes 450 minutes, or 7 hours and 30 minutes, of human time a day, which is far less than routing all 1,000 by hand. The team also routes any ticket the model is unsure about to a human first, and it adds each corrected ticket to the next training set, so accuracy improves with each release.

What are the common mistakes with small language models?

The most common small language model mistakes are picking the model by size alone, training on noisy data, and shipping without a fallback. Each one shows up as confident wrong answers that users notice before your team does.

  • Choosing by parameter count. A larger model is not always better on your task, so test candidates on your own examples.
  • Training on messy data. A small model learns the noise as well as the signal, so clean the examples first.
  • No held-out test set. Without one, you cannot tell whether the model learned or just memorised.
  • No fallback plan. When the small model is unsure, it needs a larger model or a human to hand off to.
  • No stated limits. A model without clear refusals will attempt tasks it cannot do well.

Key takeaways

  • Test candidates on your own task, not on benchmarks
  • Fine-tune on clean examples in production format
  • Keep a held-out test set and a fallback to a larger model
  • Write down what the model must refuse, and enforce it in code
  • Measure speed on the real device, not on a server

Frequently asked questions

When should I use a small model instead of a large one?

Use a small model when the task is narrow, the inputs are predictable and you need speed, low cost or on-device privacy. Routing tickets, classifying messages and extracting fields are good fits. Use a large model when the task needs broad knowledge or multi-step reasoning.

How many examples do I need to fine-tune?

A few hundred clean examples often work for a narrow task, because a small model learns the pattern quickly. Start with 200 to 500 examples in production format, test on a held-out set, and add more only where the model still fails. Quality matters more than count.

Can a small model run on a phone?

Yes, if you pick a quantised model that fits the phone memory and test it on the actual device. Speed varies a lot by device, so measure on the slowest phone you support. Keep a server fallback for cases the device model cannot handle.

How do I know if the model is guessing?

Small models rarely admit uncertainty, so you have to check. Compare its answers with a larger model on a test set, log cases where it disagrees, and route low-confidence cases to a human. If the model gives different answers to the same question, treat that as a warning.

What is quantisation?

Quantisation shrinks a model by storing its weights with fewer bits, so it uses less memory and runs faster. It costs a little accuracy, so test the quantised model on your task before you ship it. Most teams find the trade-off is worth it for on-device use.

Should I build my own small model from scratch?

Almost never. Start from a well-known open model and fine-tune it for your task, which is far cheaper and faster. Building from scratch needs huge amounts of data and compute, and it rarely beats fine-tuning an existing model for a narrow product task.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Shipping a product on a small model? Talk to Hertiv.

A senior engineer replies within one business day. Or see our LLM Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to contact@hertiv.com.

Prefer email? Write to contact@hertiv.com
Estimate costBook a call