Jarbas commited on
Commit
ce380b1
·
verified ·
1 Parent(s): 4be4ad7

ONNX export of Audio8/ARK-ASR-0.6B for onnx-asr

Browse files
.gitattributes CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ decoder.onnx.data filter=lfs diff=lfs merge=lfs -text
37
+ embed_tokens.onnx.data filter=lfs diff=lfs merge=lfs -text
38
+ encoder.onnx.data filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Audio8/ARK-ASR-0.6B
4
+ base_model_relation: quantized
5
+ library_name: onnx-asr
6
+ pipeline_tag: automatic-speech-recognition
7
+ tags:
8
+ - onnx
9
+ - onnxruntime
10
+ - automatic-speech-recognition
11
+ - speech
12
+ - audio
13
+ - asr
14
+ - int8
15
+ - speech-llm
16
+ language:
17
+ - zh
18
+ - en
19
+ - de
20
+ - ja
21
+ - fr
22
+ - ko
23
+ - es
24
+ - pl
25
+ - it
26
+ - ro
27
+ - hu
28
+ - cs
29
+ - nl
30
+ - fi
31
+ - hr
32
+ - sk
33
+ - sl
34
+ - et
35
+ - lt
36
+ ---
37
+
38
+ # ARK-ASR-0.6B ONNX
39
+
40
+ ONNX export of [Audio8/ARK-ASR-0.6B](https://huggingface.co/Audio8/ARK-ASR-0.6B) for
41
+ [onnx-asr](https://github.com/istupakov/onnx-asr). All credit for the model goes to
42
+ Audio8 (AutoArk AI). This repository only contains the converted graphs; the
43
+ weights are the original ones.
44
+
45
+ The model is a speech-LLM: a Whisper-large-v3-style audio encoder with rotary
46
+ position embeddings, an MLP adapter that merges four encoder frames into one
47
+ embedding, and a Qwen2 0.6B causal language model that writes the transcription.
48
+
49
+ ## Usage
50
+
51
+ ```sh
52
+ pip install onnx-asr[cpu,hub]
53
+ ```
54
+
55
+ ```py
56
+ import onnx_asr
57
+
58
+ model = onnx_asr.load_model("speech-llm", "OpenVoiceOS/ARK-ASR-0.6B-onnx")
59
+ print(model.recognize("audio.wav"))
60
+
61
+ # int8 weights
62
+ model = onnx_asr.load_model("speech-llm", "OpenVoiceOS/ARK-ASR-0.6B-onnx", quantization="int8")
63
+ ```
64
+
65
+ ## Files
66
+
67
+ | File | Contents |
68
+ | --- | --- |
69
+ | `encoder.onnx` | audio encoder and MLP adapter, log-mel features in, LM embeddings out |
70
+ | `embed_tokens.onnx` | token embedding table |
71
+ | `decoder.onnx` | Qwen2 decoder with KV cache, logits out |
72
+ | `*.int8.onnx` | dynamically quantized int8 weights |
73
+ | `config.json` | model type, prompt token ids, suppressed token ids |
74
+ | `vocab.json` | tokenizer vocabulary for detokenization |
75
+
76
+ ## Graph contract
77
+
78
+ | Graph | Inputs | Outputs |
79
+ | --- | --- | --- |
80
+ | `encoder.onnx` | `input_features (1, 128, frames)` | `audio_embeds (1, frames/8, 896)` |
81
+ | `embed_tokens.onnx` | `input_ids (1, S)` | `inputs_embeds (1, S, 896)` |
82
+ | `decoder.onnx` | `inputs_embeds (1, S, 896)`, `attn_bias (1, 1, S, P+S)`, `position_ids (1, S)`, `past_key_values.{0..23}.{key,value} (1, 2, P, 64)` | `logits (1, S, 163958)`, `present.{0..23}.{key,value} (1, 2, P+S, 64)` |
83
+
84
+ ## Accuracy
85
+
86
+ Four FLEURS clips (2 English, 2 Mandarin), greedy decoding, compared against the
87
+ PyTorch model in float32:
88
+
89
+ * fp32 ONNX: 4 of 4 transcriptions identical to PyTorch, character for character.
90
+ * int8 ONNX: 3 of 4 identical. One Mandarin clip stops early and loses the last
91
+ clause.
92
+
93
+ Speed on a 12-core CPU under load: RTF 0.35 to 0.61 (fp32) and 0.09 to 0.29
94
+ (int8).
95
+
96
+ ## Licence
97
+
98
+ Apache 2.0, the same licence as the source model. The model was published by
99
+ Audio8; see the [source repository](https://huggingface.co/Audio8/ARK-ASR-0.6B)
100
+ and the paper [arXiv:2605.28139](https://arxiv.org/abs/2605.28139).
config.json ADDED
The diff for this file is too large to render. See raw diff
 
decoder.int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2541ddceec2eb5c1d140d3366c1273856a444d15123ebdd5a4949ca66228ef3a
3
+ size 506552677
decoder.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a150f6710919e11c1ba51ea8e5fc946acbc8489212334c9c159b36e288e230f7
3
+ size 995553
decoder.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5fd5435175ce81cdce6f4543b09f194e2ac97e5e0bb6089660234e2b567e3676
3
+ size 2019193344
embed_tokens.int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b3d5c49e7aa511b861b48a37c3dd8f65b688d11e2dc77d97dc073d66eb41eeec
3
+ size 146906888
embed_tokens.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:26d72739d9946bb606fc36c0436d874a0fe6e3d96a31f855e91950fc651e8d6c
3
+ size 277
embed_tokens.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d2102ed49ea4f1181092468e3c24a253955692cd0bc51a1e4d26d83ed70114db
3
+ size 587625472
encoder.int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3d449e6df0b2eb519f4c6a7e2151e4428f35b116c6edb8aefa8709fd60bc64e0
3
+ size 649600736
encoder.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03b9fc7f4a35ab742a611e91354967ce50ba8aa5d9ace981f550682eb7da1d46
3
+ size 1496674
encoder.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:57501ca6aedc745b200a2fcca3e82b77b4d06f0b2b8c0a72e8e007cff5a76136
3
+ size 2583329280
vocab.json ADDED
The diff for this file is too large to render. See raw diff