[Perf]: MOSS-Transcribe-Diarize model Encoder torch.compile#962
Open
nagisa-kunhah wants to merge 3 commits into
Open
[Perf]: MOSS-Transcribe-Diarize model Encoder torch.compile#962nagisa-kunhah wants to merge 3 commits into
torch.compile#962nagisa-kunhah wants to merge 3 commits into
Conversation
0d0bb0d to
f9d5565
Compare
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.
Motivation
#924
Add and evaluate optional
torch.compilesupport for the MOSS Transcribe-Diarize ASR encoder path. The goal is to check whether compiling only the encoder can improve end-to-end latency without introducing other optimization changes.Modifications
benchmarks/eval/benchmark_moss_transcribe_diarize_encoder_compile.pymax-autotune-no-cudagraphswithdynamic=Falseas the recommended encoder compile configuration.compile_audio_encoder.Benchmark & Profiling
Encoder-only benchmark
Environment:
/root/models/MOSS-Transcribe-Diarizebenchmarks/eval/benchmark_moss_transcribe_diarize_encoder_compile.py--frames 3000 --warmup 5 --iters 50max-autotune-no-cudagraphsdynamic=Falsetorch.compile:max-autotune-no-cudagraphsThe encoder hot path improves from
6.9335 msto5.1551 msmean latency, about1.345xfaster.E2E benchmark: short audio
Config:
results/query_to_cars_30s.wav332.64s1211Short audio did not show an e2e gain:
+3.00%-2.90%This indicates the short-audio workload is not dominated enough by the encoder path.
E2E benchmark: long audio
Config:
results/query_to_cars_120s.wav110.88s443.52s411Long audio showed a measurable e2e improvement:
-5.75%+6.05%-5.71%-10.41%+1.76%The long-audio workload is more encoder-heavy, so encoder compile gives a visible e2e benefit.
Compile mode selection
reduce-overheadmax-autotune-no-cudagraphs,dynamic=Falsemax-autotune-no-cudagraphs,dynamic=TrueChecklist
CI
CI runs on self-hosted GPU runners and requires a maintainer to add the
run-cilabel. Once labeled, every subsequent push re-triggers CI as long as the label remains. Use/tag-and-rerun-ci higgsor/tag-and-rerun-ci mossto select a TTS CI model. Draft PRs are skipped even if labeled.