Stop Thinking, Just Do!

Sungsoo Kim's Blog

Building LLMs from the Ground Up

tagsTags

9 September 2024


Article Source


Building LLMs from the Ground Up

  • A 3-hour Coding Workshop

ABSTRACT

REFERENCES

  1. Build an LLM from Scratch book
  2. Build an LLM from Scratch repo
  3. GitHub repository with workshop code
  4. Lightning Studio for this workshop
  5. LitGPT

DESCRIPTION

This tutorial is aimed at coders interested in understanding the building blocks of large language models (LLMs), how LLMs work, and how to code them from the ground up in PyTorch. We will kick off this tutorial with an introduction to LLMs, recent milestones, and their use cases. Then, we will code a small GPT-like LLM, including its data input pipeline, core architecture components, and pretraining code ourselves. After understanding how everything fits together and how to pretrain an LLM, we will learn how to load pretrained weights and finetune LLMs using open-source libraries.