diff --git a/.changeset/chatty-sloths-share.md b/.changeset/chatty-sloths-share.md new file mode 100644 index 0000000000000000000000000000000000000000..3f53cee2d2f18e3d3dba1eb1359c2be13b95cae4 --- /dev/null +++ b/.changeset/chatty-sloths-share.md @@ -0,0 +1,5 @@ +--- +"@llamaindex/community": patch +--- + +feat: added llama 3.1 diff --git a/apps/docs/docs/modules/llms/available_llms/bedrock.md b/apps/docs/docs/modules/llms/available_llms/bedrock.md index 56c65c8fd42a76ddc6fe452608941e714c29d75f..6091b3ab28470cc8f54c6a49eb706630833be0ef 100644 --- a/apps/docs/docs/modules/llms/available_llms/bedrock.md +++ b/apps/docs/docs/modules/llms/available_llms/bedrock.md @@ -29,6 +29,9 @@ META_LLAMA2_13B_CHAT = "meta.llama2-13b-chat-v1"; META_LLAMA2_70B_CHAT = "meta.llama2-70b-chat-v1"; META_LLAMA3_8B_INSTRUCT = "meta.llama3-8b-instruct-v1:0"; META_LLAMA3_70B_INSTRUCT = "meta.llama3-70b-instruct-v1:0"; +META_LLAMA3_1_8B_INSTRUCT = "meta.llama3-1-8b-instruct-v1:0"; // available on us-west-2 +META_LLAMA3_1_70B_INSTRUCT = "meta.llama3-1-70b-instruct-v1:0"; // available on us-west-2 +META_LLAMA3_1_405B_INSTRUCT = "meta.llama3-1-405b-instruct-v1:0"; // preview only, available on us-west-2 ``` Sonnet, Haiku and Opus are multimodal, image_url only supports base64 data url format, e.g. `data:image/jpeg;base64,SGVsbG8sIFdvcmxkIQ==` diff --git a/packages/community/README.md b/packages/community/README.md index 5a2f0fa7a1f43b062f091322dad35a237548ca50..47cbdc2be035edf52713a8ea455dfc0845598cb3 100644 --- a/packages/community/README.md +++ b/packages/community/README.md @@ -5,7 +5,7 @@ ## Current Features: - Bedrock support for the Anthropic Claude Models [usage](https://ts.llamaindex.ai/modules/llms/available_llms/bedrock) -- Bedrock support for the Meta LLama 2 and 3 Models [usage](https://ts.llamaindex.ai/modules/llms/available_llms/bedrock) +- Bedrock support for the Meta LLama 2, 3 and 3.1 Models [usage](https://ts.llamaindex.ai/modules/llms/available_llms/bedrock) ## LICENSE diff --git a/packages/community/src/llm/bedrock/base.ts b/packages/community/src/llm/bedrock/base.ts index 6dd056bc6b050c2a3d9f90e9748d67d5537a4f69..f90a54e71231676180b69bf0125a7becd8760f06 100644 --- a/packages/community/src/llm/bedrock/base.ts +++ b/packages/community/src/llm/bedrock/base.ts @@ -60,6 +60,9 @@ export enum BEDROCK_MODELS { META_LLAMA2_70B_CHAT = "meta.llama2-70b-chat-v1", META_LLAMA3_8B_INSTRUCT = "meta.llama3-8b-instruct-v1:0", META_LLAMA3_70B_INSTRUCT = "meta.llama3-70b-instruct-v1:0", + META_LLAMA3_1_8B_INSTRUCT = "meta.llama3-1-8b-instruct-v1:0", + META_LLAMA3_1_70B_INSTRUCT = "meta.llama3-1-70b-instruct-v1:0", + META_LLAMA3_1_405B_INSTRUCT = "meta.llama3-1-405b-instruct-v1:0", MISTRAL_7B_INSTRUCT = "mistral.mistral-7b-instruct-v0:2", MISTRAL_MIXTRAL_7B_INSTRUCT = "mistral.mixtral-8x7b-instruct-v0:1", MISTRAL_MIXTRAL_LARGE_2402 = "mistral.mistral-large-2402-v1:0", @@ -94,6 +97,9 @@ const CHAT_ONLY_MODELS = { [BEDROCK_MODELS.META_LLAMA2_70B_CHAT]: 4096, [BEDROCK_MODELS.META_LLAMA3_8B_INSTRUCT]: 8192, [BEDROCK_MODELS.META_LLAMA3_70B_INSTRUCT]: 8192, + [BEDROCK_MODELS.META_LLAMA3_1_8B_INSTRUCT]: 128000, + [BEDROCK_MODELS.META_LLAMA3_1_70B_INSTRUCT]: 128000, + [BEDROCK_MODELS.META_LLAMA3_1_405B_INSTRUCT]: 128000, [BEDROCK_MODELS.MISTRAL_7B_INSTRUCT]: 32000, [BEDROCK_MODELS.MISTRAL_MIXTRAL_7B_INSTRUCT]: 32000, [BEDROCK_MODELS.MISTRAL_MIXTRAL_LARGE_2402]: 32000, @@ -121,6 +127,9 @@ export const STREAMING_MODELS = new Set([ BEDROCK_MODELS.META_LLAMA2_70B_CHAT, BEDROCK_MODELS.META_LLAMA3_8B_INSTRUCT, BEDROCK_MODELS.META_LLAMA3_70B_INSTRUCT, + BEDROCK_MODELS.META_LLAMA3_1_8B_INSTRUCT, + BEDROCK_MODELS.META_LLAMA3_1_70B_INSTRUCT, + BEDROCK_MODELS.META_LLAMA3_1_405B_INSTRUCT, BEDROCK_MODELS.MISTRAL_7B_INSTRUCT, BEDROCK_MODELS.MISTRAL_MIXTRAL_7B_INSTRUCT, BEDROCK_MODELS.MISTRAL_MIXTRAL_LARGE_2402, @@ -160,6 +169,9 @@ export const BEDROCK_MODEL_MAX_TOKENS: Partial<Record<BEDROCK_MODELS, number>> = [BEDROCK_MODELS.META_LLAMA2_70B_CHAT]: 2048, [BEDROCK_MODELS.META_LLAMA3_8B_INSTRUCT]: 2048, [BEDROCK_MODELS.META_LLAMA3_70B_INSTRUCT]: 2048, + [BEDROCK_MODELS.META_LLAMA3_1_8B_INSTRUCT]: 2048, + [BEDROCK_MODELS.META_LLAMA3_1_70B_INSTRUCT]: 2048, + [BEDROCK_MODELS.META_LLAMA3_1_405B_INSTRUCT]: 2048, }; const DEFAULT_BEDROCK_PARAMS = {