Hi everyone,
I am porting Qwen3-ASR-1.7B to a Genio board (MDLA 5.3, NeuroPilot 8), referencing MTK’s Qwen3-ASR-0.6B v0.6 FMS bundle. The text decoder is fully converted, compiled, and shell/shared-weights split, but I am looking for the official workflow for the audio encoder module.
Environment
-
Target: Genio 520 (MT8371) / Genio 720 (MT8391), compiled with:
--arch=mdla5.3,edma3.6 --l1-size-kb=256 --num-mdla=1 -
NeuroPilot SDK: Basic 8.0.7 (build20250122), host
ncc-tflite -
Toolchain:
mtk_llm_sdk3.4.2,mtk_converter8.15.0, Python 3.8 -
Host: Ubuntu 22.04 x86_64, 32 GB RAM
What I have done (Decoder complete & validated)
-
Extraction: Extracted the decoder (
thinker.model.*, tiedlm_head) from the HF checkpoint into a standalone causal Qwen3 model. Flattened mRoPE to standard 1D RoPE ($\theta = 10^6$), since the three position streams are identical for single-stream audio input. -
MTK Config:
model_type: qwen3, hidden 2048, intermediate 6144, 28 layers, 16 heads, 8 KV heads, head_dim 128,use_qk_norm: true,tie_word_embeddings: true.mtk_inference_float_llmmatches the expectedlanguage None<asr_text>output format. -
PTQ:
mtk_ptq_llm converter config.json -p precision.json --np_compat 8, withllm 0-27andtailset tosym8W_dynamic_quant, andembeddings/mask/cache/logitsset tofloat. Exportedembedding_fp16.bin(151936 $\times$ 2048). -
Shape Fix: Fixed shapes with
mtk_fix_llm_shape ... 256t 1t 2048c --np_compat 8(1 chunk).mtk_inference_quantized_llmvalidates cleanly against float inference. -
Compilation: Compiled both shapes with
ncc-tfliteusing the GAI toolkit Qwen2.5 recipes plus--relax-fp32 --suppress-input --suppress-output(~2.0 GB DRAM per model). -
Shared Weights:
extract-shared -e diff: producedshared_weights_diff_0.bin(1.7 GB) and two 1.3 MB shell DLAs, matching the 0.6B FMS layout.
Where I am blocked: Audio Encoder
The Qwen3-ASR audio_tower (3x Conv2D downsampling, 24 transformer layers, $d_{model}=1024$, 16 heads, output projection dimension 2048, 128 mel bins) is not supported in mtk_llm_sdk 3.4.2 (SUPPORTED_ENCODERS only lists whisper and qwen2_audio_encoder, which expect standard Conv1D Whisper backbones).
Questions for the MTK Team:
-
Audio Encoder Export Script: How was
qwen3-asr-0.6b-dq8w-shaped_encoder_0.dlaexported? Could MTK share the reference PyTorch $\rightarrow$ ONNX/TorchScript tracing script for the Qwen3-ASR audio tower (with fixed input shapes, e.g.[1, 128, 3000]mel + attention mask $\rightarrow$[1, 390, 2048]projected embeddings) and the correspondingmtk_converterPTQ command? -
Encoder Compiler Flags: What specific quantization scheme and
ncc-tfliteflags were used for the audio encoder? (The 0.6B YAML notes mention a “suppressOutput_only” compile). -
Compiler Flag Optimization: For the DQ8W decoder, is
--relax-fp32sufficient for FP16 I/O, or should--cast-fp32=fp16be specified explicitly? Additionally,ncc-tflitewarns that--opt-aggressivewith hybrid quantization may cause precision loss—is dropping--opt-aggressiverecommended for speech decoding? -
C++ Runtime & YAML Parser: Which runner supports
dlaEncPath,audioPadTokenId,splitMask, andheadDimon Android? (Is themain_qwen3_asrrunner or source available in the Android SDK, as the stockmainin GAI Deployment Toolkit v2.0.8 does not parse these keys)? -
Reference Packages: Is there an official
Qwen3-ASR-1.7Bpackage planned for NeuroPilot 8, or could the export scripts from theQwen3-ASR-0.6Bbundle be shared?
Any advice or reference conversion scripts would be greatly appreciated. Thanks!