CoolFace
Modelpublic

aoiandroid/qwenasrkit-pro

sourceHugging Faceotherupdated 1mo agoView on Hugging Face
0likes
Model Card

QwenASRKit-Pro (Qwen3-ASR 1.7B Core ML)

Pre-compiled Core ML package of Qwen3-ASR 1.7B, optimized for Apple Silicon (Apple Neural Engine, GPU, and CPU) with 8-bit Palettization and Speculative Decoding for ultra-low latency on-device automatic speech recognition.


๐ŸŒŸ Key Highlights

  • โ€”Base Architecture: Qwen/Qwen3-ASR-1.7B (Alibaba Cloud Qwen Team)
  • โ€”52+ Languages & Dialects: Industry-leading SOTA recognition across English (regional accents), Chinese (dialects), Japanese, Korean, European, and Asian languages.
  • โ€”Speculative Decoding Acceleration: Includes a 7-token speculative drafter (Speculator.mlmodelc) delivering up to ~566.8 tokens/sec decoding throughput on Apple Silicon.
  • โ€”Ultra-low RTF: Audio encoder executes in 7.47 ms per 1-second audio chunk (RTF: 0.007x).
  • โ€”ANE Tile Chunking: Text decoder is split into TextDecoderC0 and TextDecoderC1 to comply with Apple Neural Engine (ANE) memory and compiler constraints.

๐Ÿ“Š Benchmark Results (Apple M3 / macOS 26.5)

Tested with MLModelConfiguration.computeUnits = .all on Apple M3 (8GB RAM):

Latency Breakdown

Pipeline StageModuleAvg Latency (ms)Min / Max (ms)Description
Audio PreprocessingMelspectrogram.mlmodelc0.14 ms0.13 / 0.16 ms16 kHz 1-sec audio chunk
Convolution SubsamplingAudioEncoderConvSubsampler.mlmodelc0.72 ms0.66 / 0.79 msCNN time-downsampler
1.7B Audio TransformerAudioEncoderTransformer.mlmodelc6.62 ms6.31 / 7.36 ms8-bit Palettized Transformer
Total Audio EncoderFull Encoder Pipeline7.47 msโ€”RTF: 0.007x (1s audio in 7.5ms)
Text Decoder (Layers 0)TextDecoderC0.mlmodelc0.04 ms0.03 / 0.05 msANE Layer Chunk 0
Text Decoder (Layers 1)TextDecoderC1.mlmodelc0.05 ms0.04 / 0.08 msANE Layer Chunk 1
Embedding & LM HeadTextDecoderEmbedHead.mlmodelc3.85 ms3.81 / 3.95 msToken Logits & Projection
Autoregressive StepFull Decoder (1 Token)3.94 msโ€”254.0 tokens/sec
Speculative DrafterSpeculator.mlmodelc (7 tokens)8.41 ms8.22 / 8.72 ms7-token draft prediction
Speculative PipelineSpeculative Step (7 Tokens)~12.35 ms / 7tokโ€”~566.8 tokens/sec

๐Ÿ“ Repository Structure

qwen3-asr/
โ”œโ”€โ”€ audio_encoder/
โ”‚   โ””โ”€โ”€ 1.7b/
โ”‚       โ”œโ”€โ”€ AudioEncoderConvSubsampler.mlmodelc   # CNN Subsampler
โ”‚       โ”œโ”€โ”€ AudioEncoderTransformer.mlmodelc     # 1.7B 8-bit Audio Encoder
โ”‚       โ””โ”€โ”€ Melspectrogram.mlmodelc              # Mel Spectrogram Extractor
โ””โ”€โ”€ text_decoder/
    โ””โ”€โ”€ 1.7b/
        โ”œโ”€โ”€ Speculator.mlmodelc                  # 7-token Speculative Drafter
        โ”œโ”€โ”€ TextDecoderC0.mlmodelc               # ANE Split Chunk 0
        โ”œโ”€โ”€ TextDecoderC1.mlmodelc               # ANE Split Chunk 1
        โ”œโ”€โ”€ TextDecoderEmbedHead.mlmodelc        # Embedding & LM Head
        โ”œโ”€โ”€ decoder_manifest.json                # Speculative Decoder Manifest
        โ”œโ”€โ”€ tokenizer.json                       # Tokenizer definition
        โ”œโ”€โ”€ tokenizer_config.json
        โ””โ”€โ”€ vocab.json

๐Ÿ’ป Swift Integration Example

swift
import CoreML

let config = MLModelConfiguration()
config.computeUnits = .all

// Load Encoder
let melModel = try MLModel(contentsOf: melURL, configuration: config)
let convModel = try MLModel(contentsOf: convURL, configuration: config)
let encoderModel = try MLModel(contentsOf: encoderURL, configuration: config)

// Load Decoder & Speculator
let c0Model = try MLModel(contentsOf: decC0URL, configuration: config)
let c1Model = try MLModel(contentsOf: decC1URL, configuration: config)
let headModel = try MLModel(contentsOf: headURL, configuration: config)
let speculatorModel = try MLModel(contentsOf: speculatorURL, configuration: config)

๐Ÿ“œ License & Acknowledgements

  • โ€”Base Model: Developed by the Qwen Team at Alibaba Cloud (Apache 2.0 / Qwen License).
  • โ€”Core ML Conversion & Optimization: Optimized by Argmax, Inc. (Argmax Pro SDK).