FireRedASR2-AED-onnx

ONNX (fp32) export of FireRedTeam/FireRedASR2-AED, FireRedASR2-AED by FireRedTeam (Xiaohongshu, arXiv 2603.10420): an attention encoder-decoder speech recogniser for Mandarin, English and Chinese dialects with a CTC head, 1.15 billion parameters. All credit for the model belongs to FireRedTeam. The weights are unchanged; this is a file-format conversion done without retraining, from the original PyTorch checkpoint.

Files

manifest.json lists every file with its URL, size and SHA-256, so a client can download and verify them. The three graphs are separate files, so a client can load just the part it needs; the large ones keep their weights in a .data file that must stay in the same folder as its .onnx.

File Contents
encoder.onnx, encoder.data Conformer encoder
ctc.onnx CTC head
decoder.onnx, decoder.data Transformer decoder, one step with per-layer caches
dict.txt token dictionary: token and id per line (8667 tokens, <blank> 0, <pad> 2, <sos> 3, <eos> 4)
train_bpe1000.model SentencePiece model for English word pieces
cmvn.ark Kaldi CMVN statistics
config.json dimensions, special token ids, feature settings and the reference decoding settings

Use

Features: Kaldi fbank, 80 mel bins, 25 ms window, 10 ms shift, no dither, snip_edges, computed on 16 kHz mono samples scaled as 16-bit integers, then (x - mean) * inverse_std with the statistics of cmvn.ark (mean = sum / count, variance = sum of squares / count - mean^2).

  • encoder.onnx: input float32 [batch, frames, 80], input_lengths int64 [batch]. Outputs output float32 [batch, T, 1280], output_lengths int64 [batch] and mask float32 [batch, 1, T]. T is about frames / 4 (4 times subsampling, 40 ms per output frame). The relative position table holds 2 x 5000 - 1 positions, so up to 5000 output frames (200 s).
  • ctc.onnx: encoder_output float32 [batch, T, 1280] to log_probs float32 [batch, T, 8667] (log-softmax; id 0 is the blank).
  • decoder.onnx: inputs ys int64 [batch, L] (the tokens so far, starting with <sos> = 3), encoder_output, src_mask (the encoder's mask) and cache_0 to cache_15 float32 [batch, L-1, 1280] (empty with L-1 = 0 for the first step). Outputs logits float32 [batch, 8667] for the last position (raw scores; apply log-softmax to them) and new_cache_0 to new_cache_15 [batch, L, 1280], which are the next step's caches. Decoding stops at <eos> = 4. The reference beam search uses beam size 3, softmax smoothing 1.25 and length penalty 0.6 (see config.json).
  • Tokens are single Chinese characters and SentencePiece pieces for English words; dict.txt maps ids to them.

Checked against PyTorch on synthetic features and a recorded clip: the largest absolute difference was 1.51e-05 for the encoder output, 2.44e-04 for the CTC log-probabilities and 3.67e-05 for the decoder logits, and greedy decoding gave the same tokens as PyTorch.

Size and memory

The fp32 weights are about 4.5 GB in total. Running the encoder takes over 3 GB of memory and the decoder about the same. Decoding is autoregressive, so it costs one pass over the decoder weights per token.

Licence

Apache License 2.0, as the source model. See LICENSE and NOTICE.

Downloads last month
17
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Ciwiruk/FireRedASR2-AED-onnx

Quantized
(2)
this model

Paper for Ciwiruk/FireRedASR2-AED-onnx