Claude Code 및 기타 하네스를 위한 멀티 하네스 플러그인 마켓플레이스입니다.
한국어는 runchr 제공 번역입니다. 원문 README는 English tool page.
litgpt
LitGPT는 20개 이상의 LLM을 처음부터 구현한 버전을 제공하며, 대규모 사전 학습, 파인튜닝, 배포를 위한 레시피와 로딩을 위한 Python API를 함께 제공합니다
- Install
- pip install 'litgpt[extra]'
프로젝트 README (번역)
GitHub ↗Written by the project's own authors, not by runchr. Snapshot taken 2026-10-29.
⚡ LitGPT
사전 학습, 파인튜닝, 대규모 배포를 위한 레시피를 갖춘 20개 이상의 고성능 LLM.
✅ 처음부터 직접 구현 ✅ 추상화 없음 ✅ 초보자 친화적
✅ Flash attention ✅ FSDP ✅ LoRA, QLoRA, Adapter
✅ GPU 메모리 절감 (fp4/8/16/32) ✅ 1~1000+ GPU/TPU ✅ 20개 이상의 LLM
빠른 시작 •
모델 •
파인튜닝 •
배포 •
모든 워크플로 •
기능 •
레시피 (YAML) •
Lightning AI •
튜토리얼
GPU를 찾고 계신가요?
340,000명 이상의 개발자가 PyTorch와 PyTorch Lightning을 위해 특별히 설계된 Lightning Cloud를 사용합니다.
GPU 최저 $0.19부터.
클러스터 : 최전선급 학습/추론 클러스터.
AI Studio (vibe train) : AI가 디버깅, 튜닝, vibe train을 도와주는 워크스페이스.
AI Studio (vibe deploy) : AI가 모델 최적화와 배포를 도와주는 워크스페이스.
노트북 : AI가 코딩과 분석을 도와주는 영구 GPU 워크스페이스.
추론 : 모델을 추론 API로 배포.
LLM을 Lightning처럼 빠르게 파인튜닝, 사전 학습, 추론하세요 ⚡⚡
모든 LLM은 추상화 없이 완전한 제어권을 갖고 처음부터 구현되어, 매우 빠르고 최소한이며 엔터프라이즈 규모에서 고성능을 발휘합니다.
✅ 엔터프라이즈 지원 - 무제한 엔터프라이즈 사용을 위한 Apache 2.0.
✅ 개발자 친화적 - 추상화 계층이 없는 단일 파일 구현으로 손쉬운 디버깅.
✅ 최적화된 성능 - 성능을 극대화하고 비용을 절감하며 학습 속도를 높이도록 설계된 모델.
✅ 검증된 레시피 - 엔터프라이즈 규모에서 테스트된 고도로 최적화된 학습/파인튜닝 레시피.
빠른 시작
LitGPT 설치
pip install 'litgpt[extra]'
20개 이상의 LLM 중 하나를 로드하고 사용하세요 :
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.
✅ 빠른 추론에 최적화
✅ 양자화
✅ 저메모리 GPU에서 실행
✅ 내부 추상화 계층 없음
✅ 프로덕션 규모에 최적화
고급 설치 옵션
소스에서 설치:
git clone https://github.com/Lightning-AI/litgpt
cd litgpt
# if using uv
uv sync --all-extras
# if using pip
pip install -e " .[extra,compiler,test] "
전체 Python API 문서를 살펴보세요 .
20개 이상의 LLM 중에서 선택
모든 모델은 성능을 극대화하고 추상화 계층을 제거하기 위해 처음부터 작성됩니다:
모델
모델 크기
작성자
참조
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
...
...
...
...
20개 이상의 LLM 전체 목록 보기
모든 모델
모델
모델 크기
작성자
참조
CodeGemma
7B
Google
Google Team, Google Deepmind
Code Llama
7B, 13B, 34B, 70B
Meta AI
Rozière et al. 2023
Falcon
7B, 40B, 180B
TII UAE
TII 2023
Falcon 3
1B, 3B, 7B, 10B
TII UAE
TII 2024
FreeWilly2 (Stable Beluga 2)
70B
Stability AI
Stability AI 2023
Function Calling Llama 2
7B
Trelis
Trelis et al. 2023
Gemma
2B, 7B
Google
Google Team, Google Deepmind
Gemma 2
9B, 27B
Google
Google Team, Google Deepmind
Gemma 3
1B, 4B, 12B, 27B
Google
Google Team, Google Deepmind
Llama 2
7B, 13B, 70B
Meta AI
Touvron et al. 2023
Llama 3.1
8B, 70B
Meta AI
Meta AI 2024
Llama 3.2
1B, 3B
Meta AI
Meta AI 2024
Llama 3.3
70B
Meta AI
Meta AI 2024
Mathstral
7B
Mistral AI
Mistral AI 2024
MicroLlama
300M
Ken Wang
MicroLlama repo
Mixtral MoE
8x7B
Mistral AI
Mistral AI 2023
Mistral
7B, 123B
Mistral AI
Mistral AI 2023
Mixtral MoE
8x22B
Mistral AI
Mistral AI 2024
OLMo
1B, 7B
Allen Institute for AI (AI2)
Groeneveld et al. 2024
OpenLLaMA
3B, 7B, 13B
OpenLM Research
Geng & Liu 2023
Phi 1.5 & 2
1.3B, 2.7B
Microsoft Research
Li et al. 2023
Phi 3
3.8B
Microsoft Research
Abdin et al. 2024
Phi 4
14B
Microsoft Research
Abdin et al. 2024
Phi 4 Mini Instruct
3.8B
Microsoft Research
Microsoft 2025
Phi 4 Mini Reasoning
3.8B
Microsoft Research
Xu, Peng et al. 2025
Phi 4 Reasoning
3.8B
Microsoft Research
Abdin et al. 2025
Phi 4 Reasoning Plus
3.8B
Microsoft Research
Abdin et al. 2025
Platypus
7B, 13B, 70B
Lee et al.
Lee, Hunter, and Ruiz 2023
Pythia
{14,31,70,160,410}M, {1,1.4,2.8,6.9,12}B
EleutherAI
Biderman et al. 2023
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
Qwen2.5 1M (Long Context)
7B, 14B
Alibaba Group
Qwen Team 2025
Qwen2.5 Math
1.5B, 7B, 72B
Alibaba Group
An, Yang et al. 2024
QwQ
32B
Alibaba Group
Qwen Team 2025
QwQ-Preview
32B
Alibaba Group
Qwen Team 2024
Qwen3
0.6B, 1.7B, 4B{Hybrid, Thinking-2507, Instruct-2507}, 8B, 14B, 32B
Alibaba Group
Qwen Team 2025
Qwen3 MoE
30B{Hybrid, Thinking-2507, Instruct-2507}, 235B{Hybrid, Thinking-2507, Instruct-2507}
Alibaba Group
Qwen Team 2025
R1 Distill Llama
8B, 70B
DeepSeek AI
DeepSeek AI 2025
R1 Distill Qwen
1.5B, 7B, 14B, 32B
DeepSeek AI
DeepSeek AI 2025
SmolLM2
135M, 360M, 1.7B
Hugging Face
Hugging Face 2024
Salamandra
2B, 7B
Barcelona Supercomputing Centre
BSC-LTC 2024
StableCode
3B
Stability AI
Stability AI 2023
StableLM
3B, 7B
Stability AI
Stability AI 2023
StableLM Zephyr
3B
Stability AI
Stability AI 2023
TinyLlama
1.1B
Zhang et al.
Zhang et al. 2023
팁 : litgpt download list 명령을 실행하면 사용 가능한 모든 모델을 나열할 수 있습니다.
워크플로
파인튜닝 •
사전 학습 •
지속 사전 학습 •
평가 •
배포 •
테스트
명령줄 인터페이스를 사용하여 자체 데이터로 사전 학습이나 파인튜닝 같은 고급 워크플로를 실행하세요.
모든 워크플로
LitGPT를 설치한 후, 실행할 모델과 워크플로를 선택하세요 (파인튜닝, 사전 학습, 평가, 배포 등...):
# 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
LLM 파인튜닝
파인튜닝은 사전 학습된 AI 모델을 가져와 특정 작업이나 애플리케이션에 맞춰진 더 작고 전문화된 데이터셋으로 추가 학습하는 과정입니다.
# 0) setup your dataset
curl -L https://huggingface.co/datasets/ksaw008/finance_alpaca/resolve/main/finance_alpaca.json -o my_custom_dataset.json
# 1) Finetune a model (auto downloads weights)
litgpt finetune microsoft/phi-2 \
--data JSON \
--data.json_path my_custom_dataset.json \
--data.val_split_fraction 0.1 \
--out_dir out/custom-model
# 2) Test the model
litgpt chat out/custom-model/final
# 3) Deploy the model
litgpt serve out/custom-model/final
전체 파인튜닝 문서 읽기
LLM 배포
사전 학습된 또는 파인튜닝된 LLM을 실제 애플리케이션에서 사용할 수 있도록 배포하세요. 배포는 웹사이트나 앱에서 접근할 수 있는 웹 서버를 자동으로 설정합니다.
# 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
서버를 쿼리하는 코드 보기:
별도 터미널에서 서버를 테스트하고 모델 API를 AI 제품에 통합하세요:
# 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" ])
전체 배포 문서 읽기 .
LLM 평가
LLM을 평가하여 다양한 작업에서의 성능을 테스트하고 텍스트를 얼마나 잘 이해하고 생성하는지 확인하세요. 간단히 말해, 대학 수준의 화학, 코딩 등에서 얼마나 잘 수행하는지 평가할 수 있습니다... (MMLU, Truthful QA 등...)
litgpt evaluate microsoft/phi-2 --tasks ' truthfulqa_mc2,mmlu '
전체 평가 문서 읽기 .
LLM 테스트
대화형 채팅을 통해 모델이 얼마나 잘 작동하는지 테스트하세요. chat 명령을 사용하여 채팅하고, 임베딩을 추출하는 등 다양한 작업을 수행하세요...
다음은 Phi-2 LLM을 사용하는 방법을 보여주는 예시입니다:
litgpt chat microsoft/phi-2
>> Prompt: What do Llamas eat ?
전체 코드:
# 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 ?
일부 모델을 다운로드하려면 추가 액세스 토큰이 필요합니다. 이에 대한 자세한 내용은 다운로드 문서에서 확인할 수 있습니다.
전체 채팅 문서 읽기 .
LLM 사전 학습
사전 학습은 AI 모델을 특정 작업에 맞게 파인튜닝하기 전에 대량의 데이터에 노출시켜 가르치는 과정입니다.
코드 보기:
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
전체 사전 학습 문서 읽기
LLM 지속 사전 학습
지속 사전 학습은 커스텀 데이터로 학습하여 이미 사전 학습된 모델을 전문화하는 또 다른 파인튜닝 방법입니다:
코드 보기:
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
전체 지속 사전 학습 문서 읽기
최첨단 기능
✅ 최첨단 최적화: Flash Attention v2, 완전 샤딩 데이터 병렬 처리를 통한 멀티 GPU 지원, 선택적 CPU 오프로딩 , TPU 및 XLA 지원 .
✅ 사전 학습 , 파인튜닝 , 배포
✅ 저정밀도 설정으로 컴퓨팅 요구 사항 절감: FP16, BF16, FP16/FP32 혼합.
✅ 양자화 로 메모리 요구 사항 절감: 4비트 부동소수점, 8비트 정수, 이중 양자화.
✅ 뛰어난 즉시 사용 가능한 성능을 위한 구성 파일.
✅ 파라미터 효율적 파인튜닝: LoRA , QLoRA , Adapter , Adapter v2 .
✅ 다른 인기 모델 가중치 형식으로 내보내기.
✅ 사전 학습 및 파인튜닝을 위한 다양한 인기 데이터셋 , 커스텀 데이터셋 지원 .
✅ 최신 연구 아이디어를 실험할 수 있는 읽기 쉽고 수정하기 쉬운 코드.
학습 레시피
LitGPT는 다양한 조건에서 모델을 학습하기 위한 검증된 레시피(YAML 구성)를 제공합니다. 이러한 레시피는 다양한 학습 조건에서 가장 잘 수행되는 것으로 확인된 매개변수를 기반으로 생성되었습니다.
모든 학습 레시피는 여기에서 살펴보세요 .
예시
litgpt finetune \
--config https://raw.githubusercontent.com/Lightning-AI/litgpt/main/config_hub/finetune/llama-2-7b/lora.yaml
✅ 구성으로 학습 커스터마이징
구성을 사용하면 다음과 같은 모든 세부 매개변수에 대해 학습을 커스터마이징할 수 있습니다:
# The path to the base model's checkpoint directory to load for finetuning. (type: <class 'Path'>, 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: <class 'Path'>, 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
...
✅ 예시: LoRA 파인튜닝 구성
# The path to the base model's checkpoint …
Other tools that do the same work
일상적인 엔지니어링 작업을 위한 에이전트 스킬.
Python과 .NET에서 프로덕션 AI 에이전트와 멀티 에이전트 워크플로를 구축하세요.
No comments yet.
to comment.