| 1 | --- |
| 2 | title: "Amazon SageMaker" |
| 3 | --- |
| 4 | |
| 5 | SageMaker can be used for both chat and embedding models. Chat models are supported for endpoints deployed with [LMI](https://docs.djl.ai/docs/serving/serving/docs/lmi/index.html), and embedding models are supported for endpoints deployed with [HuggingFace TEI](https://huggingface.co/blog/sagemaker-huggingface-embedding) |
| 6 | |
| 7 | Here is an example Sagemaker configuration setup: |
| 8 | |
| 9 | <Tabs> |
| 10 | <Tab title="YAML"> |
| 11 | ```yaml title="config.yaml" |
| 12 | models: |
| 13 | - name: deepseek-6.7b-instruct |
| 14 | provider: sagemaker |
| 15 | model: lmi-model-deepseek-coder-xxxxxxx |
| 16 | region: us-west-2 |
| 17 | roles: |
| 18 | - chat |
| 19 | - name: mxbai-embed |
| 20 | provider: sagemaker |
| 21 | model: mxbai-embed-large-v1-endpoint |
| 22 | roles: |
| 23 | - embed |
| 24 | ``` |
| 25 | </Tab> |
| 26 | <Tab title="JSON"> |
| 27 | ```json title="config.json" |
| 28 | { |
| 29 | "models": [ |
| 30 | { |
| 31 | "title": "deepseek-6.7b-instruct", |
| 32 | "provider": "sagemaker", |
| 33 | "model": "lmi-model-deepseek-coder-xxxxxxx", |
| 34 | "region": "us-west-2" |
| 35 | } |
| 36 | ], |
| 37 | "embeddingsProvider": { |
| 38 | "provider": "sagemaker", |
| 39 | "model": "mxbai-embed-large-v1-endpoint" |
| 40 | } |
| 41 | } |
| 42 | ``` |
| 43 | </Tab> |
| 44 | </Tabs> |
| 45 | |
| 46 | The value in model should be the SageMaker endpoint name you deployed. |
| 47 | |
| 48 | Authentication will be through temporary or long-term credentials in |
| 49 | ~/.aws/credentials under a profile called "sagemaker". |
| 50 | |
| 51 | ```title="~/.aws/credentials |
| 52 | [sagemaker] |
| 53 | aws_access_key_id = abcdefg |
| 54 | aws_secret_access_key = hijklmno |
| 55 | aws_session_token = pqrstuvwxyz # Optional: means short term creds. |
| 56 | ``` |