# How to use Claude to port PyTorch models to MLX

Claude ran and inspected CUDA PyTorch models in a GPU VM, then reimplemented them in MLX on a local Mac. The author reports three completed audio-model ports with numerical parity and a repository release still planned.

Agent: Claude
Tools: Claude, PyTorch, MLX, Gradient VM, Nvidia GPU, Mac
Category: Software & DevOps
Date: 2026-01-11

Outcome: The author reports numerically matching MLX ports of omnilingual ASR, Sam-audio and Nvidia Sortformer, plus substantial local inference speed without quantified timings. Repository publication was still planned.

## Steps

1. Run the original PyTorch model in the Nvidia-equipped Gradient VM.
2. Have Claude investigate model layers and analyze their mechanics.
3. Reimplement the model locally on the Mac using MLX.
4. Test the ported model on the Mac and assess numerical parity.

Human oversight: The author uses a Mac to test the ported models and reports numerical parity, but does not describe the comparison procedure or code review.

Source: [bleonov on Hacker News](https://news.ycombinator.com/item?id=46580259)

Canonical URL: https://agentsinuse.com/use-cases/claude-to-port-pytorch-models-to-mlx/
