Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bench speculative script #4235

Merged
merged 1 commit into from
Mar 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions scripts/playground/bench_speculative.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Usage:
# single GPU
python3 bench_speculative.py --model-path meta-llama/Llama-2-7b-chat-hf --speculative-draft-model-path lmsys/sglang-EAGLE-llama2-chat-7B
# multiple GPU
python3 bench_speculative.py --model-path deepseek-ai/DeepSeek-V3 --speculative-draft-model-path lmsys/DeepSeek-V3-NextN --tp-size 8 --trust-remote-code --batch-size 1 4 8 16 32 --steps 0 1 2 --topk 0 1 2 4 --num_draft_tokens 0 2 4 8
"""

import argparse
Expand Down Expand Up @@ -166,6 +169,20 @@ def main(args, server_args):
]
)

if server_args.trust_remote_code:
other_args.extend(
[
"--trust-remote-code",
]
)

if server_args.enable_flashinfer_mla:
other_args.extend(
[
"--enable-flashinfer-mla",
]
)

if server_args.quantization:
other_args.extend(
[
Expand Down
Loading