Skip to content

Enable LFM2.5 export and runner support for MLX#19195

Open
seyeong-han wants to merge 2 commits intopytorch:mainfrom
seyeong-han:lfm2_5_mlx
Open

Enable LFM2.5 export and runner support for MLX#19195
seyeong-han wants to merge 2 commits intopytorch:mainfrom
seyeong-han:lfm2_5_mlx

Conversation

@seyeong-han
Copy link
Copy Markdown
Contributor

@seyeong-han seyeong-han commented Apr 28, 2026

Summary

  • Add LFM2.5 350M registration, Hugging Face repo mapping, and ExecuTorch model config.
  • Add an MLX 4-bit export config for LFM2.5 with KV cache metadata.
  • Add make lfm_2_5-mlx to build the shared Llama C++ runner with MLX enabled, plus README instructions for export and C++/pybindings runs.
  • Link to uploaded Hugging Face Hub artifacts: https://huggingface.co/younghan-meta/LFM2.5-ExecuTorch-MLX

Test plan

  • pytest -q examples/models/lfm2/test_lfm2_5_mlx.py
  • make -n lfm_2_5-mlx
  • make lfm_2_5-mlx
  • Exported and runtime-loaded:
    • lfm2_5_350m_mlx_4w.pte
    • lfm2_5_1_2b_mlx_4w.pte
  • Ran pybindings smoke generation for both 350M and 1.2B.
  • Ran C++ llama_main smoke generation with lfm2_5_350m_mlx_4w.pte.
  • Benchmarked C++ MLX runner:
    • 350M median decode: 330.43 tok/s
    • 1.2B median decode: 147.93 tok/s

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Apr 28, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19195

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit 46dbe46 with merge base 7e43308 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 28, 2026
@seyeong-han
Copy link
Copy Markdown
Contributor Author

@pytorchbot label "release notes: examples"

@pytorch-bot pytorch-bot Bot added the release notes: examples Changes to any of our example LLMs integrations, such as Llama3 and Llava label Apr 28, 2026
Add LFM2.5 350M registration, MLX export config, focused regression coverage, and a make target for building the shared Llama C++ runner with MLX.

Made-with: Cursor
Point the LFM2 README at the uploaded Hugging Face artifacts so users can run the MLX examples without re-exporting locally.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: examples Changes to any of our example LLMs integrations, such as Llama3 and Llava

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant