lbourdois's picture
Upload pruned Whisper model
be4b549 verified
|
Raw
History Blame
1.51 kB
metadata
pipeline_tag: automatic-speech-recognition
language: nob
license: apache-2.0
tags:
  - trimmed
  - whisper
library_name: transformers
base_model: openai/whisper-tiny
base_model_relation: quantized

whisper-tiny-nob-16384

This model is a vocabulary-pruned version of openai/whisper-tiny optimised for Norwegian Bokmål via the trimming method.

Only the decoder token-embedding table and lm_head (proj_out) were pruned. The encoder is fully unchanged, so audio feature extraction is identical to the original model.

Vocabulary reduction

Component Original Pruned
vocab_size 50258 14777
embed_tokens 19.9M 6.3M
proj_out 0.0M 0.0M
Total 37.8M 24.1M

Usage

from transformers import WhisperForConditionalGeneration, AutoTokenizer, pipeline

model = WhisperForConditionalGeneration.from_pretrained("alphaedge-ai/whisper-tiny-nob-16384")
tokenizer = AutoTokenizer.from_pretrained("alphaedge-ai/whisper-tiny-nob-16384")

asr = pipeline("automatic-speech-recognition", model=model, tokenizer=tokenizer)
result = asr("audio.wav", generate_kwargs={"language": "nob"})
print(result["text"])

⚠️ Limitations

Tokens not used in the selected language(s) were removed. The model may produce incorrect output for other languages.