โ† eAccelerate portfolioLearn / Guides

๐Ÿ“š Prerequisites Guide

Everything you need to know before building your first LLM

๐Ÿš€ Quick Start Checklist

โœ… Required Knowledge

  • โ€ข Basic Python programming
  • โ€ข High school mathematics
  • โ€ข Basic command line usage

โšก Estimated Time

  • โ€ข Setup: 10-15 minutes
  • โ€ข Tutorial: 2-3 hours
  • โ€ข Training: 20-30 minutes

๐Ÿ’ป System Requirements

๐Ÿ–ฅ๏ธ Minimum

  • โ€ข 8GB RAM
  • โ€ข 2GB free disk space
  • โ€ข Python 3.10+
  • โ€ข Internet connection

โšก Recommended

  • โ€ข 16GB+ RAM
  • โ€ข GPU (NVIDIA/Apple Silicon)
  • โ€ข SSD storage
  • โ€ข Stable internet

๐Ÿš€ Optimal

  • โ€ข 32GB+ RAM
  • โ€ข Modern GPU (RTX 5080+/H200/AMD RX 8900-AI/Apple M4 Pro+)
  • โ€ข Fast NVMe SSD
  • โ€ข Good cooling

๐Ÿ”ง Platform Setup

Step 1: Install Python

# Using Homebrew (recommended)
brew install python

# Verify installation
python3 --version

Alternative: Download from python.org

Step 2: Install Git

# Install Git
brew install git

# Configure Git (optional)
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"

Step 3: Setup Project Environment

# Create project directory
mkdir llm-tutorial && cd llm-tutorial

# Create virtual environment
python3 -m venv venv

# Activate virtual environment
source venv/bin/activate

# Download requirements
curl -O https://raw.githubusercontent.com/geekyabhijit/Build_LLM/main/requirements.txt

# Install dependencies
pip install -r requirements.txt

๐ŸŽ Apple Silicon Optimization

Your Mac will automatically use MPS (Metal Performance Shaders) for GPU acceleration. No additional setup needed!

๐Ÿ‘จโ€๐Ÿ’ป Development Environment

๐ŸŽฏ Recommended: VS Code

  • โ€ข Download from code.visualstudio.com
  • โ€ข Install Python extension
  • โ€ข Install Jupyter extension
  • โ€ข Built-in terminal

๐Ÿ’ก Pro tip: VS Code will automatically detect your virtual environment

๐Ÿ”„ Alternatives

  • โ€ข PyCharm: Full IDE experience
  • โ€ข Jupyter Lab: Notebook-focused
  • โ€ข Vim/Neovim: Terminal-based
  • โ€ข Sublime Text: Lightweight

๐Ÿ”ง Environment Managers (2025)

While Conda is still fine, many developers have moved to lighter alternatives for reproducible environments:

Micromamba

# Install micromamba
curl -Ls https://micro.mamba.pm/api/micromamba/$(uname -s)/latest | tar -xvj bin/micromamba

# Create environment
micromamba create -n llm-tutorial python=3.12

# Activate environment
micromamba activate llm-tutorial

Pixi

# Install pixi
curl -fsSL https://pixi.sh/install.sh | bash

# Create project
pixi init llm-tutorial
pixi add torch torchvision torchaudio

# Run commands in environment
pixi run python script.py

Both are faster and lighter than Conda, with better dependency resolution.

๐Ÿง  Knowledge Prerequisites

โœ… Essential (You Must Know)

Python Basics

  • โ€ข Variables and data types
  • โ€ข Functions and classes
  • โ€ข Lists and dictionaries
  • โ€ข For loops and if statements

Math Concepts

  • โ€ข Basic algebra
  • โ€ข Matrix multiplication (concept)
  • โ€ข What is a derivative (intuition)
  • โ€ข Probability basics

โšก Helpful (Nice to Have)

Programming

  • โ€ข NumPy basics
  • โ€ข Basic command line
  • โ€ข Git basics
  • โ€ข Virtual environments

AI/ML

  • โ€ข What neural networks do
  • โ€ข Gradient descent (concept)
  • โ€ข Training vs inference
  • โ€ข Overfitting concept

See our Cutting-Edge LLM Learning Resources for crash courses on GenAI & LLMs

๐Ÿš€ Advanced (We'll Teach You)

Don't worry if you don't know these - the tutorial covers everything:

  • โ€ข Transformer architecture
  • โ€ข Self-attention mechanism
  • โ€ข Tokenization
  • โ€ข Embedding layers
  • โ€ข PyTorch fundamentals
  • โ€ข Backpropagation
  • โ€ข Model training loops
  • โ€ข GPU acceleration

๐Ÿ“– Quick Learning Resources

Need to brush up on something?

๐Ÿ Python Programming (30-60 mins)

๐Ÿ“š Interactive Tutorials:

๐Ÿ“– References:

๐Ÿงฎ Mathematics (45-90 mins)

๐ŸŽฅ Visual Learning:

๐Ÿ“š Interactive Practice:

๐Ÿค– Deep Learning Fundamentals (1-2 hours)

๐ŸŽฏ Essential Watching:

๐Ÿš€ Practical Courses:

๐Ÿ”ฅ PyTorch Essentials (30-45 mins)

๐Ÿ“– Official Resources:

๐ŸŽฅ Video Tutorials:

๐Ÿ”ง Development Tools (20-30 mins)

๐Ÿ“ Editor Setup:

โš™๏ธ Environment Management:

๐ŸŒŸ Cutting-Edge LLM Learning Resources (2025)

Stay current with the latest in LLM research and applications

๐Ÿš€ Crash-course on GenAI & LLMs

๐Ÿ“š Google Cloud Micro-courses:

Fast, hands-on, and updated this month.

๐ŸŽ“ Full Semester Depth

๐Ÿ“š University Courses:

๐Ÿ”ง Prompt Engineering & LLMOps

๐Ÿ“š Updated Courses:

Keeps your deployment & prompting skills current.

โšก Performance Enhancements (2025)

Optional enhancements for faster training and inference

๐Ÿ”ฅ Flash-Attention 3

For faster training on Ampere+ GPUs:

pip install flash-attn --no-build-isolation

Add to your requirements.txt for faster attention mechanisms.

๐Ÿš€ vLLM

For blazing-fast inference:

pip install vllm

Now officially under the PyTorch Foundation for optimized inference.

๐Ÿณ Containerization

Pre-baked Docker image with all optimizations:

# Use the llm-stack Docker image
# PyTorch 2.7 + CUDA 12.6 + Flash-Attn 3 pre-baked
docker run --gpus all -it llm-stack/pytorch:2.7-cuda12.6-flash3

Simplified setup with all performance enhancements pre-installed.

โœ… Final Readiness Check

Ready to start? Check these boxes:

๐Ÿ”ง Common Setup Issues

โŒ "python: command not found"

Try these solutions:

  • Use python3 instead of python
  • Check if Python is in your PATH environment variable
  • Reinstall Python and check "Add to PATH" option
  • Restart your terminal/command prompt
โŒ "pip install" fails with permissions error

Solutions:

  • Make sure your virtual environment is activated
  • On Linux/Mac: Don't use sudo with pip
  • Try: pip install --user package_name
  • Update pip: python -m pip install --upgrade pip
โŒ PyTorch installation issues

Platform-specific solutions:

  • Windows: Install Microsoft Visual C++ Build Tools
  • Mac M1/M2: Use the conda-forge channel
  • Linux: Check CUDA version compatibility
  • All: Try CPU-only version first: pip install torch --index-url https://download.pytorch.org/whl/cpu
โŒ Virtual environment not working

Common fixes:

  • Make sure you're in the right directory
  • Check activation command for your platform
  • Verify with: which python (should show venv path)
  • Try recreating: rm -rf venv && python -m venv venv

๐Ÿ†˜ Need Help?

๐Ÿ“š Documentation

๐Ÿ’ฌ Community