LMFlow is an open-source toolkit for fine-tuning and inference of large foundation models, developed by OptimalScale and published on GitHub with around 8,500 stars. Its goal is to make the full lifecycle of adapting a large model โ training, alignment, evaluation, and serving โ accessible through one extensible codebase.
LMFlow covers supervised fine-tuning with full-parameter training or parameter-efficient methods such as LoRA, and it supports a wide range of open models including the LLaMA family and other popular architectures. For alignment, it implements RAFT (Reward Ranked Fine-Tuning), a best-of-n sampling approach developed by the same team, alongside other RLHF-style workflows. On the serving side, LMFlow provides inference pipelines for deploying fine-tuned models, plus benchmarking tools for measuring quality after tuning. The codebase is organized around composable dataset, model, and pipeline abstractions, so swapping in a new model or dataset usually means editing a configuration rather than rewriting training code. It has been used in a number of well-known community model releases, and the repository remains actively developed, with updates continuing into 2026.
LMFlow is free and open source under the Apache-2.0 license. There is no commercial cloud version; you run the toolkit on your own infrastructure and pay only for compute.
LMFlow is aimed at ML engineers and research teams who fine-tune open models regularly and want one maintained toolkit spanning data preparation, training, alignment, evaluation, and deployment.