whisper.cpp v1.9.5 runs the encoder on Apple's Neural Engine, twice as fast as Core ML

1 month ago

whisper.cpp v1.9.5 can run the Whisper encoder on the Apple Neural Engine through ANEForge, about twice as fast as Core ML. whisper-cli now exits with an error code when a file fails, and long recordings split across processors keep correct timestamps.

Ask about this presentation

Chapters

Show transcript
  1. On an Apple Silicon Mac, whisper.cpp can now run the Whisper encoder directly on the Apple Neural Engine through ANEForge. It is opt-in, and with it switched off, whisper.cpp behaves exactly as before.

    Slide text
    whisper.cpp

    whisper.cpp v1.9.5 runs the encoder on Apple’s Neural Engine

    ANEForge, an optional backend that bypasses Core ML

    README.md · ANEForge support
  2. On the medium model, one encoder pass drops from about 240 milliseconds with Core ML to under 120. The gap holds from the tiny model up to medium, and the transcripts come out the same.

    Slide text
    whisper.cpp

    The encoder runs about twice as fast as Core ML

    Core ML encoder
    236.0 ms
    ANEForge encoder
    117.6 ms

    One encoder pass, medium model, Apple Silicon

    PR #3905 · whisper-bench, fp16 encoder
  3. whisper-cli used to exit with success even when an input file was missing, its audio couldn't be decoded, or the output couldn't be written. Now it finishes the batch and exits with code 11.

    Slide text
    whisper.cpp

    whisper-cli now tells your scripts when a file fails

    exit 0 → exit 11
    examples/cli/cli.cpp · PR #4080
  4. With the processors option on a long file, every timestamp past about 22 minutes could come out negative, mostly on Windows builds. An integer overflow caused it, and those timestamps are now correct.

    Slide text
    whisper.cpp

    Long recordings split across processors keep correct timestamps

    before split 1 - 00:-21:-44.-350
    after split 1 - 00:23:00.000
    src/whisper.cpp · PR #4044
  5. Apps can now cancel a transcription while it is still detecting the language. The Vulkan Docker image drops from almost two gigabytes to under 700 megabytes, and a malformed model file now fails to load instead of crashing.

    Slide text
    whisper.cpp

    Cancelling, Docker and bad model files

    • + The abort callback now stops language auto-detection
    • + Vulkan Docker image: 1.75 GB down to 692 MB
    • + Malformed model files are rejected instead of crashing
    src/whisper.cpp · .devops/main-vulkan.Dockerfile
  6. The decoder is unchanged. You compile the encoder bundle on your own Mac, tied to its macOS build, and it relies on undocumented Apple interfaces that an update can change. The README's ANEForge section has the setup.

    Slide text
    whisper.cpp

    ANEForge speeds up the encoder only, on Apple Silicon

    Setup: whisper.cpp README, ANEForge support
    github.com/ggml-org/whisper.cpp
    README.md · ANEForge support

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built with ❤️ in New York