[GH-ISSUE #8465] Conflicted description of command-r7b #5446

Closed
opened 2026-04-12 16:40:45 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @vYLQs6 on GitHub (Jan 17, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/8465

What is the issue?

https://www.ollama.com/library/command-r7b

Model readme said 128k context length, but Metadata only shows 8k, which is correct?

Context length: Command R7B supports a context length of 128K.

Image

cohere2.context_length 8192

Image

OS

Windows

GPU

Nvidia

CPU

AMD

Ollama version

0.5.5

Originally created by @vYLQs6 on GitHub (Jan 17, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/8465 ### What is the issue? ### https://www.ollama.com/library/command-r7b ### Model readme said 128k context length, but Metadata only shows 8k, which is correct? > Context length: Command R7B supports a context length of 128K. ![Image](https://github.com/user-attachments/assets/b4aa49b1-2c21-46aa-b415-3f035f744260) > cohere2.context_length 8192 ![Image](https://github.com/user-attachments/assets/aabb2b49-6a4a-47ed-ba13-46146ecfdb7b) ### OS Windows ### GPU Nvidia ### CPU AMD ### Ollama version 0.5.5
GiteaMirror added the bug label 2026-04-12 16:40:45 -05:00
Author
Owner

@rick-github commented on GitHub (Jan 17, 2025):

The base model from HF has a context size of 8192, but the model also has 4 sliding windows to improve attention. A simple needle-in-a-haystack test got 100% for an input token length of 40K, so it seems pretty solid. You can increase the context size during completions by setting num_ctx in the API call or by adjusting the Modelfile with PARAMETER num_ctx.

<!-- gh-comment-id:2597452462 --> @rick-github commented on GitHub (Jan 17, 2025): The base model from HF has a [context size](https://huggingface.co/CohereForAI/c4ai-command-r7b-12-2024/blob/6e95067bc61560b05eb014eef8af443034d94ae9/config.json#L18) of 8192, but the model also has 4 sliding windows to improve attention. A simple [needle-in-a-haystack](https://github.com/chigkim/haystack-test) test got 100% for an input token length of 40K, so it seems pretty solid. You can increase the context size during completions by setting `num_ctx` in the API call or by adjusting the Modelfile with `PARAMETER num_ctx`.
Author
Owner

@mchiang0610 commented on GitHub (Jan 19, 2025):

@vYLQs6 sorry for the confusion. We work with what Cohere has given us.

https://huggingface.co/CohereForAI/c4ai-command-r7b-12-2024/blob/main/config.json#L18

I've fixed the readme for now.

<!-- gh-comment-id:2601041468 --> @mchiang0610 commented on GitHub (Jan 19, 2025): @vYLQs6 sorry for the confusion. We work with what Cohere has given us. https://huggingface.co/CohereForAI/c4ai-command-r7b-12-2024/blob/main/config.json#L18 I've fixed the readme for now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#5446