Cohere Models on Amazon Bedrock
In an effort to make our language-model capabilities more widely available, we’ve partnered with a few major platforms to create hosted versions of our offerings.
Here, you’ll learn how to use Amazon Bedrock to deploy both the Cohere Command and the Cohere Embed models on the AWS cloud computing platform. The following models are available on Bedrock:
- Command R
- Command R+
- Command Light
- Command
- Embed - English
- Embed - Multilingual
Note that the code snippets below are in Python, but you can find the equivalent code for other languages (if they’re supported) here.
Prerequisites
Here are the steps you’ll need to get set up in advance of running Cohere models on Amazon Bedrock.
- Subscribe to Cohere’s models on Amazon Bedrock. For more details, see here.
- You’ll also have to configure your authentication credentials for AWS. This document has more information.
Embeddings
You can use this code to invoke Cohere’s Embed English v3 model (cohere.embed-english-v3
) or Embed Multilingual v3 model (cohere.embed-multilingual-v3
) on Amazon Bedrock:
Note that we’ve released multimodal embeddings models that are able to handle images in addition to text. Find more information here.
Text Generation
You can use this code to invoke either Command R (cohere.command-r-v1:0
), Command R+ (cohere.command-r-plus-v1:0
), Command (cohere.command-text-v14
), or Command light (cohere.command-light-text-v14
) on Amazon Bedrock: