Audio-Text-to-Text
Transformers
Safetensors
English
Chinese
moss_transcribe_diarize
text2text-generation
moss
audio
speech
asr
diarization
timestamp-asr
long-form-audio
multimodal
multilingual
custom_code
Eval Results
Run this model with HF Jobs
Run itazap/MOSS-Transcribe-Diarize-HF on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/itazap/MOSS-Transcribe-Diarize-HF. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/itazap/MOSS-Transcribe-Diarize-HF on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use itazap/MOSS-Transcribe-Diarize-HF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use itazap/MOSS-Transcribe-Diarize-HF with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("itazap/MOSS-Transcribe-Diarize-HF", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("itazap/MOSS-Transcribe-Diarize-HF", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload processor
Browse filesFiles changed (2)
- chat_template.jinja+81-27
- processor_config.json+1-1
5 unmodified lines67891011123 unmodified lines161718192021222324252 unmodified lines28293031323334353637383940414243444546474849508 unmodified lines59606162636465666768697071727374757677787980818283848586878889909192931 unmodified line95969798991001011021031041051061071081091101111121131141151161171181195 unmodified lines{%- set keyword_namespace = namespace(items=[]) -%}{%- for item in content -%}{%- if item.type == 'audio' or 'audio' in item or 'audio_url' in item -%}{{- '<|audio_start|><|audio_pad|><|audio_end|>\n' -}}{%- set ns.has_audio = true -%}{%- elif item.type == 'text' and ns.text is none -%}{%- set ns.text = item.text -%}3 unmodified lines{%- endfor -%}{%- if ns.has_audio -%}{%- if ns.text -%}{{- '补充信息:' + ns.text + '\n\n' -}}{%- endif -%}{%- if keyword_namespace.items -%}{{- '热词列表:[' + keyword_namespace.items|join(', ') + ']\n\n' -}}{%- endif -%}{{- '请将音频转写为文本,每一段需以起始时间戳和说话人编号([S01]、[S02]、[S03]…)开头,正文为对应的语音内容,并在段末标注结束时间戳,以清晰标明该段语音范围。' -}}{%- elif ns.text -%}2 unmodified lines{%- endif -%}{%- endmacro -%}{%- if tools %}{{- '<|im_start|>system\n' }}{%- if messages[0].role == 'system' %}{{- render_content(messages[0].content) + '\n\n' }}{%- else %}{{- 'You are a helpful assistant.\n\n' }}{%- endif %}{{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}{%- for tool in tools %}{{- "\n" }}{{- tool | tojson }}{%- endfor %}{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}{%- else %}{%- if messages[0].role == 'system' %}{{- '<|im_start|>system\n' + render_content(messages[0].content) + '<|im_end|>\n' }}{%- else %}{{- '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}{%- endif %}{%- endif %}{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}8 unmodified lines{%- for message in messages %}{%- set content = render_content(message.content) %}{%- if (message.role == "user") or (message.role == "system" and not loop.first) %}{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>\n' }}{%- elif message.role == "assistant" %}{%- set reasoning_content = '' %}{%- if message.reasoning_content is string %}{%- set reasoning_content = message.reasoning_content %}{%- else %}{%- if '</think>' in content %}{%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}{%- set content = content.split('</think>')[-1].lstrip('\n') %}{%- endif %}{%- endif %}{%- if loop.index0 > ns.last_query_index %}{%- if loop.last or (not loop.last and reasoning_content) %}{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}{%- else %}{{- '<|im_start|>' + message.role + '\n' + content }}{%- endif %}{%- else %}{{- '<|im_start|>' + message.role + '\n' + content }}{%- endif %}{%- if message.tool_calls %}{%- for tool_call in message.tool_calls %}{%- if (loop.first and content) or (not loop.first) %}{{- '\n' }}{%- endif %}{%- if tool_call.function %}{%- set tool_call = tool_call.function %}{%- endif %}{{- '<tool_call>\n{"name": "' }}{{- tool_call.name }}{{- '", "arguments": ' }}{%- if tool_call.arguments is string %}1 unmodified line{%- else %}{{- tool_call.arguments | tojson }}{%- endif %}{{- '}\n</tool_call>' }}{%- endfor %}{%- endif %}{{- '<|im_end|>\n' }}{%- elif message.role == "tool" %}{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}{{- '<|im_start|>user' }}{%- endif %}{{- '\n<tool_response>\n' }}{{- content }}{{- '\n</tool_response>' }}{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}{{- '<|im_end|>\n' }}{%- endif %}{%- endif %}{%- endfor %}{%- if add_generation_prompt %}{{- '<|im_start|>assistant\n' }}{%- if enable_thinking is defined and enable_thinking is false %}{{- '<think>\n\n</think>\n\n' }}{%- endif %}{%- endif %}5 unmodified lines6789101112133 unmodified lines17181920212223242526272829302 unmodified lines3334353637383940414243444546474849505152535455565758596061626364656667686970717273747576778 unmodified lines86878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361 unmodified line1381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721735 unmodified lines{%- set keyword_namespace = namespace(items=[]) -%}{%- for item in content -%}{%- if item.type == 'audio' or 'audio' in item or 'audio_url' in item -%}{{- '<|audio_start|><|audio_pad|><|audio_end|>' -}}{%- set ns.has_audio = true -%}{%- elif item.type == 'text' and ns.text is none -%}{%- set ns.text = item.text -%}3 unmodified lines{%- endfor -%}{%- if ns.has_audio -%}{%- if ns.text -%}{{- '补充信息:' + ns.text + '' -}}{%- endif -%}{%- if keyword_namespace.items -%}{{- '热词列表:[' + keyword_namespace.items|join(', ') + ']' -}}{%- endif -%}{{- '请将音频转写为文本,每一段需以起始时间戳和说话人编号([S01]、[S02]、[S03]…)开头,正文为对应的语音内容,并在段末标注结束时间戳,以清晰标明该段语音范围。' -}}{%- elif ns.text -%}2 unmodified lines{%- endif -%}{%- endmacro -%}{%- if tools %}{{- '<|im_start|>system' }}{%- if messages[0].role == 'system' %}{{- render_content(messages[0].content) + '' }}{%- else %}{{- 'You are a helpful assistant.' }}{%- endif %}{{- "# ToolsYou may call one or more functions to assist with the user query.You are provided with function signatures within <tools></tools> XML tags:<tools>" }}{%- for tool in tools %}{{- "" }}{{- tool | tojson }}{%- endfor %}{{- "</tools>For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:<tool_call>{"name": <function-name>, "arguments": <args-json-object>}</tool_call><|im_end|>" }}{%- else %}{%- if messages[0].role == 'system' %}{{- '<|im_start|>system' + render_content(messages[0].content) + '<|im_end|>' }}{%- else %}{{- '<|im_start|>systemYou are a helpful assistant.<|im_end|>' }}{%- endif %}{%- endif %}{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}8 unmodified lines{%- for message in messages %}{%- set content = render_content(message.content) %}{%- if (message.role == "user") or (message.role == "system" and not loop.first) %}{{- '<|im_start|>' + message.role + '' + content + '<|im_end|>' }}{%- elif message.role == "assistant" %}{%- set reasoning_content = '' %}{%- if message.reasoning_content is string %}{%- set reasoning_content = message.reasoning_content %}{%- else %}{%- if '</think>' in content %}{%- set reasoning_content = content.split('</think>')[0].rstrip('').split('<think>')[-1].lstrip('') %}{%- set content = content.split('</think>')[-1].lstrip('') %}{%- endif %}{%- endif %}{%- if loop.index0 > ns.last_query_index %}{%- if loop.last or (not loop.last and reasoning_content) %}{{- '<|im_start|>' + message.role + '<think>' + reasoning_content.strip('') + '</think>' + content.lstrip('') }}{%- else %}{{- '<|im_start|>' + message.role + '' + content }}{%- endif %}{%- else %}{{- '<|im_start|>' + message.role + '' + content }}{%- endif %}{%- if message.tool_calls %}{%- for tool_call in message.tool_calls %}{%- if (loop.first and content) or (not loop.first) %}{{- '' }}{%- endif %}{%- if tool_call.function %}{%- set tool_call = tool_call.function %}{%- endif %}{{- '<tool_call>{"name": "' }}{{- tool_call.name }}{{- '", "arguments": ' }}{%- if tool_call.arguments is string %}1 unmodified line{%- else %}{{- tool_call.arguments | tojson }}{%- endif %}{{- '}</tool_call>' }}{%- endfor %}{%- endif %}{{- '<|im_end|>' }}{%- elif message.role == "tool" %}{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}{{- '<|im_start|>user' }}{%- endif %}{{- '<tool_response>' }}{{- content }}{{- '</tool_response>' }}{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}{{- '<|im_end|>' }}{%- endif %}{%- endif %}{%- endfor %}{%- if add_generation_prompt %}{{- '<|im_start|>assistant' }}{%- if enable_thinking is defined and enable_thinking is false %}{{- '<think></think>' }}{%- endif %}{%- endif %}
6 unmodified lines789101112136 unmodified lines"feature_extractor": {"chunk_length": 30,"dither": 0.0,"feature_extractor_type": "WhisperFeatureExtractor","feature_size": 80,"hop_length": 160,"n_fft": 400,6 unmodified lines789101112136 unmodified lines"feature_extractor": {"chunk_length": 30,"dither": 0.0,"feature_extractor_type": "MossTranscribeDiarizeFeatureExtractor","feature_size": 80,"hop_length": 160,"n_fft": 400,
chat_template.jinja+81-27
processor_config.json+1-1