huggingfacehuggingfaceOfficialยท1 Agent Skills Included

transformers-to-mlx

Convert transformers language models to MLX for Apple Silicon

Converts Hugging Face transformers language models into MLX implementations for fast Apple Silicon inference. Handles complex architectures like MoE, MLA, hybrid SSM, and linear attention without manual porting work. Runs generation, dtype, and layer-by-layer numerical tests to verify conversion accuracy. Prepares reviewed pull requests and test manifests for the mlx-lm codebase.
npx skills add huggingface/transformers-to-mlx --all -g -y

All Skills in This Repository (1)

Pure Emerald Level Indicators

Frequently Asked Questions

FAQPage Schema
How to install transformers-to-mlx?โ–ผ

Run `npx skills add huggingface/transformers-to-mlx --all -g -y` in your terminal to install the skill globally, then reload your agent configuration.

How to convert a transformers model to MLX?โ–ผ

Ask your agent to convert a specific architecture, such as 'convert the olmo_hybrid architecture to MLX'. The skill sets up an environment, ports the model code, and runs verification tests automatically.

Which model architectures does it support?โ–ผ

It handles standard attention models plus MoE, MLA (DeepSeek style), hybrid SSM plus attention, GatedDeltaNet linear attention, and sliding window variants. Vision-language models are not supported yet.

How does it verify the converted model is correct?โ–ผ

It compares generation output, logits, and per-layer hidden states between transformers and MLX, checks runtime dtype, and tests long-sequence generation to catch RoPE errors.

Does it support large models and multiple Macs?โ–ผ

Yes. It supports quantize-first workflows for models too large for fp16, and distributed inference across multiple Apple Silicon machines using a hostfile.

Related Repositories in Software Engineering

View All in Software Engineeringโ†’