FareedKhan-dev / train-llm-from-scratch
데이터 다운로드부터 텍스트 생성까지, LLM을 훈련시키는 간단한 방법.
이 프로젝트에 대해
FareedKhan-dev 님의 train-llm-from-scratch 프로젝트는 GitHub에서 5.1K개의 별을 받으며 많은 개발자들의 주목을 받고 있습니다. 특히 Python 환경에서 유용하게 활용될 수 있으며, 최근 오픈소스 커뮤니티에서 활발한 기여와 토론이 이루어지고 있는 트렌딩 레포지토리입니다.
Language Breakdown
🇰🇷 한국어 번역 README
캐시 히트LLM을 처음부터 학습시키기
저는 AI 분야 박사 과정 자리를 찾고 있습니다. GitHub
저는 논문 Attention is All You Need를 기반으로 PyTorch를 사용하여 트랜스포머 모델을 처음부터 구현했습니다. 제 스크립트를 사용하면 단일 GPU로 억 또는 백만 개 매개변수 LLM을 학습시킬 수 있습니다.
새로운 기능: 처음부터 학습 후(post-training) 스위트 (SFT · Reward Model · PPO · DPO · GRPO/RLVR)
이 레포지토리는 이제 사전 학습을 넘어 현대적인 정렬된 추론 모델까지 제공합니다 —
Base → SFT → Reward Model → {PPO, DPO} → GRPO— 모든 알고리즘이 순수 PyTorch로 직접 작성되었으며 (trl/peft/transformers사용하지 않음), 레포지토리 자체Transformer로 실제 공개 데이터셋 (Alpaca, Dolly, Anthropic HH-RLHF, UltraFeedback, GSM8K)에서 학습되었고, 멀티 GPU용 (DDP + bf16)으로 구축되었습니다. 전체 가이드는 POST_TRAINING.md를 참고하세요.
새로운 기능: 기초 중심 튜토리얼 문서
전체 학습 파이프라인을 실행하기 전에 코드베이스를 이해하고 싶다면 LLM Foundations 튜토리얼에서 시작하세요. 토크나이제이션, 데이터 형상, 디코더 전용 트랜스포머, 어텐션, 손실, 최적화, 다이어그램과 수식, 소스 코드 링크와 함께 생성 방법을 설명합니다. 전체 MkDocs 사이트는 docs/README.md에서 시작합니다.
아래는 학습된 1,300만 개 매개변수 LLM의 출력입니다:
목차
- 학습 데이터 정보
- 전제 조건 및 학습 시간
- 문서 사이트
- 코드 구조
- 사용법
- 단계별 코드 설명
- Libra 가져오기
🌐 본 텍스트는 빠른 이해를 돕기 위한 요약 번역본입니다. 정확한 기술 정보 및 전체 코드는 GitHub 원문에서 확인하실 수 있습니다.
🔗 유사한 프로젝트
google/langextract
A Python library for extracting structured information from unstructured text using LLMs with precise source grounding and interactive visualization.
deepset-ai/haystack
Open-source AI orchestration framework for building context-engineered, production-ready LLM applications. Design modular pipelines and agent workflows with explicit control over retrieval, routing, memory, and generation. Built for scalable agents, RAG, multimodal applications, semantic search, and conversational systems.
GoogleCloudPlatform/generative-ai
Sample code and notebooks for Generative AI on Google Cloud, with Gemini Enterprise Agent Platform
이 정보는 AI가 자동으로 분석한 결과입니다. 정확한 내용은 원문을 확인하세요.
FareedKhan-dev/train-llm-from-scratch GitHub 원문 바로가기 →