AI Cloud Architect

Optimizing LLM inference on Amazon SageMaker AI with BentoML’s LLM- Optimizer

AWSHow-to by Josh Longenecker and Mohammad TahsinAWS 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.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

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.

The same at other vendors