Building, Training and Deploying Models with Amazon SageMaker AI
This lesson explains how Amazon SageMaker AI, the fully managed AWS service for the whole machine learning lifecycle, prepares data and builds, trains, tunes, deploys and monitors models, without managing servers.
Learning outcomes
After completing this lesson, you will be able to:
- Describe the SageMaker AI tools for building and training models, such as SageMaker Studio.
- Describe the hosting options that SageMaker AI provides.
- Distinguish SageMaker JumpStart, SageMaker Canvas and Autopilot.
- Choose between Amazon Bedrock and SageMaker AI.
Building and training
SageMaker AI provides tools for each step of building and training models. SageMaker Studio is a web-based development environment, with JupyterLab notebooks and a code editor, for exploring data and running experiments. Training jobs run your training code, or a built-in algorithm, on managed instances that start for the job and shut down afterwards, so you pay only while training runs. Managed Spot Training uses spare capacity to lower that cost further.
For very large models, distributed training splits a job across many GPUs, and SageMaker HyperPod provides resilient clusters for training and fine-tuning foundation models over long periods. Automatic Model Tuning runs many training jobs with different hyperparameter values and finds the best combination. The following table summarises the features.
| Feature | What it does |
|---|---|
| SageMaker Studio | Web IDE with JupyterLab and Code Editor for exploring data, experiments and models |
| Training jobs | Run your code or a built-in algorithm on managed instances that shut down afterwards |
| Managed Spot Training | Lowers training cost |
| Distributed training | Splits large jobs across GPUs |
| SageMaker HyperPod | Resilient clusters for training and fine-tuning very large foundation models |
| Automatic Model Tuning | Searches for good hyperparameters |
Training features
Hosting
SageMaker AI supports real-time, serverless, asynchronous and batch inference, with auto scaling, multi-model endpoints and deployment guardrails that shift traffic with blue/green or canary releases.
JumpStart, Canvas and Autopilot
Three SageMaker AI features reduce the effort needed to get a model, each for a different kind of user. SageMaker JumpStart, for data scientists, is a hub of pre-trained and open foundation models, such as Llama and Mistral, and solution templates; a model can be deployed or fine-tuned in a few clicks and runs in your own account. SageMaker Canvas, for business analysts, is a no-code interface to prepare data, build models such as sales forecasts, and use foundation models. SageMaker Autopilot automates machine learning (AutoML): it tries different algorithms and settings on your data and ranks the resulting models. The following table summarises the three features.
| Feature | For | What it does |
|---|---|---|
| SageMaker JumpStart | Data scientists | Model hub of pre-trained and open foundation models (Llama, Mistral, Falcon) and solution templates; deploy or fine-tune in a few clicks, in your own account |
| SageMaker Canvas | Business analysts | No-code interface to prepare data, build models such as forecasts, and use foundation models |
| SageMaker Autopilot | Anyone | AutoML: tries algorithms and settings and ranks candidate models |
The broader Amazon SageMaker platform also includes Unified Studio, which brings data, analytics and AI together.
JumpStart, Canvas and Autopilot
Bedrock or SageMaker AI?
Amazon Bedrock and SageMaker AI both give access to models, but they suit different needs. Amazon Bedrock is the choice when you want to use foundation models through an API, with nothing to deploy or manage: you send a request and receive the model's answer. SageMaker AI is the choice when you need to train your own models, want full control of the model and how it is hosted, or want to run open models on dedicated instances. The following table summarises the choice.
| Choose | When |
|---|---|
| Amazon Bedrock | You want to call foundation models through an API with no infrastructure |
| SageMaker AI | You need to train your own models, want full control of the model and hosting, or want open models on dedicated instances |
Bedrock or SageMaker AI?
Which SageMaker tool for which person
Three people in the same company want to use machine learning, with very different skills:
| Person | Goal | Tool |
|---|---|---|
| A sales analyst with no coding skills | Forecast next quarter's sales from a spreadsheet | SageMaker Canvas (no code) |
| A developer who needs a text summariser | Deploy an open-source model in the company's own account quickly | SageMaker JumpStart |
| A data scientist with proprietary sensor data | Build and train a custom failure-prediction model | SageMaker Studio with training jobs and Automatic Model Tuning |
If the developer had only needed to call a summarisation model through an API, without hosting anything, Amazon Bedrock would have been simpler still. JumpStart is the better choice when the company wants the model deployed on its own SageMaker endpoint, perhaps to fine-tune it or control the instance type.
What does SageMaker JumpStart provide?
Show answer
Pre-trained models, including foundation models, and solution templates that can be deployed or fine-tuned with a few clicks.
Exam Tips
Remember for the exam
- To build, train and deploy custom models with full control, use SageMaker AI.
- To deploy or fine-tune pre-trained and open foundation models quickly in your own account, use SageMaker JumpStart.
- No-code ML for business analysts is SageMaker Canvas.
- Automatic model building (AutoML) is SageMaker Autopilot.
- Large-scale clusters for training foundation models are provided by SageMaker HyperPod.
- If you only need to call a foundation model through an API with no infrastructure, use Bedrock rather than SageMaker AI.