DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to use Litgpt: what you can do with it

What is Litgpt? LitGPT is a Python library and command line tool to pretrain, finetune, evaluate, chat with and serve 20+ open LLMs. One `litgpt` command covers each action and downloads model weights on first use.

How do I use it? Install with pip install 'litgpt[extra]'; then download the example dataset with curl -L https://huggingface.co/datasets/ksaw008/finance_alpaca/resolve/main/finance_alpaca.json -o my_custom_dataset.json or point to your own JSON file; run litgpt finetune microsoft/phi-2 with --data JSON, --data.json_path my_custom_dataset.json, --data.val_split_fraction 0.1 and --out_dir out/custom-model. Full steps below.

Trended earlier

View repo on GitHub

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer

3 use cases

Quick start with Litgpt

  1. Check you have what it needs: Python with pip; A GPU for finetuning and pretraining; Disk space for model weights.
  2. Open Lightning-AI/litgpt on GitHub and read the README and license.
  3. Install with pip install 'litgpt[extra]'
  4. Download the example dataset with curl -L https://huggingface.co/datasets/ksaw008/finance_alpaca/resolve/main/finance_alpaca.json -o my_custom_dataset.json or point to your own JSON file
  5. Run litgpt finetune microsoft/phi-2 with --data JSON, --data.json_path my_custom_dataset.json, --data.val_split_fraction 0.1 and --out_dir out/custom-model
  6. Test the result with litgpt chat out/custom-model/final

These steps come from our top use case, Finetune a small LLM on your own JSON dataset, which also has a copy-paste agent prompt.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for Lightning-AI/litgpt

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Best AI repos for Software and DevOps

About this repo

  • Who it is forDevelopers and ML engineers who want to finetune or serve an open model without writing a training stack.
  • Why it is hot14k stars, talked about in 2 AI sources we track
  • LanguagePython
  • Sourcegithub.com/Lightning-AI/litgpt ยท Back to Hot repos

Requirements

  • Python with pip
  • A GPU for finetuning and pretraining
  • Disk space for model weights

Add this badge to your README

Maintain Litgpt? Show readers where to find these use cases. Use cases on Deduped

Markdown

[![Use cases on Deduped](https://dedupedai.com/badge/Lightning-AI/litgpt.svg)](https://dedupedai.com/use-cases/lightning-ai-litgpt/?utm_source=github&utm_medium=badge&utm_campaign=Lightning-AI-litgpt)

HTML

<a href="https://dedupedai.com/use-cases/lightning-ai-litgpt/?utm_source=github&amp;utm_medium=badge&amp;utm_campaign=Lightning-AI-litgpt"><img src="https://dedupedai.com/badge/Lightning-AI/litgpt.svg" alt="Use cases on Deduped" height="20"></a>

A static image, no tracking script. About the badge

Questions about Litgpt

What is Litgpt?

LitGPT is a Python library and command line tool to pretrain, finetune, evaluate, chat with and serve 20+ open LLMs. One `litgpt` command covers each action and downloads model weights on first use. It is an open-source project on GitHub: https://github.com/Lightning-AI/litgpt.

How do I use Litgpt?

Install with pip install 'litgpt[extra]'; then download the example dataset with curl -L https://huggingface.co/datasets/ksaw008/finance_alpaca/resolve/main/finance_alpaca.json -o my_custom_dataset.json or point to your own JSON file; run litgpt finetune microsoft/phi-2 with --data JSON, --data.json_path my_custom_dataset.json, --data.val_split_fraction 0.1 and --out_dir out/custom-model. The use cases on this page give the full steps and a copy-paste agent prompt for each job.

Who is Litgpt for?

Developers and ML engineers who want to finetune or serve an open model without writing a training stack.

What can I do with Litgpt?

3 use cases so far, for example: Finetune a small LLM on your own JSON dataset; Serve an open LLM as a local HTTP API; Benchmark a model on MMLU and TruthfulQA. Each has steps and a copy-paste agent prompt.

What do I need to run Litgpt?

Python with pip; A GPU for finetuning and pretraining; Disk space for model weights.

What are alternatives to Litgpt?

Other hot AI repos in Software and DevOps: Skills, Claude Mem, Freellmapi, Andrej Karpathy Skills, Agent Desktop.

Is Litgpt safe to run?

Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.