Logo
Section 1 / 4

AI 系统的成本优化策略

探索 AWS 中的关键架构策略,以优化生成式 AI 应用中的每 token 成本,并介绍实用技术,通过高效使用 token、智能模型选择、系统优化和智能缓存,在保持响应质量的同时降低基础模型(FM)成本。

导入

AI 系统的成本优化策略

探索 AWS 中的关键架构策略,以优化生成式 AI 应用中的每 token 成本,并介绍实用技术,通过高效使用 token、智能模型选择、系统优化和智能缓存,在保持响应质量的同时降低基础模型(FM)成本。

...
Token optimized request lifecycle
...
Model cascading and intelligent routing

Table

Amazon Bedrock Batch InferenceAmazon Bedrock Provisioned Throughput
Primary Use CaseBulk processing of large datasets where real-time response is not required.High-volume applications require predictable performance and consistent latency.
Performance GoalMaximizes throughput for large-scale GenAI workloads.Ensures guaranteed capacity and addresses specific throughput challenges.
TimingAsynchronous processing (ideal for periodic or scheduled tasks).Synchronous, real-time availability for on-demand application traffic.
Resource StrategyPart of a batch inference strategy to optimize resource utilization.Part of capacity planning to maximize resource utilization and throughput.
Cost OptimizationReduces costs by grouping requests for efficient background processing.Optimizes costs through capacity planning and resource allocation for high-traffic patterns.
Scaling MechanismManaged processing of queued records.Dedicated model units that provide a fixed amount of processing capacity.

Table

StrategyKey MechanismBest Use Case
Prompt CachingReuses the internal state of identical prompt prefixesMulti-turn chat, static RAG context
Semantic CachingUses embeddings to match similar query intentFrequently asked questions (FAQs)
Edge CachingGlobal distribution via CDN edge locationsPublic-facing apps with global traffic
Deterministic HashingNormalizes and hashes inputs for exact matchesExact repeat queries and dev iteration

AI 治理与合规

AI 系统的性能优化