Repository navigation
[Core] Shared abstractions for specialized decode kernels - #61311
simondanielsson wants to merge 91 commits into
Conversation
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Resolves the envs.py conflict in favour of upstream's removal of VLLM_ROCM_MONO_DECODE (superseded by --monokernel / KernelConfig.monokernel) while keeping VLLM_MONO_UNSAFE_WARN and VLLM_MONO_FAULT_INJECT, and keeps the tests/models/common/mono wiring in the Basic Models (Other) Buildkite step. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
|
Hi @simondanielsson thanks for the work! For now I have one concern over the |
@Fangzhou-Ai Great point, you're right. I'll do:
|
…el' alternative Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
ChuanLi1101
left a comment
There was a problem hiding this comment.
One check needs to come back. _record_view treats the KV cache as [blocks, block, RECORD] and steps to the next block with kv.stride(0). That stride has to be at least block * RECORD, or the next block starts inside the current one. refuse_caches only checks stride(0) < RECORD. Please validate kv.stride(0) >= block * RECORD before creating the view.
On MI350 the monokernel ITL matches main. The tok/s gaps follow acceptance on a short random bench. GSM8K and GPQA stay within stderr.
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
shen-shanshan
left a comment
There was a problem hiding this comment.
It's better to add the introduction/tutorial in the PR body into https://github.com/vllm-project/vllm/tree/main/docs/design.
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
|
Documentation preview: https://vllm--61311.org.readthedocs.build/en/61311/ |
@shen-shanshan Good idea, added and refined a bit. PTAL 🙏 |
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
(the text below is written by myself)
Purpose
The kernels themselves will naturally remain difficult to review thoroughly, but ideally model code should remain easy to review. The abstraction layer should deliberately be made as thin as possible,
Note: you can run with either
--monokernelor--specialized-decode monokernelClaims
DecodeSpecandSpecializedDecodeabstractions invllm/models/common/specialized_decode/For details on point 1, see design doc in the end of the PR description.
Validation
Check no regression on dsv41
1. DeepSeek-v41 on MI350
On MI350, force max 8 seqs
1. Performance non-regression check
1k/512
--monokernel--specialized-decode--monokernel--specialized-decode64k/1k
--monokernel--specialized-decode--monokernel--specialized-decodeAccuracy
1, gsm8k
Main, specialized-decode
Main no mono
This branch. specialized decode
This branch
2. gpqa_diamond_cot_zeroshot
Main, specialized-decode
Main no mono
This branch, specialized decode
This branch
3. niah_single_2 @ 128k
Main, specialized-decode
Main no mono
This branch. specialized decode
This branch
2. DSv41 on MI300
vllm bench serve:
--monokernel--specialized-decode*--monokernel--specialized-decode*--monokernel--specialized-decode*gsm8k
Main, specialized dedode
This branch, specialized dedode
Main
This branch
gpqa diamond zero shot
Main, specialized dedode
This branch, specialized dedode
Main
This branch
niah 128k
Main
This branch
Main specialized decode
This branch specialized decode
1.1 Points from the RFC not covered