Lesson 4 of 4 Deploying Foundation Models

Scaling GPU Inference Workloads

This lesson explains how to scale expensive, sometimes scarce GPU workloads with metrics that reflect real load and strategies for idle periods and capacity limits.

Learning outcomes

After completing this lesson, you will be able to:

  • Choose scaling metrics for LLM endpoints.
  • Scale to zero while keeping warm capacity where needed.
  • Plan GPU capacity and quotas.

Choosing scaling metrics

Scaling large language model endpoints needs different metrics from traditional models. Invocation counts are a poor signal, because one request may generate ten tokens and another two thousand, so the same number of requests can represent very different load. Better metrics are ConcurrentRequestsPerModel, which is available at high resolution for faster reaction, GPU utilisation and GPU memory utilisation.

Target tracking on concurrency keeps request queues short. Step scaling handles rapid bursts with larger, faster additions of capacity. Scheduled scaling prepares capacity before known peaks, which matters because large models take minutes to load on new instances.

Scaling to zero and warm capacity

Inference components can scale to zero copies when a model is idle, and with managed instance scaling and a minimum instance count of zero, the endpoint releases its instances too, so idle models cost nothing. The first request after an idle period triggers scale-out, which takes minutes for large models while instances start and weights load.

Scaling to zero therefore suits development, internal tools and batch-like workloads rather than latency-critical applications. Container caching and model weight streaming shorten start-up time, reducing the delay when capacity is added.

The following diagram compares the scaling of a large language model endpoint before and after changes to its scaling metric and schedule.

Rescaling the LLM endpoint. Invocation counts hide load, because one request may generate ten tokens and another two thousand, so scaling started late and four GPU instances idled at night. Scaling an inference component on high-resolution ConcurrentRequestsPerModel, pre-warming before the morning peak and letting the internal-testing model scale to zero fixes both.
The scenario is illustrative.
True or false

Zero and warm capacity

Exam skills 3.2.10

Check how GPU endpoints scale to zero and keep warm capacity.

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

Capacity planning

GPU capacity is often limited, so planning matters. Service quotas for GPU instance types, per endpoint and per account, should be checked and increases requested well before a launch. For training, SageMaker training plans reserve accelerated capacity for a future window, and HyperPod clusters keep capacity for long jobs.

Model choices also affect capacity: smaller or quantised models fit more copies on each GPU, and AWS Inferentia2 instances or smaller GPU types may be available when the largest ones are not. The following table summarises the techniques.

NeedTechnique
Scale LLM endpoint on real loadConcurrentRequestsPerModel (high resolution) or GPU utilisation
No cost when idleInference components scaled to zero
Known daily peakScheduled scaling
Guaranteed capacity for a training windowSageMaker training plans
More throughput per GPUQuantization, continuous batching, smaller models
Fill in the value

Plan the copies

Exam skills 3.2.10 · 4.2.4

Work out how many model copies are needed for a peak.

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

A lagging LLM endpoint

An LLM endpoint scales on SageMakerVariantInvocationsPerInstance. During bursts, latency spikes for several minutes before new instances arrive, and at night four GPU instances sit idle.

  • Move the model to an inference component and scale on high-resolution ConcurrentRequestsPerModel with a target of 4.
  • Add scheduled scaling that pre-warms capacity 15 minutes before the morning peak.
  • Allow the internal-testing model on the same endpoint to scale to zero at night.

Concurrency reflects long generations that invocation counts hide, so scaling starts earlier. The production model keeps a minimum of one copy, because a multi-minute cold start would violate its latency target.

Check yourself

Which metric should LLM endpoints scale on?

Show answer

Concurrency or GPU utilisation, such as the high-resolution ConcurrentRequestsPerModel, rather than invocation counts.

Exam Tips

Remember for the exam

  • Scale LLM endpoints on concurrency or GPU utilisation, not invocation counts.
  • High-resolution ConcurrentRequestsPerModel reacts fastest.
  • Idle models: inference components scaled to zero (cold start on first request).
  • Reserve GPU capacity for training windows: training plans.
  • Request GPU quota increases before launch.