Automatic Speech Recognition
Transformers
Safetensors
English
Chinese
glmasr
text2text-generation
Eval Results
Instructions to use AIArchiveInfo/GLM-ASR-Nano-2512 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AIArchiveInfo/GLM-ASR-Nano-2512 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="AIArchiveInfo/GLM-ASR-Nano-2512")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("AIArchiveInfo/GLM-ASR-Nano-2512") model = AutoModelForMultimodalLM.from_pretrained("AIArchiveInfo/GLM-ASR-Nano-2512", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download chat_template.jinja from AIArchiveInfo/GLM-ASR-Nano-2512: direct link, hf CLI and curl.
- Browser
- Download file 851 Bytes
-
https://huggingface.co/AIArchiveInfo/GLM-ASR-Nano-2512/resolve/bd782c8835e5b6088ba2ff5a59c3636c4af606b9/chat_template.jinja
- Command line
-
hf download hf://AIArchiveInfo/GLM-ASR-Nano-2512@bd782c8835e5b6088ba2ff5a59c3636c4af606b9/chat_template.jinja
-
curl -L -o chat_template.jinja https://huggingface.co/AIArchiveInfo/GLM-ASR-Nano-2512/resolve/bd782c8835e5b6088ba2ff5a59c3636c4af606b9/chat_template.jinja
851 Bytes
| {%- macro to_text(content) -%} | |
| {%- if content is string -%} | |
| {{- content -}} | |
| {%- elif content is iterable and content is not mapping -%} | |
| {%- for item in content -%} | |
| {%- if item is mapping and item.type == 'text' and item.text is defined -%} | |
| {{- item.text -}} | |
| {%- elif item is mapping and (item.type == 'audio' or 'audio' in item) -%} | |
| <|begin_of_audio|><|pad|><|end_of_audio|><|user|> | |
| {% elif item is string -%} | |
| {{- item -}} | |
| {%- endif -%} | |
| {%- endfor -%} | |
| {%- else -%} | |
| {{- content -}} | |
| {%- endif -%} | |
| {%- endmacro -%} | |
| {%- for m in messages -%} | |
| {%- if m.role == 'system' -%} | |
| <|system|> | |
| {{ to_text(m.content) | trim }} | |
| {%- elif m.role == 'user' -%} | |
| <|user|> | |
| {{ to_text(m.content) | trim }} | |
| {%- elif m.role == 'assistant' -%} | |
| <|assistant|> | |
| {{ to_text(m.content) | trim }} | |
| {%- endif -%} | |
| {%- endfor -%} | |
| {%- if add_generation_prompt -%} | |
| <|assistant|> | |
| {% endif -%} |