GLM ASR Nano 2512
GLM ASR Nano 2512 from zai-org. Source-based hardware guidance from its published configuration.
At a glance
- Parameters
- 2.26B
- Architecture
- glmasr
- License
- mit
- Disk space
- 4.2 GB
- Software
- Transformers, Transformers
Will it run on your machine?
Save your machine to see a personalized rating and its reasoning.
Add my hardwareWays to run it
Transformers · See official guide
Repository-specific command in publisher documentation; confirm dependencies and hardware in the source.
from transformers import AutoModelForSeq2SeqLM, AutoProcessor
processor = AutoProcessor.from_pretrained("zai-org/GLM-ASR-Nano-2512")
model = AutoModelForSeq2SeqLM.from_pretrained("zai-org/GLM-ASR-Nano-2512", dtype="auto", device_map="auto")
inputs = processor.apply_transcription_request("https://huggingface.co/datasets/hf-internal-testing/dummy-audio-samples/resolve/main/bcn_weather.mp3")
inputs = inputs.to(model.device, dtype=model.dtype)
outputs = model.generate(**inputs, do_sample=False, max_new_tokens=500)
decoded_outputs = processor.batch_decode(outputs[:, inputs.input_ids.shape[1] :], skip_special_tokens=True)
print(decoded_outputs)Transformers · See official guide
Repository-specific command in publisher documentation; confirm dependencies and hardware in the source.
from transformers import AutoModel, AutoProcessor
import torch
device = "cuda" if torch.cuda.is_available() else "cpu"
repo_id = "zai-org/GLM-ASR-Nano-2512"
processor = AutoProcessor.from_pretrained(repo_id)
model = AutoModel.from_pretrained(repo_id, dtype=torch.bfloat16, device_map=device)
messages = [
{
"role": "user",
"content": [
{
"type": "audio",
"url": "example_zh.wav",
},
{"type": "text", "text": "Please transcribe this audio into text"},
],
}
]
inputs = processor.apply_chat_template(
messages, tokenize=True, add_generation_prompt=True, return_dict=True, return_tensors="pt"
)
inputs = inputs.to(device, dtype=torch.bfloat16)
outputs = model.generate(**inputs, max_new_tokens=128, do_sample=False)
print(processor.batch_decode(outputs[:, inputs.input_ids.shape[1]:], skip_special_tokens=True))Explore its uses
Keep exploring
Voxtral Mini · 4B Realtime
Open-weight, multilingual speech transcription with an official streaming vLLM path and an offline-file Transformers example.
whisper small
whisper-small is a Transformer-based encoder-decoder model for automatic speech recognition and speech translation, from the openai/whisper-small repository, licensed Apache-2.0. According to the supplied model card, it was trained on 680k hours of labelled speech data using large-scale weak supervision and is intended to generalize across datasets and domains without fine-tuning. It is described as trained on either English-only or multilingual data. The model card lists many languages and reports WER metrics for a few dataset/language configurations.
whisper tiny
Whisper tiny is an Apache-2.0 licensed OpenAI automatic speech recognition model on the Hugging Face Hub, with safetensors tags. It is a Transformer-based encoder-decoder (sequence-to-sequence) model trained on 680k hours of labelled speech data using large-scale weak supervision. The model card describes training on either English-only or multilingual data; the multilingual variants were trained on both speech recognition and speech translation. Reported metrics on this model card include Test WER 7.54 on LibriSpeech clean, 17.15 on LibriSpeech other, and 141 on Common Voice 11.0 (hi), with multilingual coverage listed for many languages. The model card describes generalisation to many datasets and domains without fine-tuning, but does not specify hardware requirements in the supplied facts.