litgpt
20+ high-performance LLMs with recipes to pretrain, finetune and deploy at scale.
File Explorer
- devcontainer.json
- Dockerfile
- ask-a-question.md
- bug-report.yaml
- feature-request.md
- check-links.yml
- cpu-tests.yml
- mkdocs-deploy.yml
- publish-pkg.yml
- CODEOWNERS
- dependabot.yml
- tests.yaml
- lora.yaml
- qlora.yaml
- full.yaml
- lora.yaml
- qlora.yaml
- lora.yaml
- qlora.yaml
- lora.yaml
- qlora.yaml
- lora.yaml
- qlora.yaml
- full.yaml
- lora.yaml
- qlora.yaml
- full.yaml
- lora.yaml
- qlora.yaml
- full.yaml
- lora.yaml
- qlora.yaml
- full.yaml
- lora.yaml
- qlora.yaml
- full.yaml
- lora.yaml
- qlora.yaml
- lora.yaml
- qlora.yaml
- lora.yaml
- qlora.yaml
- full.yaml
- lora.yaml
- qlora.yaml
- full.yaml
- lora.yaml
- qlora.yaml
- full.yaml
- lora.yaml
- qlora.yaml
- full.yaml
- lora.yaml
- qlora.yaml
- README.md
- debug.yaml
- microllama.yaml
- tinyllama.yaml
- tinystories.yaml
- __init__.py
- thunder_ddp.py
- thunder_fsdp.py
- __init__.py
- cross_entropy_loss.py
- rope_embedding.py
- swiglu.py
- utils.py
- __init__.py
- executor.py
- __init__.py
- pretrain.py
- README.md
- __init__
- adapter.py
- __init__
- adapter.py
- base.py
- __init__
- prepare_alpaca.py
- __init__
- README.md
- utils.py
- __init__.py
- base.py
- __init__.py
- alpaca.py
- alpaca_2k.py
- alpaca_gpt4.py
- base.py
- deita.py
- flan.py
- json_data.py
- lima.py
- lit_data.py
- longform.py
- microllama.py
- openwebtext.py
- prepare_slimpajama.py
- prepare_starcoder.py
- text_files.py
- tinyllama.py
- tinystories.py
- __init__.py
- serve.py
- evaluate.py
- __init__.py
- adapter.py
- adapter_v2.py
- full.py
- lora.py
- lora_legacy.py
- __init__.py
- adapter.py
- adapter_v2.py
- base.py
- full.py
- sequentially.py
- speculative_decoding.py
- tp.py
- __init__.py
- convert_hf_checkpoint.py
- convert_lit_checkpoint.py
- convert_pretrained_checkpoint.py
- download.py
- merge_lora.py
- validate.py
- __init__.py
- __main__.py
- adapter.py
- adapter_v2.py
- api.py
- args.py
- config.py
- constants.py
- lora.py
- model.py
- parser_config.py
- pretrain.py
- prompts.py
- tokenizer.py
- types.py
- utils.py
- __init__.py
- test_hf_checkpoint.py
- test_lit_checkpoint.py
- test_pretrained_checkpoint.py
- alpaca.json
- dolly.json
- longform_train.json
- longform_val.json
- __init__.py
- test_alpaca.py
- test_base.py
- test_deita.py
- test_json.py
- test_lit_data.py
- test_longform.py
- test_openwebtext.py
- test_textfiles.py
- test_tinyllama.py
- test_tinystories.py
- __init__.py
- test_thunder_distributed.py
- test_thunder_networks.py
- test_thunder_pretrain.py
- test_unsloth_executor.py
- __init__.py
- test_adapter.py
- test_main.py
- test_sequentially.py
- test_tp.py
- utils.py
- conftest.py
- test_adapter.py
- test_adapter_v2.py
- test_api.py
- test_args.py
- test_batch.py
- test_chat.py
- test_ci.py
- test_cli.py
- test_config.py
- test_config_hub.py
- test_deepseek_moe.py
- test_distributed.py
- test_evaluate.py
- test_full.py
- test_generate_speculatively.py
- test_lora.py
- test_merge_lora.py
- test_model.py
- test_multihead_latent_attention.py
- test_pretrain.py
- test_prompts.py
- test_readme.py
- test_rope.py
- test_serve.py
- test_tokenizer.py
- test_trainer_support.py
- test_types.py
- test_utils.py
- test_validate.py
- test_yarn.py
- adding-models.md
- python-api.md
- README.md
- litgpt_ptl_medium.py
- litgpt_ptl_small.py
- README.md
- commands.webp
- finetune.webp
- instruction-1.webp
- instruction-2.webp
- pretrain.webp
- usage.webp
- alpaca-2k.jpg
- alpaca.jpg
- alpaca_libre.jpg
- alpacagpt4.jpg
- deita-multiturn.jpg
- deita.jpg
- dolly.jpg
- lima.jpg
- longform.jpg
- 0_to_litgpt.md
- convert_hf_checkpoint.md
- convert_lit_models.md
- deploy.md
- download_model_weights.md
- evaluation.md
- finetune.md
- finetune_adapter.md
- finetune_full.md
- finetune_lora.md
- full_finetune_example.py
- inference.md
- mkdocs.yml
- oom.md
- prepare_dataset.md
- pretrain.md
- pretrain_tinyllama.md
- python-api.md
- quantize.md
- resource-tables.md
- .gitignore
- .pre-commit-config.yaml
- CITATION.cff
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- LICENSE.md
- pyproject.toml
- README.md
# Installation Guide
pythonSetup Steps
git clone https://github.com/Lightning-AI/litgpt
Clone the repository locally.
cd litgpt
Navigate to the project directory.
pip install 'litgpt[extra]'
Install LitGPT with extra dependencies.
Key Commands
pip install 'litgpt[extra]'
Install LitGPT package with extra features.
pip install -e '.[extra,compiler,test]'
Install the package in editable mode from source.
uv sync --all-extras
Sync all dependencies using the uv package manager.
# Use via CDN
jsDelivrjsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.
Release Timeline
Actively MaintainedCommand Glossary
Commands referenced in this DOCs, explained below.
git clone
View Details ▼
git clone
Clone an existing repository.
git clone {{remote_repository_location}} {{path/to/directory}}
Clone an existing repository into a new directory (the default directory is the repository name):
git clone --recursive {{remote_repository_location}}
Clone an existing repository and its submodules:
git clone {{[-n|--no-checkout]}} {{remote_repository_location}}
Clone only the `.git` directory of an existing repository:
pip install
View Details ▼
pip install
Install Python packages.
pip install {{package1 package2 ...}}
Install one or more packages:
pip install {{package1 package2 ...}} {{[-U|--upgrade]}}
Upgrade all specified packages to the latest version, installing any that are not already present:
pip install {{package}}=={{version}}
Install a specific version of a package:
uv sync
View Details ▼
uv sync
Update the project's environment to match the lockfile.
uv sync
Sync the project environment with the lockfile:
uv sync --all-extras
Sync and include all optional dependencies:
uv sync --extra {{extra_name}}
Sync with specific optional dependencies:
