From 8bfd7eeeeface0c68122ee9f48b6428422949a07 Mon Sep 17 00:00:00 2001 From: alexrs-cohere Date: Tue, 17 Dec 2024 18:36:31 +0100 Subject: [PATCH] Add Cohere2 docs details (#35294) * Add Cohere2 docs details * Update docs/source/en/model_doc/cohere2.md Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> --------- Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> --- docs/source/en/model_doc/cohere2.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/source/en/model_doc/cohere2.md b/docs/source/en/model_doc/cohere2.md index 4d3a1f0cb0929f..33e67d48fb0e8b 100644 --- a/docs/source/en/model_doc/cohere2.md +++ b/docs/source/en/model_doc/cohere2.md @@ -1,5 +1,12 @@ # Cohere +## Overview +[C4AI Command R7B](https://cohere.com/blog/command-r7b) is an open weights research release of a 7B billion parameter model developed by Cohere and Cohere For AI. It has advanced capabilities optimized for various use cases, including reasoning, summarization, question answering, and code. The model is trained to perform sophisticated tasks including Retrieval Augmented Generation (RAG) and tool use. The model also has powerful agentic capabilities that can use and combine multiple tools over multiple steps to accomplish more difficult tasks. It obtains top performance on enterprise-relevant code use cases. C4AI Command R7B is a multilingual model trained on 23 languages. + +The model features three layers with sliding window attention (window size 4096) and ROPE for efficient local context modeling and relative positional encoding. A fourth layer uses global attention without positional embeddings, enabling unrestricted token interactions across the entire sequence. + +The model has been trained on 23 languages: English, French, Spanish, Italian, German, Portuguese, Japanese, Korean, Arabic, Chinese, Russian, Polish, Turkish, Vietnamese, Dutch, Czech, Indonesian, Ukrainian, Romanian, Greek, Hindi, Hebrew, and Persian. + ## Usage tips The model and tokenizer can be loaded via: @@ -20,7 +27,7 @@ gen_tokens = model.generate( max_new_tokens=100, do_sample=True, temperature=0.3, - ) +) gen_text = tokenizer.decode(gen_tokens[0]) print(gen_text)