Skip to content

Commit 6eeaeaf

Browse files
authored
add llama3.2 (#663)
1 parent 12b8a2a commit 6eeaeaf

File tree

3 files changed

+50
-2
lines changed

3 files changed

+50
-2
lines changed

docs/DEPLOY_OPTION.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ Knowledge Base プロンプト例: キーワードで検索し情報を取得し
335335
"eu.anthropic.claude-3-5-sonnet-20240620-v1:0",
336336
"eu.anthropic.claude-3-sonnet-20240229-v1:0",
337337
"eu.anthropic.claude-3-haiku-20240307-v1:0",
338+
"us.meta.llama3-2-90b-instruct-v1:0",
339+
"us.meta.llama3-2-11b-instruct-v1:0",
338340
```
339341

340342
これらのいずれかが `cdk.json``modelIds` に定義されている必要があります。
@@ -353,6 +355,8 @@ Knowledge Base プロンプト例: キーワードで検索し情報を取得し
353355
"eu.anthropic.claude-3-5-sonnet-20240620-v1:0",
354356
"eu.anthropic.claude-3-sonnet-20240229-v1:0",
355357
"eu.anthropic.claude-3-haiku-20240307-v1:0",
358+
"us.meta.llama3-2-90b-instruct-v1:0",
359+
"us.meta.llama3-2-11b-instruct-v1:0",
356360
]
357361
```
358362

@@ -379,6 +383,10 @@ Knowledge Base プロンプト例: キーワードで検索し情報を取得し
379383
"eu.anthropic.claude-3-sonnet-20240229-v1:0",
380384
"eu.anthropic.claude-3-haiku-20240307-v1:0",
381385
"amazon.titan-text-premier-v1:0",
386+
"us.meta.llama3-2-90b-instruct-v1:0",
387+
"us.meta.llama3-2-11b-instruct-v1:0",
388+
"us.meta.llama3-2-3b-instruct-v1:0",
389+
"us.meta.llama3-2-1b-instruct-v1:0",
382390
"meta.llama3-1-405b-instruct-v1:0",
383391
"meta.llama3-1-70b-instruct-v1:0",
384392
"meta.llama3-1-8b-instruct-v1:0",
@@ -460,8 +468,10 @@ Knowledge Base プロンプト例: キーワードで検索し情報を取得し
460468
"us.anthropic.claude-3-opus-20240229-v1:0",
461469
"us.anthropic.claude-3-sonnet-20240229-v1:0",
462470
"us.anthropic.claude-3-haiku-20240307-v1:0",
463-
"meta.llama3-1-70b-instruct-v1:0",
464-
"meta.llama3-1-8b-instruct-v1:0",
471+
"us.meta.llama3-2-90b-instruct-v1:0",
472+
"us.meta.llama3-2-11b-instruct-v1:0",
473+
"us.meta.llama3-2-3b-instruct-v1:0",
474+
"us.meta.llama3-2-1b-instruct-v1:0",
465475
"cohere.command-r-plus-v1:0",
466476
"cohere.command-r-v1:0",
467477
"mistral.mistral-large-2407-v1:0"

packages/cdk/lambda/utils/models.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,38 @@ export const BEDROCK_TEXT_GEN_MODELS: {
660660
extractConverseOutputText: extractConverseOutputText,
661661
extractConverseStreamOutputText: extractConverseStreamOutputText,
662662
},
663+
'us.meta.llama3-2-1b-instruct-v1:0': {
664+
defaultParams: LLAMA_DEFAULT_PARAMS,
665+
usecaseParams: USECASE_DEFAULT_PARAMS,
666+
createConverseCommandInput: createConverseCommandInput,
667+
createConverseStreamCommandInput: createConverseStreamCommandInput,
668+
extractConverseOutputText: extractConverseOutputText,
669+
extractConverseStreamOutputText: extractConverseStreamOutputText,
670+
},
671+
'us.meta.llama3-2-3b-instruct-v1:0': {
672+
defaultParams: LLAMA_DEFAULT_PARAMS,
673+
usecaseParams: USECASE_DEFAULT_PARAMS,
674+
createConverseCommandInput: createConverseCommandInput,
675+
createConverseStreamCommandInput: createConverseStreamCommandInput,
676+
extractConverseOutputText: extractConverseOutputText,
677+
extractConverseStreamOutputText: extractConverseStreamOutputText,
678+
},
679+
'us.meta.llama3-2-11b-instruct-v1:0': {
680+
defaultParams: LLAMA_DEFAULT_PARAMS,
681+
usecaseParams: USECASE_DEFAULT_PARAMS,
682+
createConverseCommandInput: createConverseCommandInput,
683+
createConverseStreamCommandInput: createConverseStreamCommandInput,
684+
extractConverseOutputText: extractConverseOutputText,
685+
extractConverseStreamOutputText: extractConverseStreamOutputText,
686+
},
687+
'us.meta.llama3-2-90b-instruct-v1:0': {
688+
defaultParams: LLAMA_DEFAULT_PARAMS,
689+
usecaseParams: USECASE_DEFAULT_PARAMS,
690+
createConverseCommandInput: createConverseCommandInput,
691+
createConverseStreamCommandInput: createConverseStreamCommandInput,
692+
extractConverseOutputText: extractConverseOutputText,
693+
extractConverseStreamOutputText: extractConverseStreamOutputText,
694+
},
663695
'meta.llama2-13b-chat-v1': {
664696
defaultParams: LLAMA_DEFAULT_PARAMS,
665697
usecaseParams: USECASE_DEFAULT_PARAMS,

packages/cdk/lib/construct/api.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ export class Api extends Construct {
9595
'meta.llama3-1-8b-instruct-v1:0',
9696
'meta.llama3-1-70b-instruct-v1:0',
9797
'meta.llama3-1-405b-instruct-v1:0',
98+
'us.meta.llama3-2-1b-instruct-v1:0',
99+
'us.meta.llama3-2-3b-instruct-v1:0',
100+
'us.meta.llama3-2-11b-instruct-v1:0',
101+
'us.meta.llama3-2-90b-instruct-v1:0',
98102
'meta.llama2-13b-chat-v1',
99103
'meta.llama2-70b-chat-v1',
100104
'mistral.mistral-7b-instruct-v0:2',
@@ -117,6 +121,8 @@ export class Api extends Construct {
117121
'eu.anthropic.claude-3-5-sonnet-20240620-v1:0',
118122
'eu.anthropic.claude-3-sonnet-20240229-v1:0',
119123
'eu.anthropic.claude-3-haiku-20240307-v1:0',
124+
'us.meta.llama3-2-11b-instruct-v1:0',
125+
'us.meta.llama3-2-90b-instruct-v1:0',
120126
];
121127
for (const modelId of modelIds) {
122128
if (!supportedModelIds.includes(modelId)) {

0 commit comments

Comments
 (0)