Cohere Models on Amazon Bedrock
In this guide, you’ll learn how to use Amazon Bedrock to deploy the Cohere Command, Embed, and Rerank 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
- Rerank v3.5
Note that the code snippets below are in Python, but you can find the equivalent code for other languages (if they’re supported) in the Cohere SDK Cloud Platform Compatibility section.
Prerequisites
THese 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, refer to Request access to models in the Amazon documentation.
- You’ll also have to configure your authentication credentials for AWS. The Amazon documentation 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. Refer to Unlocking the Power of Multimodal Embeddings for more details.
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:
Rerank
You can use this code to invoke our latest Rerank models on Bedrock