qwen3-asr on Tenstorrent p150

Derived from Alibaba Qwen's Qwen3-ASR (Qwen/Qwen3-ASR-1.7B-hf, Qwen/Qwen3-ASR-0.6B-hf), with unmodified weights downloaded from Qwen's repositories. Official code: QwenLM/Qwen3-ASR and the transformers-native Qwen3ASRForConditionalGeneration. This is a third-party port, not affiliated with or endorsed by Alibaba or the Qwen team. See the original model cards for training details.

Qwen3-ASR transcribes speech in 30 languages and 22 Chinese dialects, identifies the language and accepts a free text context (names, hotwords, the topic) that biases the transcript. Two checkpoints are served from one image as serve profiles: 1.7b (default, the most accurate) and 0.6b (about twice as fast). Each is an audio encoder (three convolutions over 1 s chunks of a 128-bin log-mel spectrogram, then 24 / 18 transformer layers with attention inside 8 s windows) whose outputs enter a 28-layer Qwen3 text decoder (width 2048 / 1024) as audio tokens; the decoder writes language <name><asr_text> and the transcript. The package includes the official feature extraction, prompt template, language forcing, context prompts, output parsing and repetition clean-up, the splitting of long audio at quiet points (as the official code, but never past the limit) and the official streaming re-decoding algorithm. The encoder and the prefill run on the device as traced tt-nn graphs (bf16 encoder weights; decoder attention bf16, MLP bfp8), and every decoded token is one launch of a decoder megakernel (28 layers and the tied 151936-column output layer in bfp8, weights streamed from DRAM by 32 cores, attention on 16 cores, greedy decoding or sampling on the device, the stop rule on the device); audio decoding, resampling and the log-mel run on the host CPU.

Runs on Tenstorrent p150 โ€” see the serving profiles below.

Packaged and published with tt-model-manager 0.1.0 (manifest schema 5.1).

At a glance

Hardware p150
License apache-2.0

Intended use

Low-latency speech-to-text on one Tenstorrent p150, one request at a time: transcription of files, live captions from streamed audio, voice interfaces, subtitles with segment timestamps.

Prerequisites

  • The Tenstorrent CLI, tt: uv tool install tenstorrent (or use tt-model alone, see the Quickstart)
  • Docker
  • Tenstorrent hardware: p150
  • About 6 GB of free disk for the two checkpoints (fetched once into the Hugging Face cache, whichever profile is served), up to 2.4 GB for the packed megakernel weights (tt-model's weight cache: 1.7 GB for 1.7b, 0.6 GB for 0.6b) and about 2 GB of compiled kernels (its kernel cache), plus the container image
  • Audio as WAV, FLAC, OGG or MP3 (any sample rate, mono or multi-channel), or raw 16-bit / float PCM

Quickstart

tt serve changh95/Qwen3-ASR

tt serve downloads the Docker image and both required checkpoints: Qwen/Qwen3-ASR-1.7B-hf at bcd2b5b7f32b480ab5790554cfa8347f246a14f3, Qwen/Qwen3-ASR-0.6B-hf at 7f1569a48a89f3e3f4dc3a5c9d28bddd903bc76c (into your HF cache; they are not in the image), then starts the model's own HTTP server on port 20000 (or the next free port, if that one is busy). The first start compiles kernels for your device, which takes several minutes; the server is ready when it logs Application startup complete.

Without tt-cli: tt-model serve changh95/Qwen3-ASR.

Default profile (1.7b), on the port tt serve reported:

curl -sLO https://huggingface.co/changh95/Qwen3-ASR/resolve/main/code/tt_qwen3_asr/samples/librispeech_en/sample.wav
curl -s localhost:20000/v1/audio/transcriptions -F file=@sample.wav
# {"text": "Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.", "language": "English", ...}
curl -s localhost:20000/v1/audio/transcriptions -F file=@sample.wav -F response_format=srt
curl -sN localhost:20000/v1/audio/transcriptions -F file=@sample.wav -F stream=true     # SSE text deltas

Serving profiles

Select a different serving profile using --profile.

profile hardware mesh description
1.7b (default) p150 P150 Qwen3-ASR-1.7B: the most accurate (the default)
0.6b p150 P150 Qwen3-ASR-0.6B: about twice as fast

Capabilities

This package exposes the model's own HTTP server on port 20000, not an OpenAI-compatible chat API โ€” its request and response shapes are the model's own. See the author's notes for the payload it expects.

POST /v1/audio/transcriptions is OpenAI-compatible (multipart: file, model, language, prompt, response_format, temperature, stream, timestamp_granularities[]); the OpenAI Python client works against it:

from openai import OpenAI
client = OpenAI(base_url="http://localhost:20000/v1", api_key="unused")
r = client.audio.transcriptions.create(model="qwen3-asr", file=open("sample.wav", "rb"))
print(r.text)
request field default meaning
file required the audio: WAV, FLAC, OGG, MP3 (any sample rate; channels are averaged; resampled to 16 kHz). Also accepted: a JSON body {"audio": base64, ...}, or raw PCM as the body with `?raw_format=pcm16
language automatic ISO code or English name of one of the 30 languages (zh en yue ar de fr es pt id it ko ru th vi ja tr hi ms nl sv da fi pl cs fil fa el hu mk ro); forcing it skips language identification
prompt "" context / hotwords (names, terms, the topic), up to QWEN3ASR_MAX_CONTEXT_TOKENS tokens: the model's system turn
response_format json json (text, language, usage), text, srt, vtt, verbose_json (segments with start / end, tokens, timings)
temperature 0 0 = greedy (the official decoding); > 0 samples (on the device from the second token of a segment; top_k <= 64, top_p, seed 0 .. 2^64 - 1)
stream false Server-Sent Events: transcript.text.delta as tokens are decoded, then transcript.text.done
timestamp_granularities[] segment segment timestamps only (the checkpoints emit no word timestamps)
max_new_tokens, segment_seconds, postprocess 512, 60, true per-segment token limit; split long audio into shorter segments (finer subtitle cues); the official repetition clean-up
  • Long audio is split at quiet points (the quietest 100 ms of the 10 s before each limit) into segments of at most QWEN3ASR_MAX_SEGMENT_SECONDS (60 s), transcribed one after the other and joined; srt / vtt / verbose_json give one cue per segment.
  • Streaming input: WEBSOCKET /v1/audio/transcriptions/stream (see SERVING.md): send a JSON start message, then 16-bit or float PCM frames, then {"type": "finish"}; the server answers a partial transcript every chunk_size_sec (default 2 s) of audio with the official streaming algorithm, then the final one.
  • GET /health reports readiness, GET /info the profile, the weights and their commits, the device, the engines, the configuration and the limits; GET /v1/models lists the served model.
  • Errors: 400 with the reason, 413 body too large, 415 content type, 422 malformed body, 429 queue full (Retry-After), 503 after QWEN3ASR_QUEUE_TIMEOUT_S in the queue or while shutting down, 500 on a device failure. The port accepts connections only once the server is ready (uvicorn binds it after the start-up); GET /health then answers 200.
  • A Python API with the same parameters (tt_qwen3_asr.api.Qwen3ASR) is described in code/PYTHON.md.

Configuration

The server builds its device programs for one configuration when it starts; change it with environment variables and start it again. GET /info reports it.

item environment variable values default
checkpoint QWEN3ASR_VARIANT (the serve profiles set it) 1.7b, 0.6b 1.7b
longest segment per decoder pass QWEN3ASR_MAX_SEGMENT_SECONDS 1 .. 300 60
longest context prompt QWEN3ASR_MAX_CONTEXT_TOKENS 0 .. 2048 256
tokens per segment QWEN3ASR_MAX_NEW_TOKENS 16 .. 2048 512
streaming-input carried transcript QWEN3ASR_MAX_PREFIX_TOKENS 0 .. 2048 256
device engines QWEN3ASR_ENGINE dec=mk (megakernel) or dec=ttnn enc=ttnn,pre=ttnn,dec=mk
weight formats QWEN3ASR_PRECISION enc, attn, mlp, head, mk_attn, mk_mlp, mk_head = bf16 / bfp8 encoder bf16, prefill attention bf16 / MLP bfp8, megakernel bfp8 (head bfp8)
prompt / encoder lengths compiled at start QWEN3ASR_PREFILL_BUCKETS, QWEN3ASR_ENCODER_BUCKETS up to 32 multiples of 32 each derived from the limits above (7 + 7)
largest top_k QWEN3ASR_K_MAX 1 .. 64 64
streaming granularity QWEN3ASR_POLL_TOKENS 1 .. 64 decode steps per poll 8
queue QWEN3ASR_QUEUE_DEPTH, QWEN3ASR_QUEUE_TIMEOUT_S waiting requests, seconds 8, 120
longest upload QWEN3ASR_MAX_AUDIO_SECONDS, QWEN3ASR_MAX_BODY_MB seconds, MB 3600, 200

Example output

Transcribed by this package on a p150 (profile 1.7b, the shipped defaults, automatic language identification; POST /v1/audio/transcriptions with the MP3 file, client round trip on loopback). media/demos.json has every request, the full outputs, the timings and the files' sha256.

input transcript
MP3, 5.9 s, LibriSpeech English: Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel. (211 ms)
MP3, 8.6 s, synthetic (Qwen3-TTS) Chinese: ไปŠๅคฉๅคฉๆฐ”ๅพˆๅฅฝ๏ผŒๆˆ‘ไปฌไธ€่ตทๅŽปๅ…ฌๅ›ญๆ•ฃๆญฅๅงใ€‚่ทฏไธŠ่ฟ˜ๅฏไปฅไนฐไธ€ๆฏ็ƒญๅ’–ๅ•ก๏ผŒ้กบไพฟ่Š่Šๆœ€่ฟ‘็š„ๅทฅไฝœใ€‚ (204 ms)
MP3, 12.1 s, FLEURS Korean: ์–ด๋‘  ์†์—์„œ ํ”ผ๋ผ๋ฏธ๋“œ๋ฅผ ๋ณผ ์ˆ˜ ์žˆ๊ณ  ์‡ผ๊ฐ€ ์‹œ์ž‘ํ•˜๊ธฐ ์ „์— ๊ณ ์š” ์†์—์„œ ํ”ผ๋ผ๋ฏธ๋“œ๋ฅผ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. (351 ms)

Long audio, response_format=srt: MP3 (114 s, 14 FLEURS utterances) -> media/demo_long_en.srt, three segments cut at quiet points (2.3 s round trip). Excerpt:

1
00:00:00,000 --> 00:00:53,025
When you call someone who is thousands of miles away, you are using a satellite. Now widely available throughout the archipelago, Japanese cuisine features an array of simply seasoned dishes. [...]

2
00:00:53,025 --> 00:01:46,233
The Tibetan Buddhism is based on the teachings of Buddha, but were extended by the Mayana path of love and by a lot of techniques from Indian yoga. [...]

3
00:01:46,233 --> 00:01:54,000
Although three people were inside the house when the car impacted it, none of them were hurt.

Streaming input: the Korean clip sent over WEBSOCKET /v1/audio/transcriptions/stream at real-time pace (0.1 s PCM frames, 2 s chunks) gave a partial transcript every 2 s, 92-184 ms after each chunk's last frame (the first one still empty, then "์–ด๋‘  ์†์—์„œ ํ”ผ๋ผ๋ฏธ๋“œ๋ฅผ." -> "... ์‡ผ๊ฐ€ ์‹œ์ž‘." -> ... -> the full sentence), and the final 143 ms after finish; streamed output (SSE) of the same file: first text delta after 165 ms. The inputs are LibriSpeech and FLEURS recordings (CC BY 4.0) and Qwen3-TTS speech (Apache-2.0): media/ATTRIBUTION.md.

Expected performance

Agreement with Qwen's own float32 code on the CPU (transformers 5.24.1, same weights, prompts and greedy decoding) on 48 test entries (FLEURS dev en / zh / ko, model-card clips, LibriSpeech, synthetic speech, white noise at 5 / 10 dB, 31-114 s concatenations, 0.3 s / 1 s clips, silence; 23 English, 25 Chinese / Korean), as served (60 s segments):

eval 0.6b 1.7b
Transcripts identical to the float32 transcripts 43 / 48 39 / 48
WER (English) / CER (Chinese, Korean) vs the float32 transcripts 0.0087 / 0.0032 0.0082 / 0.0038
the same without the two clips longer than the 60 s segment (63 s, 114 s) 0.0028 / 0.0032 0.0063 / 0.0038
WER / CER vs the FLEURS references (the float32 code in parentheses) 0.138 / 0.081 (0.141 / 0.082) 0.101 / 0.063 (0.096 / 0.067)
Next-token distribution along the float32 path: total-variation distance per step, mean per entry / top-1 agreement (6 entries, 237 steps; Qwen's own bfloat16 over all entries in parentheses: mean / top-1) <= 0.0059 / 0.996 (0.0018 / 0.998) <= 0.0054 / 1.000 (0.0013 / 0.995)
Audio-encoder output PCC vs float32 (6.5 / 16 / 31 / 63 s) 0.9995 / 0.9996 / 0.9998 / 0.9997 0.9998 / 0.9998 / 0.9996 / 0.9993

The differences are near-ties ("you're" / "you are", "13์œ„" / "์‹ญ์‚ผ ์œ„", "6" / "ๅ…ญ", "็ง‘้š†" / "ๅ…‹้š†", "Mr." / "Mister") and the splitting of the two clips longer than the 60 s segment. Qwen's own bfloat16 code disagrees with float32 at such steps too: on the 1.7B it makes exactly the same three Chinese substitutions as the p150 port, and further ones on card_en (WER 0.056) and a noisy Korean clip.

speed (batch 1, warm) 0.6b 1.7b
Decoder time per token (megakernel, traced; context 64 / 512 / 1024; at the served maximum of 1856 positions) 2.1 / 2.5 / 2.9 ms; < 3.7 ms 4.8 / 5.2 / 5.6 ms; < 6.4 ms (6.4 / 3.7 ms measured at 2030)
Time to the first token, 3-8 s / 8-20 s / 45-80 s clips (median, end to end) 30 / 44 / 163 ms 41 / 57 / 171 ms
Real-time factor, 3-8 s / 8-20 s / 114 s clips (median, end to end) 0.012 / 0.010 / 0.009 0.023 / 0.018 / 0.016
All-ttnn baseline (QWEN3ASR_ENGINE=dec=ttnn): decoder time per token 8.1-10.3 ms 12.6-13.3 ms
Streaming input (2 s chunks): device time per update, 16-31 s streams (mean / max) -- 79-115 / 156 ms
Served POST /v1/audio/transcriptions, 5.9 s English / 8.6 s Chinese sample, client round trip on loopback 108 / 103 ms 189 / 185 ms
Server start-up in the container, first start (empty kernel and weight caches) 483 s 844 s
Server start-up, later starts (warm caches) 70-138 s 83-111 s

End-to-end times are through the Python API (code/tt_qwen3_asr/tests/dev_eval.py) on a shared host whose 8 CPU cores were kept busy by other processes: the device parts are unaffected, the host parts (audio decoding, log-mel, prompt) are inflated. Device scripts: code/tt_qwen3_asr/tests/dev_mk_dec.py, dev_stream.py.

Limitations

  • Version 1 runs each decoding step as one megakernel launch; the audio encoder and the prompt prefill are traced tt-nn graphs, which set the time to the first token. Encoder and prefill megakernels are planned for v1.1.
  • Batch 1: requests are served one at a time in arrival order (QWEN3ASR_QUEUE_DEPTH may wait).
  • Timestamps are per segment (long audio is split at quiet points); word timestamps need Qwen's separate Qwen3-ForcedAligner-0.6B, which is not included (planned for v1.1).
  • The first start of a profile takes 8 (0.6b) to 14 (1.7b) minutes (measured in the container on a shared host): it packs the megakernel's weight streams from the checkpoint on the CPU (0.5-2 min) into tt-model's weight cache (/weight-cache/mk_dec), compiles every device kernel into the kernel cache and captures the traces. Later starts reuse both caches and are ready in 1.5-2 minutes.
  • Audio longer than QWEN3ASR_MAX_SEGMENT_SECONDS (60 s) is split at quiet points and the pieces are transcribed independently (the official code splits at 20 minutes): context does not carry across segments. On five 63-128 s test clips the 1.7b transcript differs from Qwen's single pass by WER 0.015-0.042 (English) and CER 0.024 (Chinese); against the reference transcripts it is as good as the single pass (WER 0.040-0.092 vs 0.053-0.092).
  • Streaming input commits a segment when its audio reaches QWEN3ASR_MAX_SEGMENT_SECONDS (not at a quiet point); a word at that moment can be lost.
  • Sampling (temperature > 0): the first token of each segment is drawn on the host (top-k / top-p over the whole vocabulary), the following ones on the device from the 64 most likely tokens (QWEN3ASR_K_MAX); the same seed gives the same transcript. Greedy decoding, the official default, is exact.
  • Transcripts are not bit-identical to Qwen's float32 code: on 5-9 of the 48 test entries a word or a number format differs (near-ties such as "13์œ„" / "์‹ญ์‚ผ ์œ„", "you're" / "you are"); the error rate against reference transcripts stays at the float32 code's (FLEURS CER 0.063 vs 0.067, WER 0.101 vs 0.096 for 1.7B; 0.081 vs 0.082 and 0.138 vs 0.141 for 0.6B).
  • Very quiet or very short inputs (< 0.5 s) return an empty transcript, as the official code does.

Licensing

  • Weights (not redistributed here; tt serve downloads them from Qwen's repositories at these commits), both Apache-2.0: Qwen/Qwen3-ASR-1.7B-hf bcd2b5b7, Qwen/Qwen3-ASR-0.6B-hf 7f1569a4. Notices: code/tt_qwen3_asr/licenses/NOTICE.md.
  • This package is a derivative work of Qwen3-ASR: the inference code is written anew (feature extraction, prompt, parsing, long-audio splitting and streaming follow the official code), the networks run on the device in tt-nn operations and a custom decoder megakernel, and the weights are loaded unmodified. The decoder megakernel and its on-device sampler are adapted from the Qwen3-TTS talker megakernel of the same author's Qwen3-TTS port to p150, changh95/Qwen3-TTS (Apache-2.0), and the tt-nn decoder from that port's tt-nn engines, themselves adapted from tt-metal's Qwen3-TTS demo (models/demos/audio/qwen3_tts, Copyright 2026 Tenstorrent AI ULC, Apache-2.0); the encoder's convolution set-up and the first tt-nn baseline follow tt-metal's Qwen3-ASR demo (models/demos/audio/qwen3_asr, Copyright 2026 Tenstorrent USA, Inc., Apache-2.0). The adapted files say so in their headers.
  • Port, server and scripts (code/) and the tt-metal patches in patches/: Apache-2.0.
  • Samples: code/tt_qwen3_asr/samples/librispeech_en/sample.wav (LibriSpeech, CC BY 4.0), code/tt_qwen3_asr/samples/fleurs_ko/sample.wav (FLEURS, Google, CC BY 4.0) and code/tt_qwen3_asr/samples/tts_zh/sample.wav (synthetic speech made with Qwen3-TTS, Apache-2.0); provenance in their PROVENANCE.md.

Related packages

Feedback

Questions or problems with this package: open a discussion at https://huggingface.co/changh95/Qwen3-ASR/discussions โ€” that is what reaches its author. A problem with the tt tooling itself: tt report issue (collects your environment and opens a prefilled issue against tenstorrent/tt-cli). Product feedback: support@tenstorrent.com.

Provenance

The exact sources the image was built from โ€” code/ in this repo is byte-identical to the model code inside the image:

component built from
tt-metal 44d66500520fda9f2c7060c0f6b41ec48f7ab37e (dirty tree โ€” the image includes uncommitted changes)
code/ digest d268cf1231b75d36 (sha256, first 16 hex digits)
built 2026-12-02T06:17:47+00:00 by tt-model 0.1.0
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for changh95/Qwen3-ASR

Finetuned
(22)
this model

Collection including changh95/Qwen3-ASR