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

[DO NOT MERGE] Vinayak/moe final hashem #127

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

carlushuang
Copy link

@carlushuang carlushuang commented Aug 11, 2024

This PR combined vinayak/moe_final with PR:#126, kernel from hashem
Note: to enable triton optimization, need download triton code:

export VLLM_USE_ROCM_CUSTOM_PAGED_ATTN=1
export HIP_FORCE_DEV_KERNARG=1
export VLLM_USE_TRITON_FLASH_ATTN=false

export VLLM_MOE_PADDING=128
export TRITON_HIP_USE_NEW_STREAM_PIPELINE=1
export VLLM_MOE_MFMASWIZZLE=1 
export VLLM_MOE_MFMASWIZZLE_M_THRSHLD=128
# if set VLLM_MOE_MFMASWIZZLE_M_THRSHLD=0, this is just doug + vinayak
export VLLM_SCHED_PREFILL_COUNT=6

you can use benchmark in benchmarks/kernels/benchmark_mixtral_moe_dec.py to do benchmark

# test hashem's kernel with tp-2
VLLM_MOE_MFMASWIZZLE_M_THRSHLD=128  python3 benchmarks/kernels/benchmark_mixtral_moe_dec.py  --tp-size 2
 
# test hashem's kernel with tp-1
VLLM_MOE_MFMASWIZZLE_M_THRSHLD=128  python3 benchmarks/kernels/benchmark_mixtral_moe_dec.py  --tp-size 1
 
# test vinayak's triton kernel with tp-2
VLLM_MOE_MFMASWIZZLE_M_THRSHLD=0  python3 benchmarks/kernels/benchmark_mixtral_moe_dec.py  --tp-size 2
 
# test vinayak's triton kernel with tp-1
VLLM_MOE_MFMASWIZZLE_M_THRSHLD=0  python3 benchmarks/kernels/benchmark_mixtral_moe_dec.py  --tp-size 1

vgokhale and others added 24 commits July 30, 2024 02:54
To ensure we we don't run prefills repeatedly during decode, provide a
mechanism to queue up a certain number of prefills before executing.
VLLM_SCHED_PREFILL_COUNT will be the minimum batch count to specify before
executing.  One caveat, the --scheduler-delay-factor should be used to
enforce a longer prefill scheduling value.  This will be set to the value
in VLLM_SCHED_PREFILL_COUNT, if not explicitly provided.  The need for this exists
because an uneven number of prefills can lead to the queue never reaching the
VLLM_SCHED_PREFILL_COUNT.  Causing the server to hang
Copy link

This pull request has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this pull request should remain open. Thank you!

@github-actions github-actions bot added the stale label Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants