Instructions to use CohereLabs/command-a-plus-05-2026-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CohereLabs/command-a-plus-05-2026-bf16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="CohereLabs/command-a-plus-05-2026-bf16") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("CohereLabs/command-a-plus-05-2026-bf16") model = AutoModelForImageTextToText.from_pretrained("CohereLabs/command-a-plus-05-2026-bf16") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use CohereLabs/command-a-plus-05-2026-bf16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CohereLabs/command-a-plus-05-2026-bf16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CohereLabs/command-a-plus-05-2026-bf16", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/CohereLabs/command-a-plus-05-2026-bf16
- SGLang
How to use CohereLabs/command-a-plus-05-2026-bf16 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "CohereLabs/command-a-plus-05-2026-bf16" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CohereLabs/command-a-plus-05-2026-bf16", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "CohereLabs/command-a-plus-05-2026-bf16" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CohereLabs/command-a-plus-05-2026-bf16", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use CohereLabs/command-a-plus-05-2026-bf16 with Docker Model Runner:
docker model run hf.co/CohereLabs/command-a-plus-05-2026-bf16
Update README.md
Browse files
README.md
CHANGED
|
@@ -202,7 +202,8 @@ Command A+ has been specifically trained with conversational tool use capabiliti
|
|
| 202 |
|
| 203 |
Tool use with Command A+ is supported through [chat templates](https://huggingface.co/docs/transformers/main/en/chat_templating#advanced-tool-use--function-calling) in Transformers. We recommend providing tool descriptions using JSON schema.
|
| 204 |
|
| 205 |
-
|
|
|
|
| 206 |
|
| 207 |
```py
|
| 208 |
from transformers import AutoTokenizer
|
|
@@ -266,8 +267,10 @@ conversation.append({"role": "tool", "tool_call_id": "0", "content": api_respons
|
|
| 266 |
After that, you can generate() again to let the model use the tool result in the chat.
|
| 267 |
|
| 268 |
Note that this was a very brief introduction to tool calling \- for more information, see the Transformers [tool use documentation](https://huggingface.co/docs/transformers/main/chat_templating#advanced-tool-use--function-calling).
|
|
|
|
| 269 |
|
| 270 |
-
|
|
|
|
| 271 |
|
| 272 |
Optionally, one can ask the model to include grounding spans (citations) in its response to indicate the source of the information, by using `enable_citations=True` in `tokenizer.apply_chat_template(*)`. The generation would look like this:
|
| 273 |
|
|
@@ -276,6 +279,8 @@ On 29th September 2023, the total sales amount was <co>10000</co: 0:[0]> and the
|
|
| 276 |
```
|
| 277 |
|
| 278 |
When citations are turned on, the model associates pieces of texts (called "spans") with those specific tool results 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, listing them out in the closing tag. For example, `<co>span</co: 0:[1,2],1:[0]>` means that "span" is supported by result 1 and 2 from `tool_call_id=0` as well as result 0 from `tool_call_id=1`. Sources from the same tool call are grouped together and listed as `{tool_call_id}:[{list of result indices}]`, before they are joined together by ",".
|
|
|
|
|
|
|
| 279 |
|
| 280 |
## **Model Card Contact**
|
| 281 |
|
|
|
|
| 202 |
|
| 203 |
Tool use with Command A+ is supported through [chat templates](https://huggingface.co/docs/transformers/main/en/chat_templating#advanced-tool-use--function-calling) in Transformers. We recommend providing tool descriptions using JSON schema.
|
| 204 |
|
| 205 |
+
<details>
|
| 206 |
+
<summary><b>Tool Use Example [CLICK TO EXPAND]</b></summary>
|
| 207 |
|
| 208 |
```py
|
| 209 |
from transformers import AutoTokenizer
|
|
|
|
| 267 |
After that, you can generate() again to let the model use the tool result in the chat.
|
| 268 |
|
| 269 |
Note that this was a very brief introduction to tool calling \- for more information, see the Transformers [tool use documentation](https://huggingface.co/docs/transformers/main/chat_templating#advanced-tool-use--function-calling).
|
| 270 |
+
</details>
|
| 271 |
|
| 272 |
+
<details>
|
| 273 |
+
<summary><b>Tool Use With Citations [CLICK TO EXPAND]</b></summary>
|
| 274 |
|
| 275 |
Optionally, one can ask the model to include grounding spans (citations) in its response to indicate the source of the information, by using `enable_citations=True` in `tokenizer.apply_chat_template(*)`. The generation would look like this:
|
| 276 |
|
|
|
|
| 279 |
```
|
| 280 |
|
| 281 |
When citations are turned on, the model associates pieces of texts (called "spans") with those specific tool results 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, listing them out in the closing tag. For example, `<co>span</co: 0:[1,2],1:[0]>` means that "span" is supported by result 1 and 2 from `tool_call_id=0` as well as result 0 from `tool_call_id=1`. Sources from the same tool call are grouped together and listed as `{tool_call_id}:[{list of result indices}]`, before they are joined together by ",".
|
| 282 |
+
</details>
|
| 283 |
+
|
| 284 |
|
| 285 |
## **Model Card Contact**
|
| 286 |
|