Hugging Face Blog→ original

Hugging Face released a Skill for quickly porting Transformers models to MLX

Hugging Face released a Skill that helps port models from Transformers to mlx-lm for MLX and immediately prepares a verifiable PR. It comes with a separate…

AI-processed from Hugging Face Blog; edited by Hamidun News
Hugging Face released a Skill for quickly porting Transformers models to MLX
Source: Hugging Face Blog. Collage: Hamidun News.
◐ Listen to article

Hugging Face demonstrated a Skill for coding agents that helps transfer models from Transformers to the mlx-lm ecosystem on MLX. The idea is not to overwhelm open source with even more AI-generated pull requests, but to speed up quality ports and reduce the burden on reviewers.

Why This Was Needed

Hugging Face has a rather rigorous thesis: the problem with open source today is not that agents write code too slowly, but that they too easily stamp out PRs without understanding the rules of a particular codebase. In the article, the team writes that the volume of pull requests has already grown by approximately ten-fold, while the number of maintainers has not. For libraries like Transformers, this is especially painful: the code must be readable for humans, adhere to accepted conventions, and not break implicit contracts with thousands of users.

"The bottleneck in open source is not the speed of code writing, but

understanding of the codebase."

Hence the connection with MLX. Many models for mlx-lm appear as ports of existing implementations from Transformers, because Transformers often becomes the 'source of truth' for the architecture. This is a convenient scenario for an agent: it doesn't need to invent a model from scratch, but rather carefully transfer existing logic to a different stack without losing details along the way.

How the Skill Works

The Skill is designed for mlx-lm contributors. All you need to do is give a task like 'convert the olmo_hybrid architecture to MLX,' and the agent itself sets up a virtual environment, searches for the necessary model variants on the Hub, downloads the weights, reads the source code in Transformers, writes an implementation for MLX, and runs a series of checks. If the results don't match, it doesn't stop at the first plausible answer, but debugs the discrepancies and repeats the cycle until the tests look convincing.

  • Compares configs of different model variants and searches for fields that change between versions
  • Determines dtype even when it's not specified in the config, based on safetensors metadata
  • Makes layer-by-layer comparisons between Transformers and MLX to localize discrepancies
  • Adds to the PR generation examples, numerical comparisons, and verification of architectural differences

A special emphasis is made to ensure the PR looks like careful work by an experienced person, not like a raw dump from an agent. The Skill prohibits excessive comments, doesn't suggest refactorings 'just in case,' and doesn't touch common utilities without explicit permission. At the same time, the fact of agent assistance is not hidden: the PR description explicitly states that the code was prepared with the participation of an agent, and the pull request should not be opened without confirmation from the author.

Separate Verification

The most practical part of the announcement is a separate non-agentic test harness. It's needed because agent reports cannot be trusted at face value: the model can hallucinate results, be overconfident, or fail to notice that the output 'looks almost right' but still deviates from the baseline. Therefore, Hugging Face moved the verification into a separate reproducible loop that can be downloaded and run independently of the agent. It stores summary reports, details for each model, raw JSON with inputs and outputs, and even the tests themselves as they were run.

But this is not a magic merge button. The authors separately emphasize that many checks here are qualitative, not binary: for example, whether a difference in logits of a few percent is acceptable, or whether it's normal for a particular model to start repeating on long sequences. The final decision still rests with the contributor and reviewer. Therefore, the Skill is addressed not to people who want to mass-submit PRs with one click, but to those who are willing to understand the code, respond to feedback, and truly own their contribution.

What This Means

The story with the Skill for MLX demonstrates a more mature approach to AI agents in development. The key value is not that the agent 'writes code by itself,' but that it is given clear boundaries beforehand: from architectural rules to mandatory independent verification. For open source, this seems to be the working model for the coming years: less magic, more verifiable process.

ZK
Hamidun News
AI news without noise. Daily editorial selection from 400+ sources. A product by Zhemal Khamidun, Head of AI at Alpina Digital.

Want to stop reading about AI and start using it?

AI News is a curated feed of AI/tech news. Hamidun Academy teaches you to use AI systematically in your work.

What do you think?
Loading comments…