ladderlore
  • Type a service name, like S3 or IAM.

Concept

Multi-model and multi-container endpoints, inference components

Host many models on shared instances, and know which sharing option fits.

Application
Multi-model endpoint
Models in S3
Models in memory
  1. 1The request names the model in TargetModel.
  2. 2On the first call, the instance downloads that model from S3. This is the cold start.
  3. 3The model stays in memory for later calls. Unused models are unloaded when memory is needed.
A multi-model endpoint loads a model when it is first called.

Step by step

  1. 1The request names the model in TargetModel.
  2. 2On the first call, the instance downloads that model from S3. This is the cold start.
  3. 3The model stays in memory for later calls. Unused models are unloaded when memory is needed.
  • Multi-model endpoint

    What it hosts
    Many models of one framework, loaded from S3 on demand
    Pick it when
    Thousands of models, most used rarely
  • Multi-container, direct

    What it hosts
    Different containers, you name the one to call
    Pick it when
    A few unlike models that share instances
  • Serial inference pipeline

    What it hosts
    2 to 15 containers in a row
    Pick it when
    Preprocess, predict and post-process in one call
  • Inference components

    What it hosts
    Each model with its own copies and resources
    Pick it when
    Several large models scaled one by one
Four ways to share an endpoint.

1 / 2

  • Multi-model endpoint

    What it hosts
    Many models of one framework, loaded from S3 on demand
    Pick it when
    Thousands of models, most used rarely
  • Multi-container, direct

    What it hosts
    Different containers, you name the one to call
    Pick it when
    A few unlike models that share instances

2 / 2

  • Serial inference pipeline

    What it hosts
    2 to 15 containers in a row
    Pick it when
    Preprocess, predict and post-process in one call
  • Inference components

    What it hosts
    Each model with its own copies and resources
    Pick it when
    Several large models scaled one by one
Four ways to share an endpoint.

What it is

A multi-model endpoint (MME) serves many models of the same framework from one container. The artifacts sit under an S3 prefix. The caller names the model in the TargetModel parameter. On the first call the instance downloads that model and loads it into memory, which is a cold start. Later calls are fast. When memory runs low, SageMaker AI unloads models that are not in use. MME suits thousands of models that are each used rarely, such as one model per customer. It saves cost, and it accepts occasional slow first calls.

What it is

A multi-container endpoint puts several different containers on one endpoint. With direct invocation you name the container to call (TargetContainerHostname), so unlike models share instances. As a serial inference pipeline, two to fifteen containers run in a row and each passes its output to the next, for example preprocessing, prediction and post-processing in one call.

What it is

Inference components give each model its own share of an endpoint. For each component you set the number of copies and the resources one copy needs, such as accelerators and memory. Each model then scales on its own, and an endpoint that hosts inference components can scale to zero instances. Use them for several large models, such as LLMs, that need dedicated GPUs.

Remember

  • MME: one container, many models of one framework, loaded from S3 on first call.
  • MME trades cost for cold starts. Models with high traffic belong on their own endpoint.
  • Multi-container direct: different containers, you pick one per call with TargetContainerHostname.
  • Serial pipeline: 2 to 15 containers in a row, output feeds the next.

Remember

  • Inference components: per-model copies and resources, scaled one by one.

On the exam

  • “Thousands of similar models, each rarely used” points to a multi-model endpoint.
  • “Preprocess, predict and post-process in a single request” points to a serial inference pipeline.
  • “Several LLMs on one endpoint, each scaled on its own” points to inference components.