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

Detokenize incrementally when streaming #653

Merged
merged 4 commits into from
Jul 19, 2024
Merged

Conversation

hnyls2002
Copy link
Collaborator

@hnyls2002 hnyls2002 commented Jul 19, 2024

The detokenizer_manager achieves very low performance when 1) streaming is enabled, 2) model forward is very swift.

Changed the decoding process into incremental detokenization in detokenizer_manager, and it is not compatible with mutable output_ids (when jump forward).

@hnyls2002 hnyls2002 merged commit a9ef49c into main Jul 19, 2024
2 checks passed
@hnyls2002 hnyls2002 deleted the fix-streaming-detokenizer branch July 19, 2024 00:57
@zhyncs
Copy link
Member

zhyncs commented Jul 19, 2024

@hnyls2002 Nice work! cc @merrymercy @Ying1123 @yzh119

model: Llama 3 8B Instruct
hardware: A100 80G

# server
python3 -m sglang.launch_server --model /root/Meta-Llama-3-8B-Instruct --trust-remote-code --port 23333 --disable-radix-cach --stream-interval 1

# client
python3 benchmark_serving.py --backend openai --host 127.0.0.1 --port 23333 --dataset /root/ShareGPT_V3_unfiltered_cleaned_split.json --model /root/Meta-Llama-3-8B-Instruct --tokenizer /root/Meta-Llama-3-8B-Instruct --num-prompts 1000 --request-rate 128 --trust-remote-code

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.

2 participants