kotoba-whisper-v2.2-ggml
This repository contains GGML-format models converted from kotoba-tech/kotoba-whisper-v2.2 for use with whisper.cpp.
Model Description
kotoba-whisper-v2.2 is a Japanese speech recognition model fine-tuned from OpenAI Whisper. This repository provides quantized versions optimized for CPU inference with whisper.cpp.
Available Models
| Model File | Size | Quantization | Description |
|---|---|---|---|
kotoba-whisper-v2.2-ggml.bin |
~1.4 GB | FP16 | Original precision, best quality |
kotoba-whisper-v2.2-ggml-q8_0.bin |
~780 MB | Q8_0 | 8-bit quantization, good balance |
kotoba-whisper-v2.2-ggml-q5_0.bin |
~513 MB | Q5_0 | 5-bit quantization, smaller size |
Recommended Model
- For best quality: Use
kotoba-whisper-v2.2-ggml.bin(FP16) - For balanced performance: Use
kotoba-whisper-v2.2-ggml-q8_0.bin(Q8_0) - For resource-constrained environments: Use
kotoba-whisper-v2.2-ggml-q5_0.bin(Q5_0)
Usage
With whisper.cpp CLI
# Clone and build whisper.cpp
git clone https://github.com/ggerganov/whisper.cpp
cd whisper.cpp
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
# Download model (example with Q8_0)
# Place the downloaded .bin file in the models/ directory
# Run inference
./build/bin/whisper-cli -m models/kotoba-whisper-v2.2-ggml-q8_0.bin -f audio.wav -l ja
With Python bindings
from whispercpp import Whisper
w = Whisper.from_pretrained("kotoba-whisper-v2.2-ggml-q8_0.bin")
result = w.transcribe("audio.wav")
print(result)
Model Architecture
- Base Model: OpenAI Whisper Large-v3
- Encoder Layers: 32
- Decoder Layers: 2
- Hidden Size: 1280
- Attention Heads: 20
- Vocabulary Size: 51866
- Audio Context: 1500 (30 seconds)
- Mel Bins: 128
Conversion Details
These models were converted using the convert-h5-to-ggml.py script from whisper.cpp and quantized using the built-in quantize tool.
Conversion Command
# Convert to GGML
python models/convert-h5-to-ggml.py <model_dir> <whisper_repo> <output_dir>
# Quantize to Q8_0
./build/bin/quantize ggml-model.bin ggml-model-q8_0.bin q8_0
# Quantize to Q5_0
./build/bin/quantize ggml-model.bin ggml-model-q5_0.bin q5_0
License
This model follows the same license as the original kotoba-whisper-v2.2 model. Please refer to kotoba-tech/kotoba-whisper-v2.2 for licensing details.
Acknowledgements
- Original model: kotoba-tech/kotoba-whisper-v2.2
- Inference engine: ggerganov/whisper.cpp
- Base architecture: OpenAI Whisper
Citation
If you use this model, please cite the original kotoba-whisper model:
@misc{kotoba-whisper,
author = {Kotoba Technologies},
title = {kotoba-whisper-v2.2},
year = {2024},
url = {https://huggingface.co/kotoba-tech/kotoba-whisper-v2.2}
}