Lab build
Falcon-40B on a SageMaker endpoint
Deploys Falcon-40B-Instruct to a GPU SageMaker endpoint using the Hugging Face LLM container.
What it does
The Hugging Face LLM inference container image is retrieved through the SageMaker SDK and configured to load tiiuae/falcon-40b-instruct across four GPUs. The model is deployed to an ml.g5.12xlarge real-time endpoint and queried from a notebook with sampling parameters.
What was built
- 01
get_huggingface_llm_image_uri selects the Hugging Face LLM container, version 0.8.2.
- 02
HuggingFaceModel config sets HF_MODEL_ID to falcon-40b-instruct and SM_NUM_GPUS to 4.
- 03
Endpoint runs on one ml.g5.12xlarge instance and is called with top_p, temperature and token limits.
The pipeline, layer by layer
Four layers, one pipeline.
L1Setup
- SageMaker session
- LLM container image
L2Model
- Falcon-40B-Instruct model
L3Endpoint
- ml.g5.12xlarge endpoint
L4Client
- Notebook inference payload