Views
No views yet
| file | size | what it does |
|---|---|---|
encoder.onnx (+ .data) | 30.6 MB | raw audio → encoder states |
decoder_init.onnx (+ .data) | 75.5 MB | first token; returns self- and cross-attention KV |
decoder_step.onnx (+ .data) | 71.7 MB | every later token, reading the cache |
tokens.txt | 0.4 MB | 32768 ids → pieces, for a decoder written outside Python |
decode_config.json | start token 1, EOS 2, 16 kHz |
.data sidecars; ONNX Runtime loads them from beside the graph, so
keep each pair together.ConvInteger, which the ONNX Runtime builds that ship inside mobile apps have no kernel
for — the session refuses to open. Quantizing only the matrix multiplies works and is
faster, but the embedding table stays float either way, so the saving is smaller than it
looks, and on the Ukrainian model it cost a word of accuracy on one of three samples.encoder.onnx
input_values float32 [batch, samples] raw waveform, 16 kHz, mono
→ encoder_hidden_states float32 [batch, frames, 288] ~41 frames per second
decoder_init.onnx
input_ids int64 [batch, 1] decoder_start_token_id (1)
encoder_hidden_states float32 [batch, frames, 288]
→ logits float32 [batch, 1, 32768]
→ present_{key,value}_self_{0..5} [batch, 8, 1, 36]
→ present_{key,value}_cross_{0..5} [batch, 8, frames, 36]
decoder_step.onnx
input_ids int64 [batch, 1] previous token
cache_position int64 [1] absolute index of this token
encoder_hidden_states float32 [batch, frames, 288]
past_{key,value}_self_{0..5}, past_{key,value}_cross_{0..5}
→ logits, present_{key,value}_self_{0..5}decoder_init once, then decoder_step until the
argmax is EOS (2). Feed the self-attention KV back each step; the cross-attention KV does
not change within an utterance.decoder_step needs encoder_hidden_states even though the cross-attention KV is
already cached. Without it the decoder skips cross-attention and produces fluent,
confident, entirely invented text. It does not error.cache_position is the absolute index of the current token — 1 for the first
generated one, not 0.attn_implementation="eager"; with the default SDPA path
torch.onnx.export fails on enable_gqa=True where query and key heads are equal.en_us utterances decoded
identically to model.generate(), and the encoder took 0.14–0.26 s for 9–11 seconds of
audio on an x86 CPU in Docker.export_encoder.py, export_cached_param.py and validate_vs_torch.py are included; set
MS_MODEL and MS_OUT. Needs torch 2.8, transformers 5.0, onnx, onnxscript,
onnxruntime.