概念 · AIF-C01 の発展
Inference instance families
Match the family to the model: CPU for light models, GPU for deep nets and LLMs, Inferentia for compiled models.
このレッスンはまだ翻訳されていないため、英語で表示しています。
AI Practitionerで学んだこと
- AWS Inferentia is built for low-cost inference and Trainium for training.
- Both chips are programmed with the AWS Neuron SDK.
- GPU instances are the general choice with the widest software support.
XGBoost, linear, small nets
- Family
- C or M
- Why
- No accelerator needed
Large embedding tables
- Family
- R
- Why
- Data must sit in memory
Vision and mid-size LLMs
- Family
- G
- Why
- GPU memory and speed
Very large LLMs
- Family
- P
- Why
- Largest GPUs
Supported models at low cost
- Family
- Inf or Trn
- Why
- Neuron-compiled
| Workload | Family | Why |
|---|---|---|
| XGBoost, linear, small nets | C or M | No accelerator needed |
| Large embedding tables | R | Data must sit in memory |
| Vision and mid-size LLMs | G | GPU memory and speed |
| Very large LLMs | P | Largest GPUs |
| Supported models at low cost | Inf or Trn | Neuron-compiled |
1 / 2
XGBoost, linear, small nets
- Family
- C or M
- Why
- No accelerator needed
Large embedding tables
- Family
- R
- Why
- Data must sit in memory
Vision and mid-size LLMs
- Family
- G
- Why
- GPU memory and speed
| Workload | Family | Why |
|---|---|---|
| XGBoost, linear, small nets | C or M | No accelerator needed |
| Large embedding tables | R | Data must sit in memory |
| Vision and mid-size LLMs | G | GPU memory and speed |
2 / 2
Very large LLMs
- Family
- P
- Why
- Largest GPUs
Supported models at low cost
- Family
- Inf or Trn
- Why
- Neuron-compiled
| Workload | Family | Why |
|---|---|---|
| Very large LLMs | P | Largest GPUs |
| Supported models at low cost | Inf or Trn | Neuron-compiled |
概要
SageMaker AI instance names start with ml. followed by a family letter. CPU families (C for compute-optimized, M for general purpose) fit tabular models such as XGBoost, small neural nets and pre- and post-processing. Memory-optimized families (R) suit workloads that hold large data in memory, for example big embedding tables or in-memory indexes. AWS Graviton (Arm) instances lower the cost of CPU inference when your container is built for Arm.
概要
GPU families (G and P) serve deep nets and large language models. The model weights must fit in GPU memory: a model with 7 billion parameters in 16-bit numbers needs about 14 GB for the weights alone, plus room for the key-value cache and batches. A larger model needs a bigger GPU, several GPUs, or a smaller number format such as 8-bit. P families are the largest and costliest; G families fit most mid-size models.
概要
AWS Inferentia (Inf families) and Trainium (Trn) run models compiled with the AWS Neuron SDK. They can lower cost per inference for supported models, but the compile step and model support are the price. Pick by testing: choose the smallest family that meets the latency target at your peak load, then compare cost per inference. The next lesson shows the tool that tests this for you.
覚えること
- C and M: CPU, for tabular and light models.
- R: memory-optimized, for large in-memory data.
- G and P: NVIDIA GPUs for deep nets and LLMs. Weights must fit in GPU memory.
- Inf and Trn: compile the model with the Neuron SDK first.
- Graviton: lower-cost CPU inference when the container is built for Arm.
覚えること
- Choose the smallest family that meets the latency target.
試験では
- “Gradient-boosted tree model, lowest cost” points to a CPU instance, not a GPU.
- “Large language model needs more memory than one GPU has” points to a larger GPU family or several GPUs.
- “Lower cost per inference, model supports Neuron” points to Inferentia.
- “Same model on cheaper CPUs, container can run on Arm” points to Graviton.
混同しやすいもの
- Inference Recommender and right-sizingLet a load test pick the instance type, then trim idle capacity by sharing endpoints or going serverless.
- Compute environments and deployment targetsPick where a model runs: SageMaker AI, Bedrock, Lambda, containers, EC2 or Batch.
- Hosting large models on SageMakerLarge model inference containers, tensor parallelism, quantization and memory sizing.
このタスクの内容 · 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