vllm_omni.model_executor.models.audex.prompt ¶
Audex TTS/TTA prompt construction.
The Audex thinker consumes the exact ChatML prompt used by the official inference script (inference_scripts_vllm/audiogen_scripts/run_audio_gen_vllm.py in the nvidia/Nemotron-Labs-Audex-2B repo). The checkpoint's bundled chat template opens a thinking block (<think>\n) instead of the closed <think></think> + <speechgen_start> priming that TTS generation requires, so the prompt is built from a literal template here; a unit test pins it byte-for-byte against the official format.
build_null_prompt is the unconditional-prompt counterpart used by classifier-free guidance: the transcription is replaced with repeated <unk> tokens, iteratively adjusted so the tokenized null prompt is exactly as long as the conditional prompt (the CFG pair must decode the same positions).
AUDEX_SYSTEM_PROMPT module-attribute ¶
AUDEX_SYSTEM_PROMPT = "You are a helpful and harmless assistant.\n\nYou are not allowed to use any tools."
build_cond_prompt ¶
Build the conditional TTS prompt for one transcription.
build_null_prompt ¶
Unconditional TTS prompt for CFG (length-matched <unk> padding).
Replaces the transcription with <unk> repeated, adjusting the count until tokenizer.encode yields exactly the conditional prompt's length. Raises when no count matches so callers can fail the request instead of submitting a misaligned pair.
build_tta_cond_prompt ¶
Build the conditional TTA prompt for one audio caption.