Instructions to use jbilcke/whisper-medical-large-coreml with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- WhisperKit
How to use jbilcke/whisper-medical-large-coreml with WhisperKit:
# Install CLI with Homebrew on macOS device brew install whisperkit-cli # View all available inference options whisperkit-cli transcribe --help # Download and run inference using whisper base model whisperkit-cli transcribe --audio-path /path/to/audio.mp3 # Or use your preferred model variant whisperkit-cli transcribe --model "large-v3" --model-prefix "distil" --audio-path /path/to/audio.mp3 --verbose
- Notebooks
- Google Colab
- Kaggle
Medical Whisper Large v3 β Core ML for WhisperKit
A Core ML conversion of Na0s/Medical-Whisper-Large-v3,
a medical fine-tune of openai/whisper-large-v3, for WhisperKit
on Apple Silicon, with the encoder and the decoder running on the Apple Neural Engine.
- Converted with whisperkittools at commit
84f77a8, in float16, without quantization. - The conversion's compute plans dispatch 100% of the audio encoder and 99.9% of the text decoder to the Neural Engine.
- The tokenizer is included in the model folder, so loading needs no other download.
- The same weights for the browser (transformers.js, ONNX q4): jbilcke/whisper-medical-large-onnx.
Usage
import WhisperKit
let folder = try await WhisperKit.download(variant: "medical-large-v3", from: "jbilcke/whisper-medical-large-coreml")
let whisper = try await WhisperKit(WhisperKitConfig(
modelFolder: folder.path,
computeOptions: ModelComputeOptions(
melCompute: .cpuAndNeuralEngine,
audioEncoderCompute: .cpuAndNeuralEngine,
textDecoderCompute: .cpuAndNeuralEngine
),
download: false
))
let text = try await whisper.transcribe(audioArray: samples, decodeOptions: DecodingOptions(language: "en")).first?.text
The first load compiles the model for the Neural Engine, which takes about two minutes; macOS caches the result and later loads take about a second.
Measurements
MacBook Pro M4 (10-core GPU, 24 GB), four synthetic English medical consultations (23 minutes, 3,293 words):
| Placement | 25 s clip | Real-time factor, whole recordings | WER |
|---|---|---|---|
| Neural Engine (encoder and decoder) | 6.5 s | 0.247 | 1.21% |
| Encoder on the Neural Engine, decoder on the GPU | 21.3 s | 0.785 | 1.34% |
| GPU | 22.5 s | β | β |
- Downloads last month
- 46