mistralai/mistral-finetune
A lightweight codebase for memory-efficient LoRA-based fine-tuning of Mistral's language models on single or multi-GPU setups.

mistral-finetune provides a simple entry point for fine-tuning Mistral’s models using Low-Rank Adaptation (LoRA), where most weights remain frozen and only low-rank matrix perturbations representing 1-2% of total weights are trained. It targets multi-GPU-single-node training with optimizations for A100/H100 GPUs, though smaller 7B models can be fine-tuned on a single GPU. The codebase is opinionated around data formatting and specifically designed for Mistral model architectures, supporting Mistral Large v2, Mistral Nemo, and other variants.