sagemaker-python-sdk
sagemaker-python-sdk copied to clipboard
Enhance local mode support for LLM inference without model data
Issue #, if available: N/A
Description of changes: Enhance local mode support for LLM inference without model data
- Current sagemaker py-sdk local model forces the requirement of
model_dataparam which is not applicable to LLM inference (ex: DJL-LMI, HF-TGI, etc..) which downloads models based on..MODEL_IDfrom hubs. - Enhanced/updated docker compose structure when
instance_type=local_gpu.
devices:
- capabilities:
- gpu
count: all
driver: nvidia
- Added test cases for local CPU based training, inference and processing.
- Added test cases for local GPU based HuggingFace TGI and DJL-LMI inference.
Testing done:
- Test local model for CPU processing, training and inference - test_local_mode_cpu_jobs.py
- Test local model for GPU llm inference with HF-TGI and DJL-LMI - test_local_mode_gpu_jobs.py
Merge Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.
General
- [x] I have read the CONTRIBUTING doc
- [x] I certify that the changes I am introducing will be backward compatible, and I have discussed concerns about this, if any, with the Python SDK team
- [x] I used the commit message format described in CONTRIBUTING
- [x] I have passed the region in to all S3 and STS clients that I've initialized as part of this change.
- [x] I have updated any necessary documentation, including READMEs and API docs (if appropriate)
Tests
- [x] I have added tests that prove my fix is effective or that my feature works (if appropriate)
- [x] I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes
- [x] I have checked that my tests are not configured for a specific region or account (if appropriate)
- [x] I have used
unique_name_from_baseto create resource names in integ tests (if appropriate) - [x] If adding any dependency in requirements.txt files, I have spell checked and ensured they exist in PyPi
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Hi, as part of incoming PySDK V3 release, master branch will be replaced by PySDK V3 code. We have changed the target branch to master-v2