概念
Inference Recommender and right-sizing
Let a load test pick the instance type, then trim idle capacity by sharing endpoints or going serverless.
このレッスンはまだ翻訳されていないため、英語で表示しています。
Unsure which instance fits
- Inference Recommender
Self-managed EC2 looks oversized
- Compute Optimizer
Many models, little traffic each
- Multi-model endpoint
Rare or spiky traffic
- Serverless endpoint
Steady traffic, tight latency
- Dedicated real-time endpoint
| Situation | Choice |
|---|---|
| Unsure which instance fits | Inference Recommender |
| Self-managed EC2 looks oversized | Compute Optimizer |
| Many models, little traffic each | Multi-model endpoint |
| Rare or spiky traffic | Serverless endpoint |
| Steady traffic, tight latency | Dedicated real-time endpoint |
概要
Amazon SageMaker Inference Recommender runs load tests for you. You give it a model registered in SageMaker Model Registry (a model package). A Default job tests a set of instance types and finishes within 45 minutes. An Advanced job is a custom load test: you choose the instances or a serverless endpoint, a traffic pattern, and your latency and throughput targets. It takes about 2 hours on average. You can run either one on its own. You pay only for the instances used while a job runs.
概要
Results list each configuration with its cost, throughput and latency, including cost per hour and cost per inference. Pick the cheapest configuration that still meets your latency goal at peak load. The job also suggests an initial instance count to use when you set up an autoscaling policy.
For EC2 that you run yourself, for example ML containers on EC2 or in a cluster, AWS Compute Optimizer reads CloudWatch utilization and labels an instance as over-provisioned, under-provisioned or optimized, and suggests another type. It does not test your model; it looks at observed use.
概要
Then consolidate. Many small models that each get little traffic waste money on separate endpoints. A multi-model endpoint hosts them on shared instances and loads models on demand. A serverless endpoint scales to zero and bills per use, which suits spiky or rare traffic and accepts cold starts. Keep a real-time endpoint on dedicated instances for steady traffic with tight latency.
覚えること
- Input: a model package in Model Registry.
- Default job: instance recommendations, within 45 minutes.
- Advanced job: your traffic pattern and targets, about 2 hours.
- Outputs: cost per hour, cost per inference, throughput, latency, and a starting instance count.
- Compute Optimizer: right-sizes EC2 from observed utilization.
覚えること
- Many idle models: multi-model endpoint. Rare traffic: serverless endpoint.
試験では
- “Find the instance type with the lowest cost per inference for this model” points to Inference Recommender.
- “Load test with our own traffic pattern and latency target” points to an Advanced job.
- “EC2 instances running ML containers look oversized” points to Compute Optimizer.
- “Hundreds of rarely used models” points to a multi-model endpoint.
混同しやすいもの
- Inference instance familiesMatch the family to the model: CPU for light models, GPU for deep nets and LLMs, Inferentia for compiled models.
- Auto scaling endpoints and choosing metricsApplication Auto Scaling for SageMaker AI endpoints: pick the metric that tracks load.
- Multi-model and multi-container endpoints, inference componentsHost many models on shared instances, and know which sharing option fits.
このタスクの内容 · 4.2
- Inference instance families
- Inference Recommender and right-sizing
- CloudWatch metrics and dashboards for ML
- Logs and tracing to troubleshoot ML systems
- Capacity, quotas and throttling
- Cost tools, tags and spending limits
- Purchasing options for ML infrastructure
- FM inference costs and token monitoring
- Reducing FM usage cost