Tanay’s Blog
Notes on machine learning, data systems, and CUDA.
-
Fixing LLM Inference Bottlenecks with Custom CUDA Kernels (Simple Kernel)
I replace GPT-2’s GELU operations with a fused CUDA kernel, bind it to PyTorch, and benchmark the result. On my setup, this cut GELU kernel launches from 72 to 12 and brought a forward pass from 38 ms to 34.4 ms.
-
Fixing LLM Inference Bottlenecks with Custom CUDA Kernels (Profiling)
I profile GPT-2 inference with PyTorch and explain how to interpret GPU timings, call counts, and nested operations. This first part sets up the measurements you need to decide where a fused CUDA kernel could help.
-
Curating Custom Datasets for efficient LLM training using Lance
I stream and tokenize a subset of a terabyte-scale GitHub dataset into Lance, then fetch training tokens by index. The example shows how to prepare data for a small language model without downloading the full source dataset or loading it into RAM.
-
Installing CUDA and CUDA toolkit on Ubuntu the right way
I walk through the CUDA Toolkit installation path I used on Ubuntu with NVIDIA’s own packages. The guide covers checking the driver with nvidia-smi, adding the toolkit to PATH, and verifying the compiler with nvcc.
-
Fixing reseting refresh rate on Ubuntu after reboot
My Ubuntu display kept reverting to 60 Hz after a reboot. This short troubleshooting note shows how I found the right output and mode with xrandr, then reapplied my preferred refresh rate with a startup script.
-
Making Custom Data Generators in Keras
I build a Keras Sequence that controls how inputs and targets are assembled into batches. The example shows how to pair images with themselves for an autoencoder and what to implement when your training data needs custom handling.
-
3 Way Sentiment Classification using FastAI
I train a three-class Twitter sentiment classifier with fastai, starting from a pretrained language model. The walkthrough covers dataset exploration, gradual unfreezing, and discriminative fine-tuning, reaching about 80% accuracy in the final run.
-
Graduate Admissions Data Analysis and prediction
I explore which variables correlate with graduate admissions in the dataset and compare a PyTorch model with a scikit-learn baseline. Both land near 0.92 validation R², and GPA, GRE, and TOEFL scores show the strongest associations.
-
An Interactive Data Analysis on Tweets about Disaster
I use interactive Plotly charts to compare disaster-related tweets with other tweets in a Kaggle dataset. The walkthrough looks at missing location data, class imbalance, and differences in message length and link usage before building a classifier.