GPT2.cu
Handwritten C++/CUDA GPT-2 inference with real Hugging Face weights, greedy generation, prefill/decode, and KV cache.
- Speedup
- 2.536x
- Path
- KV cache
- Runtime
- FP32
CUDA · LLM Inference · AI Infrastructure
ACM silver medalist working on ContextOS, C++/CUDA, transformer inference, GPU kernels, KV cache, and small AI-infra tools that make complex systems easier to inspect and understand.
$ ./build/gpt2_main --generate 8 --text "Hello, I am"
input text: Hello, I am
generated text: Hello, I am a little bit of a fan of the
Featured Work
Handwritten C++/CUDA GPT-2 inference with real Hugging Face weights, greedy generation, prefill/decode, and KV cache.
A CLI-first MVP that watches GitHub issues, applies deterministic filters, asks an LLM for fit analysis, and renders a daily digest.
An experimental personal context system for organizing project memory, technical notes, and agent workflows without turning them into a public diary.
Writing
A long-form write-up about building GPT-2 inference in C++/CUDA, loading Hugging Face weights, and moving from naive generation to KV cache.
Focus