Skip to content

Whisper: save converted weights as weights.safetensors - #1438

Open
sfeng01-tech wants to merge 1 commit into
ml-explore:mainfrom
sfeng01-tech:whisper-safetensors-compat
Open

Whisper: save converted weights as weights.safetensors#1438
sfeng01-tech wants to merge 1 commit into
ml-explore:mainfrom
sfeng01-tech:whisper-safetensors-compat

Conversation

@sfeng01-tech

Copy link
Copy Markdown

Fixes #1421.

whisper/convert.py wrote converted weights as model.safetensors, but the released mlx-whisper==0.4.3 loader expects weights.safetensors (or the legacy weights.npz). Consequently, artifacts produced by the documented conversion command could not be loaded by the published package.

This changes the converter to emit weights.safetensors, which is compatible with both the released package and current main. It also adds a regression test that saves converted weights, verifies the artifact name and parameter keys, and reloads the model through mlx_whisper.load_model. The Whisper conversion documentation now reflects the emitted artifact.

Validation:

  • Real-MLX serialization/load regression test: passed.
  • Fresh artifact loaded with mlx-whisper==0.4.3: passed.
  • Python compilation and git diff --check: passed.

@sfeng01-tech
sfeng01-tech force-pushed the whisper-safetensors-compat branch from b4328ae to 3248c3f Compare August 18, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

whisper/convert.py outputs model.safetensors but mlx_whisper.load_models expects weights.safetensors

1 participant