fcc-intro-to-llms  by Infatoshi

Colab for building LLMs from scratch

created 2 years ago
761 stars

Top 46.6% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a Google Colab notebook for learning how to build Large Language Models (LLMs) from scratch, targeting individuals who want to understand LLM internals without requiring local GPU hardware. It offers a hands-on approach to LLM development and training.

How It Works

The project utilizes PyTorch for LLM implementation and training, with a fallback to CPU execution for users without NVIDIA GPUs. It includes code for handling data loading, model architecture, and training loops, abstracting away much of the complexity of building LLMs from the ground up. The approach is designed to be educational, allowing users to experiment with core LLM concepts.

Quick Start & Requirements

  • Install: pip install pylzma numpy ipykernel jupyter torch --index-url https://download.pytorch.org/whl/cu118
  • Prerequisites: Visual Studio 2022 (for lzma compression), OpenWebText dataset (or a mini dataset like Wizard of Oz).
  • Hardware: NVIDIA GPU recommended for faster runtimes; CPU is supported but slower.
  • Links: Google Colab Notebook: https://colab.research.google.com/drive/1_7TNpEEl8xjHlr9JzKbK5AuDKXwAkHqj?usp=sharing

Highlighted Details

  • Focuses on building LLMs from scratch, not just fine-tuning existing models.
  • Provides a Google Colab environment for accessibility without local GPU setup.
  • Includes links to foundational research papers like "Attention is All You Need."
  • Offers guidance on setting up development environments like Jupyter Notebooks.

Maintenance & Community

The project is associated with FreeCodeCamp and the author, Elliot Arledge, who shares content on Twitter/X, YouTube, and LinkedIn. A Discord server is available for community interaction.

Licensing & Compatibility

The repository's license is not explicitly stated in the provided README. Compatibility for commercial use or closed-source linking is therefore undetermined.

Limitations & Caveats

The README mentions that detailed explanations will be added as questions and issues are posted, suggesting the content may be evolving. Performance will be significantly slower on CPU-only machines.

Health Check
Last commit

4 weeks ago

Responsiveness

Inactive

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

Explore Similar Projects

Starred by Peter Norvig Peter Norvig(Author of Artificial Intelligence: A Modern Approach; Research Director at Google), Bojan Tunguz Bojan Tunguz(AI Scientist; Formerly at NVIDIA), and
4 more.

LLMs-from-scratch by rasbt

1.4%
61k
Educational resource for LLM construction in PyTorch
created 2 years ago
updated 1 day ago
Feedback? Help us improve.