Archive of AI

Source Snapshot / 2025-03-13-cohere-command-a-2

Command A 官方模型卡

Linked event: 2025-03-13 · Cohere Releases Enterprise-Efficient Model Command A

Publisher
Cohere Labs/Hugging Face
Archived
2026-11-23
Capture Method
Direct page capture
HTTP / SHA-256
200 / fd9c8e23cc5430e1
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.

[来源关键摘录] 模型卡确认 111B 参数、两张 GPU 部署、非商业许可,以及支持 256K 但下载配置默认 128K 的区别。

[正文前段节选] Hugging Face

Search models, datasets, users... ⌘K

c4ai-command-a-03-2025

Cohere Labs 4.05k

Text Generation

Transformers

23 languages

conversational

Eval Results

arxiv: 2504.00698

License: cc-by-nc-4.0

Model card Files Files and versions

Copy to bucket

Use this model

You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

By submitting this form, you agree to the License Agreement and acknowledge that the information you provide will be collected, used, and shared in accordance with Cohere’s Privacy Policy. You’ll receive email updates about Cohere Labs and Cohere research, events, products and services. You can unsubscribe at any time.

Log in or Sign Up to review the conditions and access this model content.

Model Card for Cohere Labs Command A

Model Summary

Cohere Labs Command A is an open weights research release of a 111 billion parameter model optimized for demanding enterprises that require fast, secure, and high-quality AI. Compared to other leading proprietary and open-weights models Command A delivers maximum performance with minimum hardware costs, excelling on business-critical agentic and multilingual tasks while‬ being deployable on just two GPUs.

Developed by: Cohere and Cohere Labs

Point of Contact: Cohere Labs

License:CC-BY-NC, requires also adhering to Cohere Lab's Acceptable Use Policy

Model: c4ai-command-a-03-2025

Model Size: 111 billion parameters

Context length: 256K

For more details on how this model was developed, check out our Tech Report.

Note: The model supports a context length of 256K but it is configured in Hugging Face for 128K. This value can be updated in the configuration if needed.

Try Cohere Labs Command A

You can try out Cohere Labs Command A before downloading the weights in our hosted Hugging Face Space.

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

# pip install transformers

from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "CohereLabs/c4ai-command-a-03-2025"

tokenizer = AutoTokenizer.from_pretrained(model_id)

model = AutoModelForCausalLM.from_pretrained(model_id)

# Format message with the c4ai-command-a-03-2025 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")

gen_tokens = model.generate(

max_new_tokens=100,

do_sample=True,

temperature=0.3,

gen_text = tokenizer.decode(gen_tokens[0])

print(gen_text)

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. 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.

Languages covered: 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.

Context Length: Command A supports a context length of 256K.

Chat Capabilities:

By default, Command A is configured as a conversational model. A preamble conditions the model on interactive behaviour, meaning it is expected to reply in a conversational fashion, provides introductory statements and follow-up questions, and uses Markdown as well as LaTeX where appropriate. This is desired for interactive experiences, such as chatbots, where the model engages in dialogue.

In other use cases, a non-interactive model behavior might be more desired (e.g. task-focused use cases like extracting information, summarizing text, translation, and categorization). Learn how system messages can be used to achieve such non-interactive behavior here.

Besides, Command A can be configured with two safety modes, which enable users to set guardrails that are both safe and suitable to their needs: contextual mode, or strict mode. Contextual mode is appropriate for wide-ranging interactions with fewer constraints on output, while maintaining core protections by rejecting harmful or illegal suggestions. Command A is configured to contextual mode by default. Strict mode aims to avoid all sensitive topics, such as violent or sexual acts and profanity. For more information, see the Command A prompt format docs.

RAG Capabilities:

Command A has been trained specifically for tasks like the final step of Retrieval Augmented Generation (RAG).

RAG with Command A is supported through chat templates in Transformers. The model takes a conversation as input (with an optional user-supplied system preamble), along with a list of document snippets.

RAG Example [CLICK TO EXPAND]

# Define conversation input

conversation = [{"role": "user", "content": "What has Man always dreamed of?"}]

# Define documents for retrieval-based generation

documents = [

{"heading": "The Moon: Our Age-Old Foe", "body": "Man has always dreamed of destroying the moon. In this essay, I shall..."},

{"heading": "Love is all you need", "body": "Man's dream has always been to find love. This profound lesson..."},

# Get the RAG prompt

input_prompt = tokenizer.apply_chat_template(

conversation=conversation,

documents=documents,

tokenize=False,

add_generation_prompt=True,

return_tensors="pt",

# Tokenize the prompt

input_ids = tokenizer.encode_plus(input_prompt, return_tensors="pt")

You can then generate text from this input as normal.

Document snippets should be short chunks, rather than long documents, typically around 100-400 words per chunk, formatted as key-value pairs. The keys should be short descriptive strings, the values can be text or semi-structured.

You may find that simply including relevant documents directly in a user message works just as well, or better than using the documents parameter to render the special RAG template. The RAG template is generally a strong default and is ideal for users wanting citations. We encourage users to play with both, and to evaluate which mode works best for their specific use case.

Note that this was a very brief introduction to RAG - for more information, see the Command A prompt format docs and the Transformers RAG documentation.

RAG with citations [CLICK TO EXPAND]

Optionally, one can ask the model to include grounding spans (citations) in its response to indicate the source of the information. The code is the same as before, except for this line.

# Get the Grounded Generation prompt, with citations

enable_citations=True,

# There are two answers to this question. Man has dreamed of <co>destroying the moon</co: 0:[0]> and <co>finding love.</co: 0:[1]>

The output looks like this: the model will associate pieces of texts (called "spans") with specific document snippets that support them (called "sources"). Command A uses a pair of tags "<co>" and "</co>" to indicate when a span can be grounded onto a list of sources. For example, "<co>span</co: 0:[0,1]>" means that "span" is supported by documents snippets 0 and 1 that were provided in the last message.

Tool Use Capabilities:

Command A has been specifically trained with conversational tool use capabilities. This allows the model to interact with external tools like APIs, databases, or search engines.

Tool use with Command A is supported through chat templates in Transformers. We recommend providing tool descriptions using JSON schema.

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