refactor(stt): extract shared NeMo-family module; decouple NemotronASR from Parakeet (#197)#198
Merged
Conversation
…R from Parakeet (Blaizzy#197) Move the genuinely-shared NeMo-family leaf blocks out of Parakeet into a new Models/Nemo/ group, renamed Parakeet*->Nemo*: - ParakeetAttention.swift -> Nemo/NemoAttention.swift - ParakeetRNNTLayers.swift -> Nemo/NemoRNNTLayers.swift - ParakeetDecodingLogic.swift -> Nemo/NemoDecodingLogic.swift - ParakeetAlignment.swift -> Nemo/NemoAlignment.swift - 4 RNN-T config structs lifted from ParakeetConfig.swift -> Nemo/NemoRNNTConfig.swift Add one back-compat shim (Parakeet/ParakeetNemoAliases.swift) with typealias Parakeet* = Nemo* for every moved type, so ParakeetModel, ParakeetConformer, the rest of ParakeetConfig, tests, and external code keep compiling untouched. Repoint NemotronASR directly at the Nemo* names; it no longer references Parakeet at all. Pure move/rename with no behavior change. swift build passes; the pure-logic alignment/decoding unit tests pass. Closes Blaizzy#197
lucasnewman
approved these changes
Jun 9, 2026
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.
What
Extract the genuinely-shared NeMo-family leaf blocks out of
Parakeetinto a newSources/MLXAudioSTT/Models/Nemo/group so that two sibling models no longer depend on each other.NemotronASRpreviously reused Parakeet's public types (rel-pos attention, RNN-T prednet/joint, decoding, alignment, and the RNN-T config structs). This PR moves those shared types intoModels/Nemo/, renamedParakeet*→Nemo*, and repointsNemotronASRat theNemo*names.NemotronASRno longer referencesParakeetat all.Moves (
git mv, renamed inside)Parakeet/ParakeetAttention.swiftNemo/NemoAttention.swiftParakeet/ParakeetRNNTLayers.swiftNemo/NemoRNNTLayers.swiftParakeet/ParakeetDecodingLogic.swiftNemo/NemoDecodingLogic.swiftParakeet/ParakeetAlignment.swiftNemo/NemoAlignment.swiftParakeetConfig.swiftNemo/NemoRNNTConfig.swiftRenamed types follow the prefix swap:
ParakeetRelPositionMultiHeadAttention→NemoRelPositionMultiHeadAttention,ParakeetPredictNetwork→NemoPredictNetwork,ParakeetJointNetwork→NemoJointNetwork,ParakeetLSTMState→NemoLSTMState,ParakeetDecodingLogic→NemoDecodingLogic,ParakeetAligned*/ParakeetAlignment→NemoAligned*/NemoAlignment, and the 4Parakeet*Config→Nemo*Config.Back-compat
One shim file
Parakeet/ParakeetNemoAliases.swiftaddstypealias Parakeet* = Nemo*for every moved type (access levels mirror the underlying types). This keepsParakeetModel.swift,ParakeetConformer.swift, the rest ofParakeetConfig.swift, the existing tests, and any external code compiling with zero edits.Scope
Pure move/rename — no behavior change.
ParakeetModel.swiftandParakeetConformer.swiftare untouched;ParakeetConfig.swiftonly loses the 4 extracted structs.swift buildpasses (only pre-existing README resource warnings). Test targets compile, and the pure-logic alignment/decoding unit tests (ParakeetSTTTests) pass.Closes #197