Add Llama 3.2 models to Amazon Bedrock Chat #1014
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Meta released Llama 3.2 models : https://aws.amazon.com/bedrock/llama/
These are included in Bedrock : https://aws.amazon.com/blogs/aws/introducing-llama-3-2-models-from-meta-in-amazon-bedrock-a-new-generation-of-multimodal-vision-and-lightweight-models/
These models are added:
Meta Llama 3.2 1B Instruct 1.x meta.llama3-2-1b-instruct-v1:0
Meta Llama 3.2 3B Instruct 1.x meta.llama3-2-3b-instruct-v1:0
Meta Llama 3.2 11B Instruct 1.x meta.llama3-2-11b-instruct-v1:0
Meta Llama 3.2 90B Instruct 1.x meta.llama3-2-90b-instruct-v1:0
Note: These models need "cross region inference" and tests are needed to see if additional changes are needed for access. https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html
This PR is a work in progress. we have to investigate whether the new handling of cross-region inference which requires passing an "inference profile" when calling the model. This means adding the new models may need updates to
langchain
and/orlangchain-aws
to handle these models.It turns out that we can use this in Jupyter AI by prefixing the model id with region as shown here where the model is is prefixed by
.us
:And then we can ask:
The fix would be to take the prefix from the region name field and apply it to the model id, though it seems like a lot of special handling for one model. A second approach is to add model ids for all regions.