Qwen3-ASR-1.7B on Genio 520 / 720 (MDLA 5.3, NP8): Decoder converted, how to export/convert the audio encoder?

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_sdk 3.4.2, mtk_converter 8.15.0, Python 3.8

  • Host: Ubuntu 22.04 x86_64, 32 GB RAM

What I have done (Decoder complete & validated)

  1. Extraction: Extracted the decoder (thinker.model.*, tied lm_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.

  2. 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_llm matches the expected language None<asr_text> output format.

  3. PTQ: mtk_ptq_llm converter config.json -p precision.json --np_compat 8, with llm 0-27 and tail set to sym8W_dynamic_quant, and embeddings/mask/cache/logits set to float. Exported embedding_fp16.bin (151936 $\times$ 2048).

  4. Shape Fix: Fixed shapes with mtk_fix_llm_shape ... 256t 1t 2048c --np_compat 8 (1 chunk). mtk_inference_quantized_llm validates cleanly against float inference.

  5. Compilation: Compiled both shapes with ncc-tflite using the GAI toolkit Qwen2.5 recipes plus --relax-fp32 --suppress-input --suppress-output (~2.0 GB DRAM per model).

  6. Shared Weights: extract-shared -e diff: produced shared_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:

  1. Audio Encoder Export Script: How was qwen3-asr-0.6b-dq8w-shaped_encoder_0.dla exported? 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 corresponding mtk_converter PTQ command?

  2. Encoder Compiler Flags: What specific quantization scheme and ncc-tflite flags were used for the audio encoder? (The 0.6B YAML notes mention a “suppressOutput_only” compile).

  3. Compiler Flag Optimization: For the DQ8W decoder, is --relax-fp32 sufficient for FP16 I/O, or should --cast-fp32=fp16 be specified explicitly? Additionally, ncc-tflite warns that --opt-aggressive with hybrid quantization may cause precision loss—is dropping --opt-aggressive recommended for speech decoding?

  4. C++ Runtime & YAML Parser: Which runner supports dlaEncPath, audioPadTokenId, splitMask, and headDim on Android? (Is the main_qwen3_asr runner or source available in the Android SDK, as the stock main in GAI Deployment Toolkit v2.0.8 does not parse these keys)?

  5. Reference Packages: Is there an official Qwen3-ASR-1.7B package planned for NeuroPilot 8, or could the export scripts from the Qwen3-ASR-0.6B bundle be shared?

Any advice or reference conversion scripts would be greatly appreciated. Thanks!

Hi Kieu_Viet,

Please help confirm my understanding:

  1. Your company used the Qwen3‑ASR‑0.6B v0.6 FMS bundle released by MediaTek, then converted and successfully ran the Qwen3‑ASR‑1.7B decoder model (audio‑to‑text).

  2. Your company now wants to use the Qwen3‑ASR‑1.7B encoder model (text‑to‑audio).

If my understanding is correct, MediaTek currently only supports the Qwen3‑ASR‑0.6B package with the decoder model (audio‑to‑text). The encoder model (text‑to‑audio) is not supported, so the customer would need to handle it on their own.

Regards,
Susovan

Hi Susovan,

Thank you for the quick follow-up! Please allow me to clarify, as there might be a slight misunderstanding regarding the model architecture:

  1. Both models are strictly Speech-to-Text (ASR):

    • We are not doing Text-to-Audio (TTS / Speech Synthesis). Qwen3-ASR is an end-to-end Automatic Speech Recognition model consisting of two speech-to-text stages:

      • Audio Encoder (audio_tower + projector): Converts raw audio/mel-spectrogram into acoustic feature embeddings (Audio $\rightarrow$ Embeddings).

      • Text Decoder (Qwen3 LLM): Takes those acoustic embeddings and autoregressively decodes the text transcription (Embeddings $\rightarrow$ Text).

  2. The 0.6B FMS bundle already includes the Audio Encoder DLA:

    • In MediaTek’s Qwen3-ASR-0.6B v0.6 FMS bundle, MTK provided:

      • qwen3-asr-0.6b-dq8w-shaped_encoder_0.dla (the Audio Encoder)

      • qwen3-asr-0.6b-dq8w-shaped_256t_0_shared.dla & 1t_0_shared.dla (the Text Decoder)

      • A runtime YAML pointing to both using dlaEncPath and dlaPromptPaths.

    • This confirms that MediaTek has already validated and compiled the Qwen3-ASR audio encoder to MDLA 5.3 for the 0.6B variant.

  3. What we need to handle on our own:

    • We understand that an official turnkey package for the 1.7B variant is not released yet, and we are completely happy to convert it ourselves!

    • We have already successfully converted and compiled the 1.7B Text Decoder (shared_weights_diff_0.bin + shell DLAs) to MDLA 5.3.

    • We only need to know how MediaTek exported and compiled the 0.6B Audio Encoder into qwen3-asr-0.6b-dq8w-shaped_encoder_0.dla:

      • Did MTK trace the PyTorch audio_tower + linear projection via TorchScript / ONNX with fixed shapes (e.g. [1, 128, 3000] mel) and then run mtk_converter directly?

      • Could you share the tracing script, mtk_converter options, or ncc-tflite flags used for the 0.6B encoder?

With that export script/recipe, we can run the exact same procedure on the 1.7B audio weights ourselves.

Thank you for your guidance!

Best regards,

Kieu_Viet

Hi Kieu_Viet,

Can you please help to confirm that the package you received,
“Qwen3-ASR-0.6B v0.6 FMS bundle”, released by MediaTek, does not
contain any script like “compile_encoder.sh”?

Or has your company received any package called
“IoT-Qwen3-ASR-Release-G720-G520.zip”?

Regards,
Susovan

Hi Susovan,

Thank you for following up!

To clarify our setup:

  1. The “Qwen3-ASR-0.6B v0.6 FMS bundle” we downloaded from the official MediaTek portal only includes the pre-compiled evaluation artifacts (.dla binaries, tokenizer files, and push/inference scripts). It does not contain compile_encoder.sh.
  2. Our company has not received the package “IoT-Qwen3-ASR-Release-G720-G520.zip”.

Could you please guide us on the proper official procedure to request access to the IoT-Qwen3-ASR-Release-G720-G520.zip package? We would like to follow the official workflow to obtain the encoder conversion recipes.

Thank you for your guidance and support!

Best regards,
Kieu_Viet

Hi Kieu_Viet,

Please help raise an eService request to receive the “IoT-Qwen3-ASR-Release-G720-G520.zip” package. Please also mention your company email address that has MTK FEX access enabled.

Regards,
Susovan