← all repositories
mistralai/mistral-finetune

Mistral’s LoRA tuner keeps weights frozen and opinions strong

A lightweight, guided path to memory-efficient LoRA fine-tuning across Mistral’s full model lineup, from 7B to 123B.

3.1k stars Python Language ModelsML Frameworks
mistral-finetune
Not currently ranked — collecting fresh signals.
star history

What it does

mistral-finetune is Mistral’s official toolkit for adapting its own language models—from 7B up to the 123B Large v2—using LoRA, which freezes most base weights and trains only a tiny set of low-rank perturbations. It expects JSONL datasets formatted its way, handles both pretraining and instruction-following data (including function calling), and targets single-node multi-GPU training, though smaller models can squeeze onto one GPU.

The interesting bit

The project is deliberately narrow: it does not pretend to be a generic trainer for every architecture or hardware setup, and it enforces strict data formatting rules that can trip you up if you ignore the validation step. That constrained scope is the trade-off for a guided, memory-efficient path that stays inside the Mistral ecosystem.

Key highlights

  • Supports the full Mistral model lineup, including Mixtral 8x7B/8x22B, Mistral Nemo 12B, and Mistral Large v2 123B.
  • Uses LoRA to keep training memory-efficient, with most weights frozen and only 1–2% of parameters updated.
  • Computes loss only on assistant turns in conversational data, and supports function calling with tool_calls and tools.
  • Includes a data validation script to catch formatting errors before a run starts.
  • Optimized for multi-GPU-single-node setups; an A100 or H100 is recommended for best results.

Caveats

  • Data formatting is rigid; the README stresses that validation is crucial and the toolkit is “fairly opinionated” about structure.
  • Older Mixtral 8x7B V1 checkpoints require manual vocabulary extension to 32,768 tokens before fine-tuning.
  • Mistral Nemo and Mistral Large v2 currently demand significantly more memory, forcing reduced sequence lengths (≤16,384 and ≤8,192 respectively); the README notes an improved CE loss is coming for Nemo.

Verdict

Worth a look if you are already committed to Mistral’s model family and want a directed, efficient LoRA workflow. Look elsewhere—such as torchtune—if you need a generic, architecture-agnostic trainer.

Frequently asked

What is mistralai/mistral-finetune?
A lightweight, guided path to memory-efficient LoRA fine-tuning across Mistral’s full model lineup, from 7B to 123B.
Is mistral-finetune open source?
Yes — mistralai/mistral-finetune is open source, released under the Apache-2.0 license.
What language is mistral-finetune written in?
mistralai/mistral-finetune is primarily written in Python.
How popular is mistral-finetune?
mistralai/mistral-finetune has 3.1k stars on GitHub.
Where can I find mistral-finetune?
mistralai/mistral-finetune is on GitHub at https://github.com/mistralai/mistral-finetune.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.