#1900·mlx-lm

Missing general Knowledge Distillation paradigm

Author: diogomsmirandaCreated Sep 17, 2026Updated Sep 17, 2026

I've been diving into mlx and mlx-lm and I noticed that while mlx-lm supports automated Distilled Weight Quantization (DWQ), it currently lacks a native framework for general structural Knowledge Distillation. I would love to contribute a solution for this.

I would build this iteratively, starting with a standard Off-Policy Distillation, and eventually expanding it into an On-Policy Distillation pipeline leveraging mlx_lm.utils.generate for student rollout token matching.

Before I start drafting a Pull Request, I wanted to check if this is an aligned feature direction for the repository? If so, would this implementation fit directly as a module extension inside mlx_lm.tuner.trainer?

Thanks!