-
Notifications
You must be signed in to change notification settings - Fork 6
Add ASR fp16 recipe for MahmoudAshraf/mms-300m-1130-forced-aligner #1095
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ssss141414
wants to merge
7
commits into
main
Choose a base branch
from
shzhen/add-mms-forced-aligner
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+122
−0
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
78e0020
Add ASR fp16 recipe for MahmoudAshraf/mms-300m-1130-forced-aligner
ssss141414 3930294
recipe(mms-forced-aligner): nest under cpu/cpu/ per tested-EP layout …
ssss141414 981119d
recipe: drop README index-row change (recipe-only PR; not certified f…
ssss141414 0976f77
fix: resolve CTC loaders from architecture metadata
ssss141414 7e972a0
recipe: rely on automatic CTC loader resolution
ssss141414 97f9041
Merge remote-tracking branch 'origin/main' into shzhen/add-mms-forced…
ssss141414 6eebeb9
docs(loader): clarify ambiguous-task override map
ssss141414 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
...Ashraf_mms-300m-1130-forced-aligner/cpu/cpu/automatic-speech-recognition_fp16_config.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| { | ||
| "export": { | ||
| "opset_version": 17, | ||
| "batch_size": 1, | ||
| "export_params": true, | ||
| "do_constant_folding": true, | ||
| "verbose": false, | ||
| "dynamo": false, | ||
| "enable_hierarchy_tags": true, | ||
| "clean_onnx": false, | ||
| "hierarchy_tag_format": "full", | ||
| "input_tensors": [ | ||
| { | ||
| "name": "input_values", | ||
| "dtype": "float32", | ||
| "shape": [ | ||
| 1, | ||
| 16000 | ||
| ], | ||
| "value_range": [ | ||
| -1, | ||
| 1 | ||
| ] | ||
| } | ||
| ], | ||
| "output_tensors": [ | ||
| { | ||
| "name": "logits" | ||
| } | ||
| ] | ||
| }, | ||
| "optim": {}, | ||
| "quant": { | ||
| "mode": "fp16", | ||
| "samples": 10, | ||
| "calibration_method": "minmax", | ||
| "weight_type": "uint8", | ||
| "activation_type": "uint8", | ||
| "per_channel": false, | ||
| "symmetric": false, | ||
| "weight_symmetric": null, | ||
| "activation_symmetric": null, | ||
| "save_calibration": false, | ||
| "distribution": "uniform", | ||
| "seed": null, | ||
| "calibration_load_path": null, | ||
| "calibration_save_path": null, | ||
| "op_types_to_quantize": null, | ||
| "nodes_to_exclude": null, | ||
| "fp16_keep_io_types": true, | ||
| "fp16_op_block_list": null | ||
| }, | ||
| "compile": null, | ||
| "loader": { | ||
| "task": "automatic-speech-recognition", | ||
| "model_type": "wav2vec2" | ||
| } | ||
| } |
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Design question (non-blocking): this introduces a second architecture-based resolution mechanism alongside the existing
_resolve_model_class_from_config, which already readsarchitectures[0]and would return the concreteWav2Vec2ForCTC. That helper only runs as the last fallback in Stage 2 (afterTasksManagersucceeds with the wrong seq2seq class), which is exactly why the bug slips through — so inserting an arch check beforeTasksManageris the correct move.The trade-off worth calling out: this is a hand-maintained
(task, suffix)allowlist, so every future ambiguous-task family (e.g. another dual-family pipeline task) needs a new entry. An alternative would be to prefer the concrete config architecture over theTasksManagerdefault wheneverarchitecturesis present and the task is known-ambiguous — generalizing without a suffix table. I think the targeted map is the safer, more reviewable choice here (it can't regress the many tasks where theAuto*class is intentionally preferred), so I'd keep it — just flagging that the map will accrete entries over time. A short comment noting "add an entry per ambiguous task family" on_ARCHITECTURE_AUTO_CLASS_OVERRIDESwould help the next person.