Views
No views yet
Trelis/whisper-hinglish-preview packaged for WhisperKit on Apple Silicon (macOS 14+ / iOS 17+)..mlmodelc bundles, ready for on-device inference through WhisperKit's Swift API. For Python inference, use the upstream repo linked above.1import WhisperKit
2
3let pipe = try await WhisperKit(
4 WhisperKitConfig(
5 model: "Trelis_whisper-hinglish-preview",
6 modelRepo: "vbhar/whisperkit-hinglish-large-v3-coreml"
7 )
8)
9let result = try await pipe.transcribe(audioPath: "meeting.wav")1hf download vbhar/whisperkit-hinglish-large-v3-coreml \
2 --include "Trelis_whisper-hinglish-preview/*" \
3 --local-dir ./modelsTrelis_whisper-hinglish-preview/
├── MelSpectrogram.mlmodelc/
├── AudioEncoder.mlmodelc/ # ~1.2 GB weights
├── TextDecoder.mlmodelc/ # ~1.7 GB weights
├── config.json
└── generation_config.json| This repo | vbhar/whisperkit-hinglish-large-v3-coreml — Core ML float16 conversion |
| Direct source | Trelis/whisper-hinglish-preview — Apache-2.0 |
| Its base | ARTPARK-IISc/whisper-large-v3-vaani-hindi |
| Upstream architecture | openai/whisper-large-v3 |
<|mixedcode|> token row. See below for why this is necessary and what it costs.argmaxinc/whisperkittools under Python 3.11 (3.14 has no working coremltools/torch wheels as of this writing):1python3.11 -m venv .venv && source .venv/bin/activate
2pip install git+https://github.com/argmaxinc/whisperkittools.git
3
4whisperkit-generate-model \
5 --model-version Trelis/whisper-hinglish-preview \
6 --output-dir out \
7 --repo-path-suffix fp16Trelis/whisper-hinglish-preview has vocab_size: 51867 — one token more than whisper-large-v3's 51866. The extra entry is a <|mixedcode|> control token.51866 → it loads the openai/whisper-large-v3 tokenizer.openai/whisper-base.whisper-base is a 51865-token vocabulary with different special-token ids. Every <|startoftranscript|>, language, task and timestamp id is shifted, so decoding produces plausible-looking but wrong text — or control-token soup. Nothing throws.1from transformers import WhisperForConditionalGeneration
2
3model = WhisperForConditionalGeneration.from_pretrained("Trelis/whisper-hinglish-preview")
4model.resize_token_embeddings(51866) # drops the trailing <|mixedcode|> rowproj_out is weight-tied to the input embedding, so this one call resizes both the embedding matrix and the decoder's output projection; the resulting logits tensor is [1, 1, 51866] and WhisperKit picks the correct large-v3 tokenizer. The cost is that <|mixedcode|> becomes unaddressable — in practice it is not needed, as the model code-switches from context anyway.logits: [1, 1, 51866], so consumers of this repo do not need to do anything — the fix matters only if you re-convert from the Trelis source yourself.nan on real
code-switched Hindi/English speech, while passing cleanly on short English
clips such as WhisperKit's bundled jfk.wav.<|mixedcode|> is gone by construction (see above). Code-switching still works; the token just cannot be forced.vbhar/whisperkit-hindi2hinglish-prime-coreml instead. Picking the wrong one of the two is the most likely mistake with this pair.