Skip to content

Commit

Permalink
feat: support Llama3 models on Bedrock (#7581)
Browse files Browse the repository at this point in the history
* feat: support llama3 on bedrock

* add reno
  • Loading branch information
tstadel authored Apr 23, 2024
1 parent edbee26 commit 9ea5ee1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion haystack/nodes/prompt/invocation_layer/amazon_bedrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class AmazonBedrockInvocationLayer(AWSBaseInvocationLayer):
r"ai21.j2.*": AI21LabsJurassic2Adapter,
r"cohere.command.*": CohereCommandAdapter,
r"anthropic.claude.*": AnthropicClaudeAdapter,
r"meta.llama2.*": MetaLlama2ChatAdapter,
r"meta.llama.*": MetaLlama2ChatAdapter,
r"mistral.mi[sx]tral.*": MistralAIAdapter, # codespell:ignore tral
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
enhancements:
- |
Support for Llama3 models on AWS Bedrock.
3 changes: 3 additions & 0 deletions test/prompt/invocation_layer/test_amazon_bedrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ def test_supports_with_stream_true_for_model_that_does_not_support_streaming():
("meta.llama2-13b-chat-v1", MetaLlama2ChatAdapter),
("meta.llama2-70b-chat-v1", MetaLlama2ChatAdapter),
("meta.llama2-130b-v5", MetaLlama2ChatAdapter), # artificial
("meta.llama3-8b-instruct-v1:0", MetaLlama2ChatAdapter),
("meta.llama3-70b-instruct-v1:0", MetaLlama2ChatAdapter),
("meta.llama3-130b-instruct-v5:9", MetaLlama2ChatAdapter), # artificial
("mistral.mistral-7b-instruct-v0:2", MistralAIAdapter),
("mistral.mixtral-8x7b-instruct-v0:1", MistralAIAdapter),
("mistral.mistral-large-2402-v1:0", MistralAIAdapter),
Expand Down

0 comments on commit 9ea5ee1

Please sign in to comment.