-
Notifications
You must be signed in to change notification settings - Fork 323
Update sagemaker docs structure #1645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
arjkesh
wants to merge
3
commits into
huggingface:main
Choose a base branch
from
arjkesh:sm_docs_update
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Text Generation Inference (TGI) Images | ||
|
||
[TGI](https://huggingface.co/docs/text-generation-inference/en/index) is a toolkit for deploying and serving Large Language Models (LLMs). TGI enables high-performance text generation for the most popular open-source LLMs, including Llama, Falcon, StarCoder, BLOOM, GPT-NeoX, and T5. | ||
|
||
Below, you can find a list of the latest available images for TGI for use on AWS SageMaker. | ||
|
||
To find the latest supported versions of the HF DLCs, check out https://aws.amazon.com/releasenotes/dlc-support-policy/ | ||
|
||
<!-- START AUTOGEN TABLE --> | ||
## huggingface-pytorch-tgi-inference | ||
|
||
| Framework Version | Image Type | Image URI | Size (GB) | Pushed At | Details | | ||
| --- | --- | --- | --- | --- | --- | | ||
| 2.6 | gpu | `763104351884.dkr.ecr.us-west-2.amazonaws.com/huggingface-pytorch-tgi-inference:2.6.0-tgi3.1.1-gpu-py311-cu124-ubuntu22.04-v2.0` | 8.1 | 2025-03-17 16:47:39 | [Details](https://github.com/aws/deep-learning-containers/blob/master/available_images.md#huggingface-text-generation-inference-tgi-containers) | | ||
| 2.4 | gpu | `763104351884.dkr.ecr.us-west-2.amazonaws.com/huggingface-pytorch-tgi-inference:2.4.0-tgi3.0.1-gpu-py311-cu124-ubuntu22.04-v2.2` | 6.5 | 2025-03-06 18:28:24 | [Details](https://github.com/aws/deep-learning-containers/blob/master/available_images.md#huggingface-text-generation-inference-tgi-containers) | | ||
| 2.3 | gpu | `763104351884.dkr.ecr.us-west-2.amazonaws.com/huggingface-pytorch-tgi-inference:2.3.0-tgi2.2.0-gpu-py310-cu121-ubuntu22.04-v2.1` | 4.92 | 2024-10-04 21:59:12 | [Details](https://github.com/aws/deep-learning-containers/blob/master/available_images.md#huggingface-text-generation-inference-tgi-containers) | | ||
|
||
|
||
### SM Example | ||
``` | ||
# create Hugging Face Model Class | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should add the import in the code snippet |
||
huggingface_model = HuggingFaceModel( | ||
image_uri=get_huggingface_llm_image_uri("huggingface",version="2.6"), | ||
env=<insert_hub_obj>, | ||
role=<insert_role>, | ||
) | ||
|
||
# deploy model to SageMaker Inference | ||
predictor = huggingface_model.deploy( | ||
initial_instance_count=1, | ||
instance_type="ml.g6.48xlarge", | ||
container_startup_health_check_timeout=2400, | ||
) | ||
``` | ||
|
||
<!-- END AUTOGEN TABLE --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Transformers Images | ||
|
||
[Transformers](https://huggingface.co/docs/transformers/en/index) provides APIs and tools to easily download and fine-tune state-of-the-art pretrained models, for use across NLP, computer vision, audio, and more. | ||
|
||
Below, we include a list of the latest images available on AWS, which come pre-packaged with transformers and [datasets](https://huggingface.co/docs/datasets/en/index) libraries for your convenience. Check out some of the tutorials in the reference section for more information! | ||
|
||
To find the latest supported versions of the HF DLCs, check out https://aws.amazon.com/releasenotes/dlc-support-policy/ | ||
|
||
<!-- START AUTOGEN TABLE --> | ||
## huggingface-pytorch-training | ||
|
||
| Framework Version | Image Type | Image URI | Size (GB) | Pushed At | Details | | ||
| --- | --- | --- | --- | --- | --- | | ||
| 2.3 | gpu | `763104351884.dkr.ecr.us-west-2.amazonaws.com/huggingface-pytorch-training:2.3.0-transformers4.48.0-gpu-py311-cu121-ubuntu20.04-v2.1` | 8.75 | 2025-03-14 13:15:19 | [Details](https://github.com/aws/deep-learning-containers/blob/master/available_images.md#huggingface-training-containers) | | ||
|
||
|
||
### SM Example | ||
``` | ||
# create Hugging Face Model Class | ||
huggingface_model = HuggingFaceModel( | ||
image_uri=get_huggingface_llm_image_uri("huggingface",version="2.3"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The util doesn't work for Pytorch training DLC, no? |
||
env=<insert_hub_obj>, | ||
role=<insert_role>, | ||
) | ||
|
||
# deploy model to SageMaker Inference | ||
predictor = huggingface_model.deploy( | ||
initial_instance_count=1, | ||
instance_type="ml.g6.48xlarge", | ||
container_startup_health_check_timeout=2400, | ||
) | ||
``` | ||
|
||
|
||
## huggingface-pytorch-inference | ||
|
||
| Framework Version | Image Type | Image URI | Size (GB) | Pushed At | Details | | ||
| --- | --- | --- | --- | --- | --- | | ||
| 2.3 | gpu | `763104351884.dkr.ecr.us-west-2.amazonaws.com/huggingface-pytorch-inference:2.3.0-transformers4.48.0-gpu-py311-cu121-ubuntu22.04-v2.1` | 9.12 | 2025-03-03 18:16:45 | [Details](https://github.com/aws/deep-learning-containers/blob/master/available_images.md#huggingface-inference-containers) | | ||
| 2.3 | cpu | `763104351884.dkr.ecr.us-west-2.amazonaws.com/huggingface-pytorch-inference:2.3.0-transformers4.48.0-cpu-py311-ubuntu22.04-v2.1` | 1.39 | 2025-03-03 18:04:16 | [Details](https://github.com/aws/deep-learning-containers/blob/master/available_images.md#huggingface-inference-containers) | | ||
|
||
|
||
### SM Example | ||
``` | ||
# create Hugging Face Model Class | ||
huggingface_model = HuggingFaceModel( | ||
image_uri=get_huggingface_llm_image_uri("huggingface",version="2.3"), | ||
env=<insert_hub_obj>, | ||
role=<insert_role>, | ||
) | ||
|
||
# deploy model to SageMaker Inference | ||
predictor = huggingface_model.deploy( | ||
initial_instance_count=1, | ||
instance_type="ml.g6.48xlarge", | ||
container_startup_health_check_timeout=2400, | ||
) | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
<!-- END AUTOGEN TABLE --> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file is not showing up as a page anymore--I can include it as a section called "Examples" if helpful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think we should keep this page for now. There's not only a list of notebook examples but also a useful doc on the inference toolkit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what makes sense for the title of the page. There are not only examples but also API specs, so I wouldn't call it "Examples". maybe the best is to keep "Reference" for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, we can keep it