llm-beginner  by nndl

LLM and Agent development from fundamentals to advanced applications

Created 9 years ago
6,387 stars

Top 8.0% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

LLM-Beginner is an independent tutorial series, a modern re-imagining of NLP-Beginner, for learners with Python and deep learning foundations. It features six progressive tasks (2-4 weeks each) covering Transformers, mini-GPT implementation, instruction tuning, RAG, tool-calling agents, and mini coding agents. The curriculum aligns with mainstream 2025-2026 LLM and agent technologies, emphasizing practical implementation and core principle understanding before framework utilization.

How It Works

The core pedagogy is "implement first, then compare with framework." Each task starts with manual implementation of key components (e.g., self-attention, decoder-only models, ReAct loops) using PyTorch, followed by comparison with libraries like Hugging Face's PEFT and TRL. This ensures deep understanding of mechanisms from Transformer blocks and BPE tokenization to RAG pipelines and agentic reasoning. The series progresses logically, building complexity and integrating modern techniques like RoPE, KV caching, LoRA, DPO, and MCP.

Quick Start & Requirements

  • Primary Install/Run: Tasks are self-contained; requires Python and standard deep learning libraries (PyTorch, Hugging Face ecosystem).
  • Prerequisites:
    • Tasks 1-4: 8GB VRAM GPU (e.g., RTX 3060/4060).
    • Tasks 5-6: 16GB+ VRAM recommended, or 8GB with Q4_K_M quantization.
    • Mac M series: MPS / llama.cpp support.
    • Companion textbook (https://nndl.ai/llm-agent/) recommended.
  • Setup Time: Each task is 2-4 weeks. Quick-start datasets allow rapid pipeline verification.

Highlighted Details

  • Progressive curriculum: Transformer, mini-GPT, SFT, DPO, RAG, ReAct, MCP, Skill, Subagent, CodeAct.
  • "Implement first, then use framework" pedagogy for deep principle understanding.
  • Utilizes Qwen2.5 model series (0.5B, 7B-Instruct, Coder-7B) and domestic Chinese open-source ecosystems.
  • Tasks feature data and model continuity (e.g., MOSS data from Task 3 used in Task 5).
  • Aligns with 2025-2026 mainstream LLM and agent technologies.

Maintenance & Community

The original NLP-Beginner project (2019) is archived. No specific details regarding active contributors, community channels, or sponsorships were found in the provided README.

Licensing & Compatibility

License information is not specified in the provided README content, posing a potential risk for commercial use or integration into closed-source projects.

Limitations & Caveats

Requires a solid foundation in Python and deep learning. Tasks 5 and 6 have significant hardware demands (VRAM) or require model quantization. The absence of explicit licensing information is a notable caveat for adoption decisions.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
105 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.