FredrikKarlssonSpeech commited on
Commit
f4c284e
·
verified ·
1 Parent(s): 16b32d2

Add MLX-converted Whisper weights

Browse files
Files changed (3) hide show
  1. README.md +34 -0
  2. config.json +13 -0
  3. weights.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - nb
4
+ - no
5
+ license: apache-2.0
6
+ library_name: mlx
7
+ tags:
8
+ - automatic-speech-recognition
9
+ - whisper
10
+ - mlx
11
+ - nb
12
+ - no
13
+ base_model: NbAiLab/nb-whisper-medium
14
+ pipeline_tag: automatic-speech-recognition
15
+ ---
16
+
17
+ # nb-whisper-medium (MLX, float16)
18
+
19
+ MLX conversion of [NbAiLab/nb-whisper-medium](https://huggingface.co/NbAiLab/nb-whisper-medium) for fast inference on Apple Silicon via [mlx-whisper](https://github.com/ml-explore/mlx-examples/tree/main/whisper).
20
+
21
+ Converted with `mlx-examples/whisper/convert.py` at `float16` precision.
22
+
23
+ ## Usage
24
+
25
+ ```bash
26
+ pip install mlx-whisper
27
+ mlx_whisper audio_file.mp3 --model FredrikKarlssonSpeech/nb-whisper-medium-mlx
28
+ ```
29
+
30
+ ```python
31
+ import mlx_whisper
32
+ result = mlx_whisper.transcribe("audio_file.mp3", path_or_hf_repo="FredrikKarlssonSpeech/nb-whisper-medium-mlx")
33
+ print(result["text"])
34
+ ```
config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "n_mels": 80,
3
+ "n_audio_ctx": 1500,
4
+ "n_audio_state": 1024,
5
+ "n_audio_head": 16,
6
+ "n_audio_layer": 24,
7
+ "n_vocab": 51865,
8
+ "n_text_ctx": 448,
9
+ "n_text_state": 1024,
10
+ "n_text_head": 16,
11
+ "n_text_layer": 24,
12
+ "model_type": "whisper"
13
+ }
weights.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:14ab83e90a5469ce29e06d042f41cd1e0e9c19330640a46ca77618316ef1a8d1
3
+ size 1524747195