Skip to content

Commit 1287da7

Browse files
authored
Update to version v1.3.0
### Added - Support for SageMaker as an LLM provider through SageMaker inference endpoints. - Ability to deploy both the deployment dashboard and use cases within a VPC, including bringing an existing VPC and allowing the solution to deploy one. - Option to return and display the source documents that were referenced when generating a response in RAG use cases. - New model-info API in the deployment dashboard stack which can retrieve available providers, models, and model info. Default parameters are now stored for each model and provider combination and are used to pre-populate values in the wizard. ### Changed - Refactoring of UI components in the deployment dashboard. - Switch to poetry for Python package management, replacing requirements.txt files. - Updates to Node and Python package versions.
2 parents b1e225c + dea21b9 commit 1287da7

File tree

586 files changed

+79243
-40648
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

586 files changed

+79243
-40648
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.3.0] - 2024-02-22
9+
10+
### Added
11+
12+
- Support for SageMaker as an LLM provider through SageMaker inference endpoints.
13+
- Ability to deploy both the deployment dashboard and use cases within a VPC, including bringing an existing VPC and allowing the solution to deploy one.
14+
- Option to return and display the source documents that were referenced when generating a response in RAG use cases.
15+
- New model-info API in the deployment dashboard stack which can retrieve available providers, models, and model info. Default parameters are now stored for each model and provider combination and are used to pre-populate values in the wizard.
16+
17+
### Changed
18+
19+
- Refactoring of UI components in the deployment dashboard.
20+
- Switch to poetry for Python package management, replacing requirements.txt files.
21+
- Updates to Node and Python package versions.
22+
823
## [1.2.3] - 2024-02-06
924

1025
### Fixed

NOTICE.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ This software includes third party software subject to the following copyrights:
4444
@smithy/types Apache-2.0
4545
@tabler/icons-react MIT
4646
@tailwindcss/typography MIT
47+
@tanstack/react-query MIT
48+
@tanstack/react-query-devtools MIT
4749
@testing-library/jest-dom MIT
4850
@testing-library/react MIT
4951
@testing-library/user-event MIT
@@ -64,6 +66,7 @@ MarkupSafe BSD-3-Clause
6466
PyYAML MIT
6567
SQLAlchemy MIT
6668
Werkzeug BSD-3-Clause
69+
ace-builds BSD-3-Clause
6770
aiohttp Apache-2.0
6871
aiosignal Apache-2.0
6972
annotated-types MIT

README.md

Lines changed: 84 additions & 47 deletions
Large diffs are not rendered by default.

deployment/build-s3-dist.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ set -e
4040
# Check to see if input has been provided:
4141
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] || [ -z "$4" ]; then
4242
echo "Please provide all required parameters for the build script"
43-
echo "For example: ./build-s3-dist.sh solutions trademarked-solution-name v1.2.2 template-bucket-name"
43+
echo "For example: ./build-s3-dist.sh solutions trademarked-solution-name v1.3.0 template-bucket-name"
4444
exit 1
4545
fi
4646

117 KB
Loading
118 KB
Loading
166 KB
Loading
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Changing input restrictions of Prompt Template and Text use case chat messages
2+
3+
To change/increase the max length of the prompt template, browse to the model-info folder at [source/model-info](../source/model-info) and look for the appropriate model configuration file you require. The files are organized by use-case (e.g. chat, ragchat, etc.), by model provider (e.g. bedrock), and model-id (e.g. ai21-j2-mid, llama2-13b-chat-v1, etc.).
4+
- For example, if you want to update the configuration for non-RAG Text use cases using the Bedrock Anthropic claude-2 model, navigate to the [chat-bedrock-anthropic-claude-v2.json](../source/model-info/chat-bedrock-anthropic-claude-v2.json)
5+
6+
7+
After you've identified the models you want to modify, update the appropriate keys such as `MaxPromptSize`, `MaxChatMessageSize`, etc. to the new values you wish to use.
8+
- `MaxPromptSize` controls the maximum number of characters allowed to be used by Admin/Business users when defining their prompt template
9+
- `MaxChatMessageSize` controls the maximum number of characters allowed to be used by Business users when sending messages using the chat interface
10+
11+
Once the values have been changed for all models of interest, you will need to build and deploy the solution. Instructions for that can be found in the [README.md](../README.md#deployment)
12+
13+
14+
## Manual updates for experimentation only
15+
> __*Note: use at your own discretion. Manually modifying values maintained by the solution causes a drift and may get overwritten by solution upgrades or other forms of stack updates. Use with caution and only with non-production deployments.*__
16+
17+
If you want to just quickly test some changes on an existing deployment and don't want to rebuild the entire solution, you can modify some values directly in DynamoDB to achieve a similar affect.
18+
19+
The values in the model-info files are stored in a DynamoDB table at deployment time. DynamoDB is then used by the Deployment dashboard and associated use cases at runtime. If you want to modify these values you can do the following:
20+
1. Go to the DynamoDB service page in your AWS console and search for a table with a name containing `ModelInfoStorage`
21+
2. Once you've found the right table for your Deployment dashboard, open the table and explore the table items
22+
3. Find the right row for your usecase, model provider, and model combination (e.g. - UseCase = `Chat`, SortKey = `Bedrock#anthropic.claude-v2`)
23+
4. Edit the default values of interest (e.g. `MaxChatMessageSize` or `MaxPromptSize`)
24+
25+
![Example Edit on DynamoDb](./modify-prompt-input-restrictions-example-ddb.png)
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# AlexaTM 20B
2+
3+
Sample values for the model are:
4+
5+
<table>
6+
7+
<tr>
8+
<td> Model Id </td> <td> Model Input Schema </td> <td> Model Output JSONPath </td>
9+
</tr>
10+
11+
<tr>
12+
<td> pytorch-textgeneration1-alexa20b </td>
13+
<td>
14+
15+
```json
16+
{
17+
"text_inputs": "<<prompt>>",
18+
"num_beams": "<<num_beams>>",
19+
"no_repeat_ngram_size": "<<no_repeat_ngram_size>>"
20+
}
21+
```
22+
23+
</td>
24+
<td>
25+
26+
```json
27+
$.generated_texts[0]
28+
```
29+
30+
</td>
31+
</tr>
32+
33+
</table>
34+
35+
36+
## Model Payload
37+
38+
The input schemas provided here are inferred from model payloads to replace the actual values supplied at run time. For example, sample model payload for the input schema provided above is:
39+
40+
```json
41+
{
42+
"text_inputs": "[CLM] My name is Lewis and I like to",
43+
"num_beams": 5,
44+
"no_repeat_ngram_size": 2
45+
}
46+
```
47+
48+
Please refer to model documentation and SageMaker JumpStart jupyter notebook to see the most up-to-date supported parameters.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Mistral 7B Instruct
2+
3+
<table>
4+
5+
<tr>
6+
<td> Model Id </td> <td> Model Input Schema </td> <td> Model Output JSONPath </td>
7+
</tr>
8+
9+
<tr>
10+
<td> huggingface-llm-mistral-7b-instruct </td>
11+
<td>
12+
13+
```json
14+
{
15+
"inputs": "<<prompt>>",
16+
"parameters": {
17+
"temperature": "<<temperature>>",
18+
"max_new_tokens": "<<max_new_tokens>>",
19+
"do_sample": "<<do_sample>>"
20+
}
21+
}
22+
```
23+
24+
</td>
25+
<td>
26+
27+
```json
28+
$[0].generated_text
29+
```
30+
31+
</td>
32+
</tr>
33+
34+
</table>
35+
36+
37+
## Model Payload
38+
39+
The input schemas provided here are inferred from model payloads to replace the actual values supplied at run time. For example, sample model payload for the input schema provided above is:
40+
41+
```json
42+
{
43+
"inputs": "Write the code to compute factorial of a number in Python.",
44+
"parameters": {
45+
"temperature": 0.4,
46+
"max_new_tokens": 200,
47+
"do_sample": true
48+
}
49+
}
50+
```
51+
52+
Please refer to model documentation and SageMaker JumpStart jupyter notebook to see the most up-to-date supported parameters.

0 commit comments

Comments
 (0)