File size: 2,719 Bytes
2e56cf0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63b7120
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
language:
- nl
license: other
tags:
- wav2vec2
- gguf
- asr
- speech
- audio
library_name: wav2vec2.cpp
base_model:
- jonatasgrosman/wav2vec2-large-xlsr-53-dutch
---

# wav2vec2-large-xlsr-53-dutch

GGUF quantizations of [jonatasgrosman/wav2vec2-large-xlsr-53-dutch](https://huggingface.co/jonatasgrosman/wav2vec2-large-xlsr-53-dutch) for use with [wav2vec2.cpp](https://github.com/liodon-ai/wav2vec2.cpp).

## Files

| Filename | Quant | Size | Precision |
|----------|-------|------|-----------|
| `model_f16.gguf`  | F16  | 631 MB  | ~fp16 (near-lossless) |
| `model_q8_0.gguf` | Q8_0 | 373 MB | 8-bit quantized linear layers |
| `model_q4_0.gguf` | Q4_0 | 222 MB | 4-bit quantized linear layers |

## Parity vs HuggingFace Reference

Tested on 10 audio samples from FLEURS nl_nl.

| Quant | Mean CER (vs HF) | Mean WER (vs HF) | Status |
|-------|-----------------|-----------------|--------|
| F16   | 0.00%  | 0.00%  | PASS |
| Q8_0  | 0.10% | 0.60% | PASS |
| Q4_0  | 1.51% | 9.67% | PASS |

CER/WER measured against HF model output (not ground truth) to isolate quantization error.

## Usage

### C++ CLI

```bash
# Clone and build
git clone --recursive https://github.com/liodon-ai/wav2vec2.cpp
cd wav2vec2.cpp && mkdir build && cd build && cmake .. && make -j

# Download and run
huggingface-cli download liodon-ai/wav2vec2-large-xlsr-53-dutch-GGUF model_q8_0.gguf --local-dir .
./wav2vec2-cli -m model_q8_0.gguf -f audio.wav

# With word timestamps
./wav2vec2-cli -m model_q8_0.gguf -f audio.wav -w

# SRT subtitle output
./wav2vec2-cli -m model_q8_0.gguf -f audio.wav --format srt > output.srt
```

### Python (via subprocess)

```python
import subprocess, json
result = subprocess.run(
    ['./wav2vec2-cli', '-m', 'model_q8_0.gguf', '-f', 'audio.wav', '--format', 'json'],
    capture_output=True, text=True
)
data = json.loads(result.stdout)
print(data['transcript'])
```

## Source Model

- **Original**: [jonatasgrosman/wav2vec2-large-xlsr-53-dutch](https://huggingface.co/jonatasgrosman/wav2vec2-large-xlsr-53-dutch)
- **Architecture**: XLS-R
- **Language**: nl
- **Task**: Automatic Speech Recognition

## Conversion

Converted using [wav2vec2.cpp](https://github.com/liodon-ai/wav2vec2.cpp) `scripts/convert_to_gguf.py`.

```bash
python scripts/convert_to_gguf.py jonatasgrosman/wav2vec2-large-xlsr-53-dutch model_f16.gguf --dtype f16
python scripts/convert_to_gguf.py jonatasgrosman/wav2vec2-large-xlsr-53-dutch model_q8_0.gguf --dtype q8_0
python scripts/convert_to_gguf.py jonatasgrosman/wav2vec2-large-xlsr-53-dutch model_q4_0.gguf --dtype q4_0
```

## License

Follows the license of the [source model](https://huggingface.co/jonatasgrosman/wav2vec2-large-xlsr-53-dutch/blob/main/LICENSE).