Skip to content

[Models] Cohere Eagle + fix to Cohere MoE#42078

Merged
vllm-bot merged 6 commits into
vllm-project:mainfrom
Terrencezzj:tz-cohere-moe-release
May 9, 2026
Merged

[Models] Cohere Eagle + fix to Cohere MoE#42078
vllm-bot merged 6 commits into
vllm-project:mainfrom
Terrencezzj:tz-cohere-moe-release

Conversation

@Terrencezzj

@Terrencezzj Terrencezzj commented May 8, 2026

Copy link
Copy Markdown
Contributor

Purpose

Add Cohere Eagle to vLLM.
Update CohereCommandReasoningParser

Online inference

Terminal 1: start server

MODEL_ID=<model_path>
DRAFT_ID=<draft_path>
SPEC_CONFIG=$(printf '{"method":"eagle","model":"%s","num_speculative_tokens":3,"draft_tensor_parallel_size":2}' "$DRAFT_ID")
vllm serve $MODEL_ID --trust-remote-code --speculative-config "$SPEC_CONFIG"

Terminal 2: run client

curl http://127.0.0.1:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d "{
    \"model\": \"${MODEL_ID}\",
    \"messages\": [
      {\"role\": \"user\", \"content\": \"Hello, what is 2+2?\"}
    ]
  }"

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for the EAGLE speculative decoding draft model for Cohere architectures, including the implementation of EagleCohereForCausalLM and updates to the reasoning parser for handling multiple structural tags. The review feedback highlights several critical improvements: initializing flags to track model-specific weights for the speculative proposer, ensuring the first draft layer correctly disables the input layernorm to align with the original EAGLE implementation, and removing logic that skips loading embeddings to avoid breaking weight-sharing comparisons.

Comment thread vllm/model_executor/models/cohere_eagle.py
Comment thread vllm/model_executor/models/cohere_eagle.py
Comment thread vllm/model_executor/models/cohere_eagle.py
Comment thread vllm/model_executor/models/cohere_eagle.py Outdated
@Terrencezzj Terrencezzj changed the title [Models] Cohere Eagle [Models] Cohere Eagle + fix to Cohere MoE May 8, 2026
@mergify

mergify Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Documentation preview: https://vllm--42078.org.readthedocs.build/en/42078/

@mergify mergify Bot added the documentation Improvements or additions to documentation label May 8, 2026
Terrencezzj and others added 3 commits May 8, 2026 16:53
…er for MHL v2

- Add EagleCohereForCausalLM model (cohere_eagle.py) for Eagle speculative decoding
- Register EagleCohereForCausalLM in model and test registries
- Add Cohere2VisionForConditionalGeneration to multimodal spec decode list
- Update CohereCommandReasoningParser for MHL v2: support multiple JSON tags
  per architecture (e.g. MOE uses both START_RESPONSE and START_TEXT delimiters),
  add Cohere2MoeForCausalLM tag style, fix structural_tag triggers list

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Terrencezzj <terrence@cohere.ai>
Signed-off-by: Terrencezzj <terrence@cohere.ai>
Signed-off-by: Terrencezzj <terrence@cohere.ai>
@Terrencezzj Terrencezzj force-pushed the tz-cohere-moe-release branch from d5a3e2c to 344552d Compare May 8, 2026 16:53
@DarkLight1337 DarkLight1337 added the verified Run pre-commit for new contributors without triggering other tests label May 8, 2026
@mergify

mergify Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Hi @Terrencezzj, the pre-commit checks have failed. Please run:

uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy failing?
mypy is run differently in CI. If the failure is related to this check, please use the following command to run it locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10

Signed-off-by: Terrencezzj <terrence@cohere.ai>
@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label May 8, 2026
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) May 8, 2026 17:43
Signed-off-by: Terrencezzj <terrence@cohere.ai>
auto-merge was automatically disabled May 8, 2026 21:00

Head branch was pushed to by a user without write access

@vllm-bot vllm-bot merged commit a2812be into vllm-project:main May 9, 2026
78 of 85 checks passed
weifang231 pushed a commit to weifang231/eb-vllm that referenced this pull request May 13, 2026
Signed-off-by: Terrencezzj <terrence@cohere.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
mfylcek pushed a commit to mfylcek/vllm that referenced this pull request May 19, 2026
Signed-off-by: Terrencezzj <terrence@cohere.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
@Terrencezzj Terrencezzj mentioned this pull request May 19, 2026
4 tasks
jhu960213 pushed a commit to jhu960213/vllm that referenced this pull request May 20, 2026
Signed-off-by: Terrencezzj <terrence@cohere.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
mvanhorn pushed a commit to mvanhorn/vllm that referenced this pull request Jun 4, 2026
Signed-off-by: Terrencezzj <terrence@cohere.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
knight0528 pushed a commit to knight0528/vllm that referenced this pull request Jun 8, 2026
Signed-off-by: Terrencezzj <terrence@cohere.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation new-model Requests to new models ready ONLY add when PR is ready to merge/full CI is needed speculative-decoding v1 verified Run pre-commit for new contributors without triggering other tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants