~/projects
Everything follows the same rule: build it from scratch, benchmark it, then read
how the real systems do it. Repos on
GitHub ↗.
FlashAttention-2 from scratch in Triton/CUDA — ~2× faster, ~5× less peak memory vs naive attention
Reimplementation of FlashAttention-2 with tiled online-softmax kernels in both Triton and CUDA, eliminating O(N²) score materialization — ~2× speedup and ~5× peak-memory reduction over naive PyTorch attention at 4K sequence length.
- problem
- Naive attention materializes the full N×N score matrix in HBM — memory traffic, not FLOPs, is the bottleneck.
- approach
- Tile Q/K/V blocks into shared memory, fuse softmax with matmul via online softmax rescaling, and recompute instead of storing intermediates in the backward pass. Implemented in both raw CUDA and Triton to compare programming models.
CUDA · Triton · C++ · PyTorch
LLM-powered log analysis served with Ray Serve + vLLM
An LLM-based agent that ingests raw service logs and surfaces anomalies and root-cause candidates. The interesting part is the serving layer: continuous batching, PagedAttention KV-cache management, and latency–throughput trade-offs studied on a real workload rather than a benchmark.
- problem
- Log triage is high-volume and latency-sensitive — a naive one-request-per-GPU serving setup wastes most of the hardware.
- approach
- Serve the model behind Ray Serve with vLLM as the inference engine; measure how continuous batching and KV-cache paging change tail latency and tokens/sec under bursty load.
vLLM · Ray Serve · Python · PyTorch
Fused Triton kernels for CT/MRI pipelines — ~9.7× faster than unfused PyTorch ops
GPU-accelerated CT/MRI enhancement pipeline: DICOM preprocessing, DL denoising, and post-processing. The pre/post chains (dtype conversion, windowing, normalization, clipping) run as fused Triton kernels — ~9.7× speedup by eliminating per-op kernel launches and intermediate HBM round-trips.
- problem
- Off-the-shelf image ops leave GPU performance on the table for domain-specific pipelines.
- approach
- Write the enhancement operators as fused Triton kernels, benchmark against baseline implementations, and profile memory access to guide block-size choices.
Triton · Python · Jupyter
A small functional language, from lexer to LLVM JIT
A functional language built stage by stage on LLVM — lexer, parser, AST, IR codegen, optimization passes, and JIT execution — extended with IR/CFG visualization tooling as a foundation for ML compiler work.
- problem
- ML compilers (XLA, TVM, MLIR dialects) are hard to reason about without having built a compiler pipeline end-to-end.
- approach
- Build every stage by hand in C++: recursive-descent parsing into an AST, IRBuilder-based codegen, FunctionPassManager optimizations, and Kaleidoscope JIT.
LLVM · C++ · Compilers
End-to-end MLIR pipeline — IR parsing, pass execution, toolchain integration
An experimental ML compiler built on MLIR — parsing tensor programs into IR, running custom passes, and integrating the full toolchain, applying lessons from the Kaleidoscope build.
Compilers · LLVM · C++
GPU programming puzzles solved in Mojo
Working through GPU programming puzzles in Mojo — thread indexing, shared memory, tiling, and reductions — to compare Mojo's programming model against CUDA and Triton.
Mojo · GPU
Research papers re-implemented from scratch in PyTorch
PyTorch implementations of deep learning models built from scratch following the original papers — VGG, ResNet, DenseNet, MobileNet, EfficientNet, Transformers — paired with write-ups on the blog.
PyTorch · Python
ML for manufacturing defect prediction under heavy class imbalance
Competition project from LG Aimers: predicting defective displays in a real manufacturing process, focusing on class imbalance, feature engineering, and model selection under deployment constraints.
Python · scikit-learn · ML
Transformer-based Korean→English translation model
A Transformer model for Korean-to-English translation trained on conversational data — tokenization, attention, and seq2seq training pipeline built with PyTorch.
PyTorch · Transformers · NLP