Skip to content

mtp demo - #4498

Open
dtrawins wants to merge 14 commits into
mainfrom
mtp-demo
Open

mtp demo#4498
dtrawins wants to merge 14 commits into
mainfrom
mtp-demo

Conversation

@dtrawins

@dtrawins dtrawins commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

🛠 Summary

🧪 Checklist

  • Unit tests added.
  • The documentation updated.
  • Change follows security best practices.
    ``

Copilot AI lite review requested due to automatic review settings September 1, 2026 23:14

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

🟡 Changes recommended

The updated README contains several factual/instructional inconsistencies (e.g., benchmark request counts, EAGLE3 num_assistant_tokens=0 behavior, and inconsistent model directory paths) that should be corrected before merge.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates the speculative decoding continuous batching demo documentation to add an MTP walkthrough and refresh deployment/export instructions for speculative decoding strategies.

Changes:

  • Adds a dedicated MTP (Multi-Token Prediction) section with deployment, request, and benchmarking examples.
  • Refreshes EAGLE3 and Fast Draft sections (export commands, deployment examples, and some explanatory text/output).
  • Reorders/clarifies the drafting strategy comparison table and prerequisites.
File summaries
File Description
demos/continuous_batching/speculative_decoding/README.md Adds MTP demo content and updates speculative decoding setup/deployment/benchmarking instructions for multiple strategies.
Review details

Suppressed comments (3)

demos/continuous_batching/speculative_decoding/README.md:190

  • This Docker example mounts ${HOME}/models, but the earlier steps in this section create ./models and the directory tree example is rooted at models/. To keep the instructions consistent, mount the local models directory instead.
docker run ${GPU_ARGS} -d --rm -p 8000:8000 -v ${HOME}/models:/models:ro openvino/model_server:weekly \

demos/continuous_batching/speculative_decoding/README.md:290

  • Earlier in this section the instructions create a local models directory and the folder tree example is rooted at models/, but this command writes to ${HOME}/models. Consider using --model_repository_path models to match the preceding steps and the shown directory layout.
python export_model.py text_generation --source_model meta-llama/CodeLlama-7b-hf --draft_source_model amd/AMD-Llama-135m --weight-format int8 --model_repository_path ${HOME}/models

demos/continuous_batching/speculative_decoding/README.md:334

  • This Docker example mounts ${HOME}/models, but the earlier steps in this section create ./models and the directory tree example is rooted at models/. To keep the instructions consistent, mount the local models directory instead.
docker run -d ${GPU_ARGS} --rm -p 8000:8000 -v ${HOME}/models:/models:ro openvino/model_server:weekly \
  • Files reviewed: 1/1 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

curl https://raw.githubusercontent.com/vllm-project/vllm/refs/heads/main/benchmarks/sonnet.txt -o sonnet.txt
```

Run benchmark with 100 requests sent sequentially:
```
or
```bash
python export_model.py text_generation --source_model Qwen/Qwen3-8B --draft_source_model AngelSlim/Qwen3-8B_eagle3 --draft_eagle3_mode --weight-format int4 --model_repository_path ${HOME}/models
Comment thread demos/continuous_batching/speculative_decoding/README.md Outdated
@dtrawins
dtrawins requested a review from mzegla September 2, 2026 06:50
Comment on lines +145 to +150
```bat
python export_model.py text_generation --source_model Qwen/Qwen3-8B --draft_source_model AngelSlim/Qwen3-8B_eagle3 --draft_eagle3_mode --weight-format int4 --model_repository_path c:\models
```
or
```bash
python export_model.py text_generation --source_model Qwen/Qwen3-8B --draft_source_model AngelSlim/Qwen3-8B_eagle3 --draft_eagle3_mode --weight-format int4 --model_repository_path ${HOME}/models

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Essentially the same. Maybe we should note which command is supposed to use when. Like simple headers: Linux, Windows etc.?

Comment on lines +191 to +194
docker run -d ${GPU_ARGS} --user $(id -u):$(id -g) --rm -p 8000:8000 -v ${HOME}/models:/models:ro openvino/model_server:weekly \
--model_path /models/Qwen/Qwen3-8B \
--model_name Qwen/Qwen3-8B \
--rest_port 8000

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Missing draft model. This command is not a speculative decoding pipeline deployment.


```bat
ovms --rest_port 8000 --config_path ./models/config.json
ovms --rest_port 8000 --model_path c:\models\Qwen\Qwen3-8B --model_name Qwen/Qwen3-8B

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same as above. This command runs OVMS with regular Qwen3-8B model, not a speculative decoding pipeline.

Increase `num_assistant_tokens` until the tokens-per-step figure plateaus, then back off — past the plateau, rejected draft tokens are pure overhead.

Setting `num_assistant_tokens: 0` disables drafting for that request; only the target model runs.
`num_assistant_tokens` must be greater than `0`; OVMS rejects a value of `0` for EAGLE3 decoding.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please revert. New message is incorrect as pointed by copilot.

Comment on lines +335 to +338
docker run -d ${GPU_ARGS} --user $(id -u):$(id -g) --rm -p 8000:8000 -v ${HOME}/models:/models:ro openvino/model_server:weekly \
--rest_port 8000 \
--model_path /models/meta-llama/CodeLlama-7b-hf \
--model_name meta-llama/CodeLlama-7b-hf

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not a speculative decoding deployment. Add draft model parameters.


```bat
ovms --rest_port 8000 --config_path ./models/config.json
ovms --rest_port 8000 --model_path c:\models\meta-llama\CodeLlama-7b-hf --model_name meta-llama/CodeLlama-7b-hf

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not a speculative decoding deployment. Add draft model parameters.

dtrawins and others added 2 commits September 2, 2026 11:50
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants