သဘောတရား · AIF-C01 အပေါ် ဆက်လေ့လာရန်
FM performance, latency and cost trade-offs
Pull the levers that cut delay or cost: smaller models, caching, routing, streaming, short outputs, batch and capacity.
ဒီသင်ခန်းစာကို မြန်မာဘာသာ မပြန်ရသေးလို့ အင်္ဂလိပ်လို ပြထားပါတယ်။
AI Practitioner မှ သင်သိပြီးသားများ
- On demand: pay per token. Provisioned throughput: an hourly price for reserved capacity. Batch: about half price for jobs that can wait.
- Larger models, lower latency and more Regions cost more.
- Prompt caching reads a repeated prompt start at a lower price.
Smaller model
- Helps
- Cost and latency
- Catch
- May lose quality
Streaming
- Helps
- Perceived latency
- Catch
- Same total time
Latency-optimized
- Helps
- Latency
- Catch
- Few models and Regions
Prompt caching
- Helps
- Cost and latency
- Catch
- Needs a repeated prefix
Prompt routing
- Helps
- Cost
- Catch
- One family, English tuned
Short outputs
- Helps
- Cost and latency
- Catch
- Less detail
Batch inference
- Helps
- Cost
- Catch
- Results come later
| Lever | Helps | Catch |
|---|---|---|
| Smaller model | Cost and latency | May lose quality |
| Streaming | Perceived latency | Same total time |
| Latency-optimized | Latency | Few models and Regions |
| Prompt caching | Cost and latency | Needs a repeated prefix |
| Prompt routing | Cost | One family, English tuned |
| Short outputs | Cost and latency | Less detail |
| Batch inference | Cost | Results come later |
1 / 3
Smaller model
- Helps
- Cost and latency
- Catch
- May lose quality
Streaming
- Helps
- Perceived latency
- Catch
- Same total time
Latency-optimized
- Helps
- Latency
- Catch
- Few models and Regions
| Lever | Helps | Catch |
|---|---|---|
| Smaller model | Cost and latency | May lose quality |
| Streaming | Perceived latency | Same total time |
| Latency-optimized | Latency | Few models and Regions |
2 / 3
Prompt caching
- Helps
- Cost and latency
- Catch
- Needs a repeated prefix
Prompt routing
- Helps
- Cost
- Catch
- One family, English tuned
Short outputs
- Helps
- Cost and latency
- Catch
- Less detail
| Lever | Helps | Catch |
|---|---|---|
| Prompt caching | Cost and latency | Needs a repeated prefix |
| Prompt routing | Cost | One family, English tuned |
| Short outputs | Cost and latency | Less detail |
3 / 3
Batch inference
- Helps
- Cost
- Catch
- Results come later
| Lever | Helps | Catch |
|---|---|---|
| Batch inference | Cost | Results come later |
ဘာလဲ
Model size is the first lever. A small model is faster and cheaper per token. A large one is more accurate on hard tasks. Test the small one first, and send only hard requests to the large one.
Streaming returns tokens as they are made, so users see text sooner, though total time is the same. Latency-optimized inference (performanceConfig latency set to optimized) serves requests faster on a short list of models and Regions; the documentation calls it a preview feature. Shorter outputs finish sooner and cost less, because output tokens are billed and usually cost more than input tokens. Set a maximum output length and ask for concise answers.
ဘာလဲ
Prompt caching stores the repeated start of a prompt, such as long instructions or a document, so later calls read it at a lower price and answer sooner. The cache lasts 5 minutes after the last hit. Some models also let you choose 1 hour, which suits prompts reused less often than every 5 minutes. Each hit resets the timer, and each model has a minimum prompt length. Caching works with on-demand calls, not batch.
Intelligent prompt routing gives one endpoint that sends each request to a smaller or larger model of the same family, based on predicted quality; default routers use selected Amazon Nova and Meta Llama models, tuned for English prompts.
ဘာလဲ
Batch inference runs offline work at a lower price. On-demand fits uneven traffic. Provisioned throughput fits steady, high traffic and gives dependable speed.
မှတ်ထားရန်
- Streaming shows text sooner. It does not cut total cost.
- Prompt caching cuts input cost and delay for a repeated prompt start; it needs a minimum prefix length.
- Batch for work that can wait. Provisioned throughput for steady, high traffic.
စာမေးပွဲမှာ
- “The same 20-page document is sent with every question” points to prompt caching.
- “Show the answer as it is written to shorten the perceived wait” points to streaming.
- “Send easy questions to a cheap model and hard ones to a strong model automatically” points to intelligent prompt routing.
- “Nightly summaries of a million records, no one waiting” points to batch inference.
ဒီ task ထဲမှာ · 2.1
- Choosing a foundation model in Bedrock
- Custom, managed, pre-trained or foundation model
- Selecting ML models and algorithms
JumpStart and AutoML
- Fine-tuning strategies for foundation models
- RAG architecture patterns
- Training time, cost and performance trade-offs
- FM performance, latency and cost trade-offs
Textract
Rekognition
Comprehend
Transcribe
Translate, Polly, Lex
Personalize and health AI