~/projects/llm-from-scratch

GPT from Scratch

WIP AI/ML 2026
  • PyTorch
  • Python
  • Transformers
  • BPE Tokenization
  • CUDA
  • RLHF
  • Distributed Training
Illustration of GPT internals: causal self-attention heatmap, transformer block stack, and BPE token stream predicting the next token

A ground-up implementation of a GPT-style language model built to understand transformer internals: multi-head self-attention, Byte Pair Encoding, GPU training, and RLHF-style fine-tuning. Developed in Jupyter notebooks with PyTorch on CUDA (via WSL2) and DDP support, the project prioritizes architectural clarity over rapid prototyping. Work in progress.

Highlights

  • Multi-head attention transformer architecture modeled after GPT, with core LLM logic implemented from first principles
  • PyTorch CUDA training through a WSL2 environment to leverage NVIDIA GPU compute
  • Byte Pair Encoding (BPE) tokenizer and fine-tuned NLP embeddings for the initial vocabulary
  • Output fine-tuning using an RLHF methodology
  • Distributed training support with PyTorch DDP

~/contact

Get in touch

I'm looking for software engineering, AI/ML, and data science internships, as well as research opportunities — and I'm always happy to talk shop. The fastest way to reach me is email.