Fix parakeet_runner blank priming - #16509
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16509
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit ebc0f16 with merge base 8e8d97e ( UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Hi @mattjcly! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
This PR needs a
|
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical bug in the parakeet_runner where the first part of audio was not being transcribed. The issue was caused by missing "priming with blanks" initialization that is performed in the NVIDIA NeMo implementation. The fix initializes the prediction network state with an SOS (Start of Sequence) token, which is set to the blank_id, before beginning the greedy decoding process.
Key Changes:
- Initialize the prediction network state by executing the decoder with SOS (blank_id) token before the main decoding loop
- Update LSTM hidden and cell states (h_data, c_data) with the primed state from the SOS initialization
- Replace the previous zero-initialized decoder state approach with proper NeMo-compatible priming
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Summary
parakeet_runneris currently missing transcription of the first part of audio. I believe this is due to a lack of "priming with blanks" that is done in https://github.com/NVIDIA-NeMo/NeMo.Tested with this audio file:
audio.wav
Which I would manually transcribe as: "Can you please add to analyze.py the ability to pass in a dash dash dataset dash path or dash d that will take the place of dot input if present? Also dot input should be renamed to dot dataset"
ExecuTorch Before
Before Executorch misses the "Can you please add to analyze" and transcribes as "py the ability to pass in a dash-dataset-path or dash d that will take the place of dot input if present. Also dot input should be renamed dot dataset."
NeMo
NeMo thru:
outputs "Can you please add to analyze.py the ability to pass in a dash-dataset-path or dash d that will take the place of dot input if present. Also dot input should be renamed dot dataset.":
ExecuTorch After
After ExecuTorch "Can you please add to analyze.py the ability to pass in a dash-dataset-path or dash d that will take the place of dot input if present. Also dot input should be renamed dot dataset."
Test plan
Tested manually, see above