Instructions to use KlangAI/pianissimo-da-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use KlangAI/pianissimo-da-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download KlangAI/pianissimo-da-mlx --local-dir pianissimo-da-mlx
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
|
Download README.md from KlangAI/pianissimo-da-mlx: direct link, hf CLI and curl.
- Browser
- Download file 4.46 kB
-
https://huggingface.co/KlangAI/pianissimo-da-mlx/resolve/main/README.md
- Command line
-
hf download hf://KlangAI/pianissimo-da-mlx/README.md
-
curl -L -o README.md https://huggingface.co/KlangAI/pianissimo-da-mlx/resolve/main/README.md
4.46 kB
| language: | |
| - da | |
| license: cc-by-4.0 | |
| pipeline_tag: automatic-speech-recognition | |
| library_name: mlx | |
| base_model: KlangAI/pianissimo-da | |
| tags: | |
| - mlx | |
| - speech | |
| - audio | |
| - fastconformer | |
| - tdt | |
| - danish | |
| # Klang Pianissimo for Danish: MLX bf16 | |
| A version of [Klang Pianissimo for Danish](https://huggingface.co/KlangAI/pianissimo-da), our Danish speech recognition model, for Macs with Apple silicon (M1 or later). It runs on the Mac's GPU using [MLX](https://github.com/ml-explore/mlx) and [parakeet-mlx](https://github.com/senstella/parakeet-mlx), without PyTorch or NeMo. | |
| This repository contains the 16-bit (bfloat16) version, with almost the same accuracy as the full-size model at half the download size. | |
| ## Versions | |
| | Repository | Weights | Download | FLEURS test | Speed | Memory, 5 min | | |
| |---|---|---:|---:|---:|---:| | |
| | [pianissimo-da](https://huggingface.co/KlangAI/pianissimo-da) | Original fp32 | 2.51 GB | **7.43** | | | | |
| | [pianissimo-da-mlx-8bit](https://huggingface.co/KlangAI/pianissimo-da-mlx-8bit) | 8-bit | 759 MB | 7.49 | 151× | **2.2 GB** | | |
| | [pianissimo-da-mlx-4bit](https://huggingface.co/KlangAI/pianissimo-da-mlx-4bit) | 4-bit | **528 MB** | 7.80 | 126× | **2.2 GB** | | |
| | [pianissimo-da-mlx](https://huggingface.co/KlangAI/pianissimo-da-mlx) | bf16 | 1.25 GB | 7.48 | 140× | 2.7 GB | | |
| | [pianissimo-da-mlx-fp32](https://huggingface.co/KlangAI/pianissimo-da-mlx-fp32) | fp32 | 2.51 GB | **7.43** | **173×** | 3.8 GB | | |
| The FLEURS column shows word error rate (WER, %) on all 930 Danish test clips, scored with our evaluation normaliser; lower is better. Speed is audio duration divided by processing time (RTFx), measured on a 30-second clip. | |
| Speed and memory were measured on the Swedish model, which has the same architecture, on an Apple M5 Pro GPU (24 GB). Memory is peak GPU memory use while transcribing a 5-minute recording. | |
| For other computers, use the [ONNX versions](https://huggingface.co/KlangAI/pianissimo-da-onnx). | |
| ## Usage | |
| ```bash | |
| pip install parakeet-mlx==0.5.2 huggingface_hub sentencepiece | |
| brew install ffmpeg # to read audio files | |
| ``` | |
| ```python | |
| import sys | |
| from huggingface_hub import snapshot_download | |
| path = snapshot_download("KlangAI/pianissimo-da-mlx") | |
| sys.path.append(path) | |
| import pianissimo_mlx | |
| model = pianissimo_mlx.load(path) | |
| result = pianissimo_mlx.transcribe(model, "audio.wav") | |
| print(result.text) | |
| ``` | |
| Recordings longer than 2 minutes are transcribed in 2-minute chunks with a 15-second overlap. Set `chunk_duration` to change the chunk length in seconds, or to `None` for a single pass. `transcribe` also accepts a 16 kHz mono NumPy array. Timestamps are available in `result.sentences` and `sentence.tokens`. | |
| Use the `pianissimo_mlx.py` loader included in this repository. It supports the 8-bit and 4-bit weights and reproduces the audio preprocessing used during training. Calling parakeet-mlx directly does not support these quantized weights and uses slightly different preprocessing, adding about 0.2 percentage points of WER. | |
| ### Vocabulary | |
| Our implementation of NeMo's phrase boosting supports custom vocabulary and matches NeMo's results on the original model. List names and terms to help the model spell them correctly. | |
| ```python | |
| vocabulary = ["Klang AI", "Pianissimo", "Folketinget", "Aarhus Universitet"] | |
| result = pianissimo_mlx.transcribe(model, "audio.wav", boost=vocabulary) | |
| ``` | |
| See the [main model card](https://huggingface.co/KlangAI/pianissimo-da#vocabulary) for vocabulary boosting with NeMo. | |
| ## How they were made | |
| All versions are converted from the released checkpoint and retain its local attention (256 frames on each side). The 8-bit and 4-bit versions use MLX's built-in quantization for the encoder's linear layers, with groups of 64 weights for 8-bit and 32 for 4-bit. The remaining weights in those two versions are stored in bfloat16. | |
| FLEURS WER was measured with this code on Linux. In a separate Mac check, this version matched the normalised original fp32 reference on 195 of 200 FLEURS clips. See the [main model card](https://huggingface.co/KlangAI/pianissimo-da) for comparisons with other models. | |
| ## License and citation | |
| Released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), like the original model. | |
| ```bibtex | |
| @misc{klang2026pianissimoda, | |
| title = {Klang Pianissimo for Danish}, | |
| author = {{Klang}}, | |
| year = {2026}, | |
| howpublished = {Hugging Face model repository}, | |
| url = {https://huggingface.co/KlangAI/pianissimo-da} | |
| } | |
| ``` | |