Upload folder using huggingface_hub
Browse files- README.md +44 -3
- config.json +13 -0
- weights.safetensors +3 -0
README.md
CHANGED
|
@@ -1,3 +1,44 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## Whisper-medium-Malayalam (MLX)
|
| 2 |
+
|
| 3 |
+
Apple MLX-converted weights for `vrclc/Whisper-medium-Malayalam` optimized for Apple Silicon.
|
| 4 |
+
|
| 5 |
+
- Base model: `vrclc/Whisper-medium-Malayalam`
|
| 6 |
+
- Format: MLX (`weights.safetensors`, `config.json`)
|
| 7 |
+
- Intended runtime: `mlx-whisper` on Apple Silicon (M-series)
|
| 8 |
+
|
| 9 |
+
### Usage (Python)
|
| 10 |
+
```python
|
| 11 |
+
import mlx_whisper
|
| 12 |
+
|
| 13 |
+
result = mlx_whisper.transcribe(
|
| 14 |
+
"/path/to/audio.wav",
|
| 15 |
+
path_or_hf_repo="<this-repo>",
|
| 16 |
+
# Optional decoding controls
|
| 17 |
+
language="ml", # Malayalam
|
| 18 |
+
task="transcribe", # or "translate"
|
| 19 |
+
temperature=0.0,
|
| 20 |
+
no_speech_threshold=0.3,
|
| 21 |
+
logprob_threshold=-1.0,
|
| 22 |
+
compression_ratio_threshold=2.4,
|
| 23 |
+
)
|
| 24 |
+
print(result["text"])
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
### Local HTTP server (FastAPI)
|
| 28 |
+
With the server at `whisper/server_mlx.py` from `avatar-npm`:
|
| 29 |
+
```bash
|
| 30 |
+
export WHISPER_MODEL=<this-repo-or-local-mlx-path>
|
| 31 |
+
export WHISPER_LANGUAGE=ml
|
| 32 |
+
python server_mlx.py
|
| 33 |
+
# POST /transcribe with form field `file`
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
### Notes
|
| 37 |
+
- This repo contains only the MLX weights and config. Tokenization and audio
|
| 38 |
+
preprocessing are handled by `mlx-whisper`.
|
| 39 |
+
- If you need the original (non-MLX) model, see `vrclc/Whisper-medium-Malayalam`.
|
| 40 |
+
|
| 41 |
+
### License
|
| 42 |
+
The original model’s license applies. See the upstream repository for details.
|
| 43 |
+
|
| 44 |
+
|
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:db7b72f5bbe426256f7c70a63373ecc6f1d9c69724e0060df8a04494f9363d33
|
| 3 |
+
size 1524747195
|