-
Notifications
You must be signed in to change notification settings - Fork 292
[NVIDIA] Add SGlang B200 FP4 #31
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
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
ae8efdb
new command
KaunilD 580bd36
redundant stuff
KaunilD 68cdf7a
new command
KaunilD b9fd613
new command
KaunilD 712856c
new command
KaunilD d76f7a9
new command
KaunilD e71bb8f
new yaml structure
KaunilD 0031331
new yaml structure
KaunilD 7ffd0e0
redundant character
KaunilD 6827384
images
KaunilD 7e56d0c
added config
KaunilD 2e45e2d
moved yaml
KaunilD 5ee23ee
slurm script
KaunilD 989f10d
slurm config
KaunilD 11092bd
slurm config
KaunilD 6f18531
slurm config
KaunilD 07c41fc
slurm config
KaunilD 53d1e9c
slurm config
KaunilD fa4f926
slurm config
KaunilD c3f8da8
Update dsr1-tmpl.yml
kedarpotdar-nv 306c378
Update dsr1_fp4_b200_slurm.sh
kedarpotdar-nv 8e61c53
Update dsr1_fp4_b200_slurm.sh
kedarpotdar-nv 8ed7586
Update dsr1_fp4_b200_slurm.sh
kedarpotdar-nv 031aea0
Merge branch 'main' into kepotdar-add-sgl-fp4
functionstackx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| echo "JOB $SLURM_JOB_ID running on NODE $SLURMD_NODENAME" | ||
|
|
||
| huggingface-cli download $MODEL | ||
| SERVER_LOG=$(mktemp /tmp/server-XXXXXX.log) | ||
|
|
||
| set -x | ||
| PORT=$(( 8888 + $PORT_OFFSET )) | ||
|
|
||
|
|
||
| # Default: recv every ~10 requests; if CONC ≥ 16, relax to ~30 requests between scheduler recv polls. | ||
|
|
||
| SCHEDULER_RECV_INTERVAL=10 | ||
|
|
||
| if [[ $CONC -ge 16 ]]; then | ||
| SCHEDULER_RECV_INTERVAL=30 | ||
| fi | ||
|
|
||
|
|
||
|
|
||
| echo "SCHEDULER_RECV_INTERVAL: $SCHEDULER_RECV_INTERVAL, CONC: $CONC, ISL: $ISL, OSL: $OSL" | ||
|
|
||
|
|
||
| PYTHONNOUSERSITE=1 python3 -m sglang.launch_server --model-path $MODEL --host 0.0.0.0 --port $PORT --trust-remote-code \ | ||
| --tensor-parallel-size=$TP --data-parallel-size=1 \ | ||
| --cuda-graph-max-bs 256 --max-running-requests 256 --mem-fraction-static 0.85 --kv-cache-dtype fp8_e4m3 \ | ||
| --chunked-prefill-size 16384 \ | ||
| --enable-ep-moe --quantization modelopt_fp4 --enable-flashinfer-allreduce-fusion --scheduler-recv-interval $SCHEDULER_RECV_INTERVAL \ | ||
| --enable-symm-mem --disable-radix-cache --attention-backend trtllm_mla --enable-flashinfer-trtllm-moe --stream-interval 10 \ | ||
| > $SERVER_LOG 2>&1 & | ||
|
|
||
| set +x | ||
| IGNORE_PAT="Ignore import error when loading sglang.srt.models.glm4v_moe: No module named 'transformers.models.glm4v_moe'" | ||
|
|
||
| while IFS= read -r line; do | ||
| printf '%s\n' "$line" | ||
|
|
||
| # Skip the known benign "Ignore import error ..." line | ||
| if [[ "$line" == *"$IGNORE_PAT"* ]]; then | ||
| continue | ||
| fi | ||
|
|
||
| # Keep your original "error" trap for everything else | ||
| if [[ "$line" =~ [Ee][Rr][Rr][Oo][Rr] ]]; then | ||
| sleep 5 | ||
| tail -n100 "$SERVER_LOG" | ||
| echo "JOB ${SLURM_JOB_ID:-NA} ran on NODE ${SLURMD_NODENAME:-unknown}" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Break when server is ready | ||
| if [[ "$line" == *"The server is fired up and ready to roll"* ]]; then | ||
| break | ||
| fi | ||
| # Start tail from the beginning so we don't miss early lines | ||
| done < <(tail -n +1 -F "$SERVER_LOG") | ||
|
|
||
| set -x | ||
| git clone https://github.com/kimbochen/bench_serving.git | ||
|
|
||
| # warmup for JIT kernels | ||
| python3 bench_serving/benchmark_serving.py \ | ||
| --model $MODEL --backend vllm \ | ||
| --base-url http://0.0.0.0:$PORT \ | ||
| --dataset-name random \ | ||
| --random-input-len $ISL --random-output-len $OSL --random-range-ratio $RANDOM_RANGE_RATIO \ | ||
| --num-prompts $CONC --max-concurrency $CONC \ | ||
| --request-rate inf --ignore-eos | ||
|
|
||
| python3 bench_serving/benchmark_serving.py \ | ||
| --model $MODEL --backend vllm \ | ||
| --base-url http://0.0.0.0:$PORT \ | ||
| --dataset-name random \ | ||
| --random-input-len $ISL --random-output-len $OSL --random-range-ratio $RANDOM_RANGE_RATIO \ | ||
| --num-prompts $(( $CONC * 10 )) --max-concurrency $CONC \ | ||
| --request-rate inf --ignore-eos \ | ||
| --save-result --percentile-metrics 'ttft,tpot,itl,e2el' \ | ||
| --result-dir /workspace/ \ | ||
| --result-filename $RESULT_FILENAME.json | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.