Optimizing LLM inference on Amazon SageMaker AI with BentoML’s LLM- Optimizer
AWS•How-to••by Josh Longenecker and Mohammad Tahsin•AWS Artificial Intelligence Blog
In this post, we demonstrate how to optimize large language model (LLM) inference on Amazon SageMaker AI using BentoML’s LLM-Optimizer to systematically identify the best serving configurations for your workload.
A walkthrough that uses BentoML's LLM-Optimizer to benchmark vLLM serving settings for Qwen3-4B, then deploys the chosen settings on a SageMaker AI endpoint via an LMI container.
Who it is for
Teams self-hosting open models on SageMaker AI that need to tune tensor parallelism, batch size and concurrency against latency and throughput targets.
Key points
Example uses an ml.g6.12xlarge (4x NVIDIA L4) with Qwen/Qwen3-4B and targets 10 RPS in the constraints section, while the benchmark examples use 5 RPS and 60 s latency.
Best throughput config reported: tensor parallel 4, max batched tokens 8192, concurrency 128, 7.51 req/s, p99 latency 61.4 s.
Lower-latency config reported: tensor parallel 4, max batched tokens 4096, concurrency 32, p99 under 24 s, 5.63 req/s.
LMI v16 container (vLLM v0.10.2, V1 engine) is used; the post's own code and text contain inconsistencies in the constraints and results.
AI:Both benchmark LLM serving performance on a cloud platform to pick settings, using Google TPUs in the item and an AWS SageMaker route with BentoML in C15.
Related posts
AWS•How-to••by Jyothirmai Kottu, Dmitry Soldatkin, Daniel Quang and Daniel Wirjo•AWS Artificial Intelligence Blog
AI:SageMaker AI can serve GGUF models via the AWS Deep Learning Container for llama.cpp, and a SemIf adapter returns option probabilities from final-position logits without generating tokens.
AI:SageMaker AI's CreateAIBenchmarkJob API runs automated concurrency sweeps on a generative AI endpoint, showing where throughput plateaus and latency rises, and can search for the highest concurrency that meets latency SLAs.
AWS•How-to••by Xuan Lu, Kirupa Gunaseelan, Nicolas Jourdan, Swapnil Palod, Piyush Daftary, Richa Shalom Gadagotti and Vinay Arora•AWS Artificial Intelligence Blog
AI:HyperPod now supports disaggregated prefill and decode (DPD) for LLM inference, running prefill and decode on separate GPU pools linked by EFA RDMA, with vLLM and LMCache, per the post.