Lesson 4 of 4 Foundation Model Deployment Strategies

Right-Sizing Models for the Task

This lesson explains how to right-size models, since smaller models are faster, cheaper and often good enough for focused tasks, and introduces model cascading.

Learning outcomes

After completing this lesson, you will be able to:

  • Match model size to task complexity.
  • Use smaller pre-trained and distilled models.
  • Escalate requests with API-based model cascading.

Matching model size to task complexity

Tasks differ widely in difficulty. Classification, routing, extraction of clearly labelled fields, short summaries and reformatting are handled well by small models. Multi-step reasoning, complex instructions, long-document synthesis and agent planning benefit from larger models. A deployment that uses one large model for every step pays large-model prices and latency for easy work.

Decomposing a workflow reveals which steps need which capability. In a support workflow, a small model can classify intent and extract the order number, a mid-sized model can draft the reply from retrieved policy, and a large model is used only for complex complaints. Each choice is validated with the evaluation set for that step.

The following diagram shows a model size chosen for each step of a support workflow.

Right-sizing each step of a support workflow. A small model classifies intent and extracts the order number, a mid-sized model drafts the reply from retrieved policy, and a large model is used only for complex complaints. Each step is validated with its own evaluation set.
Most tickets never reach the large model.
Sort into groups

Small model or large model?

Exam skills 2.2.3 · 4.1.2

Decide whether each task is a candidate for a small model or needs a large one.

Log in to try this activity Interactive activities are free with an account.

Smaller pre-trained and distilled models

The largest models are rarely necessary for every task. Smaller pre-trained models in the same family, such as the Micro or Lite tiers of a model family, often keep most of the quality on narrow, well-defined tasks such as classification, extraction or short summaries, while responding faster and costing a fraction as much per token.

Some tasks are better served by task-specific models than by any general model. An embedding model measures similarity between texts, and a reranker orders retrieved passages by relevance; both are far cheaper and faster than asking a general model to perform the same work through a prompt. When a small model is not good enough on its own, distillation trains it on the outputs of a large model for one task, transferring much of the large model's skill on that task, and Amazon Bedrock Model Distillation automates this. Fine-tuning a small model on high-quality examples can similarly match a much larger general model on a narrow task. In each case, evaluation on the task's own dataset confirms whether the smaller model meets the quality bar.

API-based model cascading

Model cascading sends a request to a small model first and escalates to a larger model only if needed: when the small model indicates low confidence, when its output fails a validation check, or when a classifier marks the request as complex. Exposed behind one API, the cascade is invisible to clients, and most routine queries are answered cheaply. Amazon Bedrock Intelligent Prompt Routing offers a managed variant within a model family. The module "Model Routing and Cascading" describes routing designs in detail. The following table compares the right-sizing techniques.

TechniqueHow it savesWatch out for
Smaller model per stepLower price and latency for easy stepsValidate each step's quality
Task-specific modelsEmbeddings and rerankers replace general promptsIntegration of several models
Distilled modelLarge-model quality on one task, small-model costTraining data and maintenance
CascadingLarge model only for hard requestsEscalation logic and added latency on escalation

The following diagram shows a validation-based model cascade for email triage.

A validation-based cascade for email triage. The small model classifies each email and extracts the customer ID; output that passes validation, with a category other than other, is returned. Output that fails validation or is classed as other escalates to the large model, so overall accuracy stays at 97% while cost drops sharply.
The percentages come from the scenario above.
Select all that apply

When to escalate

Exam skills 2.2.3 · 4.1.2

In a cascade, a small model answers first. Choose the signals that should escalate a request to the larger model.

Log in to try this activity Interactive activities are free with an account.
Worked example

Cutting cost without losing quality

An email triage system sends every email to a large model to classify it into 12 categories and extract a customer ID. Costs are high, and accuracy is 97%.

Evaluation shows a small model reaches 96% on the same set and returns valid output 99.5% of the time. The right-sized design uses the small model and cascades to the large model only when the small model's output fails validation or its category is "other". Cost drops sharply while overall accuracy stays at 97%.

Check yourself

Is a general-purpose prompt the cheapest way to find similar documents?

Show answer

No. An embedding model is much cheaper and better suited to similarity; rerankers and classifiers are likewise cheaper for their own tasks.

Exam Tips

Remember for the exam

  • Use the smallest model that meets each step's quality bar.
  • Embeddings, rerankers and classifiers are cheaper than general prompts for their tasks.
  • Cascade: small model first, escalate on low confidence or failed validation.