Run LLMs with MLX
MLX LM is a Python package for generating text and fine-tuning large language models on Apple silicon using the MLX framework. It integrates with Hugging Face Hub to provide easy access to thousands of pre-trained language models, and supports quantization, model uploading, low-rank fine-tuning with LoRA or QLoRA, and distributed inference. The package offers both command-line interfaces (like `mlx_lm.generate` and `mlx_lm.chat`) and a Python API for text generation, including streaming capabilities and advanced features like prompt caching and rotating key-value caches for handling long contexts.