# OptimalScale/LMFlow

An Extensible Toolkit for Finetuning and Inference of Large Foundation Models. Large Models for All.

Repository: https://github.com/OptimalScale/LMFlow
Canonical: https://ross.abutalabs.com/products/lmflow
Homepage: https://optimalscale.github.io/LMFlow/
Language: Python
License: Apache-2.0
License Family: permissive
Topics: chatgpt, deep-learning, instruction-following, language-model, pretrained-models, pytorch, transformer
Last push: 2026-08-10T06:56:25+00:00

## Health v2 (maintenance only)
Score: 64/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 8, longevity 89
- inputs: {"age_days": 1255, "days_push": 23, "days_rel": 419, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8484, forks 823 (observed 2026-08-28T04:10:23.084708+00:00)

## What it is
LMFlow is an extensible Python toolkit for finetuning and inference of large foundation models such as LLaMA, GPT-2, and Galactica. It provides lightweight LoRA-based tuning, task tuning, and inference pipelines designed to be user-friendly and efficient.

## Use cases
- finetune a large language model on my own dataset
- run LoRA finetuning on LLaMA with limited GPU memory
- adapt a pretrained model to a domain like medicine or math
- run inference with a finetuned 7B or 33B model
- instruction-tune an open-source language model
- train a chatbot model comparable to ChatGPT on a small budget

## When to choose
- you want a simple, extensible pipeline for finetuning and inference of large foundation models
- you need memory-efficient tuning methods like LoRA or LISA
- you want an open-source full pipeline covering data, tuning, and inference

## When to avoid
- you only need to call hosted LLM APIs without any local training
- you need a production serving stack with autoscaling rather than a research toolkit
- you require non-PyTorch training backends

## Facets
- artifact type: library
- maturity: active
- function: llm-training, llm-inference, machine-learning, deep-learning
- domain: large-language-models, deep-learning, machine-learning, artificial-intelligence
- platform: python, cross-platform
- tags: finetuning, lora, transformers, pytorch, instruction-tuning, foundation-models, lisa, gpu, linux

## Member repositories
- OptimalScale/LMFlow (main) score 64

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:23.084708+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:26:50.394247+00:00, confidence not recorded.
  - readme: https://github.com/OptimalScale/LMFlow (fetched 2026-08-28T04:10:23.084708+00:00, sha 0b39f4253399)
  - homepage: https://optimalscale.github.io/LMFlow/ (fetched 2026-08-29T08:26:55.105683+00:00, sha bda27a0632bc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
