A full-precision Whisper model is a big file: in whisper.cpp’s own memory table, the base model takes 142 MiB on disk, small takes 466 MiB, medium takes 1.5 GiB, and large takes 2.9 GiB. If disk space or memory is tight, you do not need a different model — you can shrink the one you already have. whisper.cpp supports integer quantization of its Whisper ggml models, and the project says quantized models require less memory and disk space, and depending on the hardware can be processed more efficiently. This guide quantizes a model; it does not change how you transcribe with it.
Build whisper.cpp first
The quantize tool is built together with the rest of the project. Clone the repository, then build it with CMake:
git clone https://github.com/ggml-org/whisper.cpp.git
cd whisper.cpp
cmake -B build
cmake --build build -j --config Release
You also need a model in ggml format to quantize. The README downloads one like this:
sh ./models/download-ggml-model.sh base.en
That gives you models/ggml-base.en.bin, the file the quantization example starts from.
Quantize the model with Q5_0
Run the quantize tool with the input file, the output file, and the quantization method. The README’s own example uses q5_0:
./build/bin/quantize models/ggml-base.en.bin models/ggml-base.en-q5_0.bin q5_0
The output file name follows the project’s own convention: the original name plus -q5_0 before .bin. Keep the original file until you have checked the quantized one works — quantization trades some precision for size, so the quantized copy is a replacement only after you are happy with its output.
Run the quantized model as usual
Nothing about transcription changes except the model file you point at. The README runs the quantized model with whisper-cli and the -m flag:
./build/bin/whisper-cli -m models/ggml-base.en-q5_0.bin ./samples/gb0.wav
Use a sample you know the answer to, such as one of the project’s own samples, and read the transcript it prints. If the words match what the full-precision model gave you on the same file, the quantized model is doing its job.
| Check | What you should see | If you do not see it |
|---|---|---|
| Built | The build finishes and ./build/bin/quantize exists |
Re-run the two CMake commands — the tool is built with the project |
| Quantized | A new file called models/ggml-base.en-q5_0.bin appears |
Check the input path — the model must be the ggml file, such as models/ggml-base.en.bin |
| Smaller | The -q5_0 file is smaller on disk than the original |
Compare the two files with ls -lh models/ggml-base.en*.bin — the quantized name must end in -q5_0.bin |
| Transcribes | whisper-cli -m models/ggml-base.en-q5_0.bin ./samples/gb0.wav prints a transcript |
The -m flag must point at the quantized file, not the original |
Expected result. We checked the whisper.cpp README for the Quantization section, the Q5_0 quantize command, the whisper-cli command with the quantized model, and the memory table with the disk sizes for tiny, base, small, medium, and large. We did not run whisper.cpp or quantize any model.
Limits
Quantization is a trade-off: the file gets smaller, but some precision is lost, so check the transcript on audio you care about before deleting the original. The Q5_0 method is the README’s example, not the only method — the README does not list the other methods on that page, so do not guess at other method names. This guide is about shrinking a model file, which is different from serving a model over HTTP or from plain command-line transcription; the quantized file is used with the same whisper-cli command as before. We did not run whisper.cpp, so no file size or transcript here is a recorded result.
