Back to directory

MLX LM

A Python package for generating text with and fine-tuning large language models on Apple silicon using Apple's MLX framework.

MLX LM

MLX LM is a Python package for generating text and fine-tuning large language models on Apple silicon with MLX. It integrates with the Hugging Face Hub to use thousands of LLMs with a single command, supports quantizing models and uploading them back to the Hub, and supports low-rank and full model fine-tuning, including of quantized models, plus distributed inference and fine-tuning across machines.

It installs via pip or conda, and provides command-line tools to generate text from a prompt or open an interactive chat REPL that preserves context for the session's lifetime, with command-line options for choosing a model and sampling parameters. Its default model for generation and chat is a 4-bit Llama-3.2-3B-Instruct build, and any MLX-compatible model, including the thousands available in the MLX Community Hugging Face organization, can be selected instead.

A Python API exposes load and generate functions for scripting, and a convert function quantizes a model and optionally uploads the result to a chosen Hugging Face repository.

More in Models

See all 405
  • mini-AGI

    github.com

    A continual learning language model that trains from scratch on a single 8 GB VRAM GPU, assembling its own architecture and adapting its size to the hardware and data available rather than shipping as a fixed pretrained model.

  • An open-source contrastive-embedding pipeline that maps technical CVE vulnerability descriptions to formal cybersecurity compliance controls in NIST SP 800-53 and CMMC, published with its model generation, fine-tuning and evaluation code.

  • peekaboolean

    github.com

    A small vision-language model, fine-tuned with LoRA on a 500-million-parameter backbone, that answers typed multiple-choice, ordinal-score and yes/no questions about an image with calibrated probabilities, in about 400 milliseconds on a laptop.