Downloads · 30 days
38
7% of all-time downloads
amugoodbad229/Qwen3-ASR-Bengali-FT
Qwen3-ASR-Bengali-FT is a automatic speech recognition model from amugoodbad229. Use it when you need speech turned into text. The card lists the license as apache-2.0.
This repository contains a fine-tuned, specialized version of the Qwen3-ASR-1.7B model, fundamentally optimized for Bengali Automatic Speech Recognition (ASR).
Downloads · 30 days
38
7% of all-time downloads
All-time downloads
570
Public
Parameters
2B
4.1 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors4.1 GB · 100%
From the Hugging Face model README
This repository contains a fine-tuned, specialized version of the Qwen3-ASR-1.7B model, fundamentally optimized for Bengali Automatic Speech Recognition (ASR).
By conducting a full-parameter Supervised Fine-Tuning (SFT) over 241 hours of Bangladeshi Bengali audio, this model overcomes the "language bleeding" and script-hallucination limitations of the base foundation model, providing highly accurate native Bengali transcriptions.
To ensure a rigorous and unbiased benchmark, the model was evaluated using 1,000 randomly sampled deterministic audio files from the SUBAK.KO validation set. Metrics were calculated using the industry-standard jiwer library.
Note: For fairness, the baseline models (Qwen Base and Whisper) had their outputs normalized via bnunicodenormalizer to prevent visual-unicode mismatch penalties. The fine-tuned model's output was evaluated raw, proving its native alignment to the language.
| Model | WER (%) | CER (%) | Script Err% (Devanagari) |
|---|---|---|---|
| Qwen3-ASR-1.7B-Bengali (FT) | 23.91% | 9.57% | 0.00% |
| Qwen3-ASR-1.7B (Base) | 71.17% | 40.26% | 80.20% |
| OpenAI Whisper Large-v3 | 72.73% | 28.73% | 29.40% |
bfloat16 precision and native HF gradient accumulation, masking prompt tokens (-100) to focus loss calculation purely on the Bengali textual output.Since Qwen3-ASR is a multimodal LLM, you must provide a text prompt containing the <|audio_pad|> token so the model knows where to "listen."
import torch
import librosa
from transformers import AutoModel, AutoProcessor, AutoConfig
model_id = "amugoodbad229/Qwen3-ASR-Bengali-FT"
# 1. Initialize Processor and Model
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
model = AutoModel.from_pretrained(
model_id,
dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True
)
# 2. Load audio (16kHz mono)
audio, _ = librosa.load("path/to/audio.wav", sr=16000)
# 3. Prepare Input with Prompt
# The <|audio_pad|> token is mandatory for the processor
prompt = "<|im_start|>user\n<|audio_pad|>Please transcribe.<|im_end|>\n<|im_start|>assistant\n"
inputs = processor(text=prompt, audio=audio, sampling_rate=16000, return_tensors="pt").to(model.device)
# Ensure floating point inputs match model precision
inputs = {k: v.to(torch.bfloat16) if v.is_floating_point() else v for k, v in inputs.items()}
# 4. Generate
generated_ids = model.generate(**inputs, max_new_tokens=256)
# 5. Decode
transcription = processor.batch_decode(
generated_ids[:, inputs["input_ids"].shape[1]:],
skip_special_tokens=True
)[0]
print(f"Result: {transcription}")
This is the most efficient way to transcribe long audio files.
from qwen_asr import Qwen3ASRModel
# Load the model using the official wrapper
# Ensure your model repo has the chat_template defined in tokenizer_config.json
model = Qwen3ASRModel.from_pretrained("amugoodbad229/Qwen3-ASR-Bengali-FT")
# Transcribe audio (Handles long-form audio chunking natively)
results = model.transcribe(audio=["path/to/your/audio.wav"], language=[None])
print(results[0].text)