# Lightning-AI/lit-llama

Implementation of the LLaMA language model based on nanoGPT. Supports flash attention, Int8 and GPTQ 4bit quantization, LoRA and LLaMA-Adapter fine-tuning, pre-training. Apache 2.0-licensed.

Repository: https://github.com/Lightning-AI/lit-llama
Canonical: https://ross.abutalabs.com/products/lit-llama
Language: Python
License: Apache-2.0
License Family: permissive
Last push: 2025-07-01T16:31:39+00:00

## Health v2 (maintenance only)
Score: 43/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 29, release rhythm 35, longevity 90
- inputs: {"age_days": 1260, "days_push": 428, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6085, forks 517 (observed 2026-08-28T04:09:34.920541+00:00)

## What it is
Lit-LLaMA is an independent, Apache 2.0-licensed implementation of the LLaMA language model built on nanoGPT, covering pre-training, fine-tuning (LoRA, LLaMA-Adapter), and inference with quantization support. The repository is no longer actively maintained and its successor is LitGPT.

## Use cases
- pretrain a llama-style language model from scratch
- fine-tune llama with lora on consumer hardware
- run llama inference with 4-bit quantization
- open-source licensed llama implementation without gpl restrictions
- convert and evaluate llama checkpoints
- fine-tune llama with llama-adapter

## When to choose
- you need a permissively licensed (Apache 2.0) LLaMA implementation for research or study
- you want a simple single-file model implementation to read and modify
- you need Int8 or GPTQ 4-bit quantized inference of LLaMA weights

## When to avoid
- you want active maintenance, bug fixes, or support for LLaMA 2 and newer checkpoints - use LitGPT instead
- you need production-grade serving infrastructure rather than research code
- you require the latest optimizations or new model architectures

## Facets
- artifact type: library
- maturity: abandoned
- function: llm-training, llm-inference, machine-learning, deep-learning
- domain: large-language-models, deep-learning, machine-learning, artificial-intelligence
- platform: python, windows
- tags: llama, nanogpt, lora, quantization, fine-tuning, apache-2.0, deprecated, litgpt-successor, gpu, linux, macos

## Member repositories
- Lightning-AI/lit-llama (main) score 43

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:34.920541+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:48:19.261788+00:00, confidence not recorded.
  - readme: https://github.com/Lightning-AI/lit-llama (fetched 2026-08-28T04:09:34.920541+00:00, sha 19257ea0b710)
- Data as of 2026-08-30T08:39:29.467469+00:00.
