Ming-3.0-asr-tiny#
Ming-3.0-asr-tiny transcribes Chinese and English speech. A Whisper audio encoder and a Ling V3 mixture-of-experts language model share the work. The encoder’s embeddings fill the audio placeholder tokens of the transcription prompt.
Installation and Startup#
Install SGLang-Omni by following Installation. For Intel GPUs, follow the Ming-3.0-ASR-Tiny XPU recipe.
Startup uses one GPU. Preprocessing runs on the CPU. The audio encoder and the language model share that GPU. The pipeline is preprocessing, then thinker.
sgl-omni serve --model-path inclusionAI/Ming-3.0-asr-tiny
Send one audio file to POST /v1/audio/transcriptions. The examples below use tests/data/query_to_cars.wav and return how many cars are there in the picture.
DSpark decoding#
On one CUDA GPU, Ming-3.0-asr-tiny serves with its DSpark draft by default, at the revision sglang_omni/speculative/draft_registry.py pins. Greedy and sampled requests (temperature above 0) and repetition_penalty all run under the draft. The model path that launches, from --model-path or a config file, decides it: the draft is on for inclusionAI/Ming-3.0-asr-tiny and for a local directory whose path has models--inclusionAI--Ming-3.0-asr-tiny as one of its components, as every Hugging Face cache snapshot of it does, such as /models/models--inclusionAI--Ming-3.0-asr-tiny/. A local copy whose path has no such component serves without the draft, and so do Intel GPUs and other platforms. A speculative_algorithm other than DSPARK, such as NEXTN for MTP, replaces the DSpark draft.
Ming’s stages load --model-path as a repo ID or a directory, so inclusionAI/Ming-3.0-asr-tiny@<revision> does not start. To pin the target, download that revision and serve its snapshot directory, which keeps the draft on:
MODEL_PATH="$(
hf download inclusionAI/Ming-3.0-asr-tiny \
--revision ac95e7b1678c08ea6f4a2581a051e432ed63e9b7 \
--quiet
)"
sgl-omni serve --model-path "${MODEL_PATH}" \
--model-name inclusionAI/Ming-3.0-asr-tiny
To serve without the draft, add --thinker.engine.disable_speculative_decoding true:
sgl-omni serve --model-path inclusionAI/Ming-3.0-asr-tiny \
--thinker.engine.disable_speculative_decoding true
Transcription#
The prompt is the checkpoint’s transcription instruction followed by the audio. The chat template is not used. The model answers with a language label, a tab, and the transcript, and this endpoint returns only the transcript. Decoding is greedy unless temperature is set. Generation stops at the end-of-text token or after 256 new tokens.
Use curl
curl -X POST http://127.0.0.1:8000/v1/audio/transcriptions \
-F model=inclusionAI/Ming-3.0-asr-tiny \
-F file=@tests/data/query_to_cars.wav \
-F response_format=json
Use Python
import requests
with open("tests/data/query_to_cars.wav", "rb") as audio_file:
response = requests.post(
"http://127.0.0.1:8000/v1/audio/transcriptions",
data={
"model": "inclusionAI/Ming-3.0-asr-tiny",
"response_format": "json",
},
files={"file": ("query_to_cars.wav", audio_file, "audio/wav")},
timeout=180,
)
response.raise_for_status()
print(response.json()["text"])
Language#
language accepts en or zh and prefills that language label. Without language, the model identifies the language itself. On this English recording, omitting language and setting language=en both return the transcript above. A Chinese recording of 明天早上八点在会议室见。 returns 明天早上八点在会议室见 with language=zh and also with the hint omitted. Setting language=en on that Chinese recording returns <other>. Any other language is HTTP 400.
curl -X POST http://127.0.0.1:8000/v1/audio/transcriptions \
-F model=inclusionAI/Ming-3.0-asr-tiny \
-F file=@tests/data/query_to_cars.wav \
-F language=en \
-F response_format=json
curl -sS -X POST http://127.0.0.1:8000/v1/audio/transcriptions \
-F model=inclusionAI/Ming-3.0-asr-tiny \
-F file=@tests/data/query_to_cars.wav \
-F language=fr
The second command returns HTTP 400 and language must be one of ['en', 'zh'].
Prompt#
prompt adds one line of topic or hotword context after the instruction. A prompt that contains a newline is HTTP 400.
curl -X POST http://127.0.0.1:8000/v1/audio/transcriptions \
-F model=inclusionAI/Ming-3.0-asr-tiny \
-F file=@tests/data/query_to_cars.wav \
-F prompt=cars \
-F response_format=json
curl -sS -X POST http://127.0.0.1:8000/v1/audio/transcriptions \
-F model=inclusionAI/Ming-3.0-asr-tiny \
-F file=@tests/data/query_to_cars.wav \
--form-string $'prompt=first line\nsecond line'
Response formats#
response_format accepts json, text, and verbose_json. json is the default. text returns the transcript alone. verbose_json adds the duration and one segment covering the whole file. srt and vtt are HTTP 400 because this model does not emit word timestamps.
curl -X POST http://127.0.0.1:8000/v1/audio/transcriptions \
-F model=inclusionAI/Ming-3.0-asr-tiny \
-F file=@tests/data/query_to_cars.wav \
-F language=en \
-F response_format=text
curl -X POST http://127.0.0.1:8000/v1/audio/transcriptions \
-F model=inclusionAI/Ming-3.0-asr-tiny \
-F file=@tests/data/query_to_cars.wav \
-F language=en \
-F response_format=verbose_json
An upload longer than 30 seconds is split into 30-second clips, and the clip transcripts are joined.
Stream transcription#
Set stream=true to receive incremental transcript text as server-sent events. Use curl -N so curl does not buffer the response. Append the text from each transcript.text.delta event. The final transcript.text.done event repeats the complete transcript, followed by the [DONE] sentinel.
curl -N -X POST http://127.0.0.1:8000/v1/audio/transcriptions \
-F model=inclusionAI/Ming-3.0-asr-tiny \
-F file=@tests/data/query_to_cars.wav \
-F language=en \
-F response_format=json \
-F stream=true
An illustrative response is:
data: {"type":"transcript.text.delta","delta":"..."}
data: {"type":"transcript.text.done","text":"...","usage":{"type":"duration","seconds":5}}
data: [DONE]
The first stable text is emitted immediately; later updates use a 50 ms interval (--thinker.factory.stream_emit_interval_seconds). Completion flushes pending text, the language header is removed, and concatenated deltas equal the done event’s text. When max_new_tokens is reached, transcript.text.done includes "finish_reason":"length" and the partial transcript.
MTP decoding#
Enable MTP with the fine-tuned prediction weights:
sgl-omni serve --model-path inclusionAI/Ming-3.0-asr-tiny \
--thinker.engine.speculative_algorithm NEXTN \
--thinker.engine.speculative_draft_model_path wirybeaver/Ming-3.0-asr-tiny-mtp
Omit --thinker.engine.speculative_draft_model_path to use the official MTP bundled with the target checkpoint. Ming ASR MTP requires speculative_eagle_topk=1 and repetition_penalty=1.0. You can omit both settings: NEXTN sets the former at startup, and transcription requests use the latter by default.