Repository navigation
Commit 62b093e
Add Parakeet CTC automatic speech recognition support (#471)
## Summary
Add first-class Mobius support for
[`nvidia/parakeet-ctc-1.1b`](https://huggingface.co/nvidia/parakeet-ctc-1.1b),
Hugging Face `model_type: parakeet_ctc`.
This is an independent offline CTC ASR architecture and does not
duplicate #411, which targets streaming Parakeet RNNT. The new path
consumes processor-normalized log-mel features and produces frame-level
CTC logits.
## Architecture
- Symmetric 8x depthwise Conv2d FastConformer subsampling
- Transformer-XL relative positional self-attention with learned
`bias_u`/`bias_v`
- Macaron feed-forward blocks
- BatchNorm Conformer convolution modules
- 42-layer, hidden-size 1024 encoder and 1025-class Conv1d CTC head
- Feature-input contract: `input_features [B, T, 80]` plus boolean
`attention_mask`
- Direct Hugging Face parameter-name alignment; preprocessing only
removes BatchNorm `num_batches_tracked`
The reusable component surface also gains grouped/bias-free `Conv1d` and
frozen `BatchNorm1d` inference with fp32 accumulation.
## Model and golden integration
- Register `parakeet_ctc` config/model/task extraction
- Add `FeatureCTCAsrTask`
- Add `feature-ctc-asr` YAML/schema and golden generation support
- Pin config and every checkpoint shard to revision
`20e63a0fed6aedba145b74b826dbd41df0941730`
- Add exact frame-count enforcement for deterministic CTC L5 goldens
- Add explicit ORT GenAI export rejection for this unsupported
feature-input CTC contract
Committed real-audio goldens use nonzero LibriSpeech audio and contain
all 114 frame argmax IDs plus the full decoded transcript:
> cauliflower mayonnaise take cold boiled cauliflower break into
branches adding salt pepper and vinegar to season
## Validation
GPU: NVIDIA RTX A1000 Laptop GPU, 8 GB; CUDA and `CUDAExecutionProvider`
available.
- `python -m pytest tests/build_graph_test.py tests/cli_test.py src/ -q
-k "not phi4mm and not apply_weights_unknown" --tb=short -n auto`
- **3639 passed, 57 skipped**
- `python -m pytest tests/arch_validation_test.py -k parakeet -q
--tb=short`
- **3 passed, 874 deselected**
- `python -m pytest tests/yaml_schema_test.py -q --tb=short`
- **237 passed**
- Real-checkpoint CUDA parity, fp32:
- **passed**
- max absolute difference: **0.000076**
- mean absolute difference: **0.000014**
- Real-checkpoint CUDA fp16:
- **passed**
- exact **114/114** frame IDs
- exact full transcript
- CUDA L4 checkpoint golden and L5 deterministic CTC transcript/frame
golden:
- **2 passed, 377 deselected**
- `lintrunner -a`
- **no issues**
- Automated high-confidence code review after fixes:
- **no significant issues found**
## CLI/runtime/quantization evidence
- fp16 CLI CUDA export loaded and ran with ONNX Runtime CUDA EP
- Runtime produced the exact 114 golden frame IDs and exact full
transcript
- Olive 0.13.0 INT4 RTN quantization produced a 751 MB model
- Quantized CUDA inference produced the same full transcript
## Evidence-based limitations and waivers
- **BF16 disabled:** Hugging Face bf16 reference output is correct, and
the Mobius graph executes under ORT CUDA after avoiding unsupported
kernels, but ORT output collapses to blank CTC predictions. Parakeet
therefore defaults safely to fp32 and rejects explicit bf16; fp32 and
fp16 are verified. This avoids exposing a configuration that runs
without error but returns incorrect ASR results.
- **ORT GenAI / Foundry Local waived:** ORT GenAI 0.15.2 rejects
`input_features` in its decoder model schema. This offline feature-input
CTC model cannot be represented by the current ORT GenAI decoder
contract, so Mobius now fails explicitly rather than producing a
misleading package. Foundry Local depends on ORT GenAI and is
consequently not applicable until that runtime supports feature-input
CTC pipelines.
- **Safetensors package output:** the installed `onnx_ir` failed during
safetensors CLI serialization; standard ONNX external-data export
succeeded and was used for CUDA runtime and quantization validation.
---------
Signed-off-by: Justin Chu <[email protected]>
Signed-off-by: justinchuby <[email protected]>
Co-authored-by: Copilot App <[email protected]>1 parent ed0319d commit 62b093e
32 files changed
Lines changed: 1683 additions & 79 deletions
File tree
- .github/workflows
- scripts
- src/mobius
- _configs
- components
- integrations/ort_genai
- models
- tasks
- testdata
- cases
- audio
- golden/audio
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
8 | 15 | | |
9 | 16 | | |
10 | 17 | | |
| |||
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
51 | | - | |
52 | | - | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
8 | 15 | | |
9 | 16 | | |
10 | 17 | | |
| |||
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
51 | | - | |
52 | | - | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
963 | 963 | | |
964 | 964 | | |
965 | 965 | | |
966 | | - | |
| 966 | + | |
967 | 967 | | |
968 | 968 | | |
969 | 969 | | |
| |||
984 | 984 | | |
985 | 985 | | |
986 | 986 | | |
987 | | - | |
988 | | - | |
989 | | - | |
990 | | - | |
991 | | - | |
992 | | - | |
993 | | - | |
994 | | - | |
995 | | - | |
996 | | - | |
997 | | - | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
998 | 1006 | | |
999 | 1007 | | |
1000 | 1008 | | |
1001 | | - | |
| 1009 | + | |
1002 | 1010 | | |
1003 | 1011 | | |
1004 | 1012 | | |
| |||
1771 | 1779 | | |
1772 | 1780 | | |
1773 | 1781 | | |
| 1782 | + | |
1774 | 1783 | | |
1775 | 1784 | | |
1776 | 1785 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
| 414 | + | |
414 | 415 | | |
415 | 416 | | |
416 | 417 | | |
| |||
443 | 444 | | |
444 | 445 | | |
445 | 446 | | |
| 447 | + | |
| 448 | + | |
446 | 449 | | |
447 | 450 | | |
448 | 451 | | |
| |||
537 | 540 | | |
538 | 541 | | |
539 | 542 | | |
540 | | - | |
541 | | - | |
542 | | - | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
543 | 547 | | |
544 | 548 | | |
545 | 549 | | |
546 | 550 | | |
547 | | - | |
| 551 | + | |
548 | 552 | | |
549 | 553 | | |
550 | 554 | | |
| |||
555 | 559 | | |
556 | 560 | | |
557 | 561 | | |
| 562 | + | |
558 | 563 | | |
559 | 564 | | |
560 | 565 | | |
| |||
687 | 692 | | |
688 | 693 | | |
689 | 694 | | |
690 | | - | |
| 695 | + | |
691 | 696 | | |
692 | 697 | | |
693 | 698 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
183 | 184 | | |
184 | 185 | | |
185 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
91 | 94 | | |
92 | 95 | | |
93 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| 125 | + | |
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2930 | 2930 | | |
2931 | 2931 | | |
2932 | 2932 | | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
| 2939 | + | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
| 2950 | + | |
| 2951 | + | |
| 2952 | + | |
| 2953 | + | |
| 2954 | + | |
| 2955 | + | |
| 2956 | + | |
| 2957 | + | |
| 2958 | + | |
| 2959 | + | |
| 2960 | + | |
| 2961 | + | |
| 2962 | + | |
| 2963 | + | |
| 2964 | + | |
| 2965 | + | |
| 2966 | + | |
| 2967 | + | |
| 2968 | + | |
| 2969 | + | |
| 2970 | + | |
| 2971 | + | |
| 2972 | + | |
| 2973 | + | |
| 2974 | + | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
| 2980 | + | |
0 commit comments