[JJ] Preallocate DeepSeek V4 padded-query output - #671
Conversation
Make the fused DeepSeek V4 Q-normalization, RoPE, and KV-insert operator write into a caller-owned q_out tensor instead of allocating its padded output inside the stable-ABI wrapper. Reserve reusable padded-query storage during V1 and V2 memory profiling, including DBO microbatches, so KV-cache admission accounts for the runtime allocation. Update NVIDIA and AMD DSpark context-KV insertion to use the same mutating operator contract. Preserve functionalization support for both caller-owned q_out and the legacy in-place q schema. Validate tensor shape, dtype, contiguity, and device before kernel launch. Co-authored-by: alexbi29 <alexbi29@users.noreply.github.com> Co-authored-by: jasl <jasl9187@hotmail.com> Co-authored-by: OpenAI Codex <codex@openai.com>
|
Warning Review limit reachedNext included review available in 59 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (12)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
7f56d25
into
local-inference-lab:dev/jovian-judgement
|
Included in Source validation: replaying all 32 R35 review heads on the pinned base exactly reproduces the released Docker's vLLM tree; all 6,870 installed tracked files match. JJ additionally preserves Luke's DS4.1 work and #734. The final composition passed 247 focused checkpoint/scheduler, sampler/warmup and native GPU tests. This is combined-source evidence, not a fresh performance or full-model qualification for this individual PR. Publication-history clarification: the individual merge linked above is in JJ's first-parent history. It replaces the receipt's archived wrapper-merge reference; GitHub's historical merge SHA may still identify that archive. See #731 for component review order and qualification limits. |
Preserve the reviewed source head 6efc116 and its contributor history. The first parent records the ordered serving-source composition. Whole-tree equality and installed-artifact verification are publication gates. Review: #671 Assisted-by: OpenAI Codex Signed-off-by: Martin Vit <martin@voipmonitor.org>
Status
Implemented and TP2-qualified for DeepSeek-V4-Flash-0731 with fixed probabilistic DSpark K5 on NVIDIA SM120.
Operation contract
The fused DeepSeek V4 query-normalization, RoPE, and KV-insert operator writes a padded query tensor consumed by sparse MLA. The model runner must own this output and include its peak size in memory admission before vLLM assigns remaining device memory to GPU KV blocks.
Resulting behavior
q_outtensor and performs no hidden output allocation.The operator API changes with this PR. The Python runtime and compiled vLLM extension must be updated together; out-of-tree callers must provide
q_out.The caller-owned output design originates from jasl/vllm#26. This PR adds V1/DBO reservation, functionalization coverage, and both DSpark context-KV call sites required by the Jovian Judgement runtime.
Validation
Registry artifact:
Source and runtime conditions:
dev/jovian-judgement@b7e3d033676d5db46fb7d6cdd40d760365a1e239a67b59a4099457fbcdadce4476c88504fafaf083FULL_AND_PIECEWISECUDA graphsResults:
Machine-readable receipt: https://github.com/local-inference-lab/blackwell-llm-docker/blob/main/validation/jovian-judgement-ds4-r6-engine-driven-lmcache.json
Compatibility
No model arithmetic, attention selection, KV layout, scheduler policy, or sampling behavior changes. The reserved workspace reduces memory otherwise available for GPU KV blocks and prevents an unaccounted allocation from first appearing under live traffic.
Development disclosure
The implementation and validation were completed with OpenAI Codex assistance under human direction.