Skip to main content
WhisperKit supports loading custom fine-tuned Whisper models, allowing you to deploy specialized models optimized for your specific use case, domain, or language.

Model Requirements

Custom models must be converted to CoreML format compatible with WhisperKit. The models consist of:

Audio Encoder

Mel spectrogram to embeddings

Text Decoder

Embeddings to text tokens

Tokenizer

Text encoding/decoding

WhisperKit Tools

The whisperkittools Python package provides utilities to:
  • Convert Hugging Face Whisper models to CoreML
  • Fine-tune models on custom datasets
  • Optimize models for specific Apple devices
  • Deploy models to Hugging Face Hub

Installation

Converting Models

From Hugging Face Hub

Convert any Whisper model from Hugging Face:

From Local Checkpoint

Convert a locally fine-tuned model:

Conversion Options

string
Hugging Face model ID (e.g., openai/whisper-large-v3)
string
Path to local model checkpoint
string
Directory to save converted models
string
default:"cpuAndNeuralEngine"
Target compute units: cpuOnly, cpuAndGPU, cpuAndNeuralEngine, all
string
Quantization mode: linear, palettize, or none

Fine-Tuning Models

Preparing Your Dataset

Dataset should be in Hugging Face Datasets format with audio and transcription:

Training Example

Deploying to Hugging Face

After converting your model to CoreML, upload to Hugging Face Hub:

Loading Custom Models

From Hugging Face Hub

Once uploaded, load your custom model in WhisperKit:

From Local Path

Load models from local filesystem:

With Compute Options

Model Repository Structure

Your Hugging Face repository should follow this structure:

Model Variants

WhisperKit supports glob patterns for model selection:
Common prefixes:
  • openai_whisper-* - Original OpenAI models
  • distil-whisper-* - Distilled models (faster, slightly lower accuracy)

Optimization Techniques

Quantization

Reduce model size and improve inference speed:

Model Pruning

Remove unnecessary weights during fine-tuning:

Knowledge Distillation

Create smaller models from larger ones:

Testing Custom Models

CLI Testing

Programmatic Testing

Benchmarking

Compare your custom model against baselines:

Best Practices

Model Selection

  • Start with openai/whisper-small for fine-tuning (good balance)
  • Use large-v3 for highest accuracy, tiny for fastest inference
  • Consider distil models for production (2-3x faster)

Fine-Tuning

  • Use domain-specific data (medical, legal, technical)
  • Include background noise similar to deployment environment
  • Balance dataset across accents and speakers
  • Fine-tune for 2-5 epochs to avoid overfitting

Optimization

  • Apply quantization for models > 200MB
  • Target cpuAndNeuralEngine for macOS 14+ deployment
  • Use cpuAndGPU for older macOS versions
  • Test on target devices before deployment

Validation

  • Measure Word Error Rate (WER) on held-out test set
  • Test edge cases (accents, noise, domain terms)
  • Compare against baseline OpenAI models
  • Profile memory usage and inference time

Example: Medical Transcription Model

Complete workflow for creating a medical transcription model:

Resources

WhisperKit Tools

Python toolkit for model conversion

Model Hub

Pre-converted WhisperKit models

Hugging Face Whisper

Browse available Whisper models

Fine-tuning Guide

Official Whisper fine-tuning guide

Next Steps

Performance Optimization

Optimize custom model performance

Memory Management

Manage memory for large models