Archive of AI

Source Snapshot / 2024-04-04-cohere-191-2

Model Card for Cohere Labs Command R+

Linked event: 2024-04-04 · Cohere Releases Command R+, Strengthening Retrieval-Augmented Generation and Multi-Step Tool Use

Publisher
Cohere Labs / Hugging Face
Archived
2026-11-23
Capture Method
Direct page capture
HTTP / SHA-256
200 / aee8b0c2737f143a
Original URL
Open source ↗
Wayback Backup
Not archived
This page preserves a plain-text static snapshot against link rot. When citing figures, tables, or full legal terms, verify against the original URL and Wayback Machine archive.

Hugging Face

Search models, datasets, users... ⌘K

c4ai-command-r-plus

Cohere Labs 4.05k

Text Generation

Transformers

10 languages

doi:10.57967/hf/3138

conversational

text-generation-inference

License: cc-by-nc-4.0

Model card Files Files and versions

Copy to bucket

Use this model

c4ai-command-r-plus / README.md

Update README.md

3de12c8 verified over 1 year ago

preview code

Raw History Blame Contribute Delete

inference: false

license: cc-by-nc-4.0

library_name: transformers

extra_gated_prompt: >-

By submitting this form, you agree to the [License

Agreement](https://cohere.com/c4ai-cc-by-nc-license) and acknowledge that the

information you provide will be collected, used, and shared in accordance with

Cohere’s [Privacy Policy]( https://cohere.com/privacy). You’ll receive email updates about Cohere Labs and Cohere research, events, products and services. You can unsubscribe at any time.

extra_gated_fields:

Affiliation: text

type: select

- Afghanistan

- Åland Islands

- United Arab Emirates

- American Samoa

- Antarctica

- French Southern Territories

- Antigua and Barbuda

- Azerbaijan

- Bonaire Sint Eustatius and Saba

- Burkina Faso

- Bangladesh

- Bosnia and Herzegovina

- Saint Barthélemy

- Plurinational State of Bolivia

- Brunei-Darussalam

- Bouvet-Island

- Central African Republic

- Cocos (Keeling) Islands

- Switzerland

- Côte-dIvoire

- Democratic Republic of the Congo

- Cook Islands

- Cabo Verde

- Costa Rica

- Christmas Island

- Cayman Islands

- Dominican Republic

- Western Sahara

- Falkland Islands (Malvinas)

- Faroe Islands

- Federated States of Micronesia

- United Kingdom

- Guadeloupe

- Guinea Bissau

- Equatorial Guinea

- French Guiana

- Heard Island and McDonald Islands

- Isle of Man

- British Indian Ocean Territory

- Islamic Republic of Iran

- Kazakhstan

- Kyrgyzstan

- Saint-Kitts-and-Nevis

- South Korea

- Lao-Peoples-Democratic-Republic

- Saint-Lucia

- Liechtenstein

- Luxembourg

- Saint Martin (French-part)

- Republic of Moldova

- Madagascar

- Marshall Islands

- North Macedonia

- Montenegro

- Northern Mariana Islands

- Mozambique

- Mauritania

- Montserrat

- Martinique

- New Caledonia

- Norfolk Island

- Netherlands

- New Zealand

- Philippines

- Papua New Guinea

- Puerto Rico

- North Korea

- State of Palestine

- French Polynesia

- Saudi Arabia

- South Georgia and the South Sandwich Islands

- Saint Helena Ascension and Tristan da Cunha

- Svalbard and Jan Mayen

- Solomon Islands

- Sierra Leone

- El Salvador

- San Marino

- Saint Pierre and Miquelon

- South Sudan

- Sao Tome and Principe

- Sint Maarten (Dutch-part)

- Seychelles

- Syrian Arab Republic

- Turks and Caicos Islands

- Tajikistan

- Turkmenistan

- Timor Leste

- Trinidad and Tobago

- United Republic of Tanzania

- United States Minor Outlying Islands

- United-States

- Uzbekistan

- Holy See (Vatican City State)

- Saint Vincent and the Grenadines

- Bolivarian Republic of Venezuela

- Virgin Islands British

- Virgin Islands U.S.

- Wallis and Futuna

- South Africa

I agree to use this model for non-commercial use ONLY: checkbox

new_version: CohereLabs/c4ai-command-r-plus-08-2024

# Model Card for Cohere Labs Command R+

🚨 **This model is non-quantized version of Cohere Labs Command R+. You can find the quantized version of Cohere Labs Command R+ using bitsandbytes [here](https://huggingface.co/CohereLabs/c4ai-command-r-plus-4bit)**.

## Model Summary

Cohere Labs Command R+ is an open weights research release of a 104B billion parameter model with highly advanced capabilities, this includes Retrieval Augmented Generation (RAG) and tool use to automate sophisticated tasks. The tool use in this model generation enables multi-step tool use which allows the model to combine multiple tools over multiple steps to accomplish difficult tasks. Cohere Labs Command R+ is a multilingual model evaluated in 10 languages for performance: English, French, Spanish, Italian, German, Brazilian Portuguese, Japanese, Korean, Arabic, and Simplified Chinese. Command R+ is optimized for a variety of use cases including reasoning, summarization, and question answering.

Command R+ is part of a family of open weight releases from Cohere Labs and Cohere. Our smaller companion model is [Cohere Labs Command R](https://huggingface.co/CohereLabs/c4ai-command-r-v01)

Developed by: [Cohere](https://cohere.com/) and [Cohere Labs](https://cohere.for.ai)

- Point of Contact: [Cohere Labs](https://cohere.for.ai/)

- License: [CC-BY-NC](https://cohere.com/c4ai-cc-by-nc-license), requires also adhering to [Cohere Lab's Acceptable Use Policy](https://docs.cohere.com/docs/c4ai-acceptable-use-policy)

- Model: c4ai-command-r-plus

- Model Size: 104 billion parameters

- Context length: 128K

**Try Cohere Labs Command R+**

You can try out Cohere Labs Command R+ before downloading the weights in our hosted [Hugging Face Space](https://huggingface.co/spaces/CohereLabs/c4ai-command?model=command-r-plus).

Please install `transformers` from the source repository that includes the necessary changes for this model.

# pip install 'git+https://github.com/huggingface/transformers.git'

from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "CohereLabs/c4ai-command-r-plus"

tokenizer = AutoTokenizer.from_pretrained(model_id)

model = AutoModelForCausalLM.from_pretrained(model_id)

# Format message with the command-r-plus chat template

messages = [{"role": "user", "content": "Hello, how are you?"}]

input_ids = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")

## <BOS_TOKEN><|START_OF_TURN_TOKEN|><|USER_TOKEN|>Hello, how are you?<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>

gen_tokens = model.generate(

max_new_tokens=100,

do_sample=True,

temperature=0.3,

gen_text = tokenizer.decode(gen_tokens[0])

print(gen_text)

**Quantized model through bitsandbytes, 8-bit precision**

# pip install 'git+https://github.com/huggingface/transformers.git' bitsandbytes accelerate

from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig

bnb_config = BitsAndBytesConfig(load_in_8bit=True)

model = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=bnb_config)

**Quantized model through bitsandbytes, 4-bit precision**

This model is non-quantized version of Cohere Labs Command R+. You can find the quantized version of Cohere Labs Command R+ using bitsandbytes [here](https://huggingface.co/CohereLabs/c4ai-command-r-plus-4bit).

## Model Details

**Input**: Models input text only.

**Output**: Models generate text only.

**Model Architecture**: This is an auto-regressive language model that uses an optimized transformer architecture. After pretraining, this model uses supervised fine-tuning (SFT) and preference training to align model behavior to human preferences for helpfulness and safety.

**Languages covered**: The model is optimized to perform well in the following languages: English, French, Spanish, Italian, German, Brazilian Portuguese, Japanese, Korean, Simplified Chinese, and Arabic.

Pre-training data additionally included the following 13 languages: Russian, Polish, Turkish, Vietnamese, Dutch, Czech, Indonesian, Ukrainian, Romanian, Greek, Hindi, Hebrew, Persian.

**Context length**: Command R+ supports a context length of 128K.

## Evaluations

[...内容已截断,完整版请查看原文或 Wayback 快照]