ONNX export of seanghay/whisper-small-khmer-v2 (Whisper small fine-tuned for Khmer by Seanghay Yath, Apache-2.0), laid out for Transformers.js. Used by KamVox for in-browser Khmer transcription.
The decoder graph is simplified for WebGPU (standard ONNX ops only; outputs identical to the plain export), and the fp16 files keep the KV cache in fp16 (about 4x faster decoding than a stock export). generation_config.json adds the multilingual fields from openai/whisper-small (lang_to_id, task_to_id, ...) so language: 'khmer' works; the weights are unchanged.
| file | encoder | decoder_model_merged |
|---|---|---|
| fp32 | 353 MB | 615 MB |
fp16 (_fp16) |
176 MB | 308 MB |
q8 (_quantized) |
92 MB | 155 MB |
q4 (_q4, encoder only) |
66 MB | — |
4-bit decoders are not published: they roughly double the Khmer character error rate.
import { pipeline } from '@huggingface/transformers';
const asr = await pipeline('automatic-speech-recognition', 'uddompang/whisper-small-khmer-v2-onnx', {
device: 'webgpu',
dtype: { encoder_model: 'fp16', decoder_model_merged: 'fp16' },
});
const { text } = await asr(audio16kMono, { language: 'khmer', task: 'transcribe' });
The model was fine-tuned without reliable timestamps; transcribe windows of up to ~20 s without return_timestamps.
Apache-2.0, as the base model. Credit: Seanghay Yath (seanghay/whisper-small-khmer-v2), OpenAI Whisper.
onnx/decoder_model_merged.onnx 615 MBonnx/encoder_model.onnx 353 MBonnx/decoder_model_merged_fp16.onnx 308 MBonnx/encoder_model_fp16.onnx 176 MBonnx/decoder_model_merged_quantized.onnx 155 MBonnx/encoder_model_quantized.onnx 92 MBonnx/encoder_model_q4.onnx 66 MBseanghay/whisper-small-khmer-v2