Skip to content
mentoor

Topic 5 of 5 · 5 min read

When a small model beats a big one

Goal: Decide whether a task can run on a small or on-device model and design a test that proves it.

Use a small model when the task is narrow, the output is checkable and latency, cost or privacy matter more than broad skill; prove it with a test on your own data. Small models are not weaker versions of big ones for every job. For a fixed task they can match them.

Check yourself · 1 of 3

Which task is the best fit for a small model?

Choose one answer

Why it matters

A large model on every request costs more, answers more slowly and sends your data to a provider. For tasks such as tagging support tickets, extracting dates from emails or routing a request, a small model that runs in milliseconds, or on a phone with no network, can be the better product.

Where small models fit

  • Classification and routing: label a message as billing, bug or sales.
  • Extraction: pull fields into a fixed JSON shape.
  • Short rewriting or autocomplete with a clear style.
  • Offline and private work: on a laptop or phone, with text that must not leave the device.
  • High volume: millions of short items where per-call cost adds up.

They are weaker at long, open-ended reasoning, rare knowledge and following long, complicated instructions.

How to decide

  1. Write the task as input and expected output. If you can list expected outputs, you can test.
  2. Collect 100 real examples with the right answers. Include the awkward ones.
  3. Run a large model first. This gives a quality ceiling and may label more data.
  4. Run the small model on the same examples. Tools such as Ollama and llama.cpp run open-weight models locally; quantization shrinks them to fit memory with some quality loss.
  5. Compare accuracy, latency and cost per thousand items. Accept the small model only if accuracy stays above your bar.
  6. Add a fallback. Send low-confidence or failed cases to the large model.

Before and after

# Weak: big model for every ticket
label = big_model(f"Classify this ticket: {text}")

# Better: small model first, big model only when unsure
label, confidence = small_classifier(text)
if confidence < 0.80:
    label = big_model(f"Classify this ticket: {text}")

Pick the confidence cut-off from your test set, not by feel.

What goes wrong

  • Judging on a few easy examples. Small models fail on the long tail.
  • Skipping the fallback. Some inputs will fail; plan where they go.
  • Forgetting the device. Memory and battery limits decide what runs on a phone.

Examples

Ticket routing at volume

A support platform labels every incoming ticket as billing, bug or sales. A small classifier answers in milliseconds at a fraction of the cost. The 15 percent of tickets with low confidence go to a large model, and a weekly sample is checked by a person.

Notes that stay on the phone

A note-taking app summarises voice notes offline because users record private health information. A small on-device model handles short notes. Long notes are queued and shown with a warning that the quality is limited.

Key points

  • Small models suit narrow, checkable tasks such as classification, routing and extraction.
  • Privacy, offline use, low latency and high volume are the main reasons to run small or on device.
  • Test on 100 or more real labelled examples, including the awkward ones, against a large-model baseline.
  • Quantization shrinks a model to fit memory at some cost in quality, so test the quantized version you will ship.
  • Route low-confidence cases to a larger model instead of accepting every small-model answer.

Common mistakes

  • Choosing a small model from a benchmark without testing it on your data.
  • Testing only on easy, typical examples.
  • Skipping a fallback for low-confidence or failed cases.
  • Testing the full-precision model and shipping a quantized one.

Check yourself · 2 of 3

You want to replace a large model with a small one for extracting invoice fields. What is the right test?

Choose one answer

Check yourself · 3 of 3

A small classifier returns a label with low confidence. What does a sound pipeline do?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic