CoolFace
Modelpublic

leope/ark-asr-3B-mlx

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes54downloads
Model Card

ARK-ASR-3B MLX

Native Apple MLX conversion of `AutoArk-AI/ARK-ASR-3B`, a multilingual automatic speech recognition model supporting 19 languages.

This repository includes the BF16 checkpoint, tokenizer and feature extractor, native MLX Python inference implementation, conversion code, tests, validation results, and licensing information. PyTorch is not required for inference.

This is a community conversion. It is not affiliated with or endorsed by the original ARK-ASR authors or Apple.

Requirements

  • A Mac with Apple silicon
  • macOS with Metal support
  • Conda
  • Approximately 8 GB of available unified memory during inference
  • Audio clips no longer than 30 seconds

The runtime currently performs single-clip greedy transcription. This is a custom MLX architecture and is not compatible with mlx-lm, mlx-audio, or Transformers AutoModel.

Installation

bash
hf download leope/ark-asr-3B-mlx --local-dir ark-asr-3B-mlx
cd ark-asr-3B-mlx
conda env create -f environment.yml
conda activate ark-asr-mlx

Transcription

bash
ark-asr-mlx transcribe /path/to/audio.wav --model .

To receive structured output:

bash
ark-asr-mlx transcribe /path/to/audio.wav --model . --json

Python usage:

python
from ark_asr_mlx import ArkASR

asr = ArkASR.from_pretrained(".")
result = asr.transcribe("/path/to/audio.wav")
print(result.text)

Audio is converted to mono and resampled to 16 kHz. Files longer than 30 seconds are rejected instead of silently truncated.

Native MLX checkpoint

Safetensors is framework-neutral, so the filename alone is not the proof that this is an MLX conversion. This release changes the checkpoint and runs it through a model implemented with native mlx.core and mlx.nn operations:

  • all 924 retained tensors load strictly as native mlx.core.array values;
  • weights are stored as BF16;
  • Conv1d tensors use MLX [out, kernel, in] layout instead of PyTorch [out, in, kernel] layout;
  • the tied lm_head.weight and unused learned Whisper position embedding are intentionally omitted;
  • inference runs through Metal on Apple silicon without importing PyTorch.

Inspect the checkpoint directly:

bash
python - <<'PY'
import mlx.core as mx

weights = mx.load("model.safetensors")
conv = weights["audio_encoder.whisper.conv1.weight"]
print(type(conv))       # <class 'mlx.core.array'>
print(conv.dtype)       # mlx.core.bfloat16
print(conv.shape)       # (1280, 3, 128), native MLX Conv1d layout
print(len(weights))     # 924
print(mx.metal.is_available())
PY

Conversion provenance

FieldValue
SourceAutoArk-AI/ARK-ASR-3B
Source revision1e28271b79edc97635783bea65abc89195a09ed3
FormatNative MLX Safetensors
PrecisionBF16
Parameter tensors924
Checkpoint size7.0 GiB
Output SHA-256a5e9431bdd648340a40c092e385c4fe1d445d8ad3311dd94609e72af36b0256d

The source shard hashes and complete transform manifest are recorded in `conversion.json`.

To reproduce the conversion from the pinned upstream revision:

bash
pip install -e '.[dev]'
ark-asr-mlx convert \
  --source AutoArk-AI/ARK-ASR-3B \
  --revision 1e28271b79edc97635783bea65abc89195a09ed3 \
  --output ./converted-model

Run the included unit tests and lint checks with:

bash
pytest
ruff check .

Source parity

The pinned PyTorch source model and native MLX model were evaluated on the same public 12.1-second LibriSpeech sample:

CheckResult
Prompt token IDsIdentical
BF16 input features, max absolute difference0.0
Adapted audio feature cosine similarity0.9985675587
Initial decoder logits cosine similarity0.9999223477
Greedy output token IDsIdentical
Final transcriptionIdentical

See `VALIDATION.md` for the transcript and validation command.

Reference benchmark

Measured on an Apple M5 Pro with 24 GB unified memory, macOS 26.6, Python 3.12.13, and MLX 0.32.0:

MeasurementResult
Model load1.011 s
Audio preprocessing0.499 s
First token0.885 s
34-token generation1.965 s
Generation throughput17.30 tokens/s
MLX peak memory7.820 GB

These figures describe one machine and one sample; they are not performance guarantees.

Supported languages

Chinese, English, German, Japanese, French, Korean, Spanish, Polish, Italian, Romanian, Hungarian, Czech, Dutch, Finnish, Croatian, Slovak, Slovene, Estonian, and Lithuanian.

License and attribution

The runtime and upstream model are licensed under Apache-2.0. Please retain the included license, notice, model card attribution, and upstream citation when redistributing this conversion.