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) here.
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, 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:
Rerank
You can use this code to invoke our latest Rerank models on Bedrock