Skip to content

aws-samples/Cohere-on-AWS

Cohere on AWS examples

cohereaws

Welcome to the repository hosting example use of Cohere models on AWS! You will find a few folders within this repository that give various examples. Open a PR if you would like to contribute! 🔀

What's New

  • Cohere Command R fine-tuning model with Sagemaker blog: This blog post announces the availability of the Cohere Command R fine-tuning model on Amazon SageMaker. The blog explains the benefits of fine-tuning Cohere Command R, including improved performance in specific domains and tasks, and provides a step-by-step guide on how to use this model on SageMaker. We cover data preparation, model deployment, fine-tuning process, endpoint creation for inference, and the importance of cleaning up resources after use. Additionally, it highlights the model's key features such as high precision on Retrieval Augmented Generation tasks, low latency, and support for multiple languages.

  • Semantic Search with Cohere Embedding Archives: In this notebook we show an example of using different embeddings and the nearest neighbor algorithm to search based on meaning and not just keywords. Binary embeddings give a 32x reduction in memory compared to typical float32 embedding. Semantic search is also the foundation for improvement algorithms such as hierarchical navigable small world and multiple negative ranking loss.

  • Cohere Rerank Multilingual on AWS notebook: This notebook demonstrates how to implement a multilingual Retrieval-Augmented Generation (RAG) system using Cohere's Rerank3 model and FAISS on AWS. We show the integration of Cohere's multilingual capabilities with AWS services to create an efficient and accurate information retrieval system across multiple languages. The notebook includes data preparation, model deployment, and the implementation of the RAG pipeline using Rerank3 for improved search relevance.

  • Next release scheduled for 8/22

Notebooks

bedrock-prompting-notebooks

Within this folder, find examples on prompting for Command R and Command R+ models with the Bedrock API

cohere-cookbooks

Cohere has consolidated and created a "cookbook" providing examples of using their models. Cohere's Cookbooks can be found here https://docs.cohere.com/page/cookbooks! This folder represents these cookbooks leveraging Bedrock APIs (Converse and Invoke_Model) to help customers become familiar with Bedrock APIs.

rag-recipes

This folder contains example notebooks leveraging RAG approach with mutliple models from Cohere including Rerank and embeddings models.

Security

See CONTRIBUTING for more information.

Distributors

  • AWS
  • Cohere

License

This library is licensed under the MIT-0 License. See the LICENSE file.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published