Views
No views yet
mlprogram) export of the RNN-T (Transducer) path of
nvidia/stt_be_fastconformer_hybrid_large_pcmel_buffers.npz).| file | size | role |
|---|---|---|
BeFastConformerEncoder.mlpackage | 212 MB | FastConformer encoder, fixed 30 s window, 8x downsampling |
BeFastConformerDecoderStep.mlpackage | 7.5 MB | RNN-T prediction net, one LSTM step with explicit state I/O |
BeFastConformerJointStep.mlpackage | 2.7 MB | joint network, raw logits (log_softmax stripped - argmax-invariant) |
mel_buffers.npz | 84 KB | Hann window + 80-bin mel filterbank, taken verbatim from the checkpoint |
tokenizer.model | 251 KB | SentencePiece model (1024 unigram pieces, byte fallback) |
tokens.json | 14 KB | the 1024 vocabulary pieces (▁ = word boundary) |
model_config.yaml | - | full upstream NeMo config extracted from the checkpoint |
model_info.json | - | dims, blank id, mel parameters |
convert_info.json | - | window length in mel frames, conversion settings |
example_infer.py | - | runnable, self-contained reference inference |
features float32 [1, 80, 2999] (log-mel, 30 s window, zero-padded
right), length int32 [1] (true mel frames, so the padded tail is masked) ->
encoded [1, 512, 375]. encoded valid length is computed host-side as
L = (L-1)//2 + 1 applied three times to the mel length (8x downsampling); fp16
cannot represent the length exactly, so it is not returned by the graph.token int32 [1, 1], h_in/c_in float32 [1, 1, 640] ->
dec_out [1, 640], h_out, c_out. Start state: token = 1024 (blank), zero
h/c - the blank embedding row is zeros (blank_as_pad), reproducing the
reference fresh start exactly.enc_t [1, 512] (one encoder frame), dec_t [1, 640] ->
logits [1, 1025]. blank_id = 1024; the 1024 non-blank ids index tokens.json.n_fft = 512,
win_length = 400, hop_length = 160, Hann window, center = True (reflect pad),
80 mel bins, power spectrum, log(x + 2^-24), then per-feature mean/variance
normalization over the valid frames. The window and filterbank are embedded in
mel_buffers.npz; the full upstream config is in model_config.yaml.pip install coremltools torch numpy sentencepiece # + ffmpeg on PATH
python example_infer.py audio.wavexample_infer.py loads the three packages, computes the mel from the embedded
buffers, runs the encoder once per <=30 s window and a greedy RNN-T loop over the
decoder + joint, and detokenizes with SentencePiece. No NeMo is required.h/c/last per window. The emission frame index t maps to seconds as
t * 8 * 160 / 16000 = t * 0.08 (8x downsampling, 10 ms hop) plus the window
offset.AudioToMelSpectrogramPreprocessor.| compute units | encoder mean abs diff | transcript |
|---|---|---|
CPU_AND_GPU | 0.0004 | token-exact (3/3 clips) |
CPU_AND_GPU.CPU_AND_GPU, single clip) the full pipeline runs at RTF
~0.006-0.01 (roughly 100-160x faster than real time); the greedy loop is not the
bottleneck.torch.jit.trace(strict=False) -> coremltools 9.0 (mlprogram,
FLOAT16, macOS15). Three things needed care: the encoder is warmed up with one
forward before tracing so the relative positional-encoding cache is built;
coremltools 9.0 crashes on the aten::Int pattern under numpy 2 (fixed with a
scoped register_torch_op override on int); and dither must be 0 at inference
or the random spectrogram perturbation flips borderline emissions.mlprogram), split into encoder / decoder-step / joint-step packages, with the
log-mel front-end reproduced from the checkpoint buffers.