Repository navigation
Conversation
Signed-off-by: Canlin Guo <canlinguosdu@gmail.com>
Signed-off-by: Canlin Guo <canlinguosdu@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
MOSS V2 streaming attention currently produces contiguous
[B,H,T,D]output, so the transpose/reshape before the output projection copies data at T>1. Write[B,T,H,D]backing storage directly and return the existing logical shape as a view.Also add opt-in, offline-selected BF16 Tensor Core FFN GEMMs with GELU / LayerScale+residual epilogues. Dispatch stays inside a custom op so batch/frame dimensions remain symbolic; unmatched shapes retain PyTorch GEMM. The locally retained H200 whitelist selects seven GEMM+GELU shapes that passed speed and waveform checks; no tuning JSON is shipped in this PR. Preserve intermediate BF16 rounding and include configuration contents in the decoder AOT cache key.
MOSS_CODEC_GEMM_CONFIGpointing to a user-supplied JSON file; without it, the original FFN path is used. The tested JSON maps keys"M,3072,768,1"for M in 2/4/8/15/16/30/32 to[16,64,64,1].3d952d13; does not include or depend on [Model] Reduce MOSS-TTS codec streaming KV state memory #7332 or the local-depth performance branch. No local experiment logs are added.Draft for review of the opt-in kernels and validation scope. This PR does not claim an isolated end-to-end throughput or TTFP improvement.
Test Plan
Benchmark runners, validation harnesses, benchmark documentation and tuning JSON under
benchmarks/kernels/are retained locally and intentionally excluded from this PR. Reported measurements were run before removing those files from the PR diff; production code and regression tests are unchanged.Hardware: one NVIDIA H200 (141 GB), BF16, CUDA graph microbenchmarks. Model waveform validation uses real
OpenMOSS-Team/MOSS-Audio-Tokenizer-v2weights (revisionf6e20e543b33d2c252a7ef71bdf8aa71e5ff9169) and fixed random codes, with ten chunks, ring wrap and slot recycling. Generated waveforms are numerical fixtures, not ground-truth speech.vLLM Version: source
98dff2a81d, version 0.29.0; torch 2.13.0+cu130.vLLM-Omni Commit:
63bd9ea8, based on main3d952d13.In a configured development environment, select an idle GPU and run:
python -m pytest -o addopts='' \ tests/model_executor/models/moss_tts/test_codec_gemm.py \ tests/model_executor/models/moss_tts/test_streaming_attention.py -q pre-commit run --from-ref origin/main --to-ref HEADThree warmups; eight calls per CUDA graph, twenty replays per timing sample, median of five samples. GEMM baseline is fullgraph-compiled PyTorch GEMM+epilogue. Whitelist entries require >5% speedup in initial and confirmation timings, plus relative L2 <0.004. Repeated-weight microbenchmarks do not estimate serving throughput.
Test Result
AI assistance: Codex assisted with implementation, regression tests, measurements, and PR preparation. This draft is open for human review.