Skip to content

Commit e05f443

Browse files
authored
Merge pull request #70 from aws-samples/development
Development
2 parents 8c4488e + e9cc7d4 commit e05f443

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

kendra_retriever_samples/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,25 @@ pip install --force-reinstall "boto3>=1.28.57"
3939
```
4040

4141
## Running samples
42-
Before you run the sample, you need to deploy a Large Language Model (or get an API key if you using Anthropic or OPENAI). The samples in this repository have been tested on models deployed using SageMaker Jumpstart. The model id for the LLMS are specified in the table below.
42+
Before you run the sample, you need to deploy a Large Language Model (or get an API key if you using Anthropic or OPENAI). The samples in this repository have been tested on models deployed using SageMaker JumpStart.
4343

44-
With the latest sagemaker release each endpoint can hold multiple models (called InferenceComponent). For jumpstart models, optionally specify the INFERENCE_COMPONENT_NAME as well as an environment varialbe
44+
With the latest sagemaker release each endpoint can hold multiple models (called InferenceComponent). For JumpStart models, optionally specify the INFERENCE_COMPONENT_NAME as well as an environment variable. When you deploy JumpStart models from the new Studio console, you need to specify the environment variable INFERENCE_COMPONENT_NAME. When you deploy JumpStart models from the Studio Classic console or using the SDK, you do not need to specify the environment variable INFERENCE_COMPONENT_NAME.
4545

46+
The model id for the LLMs are specified in the table below.
4647

47-
| Model name | env var name | Endpoint Name | Inference component name (optional) |streamlit provider name |
48-
| -----------| -------- | ------------------ | ----------------- |
49-
| Falcon 40B instruct | FALCON_40B_ENDPOINT, INFERENCE_COMPONENT_NAME | <Endpoint_name> | <Inference_component_name>|falcon40b |
50-
| Llama2 70B instruct | LLAMA_2_ENDPOINT, INFERENCE_COMPONENT_NAME |<Endpoint_name> | <Inference_component_name> | llama2 |
51-
| Bedrock Titan | None | | | bedrock_titan|
52-
| Bedrock Claude | None | | | bedrock_claude|
53-
| Bedrock Claude V2 | None | | | bedrock_claudev2|
48+
| Model Name | Env Var Name | Endpoint Name | Inference Component Name (Optional) | streamlit Provider Name |
49+
| -----------| -------- | ------------------ | ----------------- |----------------- |
50+
| Falcon 40B instruct | FALCON_40B_ENDPOINT, INFERENCE_COMPONENT_NAME | <Endpoint_name> | <Inference_component_name> | falcon40b |
51+
| Llama2 70B instruct | LLAMA_2_ENDPOINT, INFERENCE_COMPONENT_NAME | <Endpoint_name> | <Inference_component_name> | llama2 |
52+
| Bedrock Titan | None | | | bedrock_titan |
53+
| Bedrock Claude | None | | | bedrock_claude |
54+
| Bedrock Claude V2 | None | | | bedrock_claudev2 |
5455

56+
After deploying the LLM, set up environment variables for kendra id, aws region, endpoint name (or the API key for an external provider), and optionally the inference component name.
5557

56-
after deploying the LLM, set up environment variables for kendra id, aws_region endpoint name (or the API key for an external provider) and optionally the inference component name
58+
For example, for running the `kendra_chat_llama_2.py` sample, these environment variables must be set: AWS_REGION, KENDRA_INDEX_ID, LLAMA_2_ENDPOINT, and INFERENCE_COMPONENT_NAME (if you deploy JumpStart model from the new Studio console).
5759

58-
For example, for running the `kendra_chat_llama_2.py` sample, these environment variables must be set: AWS_REGION, KENDRA_INDEX_ID, LLAMA_2_ENDPOINT and INFERENCE_COMPONENT_NAME. INFERENCE_COMPONENT_NAME is only required when deploying the jumpstart through the console or if you explicitely create an inference component using code. It is also possible to create an endpoint without and inference component in which case, do not set the INFERENCE_COMPONENT_FIELD.
59-
60-
You can use commands as below to set the environment variables. Only set the environment variable for the provider that you are using. For example, if you are using Flan-xl only set the FLAN_XXL_ENDPOINT. There is no need to set the other Endpoints and keys.
60+
You can use commands as below to set the environment variables. Only set the environment variable for the provider that you are using. For example, if you are using Falcon 40B, only set the FALCON_40B_ENDPOINT. There is no need to set the other Endpoints and keys.
6161

6262
```bash
6363
export AWS_REGION=<YOUR-AWS-REGION>
@@ -66,7 +66,7 @@ export KENDRA_INDEX_ID=<YOUR-KENDRA-INDEX-ID>
6666

6767
export FALCON_40B_ENDPOINT=<YOUR-SAGEMAKER-ENDPOINT-FOR-FALCON> # only if you are using falcon as the endpoint
6868
export LLAMA_2_ENDPOINT=<YOUR-SAGEMAKER-ENDPOINT-FOR-LLAMA2> #only if you are using llama2 as the endpoint
69-
export INFERENCE_COMPONENT_NAME=<YOUR-SAGEMAKER-INFERENCE-COMPONENT-NAME> # if you are deploying the FM via the JumpStart console.
69+
export INFERENCE_COMPONENT_NAME=<YOUR-SAGEMAKER-INFERENCE-COMPONENT-NAME> # only if you are deploying the FM via the new Studio console.
7070

7171
export OPENAI_API_KEY=<YOUR-OPEN-AI-API-KEY> # only if you are using OPENAI as the endpoint
7272
export ANTHROPIC_API_KEY=<YOUR-ANTHROPIC-API-KEY> # only if you are using Anthropic as the endpoint

0 commit comments

Comments
 (0)