litgpt

20+ high-performance LLMs with recipes to pretrain, finetune and deploy at scale.

https://github.com/lightning-ai/litgpt

Science Score: 64.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
    5 of 112 committers (4.5%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.4%) to scientific vocabulary

Keywords

ai artificial-intelligence deep-learning large-language-models llm llm-inference llms

Keywords from Contributors

transformers pretrained-models deepseek qwen jax gemma speech-recognition vlms pytorch-transformers audio
Last synced: 6 months ago · JSON representation ·

Repository

20+ high-performance LLMs with recipes to pretrain, finetune and deploy at scale.

Basic Info
  • Host: GitHub
  • Owner: Lightning-AI
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Homepage: https://lightning.ai
  • Size: 5.53 MB
Statistics
  • Stars: 12,683
  • Watchers: 114
  • Forks: 1,301
  • Open Issues: 235
  • Releases: 26
Topics
ai artificial-intelligence deep-learning large-language-models llm llm-inference llms
Created almost 3 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation Codeowners

README.md

# ⚡ LitGPT **20+ high-performance LLMs with recipes to pretrain, finetune, and deploy at scale.**
✅ From scratch implementations      ✅ No abstractions         ✅ Beginner friendly
   ✅ Flash attention                   ✅ FSDP                    ✅ LoRA, QLoRA, Adapter
✅ Reduce GPU memory (fp4/8/16/32)   ✅ 1-1000+ GPUs/TPUs       ✅ 20+ LLMs         
--- ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pytorch-lightning) ![cpu-tests](https://github.com/lightning-AI/lit-stablelm/actions/workflows/cpu-tests.yml/badge.svg) [![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/Lightning-AI/lit-stablelm/blob/master/LICENSE) [![Discord](https://img.shields.io/discord/1077906959069626439)](https://discord.gg/VptPCZkGNa)

Quick startModelsFinetuneDeployAll workflowsFeaturesRecipes (YAML)Lightning AITutorials

  Get started  

Use, finetune, pretrain, and deploy LLMs Lightning fast ⚡⚡

Every LLM is implemented from scratch with no abstractions and full control, making them blazing fast, minimal, and performant at enterprise scale.

Enterprise ready - Apache 2.0 for unlimited enterprise use.
Developer friendly - Easy debugging with no abstraction layers and single file implementations.
Optimized performance - Models designed to maximize performance, reduce costs, and speed up training.
Proven recipes - Highly-optimized training/finetuning recipes tested at enterprise scale.

 

Quick start

Install LitGPT pip install 'litgpt[extra]'

Load and use any of the 20+ LLMs: ```python from litgpt import LLM

llm = LLM.load("microsoft/phi-2") text = llm.generate("Fix the spelling: Every fall, the family goes to the mountains.") print(text)

Corrected Sentence: Every fall, the family goes to the mountains.

```

 

✅ Optimized for fast inference
✅ Quantization
✅ Runs on low-memory GPUs
✅ No layers of internal abstractions
✅ Optimized for production scale

Advanced install options Install from source: ```bash git clone https://github.com/Lightning-AI/litgpt cd litgpt pip install -e '.[all]' ```

Explore the full Python API docs.

 


Choose from 20+ LLMs

Every model is written from scratch to maximize performance and remove layers of abstraction:

| Model | Model size | Author | Reference | |----|----|----|----| | Llama 3, 3.1, 3.2, 3.3 | 1B, 3B, 8B, 70B, 405B | Meta AI | Meta AI 2024 | | Code Llama | 7B, 13B, 34B, 70B | Meta AI | Rozière et al. 2023 | | CodeGemma | 7B | Google | Google Team, Google Deepmind | | Gemma 2 | 2B, 9B, 27B | Google | Google Team, Google Deepmind | | Phi 4 | 14B | Microsoft Research | Abdin et al. 2024 | | Qwen2.5 | 0.5B, 1.5B, 3B, 7B, 14B, 32B, 72B | Alibaba Group | Qwen Team 2024 | | Qwen2.5 Coder | 0.5B, 1.5B, 3B, 7B, 14B, 32B | Alibaba Group | Hui, Binyuan et al. 2024 | | R1 Distill Llama | 8B, 70B | DeepSeek AI | DeepSeek AI 2025 | | ... | ... | ... | ... |

See full list of 20+ LLMs   #### All models | Model | Model size | Author | Reference | |----|----|----|----| | CodeGemma | 7B | Google | [Google Team, Google Deepmind](https://ai.google.dev/gemma/docs/codegemma) | | Code Llama | 7B, 13B, 34B, 70B | Meta AI | [Rozière et al. 2023](https://arxiv.org/abs/2308.12950) | | Falcon | 7B, 40B, 180B | TII UAE | [TII 2023](https://falconllm.tii.ae) | | Falcon 3 | 1B, 3B, 7B, 10B | TII UAE | [TII 2024](https://huggingface.co/blog/falcon3) | | FreeWilly2 (Stable Beluga 2) | 70B | Stability AI | [Stability AI 2023](https://stability.ai/blog/stable-beluga-large-instruction-fine-tuned-models) | | Function Calling Llama 2 | 7B | Trelis | [Trelis et al. 2023](https://huggingface.co/Trelis/Llama-2-7b-chat-hf-function-calling-v2) | | Gemma | 2B, 7B | Google | [Google Team, Google Deepmind](https://storage.googleapis.com/deepmind-media/gemma/gemma-report.pdf) | | Gemma 2 | 9B, 27B | Google | [Google Team, Google Deepmind](https://storage.googleapis.com/deepmind-media/gemma/gemma-2-report.pdf) | | Gemma 3 | 1B, 4B, 12B, 27B | Google | [Google Team, Google Deepmind](https://arxiv.org/pdf/2503.19786) | | Llama 2 | 7B, 13B, 70B | Meta AI | [Touvron et al. 2023](https://arxiv.org/abs/2307.09288) | | Llama 3.1 | 8B, 70B | Meta AI | [Meta AI 2024](https://github.com/meta-llama/llama3) | | Llama 3.2 | 1B, 3B | Meta AI | [Meta AI 2024](https://ai.meta.com/blog/llama-3-2-connect-2024-vision-edge-mobile-devices/) | | Llama 3.3 | 70B | Meta AI | [Meta AI 2024](https://huggingface.co/meta-llama/Llama-3.3-70B-Instruct) | | Mathstral | 7B | Mistral AI | [Mistral AI 2024](https://mistral.ai/news/mathstral/) | | MicroLlama | 300M | Ken Wang | [MicroLlama repo](https://github.com/keeeeenw/MicroLlama) | | Mixtral MoE | 8x7B | Mistral AI | [Mistral AI 2023](https://mistral.ai/news/mixtral-of-experts/) | | Mistral | 7B, 123B | Mistral AI | [Mistral AI 2023](https://mistral.ai/news/announcing-mistral-7b/) | | Mixtral MoE | 8x22B | Mistral AI | [Mistral AI 2024](https://mistral.ai/news/mixtral-8x22b/) | | OLMo | 1B, 7B | Allen Institute for AI (AI2) | [Groeneveld et al. 2024](https://aclanthology.org/2024.acl-long.841/) | | OpenLLaMA | 3B, 7B, 13B | OpenLM Research | [Geng & Liu 2023](https://github.com/openlm-research/open_llama) | | Phi 1.5 & 2 | 1.3B, 2.7B | Microsoft Research | [Li et al. 2023](https://arxiv.org/abs/2309.05463) | | Phi 3 | 3.8B | Microsoft Research | [Abdin et al. 2024](https://arxiv.org/abs/2404.14219) | | Phi 4 | 14B | Microsoft Research | [Abdin et al. 2024](https://arxiv.org/abs/2412.08905) | | Phi 4 Mini Instruct | 3.8B | Microsoft Research | [Microsoft 2025](https://arxiv.org/abs/2503.01743) | | Phi 4 Mini Reasoning | 3.8B | Microsoft Research | [Xu, Peng et al. 2025](https://arxiv.org/abs/2504.21233) | | Phi 4 Reasoning | 3.8B | Microsoft Research | [Abdin et al. 2025](https://arxiv.org/abs/2504.21318) | | Phi 4 Reasoning Plus | 3.8B | Microsoft Research | [Abdin et al. 2025](https://arxiv.org/abs/2504.21318) | | Platypus | 7B, 13B, 70B | Lee et al. | [Lee, Hunter, and Ruiz 2023](https://arxiv.org/abs/2308.07317) | | Pythia | {14,31,70,160,410}M, {1,1.4,2.8,6.9,12}B | EleutherAI | [Biderman et al. 2023](https://arxiv.org/abs/2304.01373) | | Qwen2.5 | 0.5B, 1.5B, 3B, 7B, 14B, 32B, 72B | Alibaba Group | [Qwen Team 2024](https://qwenlm.github.io/blog/qwen2.5/) | | Qwen2.5 Coder | 0.5B, 1.5B, 3B, 7B, 14B, 32B | Alibaba Group | [Hui, Binyuan et al. 2024](https://arxiv.org/abs/2409.12186) | | Qwen2.5 1M (Long Context) | 7B, 14B | Alibaba Group | [Qwen Team 2025](https://qwenlm.github.io/blog/qwen2.5-1m/) | | Qwen2.5 Math | 1.5B, 7B, 72B | Alibaba Group | [An, Yang et al. 2024](https://arxiv.org/abs/2409.12122) | | QwQ | 32B | Alibaba Group | [Qwen Team 2025](https://qwenlm.github.io/blog/qwq-32b/) | | QwQ-Preview | 32B | Alibaba Group | [Qwen Team 2024](https://qwenlm.github.io/blog/qwq-32b-preview/) | | Qwen3 | 0.6B, 1.7B, 4B{Hybrid, Thinking-2507}, 8B, 14B, 32B | Alibaba Group | [Qwen Team 2025](https://arxiv.org/abs/2505.09388/) | | Qwen3 MoE | 30B{Hybrid, Thinking-2507}, 235B{Hybrid, Thinking-2507} | Alibaba Group | [Qwen Team 2025](https://arxiv.org/abs/2505.09388/) | | R1 Distill Llama | 8B, 70B | DeepSeek AI | [DeepSeek AI 2025](https://github.com/deepseek-ai/DeepSeek-R1/blob/main/DeepSeek_R1.pdf) | | SmolLM2 | 135M, 360M, 1.7B | Hugging Face | [Hugging Face 2024](https://github.com/huggingface/smollm) | | Salamandra | 2B, 7B | Barcelona Supercomputing Centre | [BSC-LTC 2024](https://github.com/BSC-LTC/salamandra) | | StableCode | 3B | Stability AI | [Stability AI 2023](https://stability.ai/blog/stablecode-llm-generative-ai-coding) | | StableLM | 3B, 7B | Stability AI | [Stability AI 2023](https://github.com/Stability-AI/StableLM) | | StableLM Zephyr | 3B | Stability AI | [Stability AI 2023](https://stability.ai/blog/stablecode-llm-generative-ai-coding) | | TinyLlama | 1.1B | Zhang et al. | [Zhang et al. 2023](https://github.com/jzhang38/TinyLlama) | **Tip**: You can list all available models by running the `litgpt download list` command.

 


Workflows

FinetunePretrainContinued pretrainingEvaluateDeployTest

 

Use the command line interface to run advanced workflows such as pretraining or finetuning on your own data.

All workflows

After installing LitGPT, select the model and workflow to run (finetune, pretrain, evaluate, deploy, etc...):

```bash

litgpt [action] [model]

litgpt serve meta-llama/Llama-3.2-3B-Instruct litgpt finetune meta-llama/Llama-3.2-3B-Instruct litgpt pretrain meta-llama/Llama-3.2-3B-Instruct litgpt chat meta-llama/Llama-3.2-3B-Instruct litgpt evaluate meta-llama/Llama-3.2-3B-Instruct ```

 


Finetune an LLM

Run on Studios

 

Finetuning is the process of taking a pretrained AI model and further training it on a smaller, specialized dataset tailored to a specific task or application.

 

```bash

0) setup your dataset

curl -L https://huggingface.co/datasets/ksaw008/financealpaca/resolve/main/financealpaca.json -o mycustomdataset.json

1) Finetune a model (auto downloads weights)

litgpt finetune microsoft/phi-2 \ --data JSON \ --data.jsonpath mycustomdataset.json \ --data.valsplitfraction 0.1 \ --outdir out/custom-model

2) Test the model

litgpt chat out/custom-model/final

3) Deploy the model

litgpt serve out/custom-model/final ```

Read the full finetuning docs

 


Deploy an LLM

Deploy on Studios

 

Deploy a pretrained or finetune LLM to use it in real-world applications. Deploy, automatically sets up a web server that can be accessed by a website or app.

```bash

deploy an out-of-the-box LLM

litgpt serve microsoft/phi-2

deploy your own trained model

litgpt serve path/to/microsoft/phi-2/checkpoint ```

Show code to query server:   Test the server in a separate terminal and integrate the model API into your AI product: ```python # 3) Use the server (in a separate Python session) import requests, json response = requests.post( "http://127.0.0.1:8000/predict", json={"prompt": "Fix typos in the following sentence: Example input"} ) print(response.json()["output"]) ```

Read the full deploy docs.

 


Evaluate an LLM

Evaluate an LLM to test its performance on various tasks to see how well it understands and generates text. Simply put, we can evaluate things like how well would it do in college-level chemistry, coding, etc... (MMLU, Truthful QA, etc...)

bash litgpt evaluate microsoft/phi-2 --tasks 'truthfulqa_mc2,mmlu'

Read the full evaluation docs.

 


Test an LLM

Run on Studios

 

Test how well the model works via an interactive chat. Use the chat command to chat, extract embeddings, etc...

Here's an example showing how to use the Phi-2 LLM: ```bash litgpt chat microsoft/phi-2

Prompt: What do Llamas eat? ```

Full code:   ```bash # 1) List all supported LLMs litgpt download list # 2) Use a model (auto downloads weights) litgpt chat microsoft/phi-2 >> Prompt: What do Llamas eat? ``` The download of certain models requires an additional access token. You can read more about this in the [download](tutorials/download_model_weights.md#specific-models-and-access-tokens) documentation.

Read the full chat docs.

 


Pretrain an LLM

Run on Studios

 

Pretraining is the process of teaching an AI model by exposing it to a large amount of data before it is fine-tuned for specific tasks.

Show code:   ```bash mkdir -p custom_texts curl https://www.gutenberg.org/cache/epub/24440/pg24440.txt --output custom_texts/book1.txt curl https://www.gutenberg.org/cache/epub/26393/pg26393.txt --output custom_texts/book2.txt # 1) Download a tokenizer litgpt download EleutherAI/pythia-160m \ --tokenizer_only True # 2) Pretrain the model litgpt pretrain EleutherAI/pythia-160m \ --tokenizer_dir EleutherAI/pythia-160m \ --data TextFiles \ --data.train_data_path "custom_texts/" \ --train.max_tokens 10_000_000 \ --out_dir out/custom-model # 3) Test the model litgpt chat out/custom-model/final ```

Read the full pretraining docs

 


Continue pretraining an LLM

Run on Studios

 

Continued pretraining is another way of finetuning that specializes an already pretrained model by training on custom data:

Show code:   ```bash mkdir -p custom_texts curl https://www.gutenberg.org/cache/epub/24440/pg24440.txt --output custom_texts/book1.txt curl https://www.gutenberg.org/cache/epub/26393/pg26393.txt --output custom_texts/book2.txt # 1) Continue pretraining a model (auto downloads weights) litgpt pretrain EleutherAI/pythia-160m \ --tokenizer_dir EleutherAI/pythia-160m \ --initial_checkpoint_dir EleutherAI/pythia-160m \ --data TextFiles \ --data.train_data_path "custom_texts/" \ --train.max_tokens 10_000_000 \ --out_dir out/custom-model # 2) Test the model litgpt chat out/custom-model/final ```

Read the full continued pretraining docs

 


State-of-the-art features

✅ State-of-the-art optimizations: Flash Attention v2, multi-GPU support via fully-sharded data parallelism, optional CPU offloading, and TPU and XLA support.
Pretrain, finetune, and deploy
✅ Reduce compute requirements with low-precision settings: FP16, BF16, and FP16/FP32 mixed.
✅ Lower memory requirements with quantization: 4-bit floats, 8-bit integers, and double quantization.
Configuration files for great out-of-the-box performance.
✅ Parameter-efficient finetuning: LoRA, QLoRA, Adapter, and Adapter v2.
Exporting to other popular model weight formats.
✅ Many popular datasets for pretraining and finetuning, and support for custom datasets.
✅ Readable and easy-to-modify code to experiment with the latest research ideas.

 


Training recipes

LitGPT comes with validated recipes (YAML configs) to train models under different conditions. We've generated these recipes based on the parameters we found to perform the best for different training conditions.

Browse all training recipes here.

Example

bash litgpt finetune \ --config https://raw.githubusercontent.com/Lightning-AI/litgpt/main/config_hub/finetune/llama-2-7b/lora.yaml

✅ Use configs to customize training

Configs let you customize training for all granular parameters like:

```yaml

The path to the base model's checkpoint directory to load for finetuning. (type: , default: checkpoints/stabilityai/stablelm-base-alpha-3b)

checkpoint_dir: checkpoints/meta-llama/Llama-2-7b-hf

Directory in which to save checkpoints and logs. (type: , default: out/lora)

out_dir: out/finetune/qlora-llama2-7b

The precision to use for finetuning. Possible choices: "bf16-true", "bf16-mixed", "32-true". (type: Optional[str], default: null)

precision: bf16-true

... ```

✅ Example: LoRA finetuning config   ```yaml # The path to the base model's checkpoint directory to load for finetuning. (type: , default: checkpoints/stabilityai/stablelm-base-alpha-3b) checkpoint_dir: checkpoints/meta-llama/Llama-2-7b-hf # Directory in which to save checkpoints and logs. (type: , default: out/lora) out_dir: out/finetune/qlora-llama2-7b # The precision to use for finetuning. Possible choices: "bf16-true", "bf16-mixed", "32-true". (type: Optional[str], default: null) precision: bf16-true # If set, quantize the model with this algorithm. See ``tutorials/quantize.md`` for more information. (type: Optional[Literal['nf4', 'nf4-dq', 'fp4', 'fp4-dq', 'int8-training']], default: null) quantize: bnb.nf4 # How many devices/GPUs to use. (type: Union[int, str], default: 1) devices: 1 # How many nodes to use. (type: int, default: 1) num_nodes: 1 # The LoRA rank. (type: int, default: 8) lora_r: 32 # The LoRA alpha. (type: int, default: 16) lora_alpha: 16 # The LoRA dropout value. (type: float, default: 0.05) lora_dropout: 0.05 # Whether to apply LoRA to the query weights in attention. (type: bool, default: True) lora_query: true # Whether to apply LoRA to the key weights in attention. (type: bool, default: False) lora_key: false # Whether to apply LoRA to the value weights in attention. (type: bool, default: True) lora_value: true # Whether to apply LoRA to the output projection in the attention block. (type: bool, default: False) lora_projection: false # Whether to apply LoRA to the weights of the MLP in the attention block. (type: bool, default: False) lora_mlp: false # Whether to apply LoRA to output head in GPT. (type: bool, default: False) lora_head: false # Data-related arguments. If not provided, the default is ``litgpt.data.Alpaca``. data: class_path: litgpt.data.Alpaca2k init_args: mask_prompt: false val_split_fraction: 0.05 prompt_style: alpaca ignore_index: -100 seed: 42 num_workers: 4 download_dir: data/alpaca2k # Training-related arguments. See ``litgpt.args.TrainArgs`` for details train: # Number of optimizer steps between saving checkpoints (type: Optional[int], default: 1000) save_interval: 200 # Number of iterations between logging calls (type: int, default: 1) log_interval: 1 # Number of samples between optimizer steps across data-parallel ranks (type: int, default: 128) global_batch_size: 8 # Number of samples per data-parallel rank (type: int, default: 4) micro_batch_size: 2 # Number of iterations with learning rate warmup active (type: int, default: 100) lr_warmup_steps: 10 # Number of epochs to train on (type: Optional[int], default: 5) epochs: 4 # Total number of tokens to train on (type: Optional[int], default: null) max_tokens: # Limits the number of optimizer steps to run (type: Optional[int], default: null) max_steps: # Limits the length of samples (type: Optional[int], default: null) max_seq_length: 512 # Whether to tie the embedding weights with the language modeling head weights (type: Optional[bool], default: null) tie_embeddings: # (type: float, default: 0.0003) learning_rate: 0.0002 # (type: float, default: 0.02) weight_decay: 0.0 # (type: float, default: 0.9) beta1: 0.9 # (type: float, default: 0.95) beta2: 0.95 # (type: Optional[float], default: null) max_norm: # (type: float, default: 6e-05) min_lr: 6.0e-05 # Evaluation-related arguments. See ``litgpt.args.EvalArgs`` for details eval: # Number of optimizer steps between evaluation calls (type: int, default: 100) interval: 100 # Number of tokens to generate (type: Optional[int], default: 100) max_new_tokens: 100 # Number of iterations (type: int, default: 100) max_iters: 100 # The name of the logger to send metrics to. (type: Literal['wandb', 'tensorboard', 'csv'], default: csv) logger_name: csv # The random seed to use for reproducibility. (type: int, default: 1337) seed: 1337 ```
✅ Override any parameter in the CLI: ```bash litgpt finetune \ --config https://raw.githubusercontent.com/Lightning-AI/litgpt/main/config_hub/finetune/llama-2-7b/lora.yaml \ --lora_r 4 ```

 


Project highlights

LitGPT powers many great AI projects, initiatives, challenges and of course enterprises. Please submit a pull request to be considered for a feature.

📊 SAMBA: Simple Hybrid State Space Models for Efficient Unlimited Context Language Modeling The [Samba](https://github.com/microsoft/Samba) project by researchers at Microsoft is built on top of the LitGPT code base and combines state space models with sliding window attention, which outperforms pure state space models.
🏆 NeurIPS 2023 Large Language Model Efficiency Challenge: 1 LLM + 1 GPU + 1 Day The LitGPT repository was the official starter kit for the [NeurIPS 2023 LLM Efficiency Challenge](https://llm-efficiency-challenge.github.io), which is a competition focused on finetuning an existing non-instruction tuned LLM for 24 hours on a single GPU.
🦙 TinyLlama: An Open-Source Small Language Model LitGPT powered the [TinyLlama project](https://github.com/jzhang38/TinyLlama) and [TinyLlama: An Open-Source Small Language Model](https://arxiv.org/abs/2401.02385) research paper.
🍪 MicroLlama: MicroLlama-300M [MicroLlama](https://github.com/keeeeenw/MicroLlama) is a 300M Llama model pretrained on 50B tokens powered by TinyLlama and LitGPT.
🔬 Pre-training Small Base LMs with Fewer Tokens The research paper ["Pre-training Small Base LMs with Fewer Tokens"](https://arxiv.org/abs/2404.08634), which utilizes LitGPT, develops smaller base language models by inheriting a few transformer blocks from larger models and training on a tiny fraction of the data used by the larger models. It demonstrates that these smaller models can perform comparably to larger models despite using significantly less training data and resources.

 


Community

We welcome all individual contributors, regardless of their level of experience or hardware. Your contributions are valuable, and we are excited to see what you can accomplish in this collaborative and supportive environment.

 

Tutorials

🚀 Get started
⚡️ Finetuning, incl. LoRA, QLoRA, and Adapters
🤖 Pretraining
💬 Model evaluation
📘 Supported and custom datasets
🧹 Quantization
🤯 Tips for dealing with out-of-memory (OOM) errors
🧑🏽‍💻 Using cloud TPUs

 


Acknowledgments

This implementation extends on Lit-LLaMA and nanoGPT, and it's powered by Lightning Fabric.

License

LitGPT is released under the Apache 2.0 license.

Citation

If you use LitGPT in your research, please cite the following work:

bibtex @misc{litgpt-2023, author = {Lightning AI}, title = {LitGPT}, howpublished = {\url{https://github.com/Lightning-AI/litgpt}}, year = {2023}, }

 

Owner

  • Name: ⚡️ Lightning AI
  • Login: Lightning-AI
  • Kind: organization
  • Location: United States of America

Turn ideas into AI, Lightning fast. Creators of PyTorch Lightning, Lightning AI Studio, TorchMetrics, Fabric, Lit-GPT, Lit-LLaMA

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, you can cite it as shown below."
title: "LitGPT"
abstract: "20+ high-performance LLMs with recipes to pretrain, finetune and deploy at scale."
date-released: 2023-03-22
authors:
  - name: "The Lightning AI team"
license: "Apache-2.0"
url: "https://github.com/Lightning-AI/litgpt"

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 1,373
  • Total Committers: 112
  • Avg Commits per committer: 12.259
  • Development Distribution Score (DDS): 0.704
Past Year
  • Commits: 382
  • Committers: 46
  • Avg Commits per committer: 8.304
  • Development Distribution Score (DDS): 0.526
Top Committers
Name Email Commits
Carlos Mocholí c****i@g****m 406
Sebastian Raschka m****l@s****m 328
awaelchli a****i@g****m 160
Andrei-Aksionov 5****v 83
Luca Antiga l****a@l****i 60
William Falcon w****7@c****u 55
Jirka Borovec 6****a 37
Thomas Viehmann t****e@b****e 30
Yu Shi Jie y****9@g****m 22
Aniket Maurya t****a@g****m 19
Gerson Kroiz 4****z 12
Kaeun Kim k****m@u****a 11
Justin Goheen 2****n 11
apaz a****a@g****m 6
__mo_san__ 5****n 4
Boon 4****3 4
Artur Komenda 6****5 4
Ali Alshaarawy 4****7 4
twsl 4****l 3
janEbert j****t@p****t 3
MF FOOM 1****M 3
Lucas Ventura l****r@g****m 3
John Paul Hennessy l****c 2
Mathew Shen d****r@g****m 2
Ikko Eltociear Ashimine e****r@g****m 2
Deependu d****1@g****m 2
Davide Macario 8****o 2
Matthias Seeger m****r@g****m 2
Noah Kasmanoff n****f@g****m 2
Patrick Wood p****d@g****m 2
and 82 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 452
  • Total pull requests: 976
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 10 days
  • Total issue authors: 225
  • Total pull request authors: 96
  • Average comments per issue: 1.39
  • Average comments per pull request: 1.29
  • Merged pull requests: 732
  • Bot issues: 0
  • Bot pull requests: 17
Past Year
  • Issues: 155
  • Pull requests: 442
  • Average time to close issues: 18 days
  • Average time to close pull requests: 5 days
  • Issue authors: 102
  • Pull request authors: 45
  • Average comments per issue: 0.78
  • Average comments per pull request: 1.24
  • Merged pull requests: 335
  • Bot issues: 0
  • Bot pull requests: 17
Top Authors
Issue Authors
  • rasbt (75)
  • carmocca (25)
  • awaelchli (23)
  • Andrei-Aksionov (9)
  • mtasic85 (7)
  • mseeger (7)
  • vabatista (5)
  • Esmail-ibraheem (5)
  • aniketmaurya (5)
  • bkiat1123 (5)
  • wen020 (4)
  • RDouglasSharp (4)
  • guangyuli-uoe (4)
  • sadrafh (4)
  • Gooooooogo (4)
Pull Request Authors
  • rasbt (346)
  • carmocca (76)
  • Borda (69)
  • ysjprojects (64)
  • awaelchli (60)
  • Andrei-Aksionov (50)
  • t-vi (35)
  • k223kim (25)
  • dependabot[bot] (13)
  • apaz-cli (12)
  • mseeger (12)
  • lantiga (11)
  • ali-alshaar7 (10)
  • aniketmaurya (9)
  • ArturK-85 (8)
Top Labels
Issue Labels
question (114) bug (85) enhancement (75) help wanted (13) documentation (7) checkpoints (6) fine-tuning (4) generation (4) good first issue (3) model-weights (3) pre-training (2) quantization (2) waiting on author (2) 3rd party (2) tokenization (1) CI (1) breaking change (1)
Pull Request Labels
enhancement (30) dependencies (11) bug (10) breaking change (6) waiting on author (3) performance (3) CI (2) CI / actions (1) generation (1) checkpoints (1) question (1) model-weights (1) quantization (1)

Packages

  • Total packages: 4
  • Total downloads:
    • pypi 11,713 last-month
  • Total dependent packages: 1
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 86
  • Total maintainers: 2
proxy.golang.org: github.com/lightning-ai/litgpt
  • Versions: 26
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.5%
Average: 6.7%
Dependent repos count: 7.0%
Last synced: 6 months ago
proxy.golang.org: github.com/Lightning-AI/litgpt
  • Versions: 26
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.5%
Average: 6.7%
Dependent repos count: 7.0%
Last synced: 6 months ago
pypi.org: litgpt

Hackable implementation of state-of-the-art open-source LLMs

  • Documentation: https://litgpt.readthedocs.io/
  • License: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [2023] Lightning AI Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
  • Latest release: 0.5.10
    published 6 months ago
  • Versions: 32
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 11,661 Last month
Rankings
Stargazers count: 0.8%
Forks count: 2.9%
Dependent packages count: 9.7%
Downloads: 14.5%
Average: 18.4%
Dependent repos count: 63.9%
Maintainers (2)
Last synced: 6 months ago
pypi.org: fpdb

Python package for debugging multi-processed code using PDB.

  • Documentation: https://fpdb.readthedocs.io/
  • License: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
  • Latest release: 0.0.0.dev2
    published 9 months ago
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 52 Last month
Rankings
Dependent packages count: 9.1%
Average: 30.2%
Dependent repos count: 51.3%
Maintainers (1)
Last synced: 6 months ago