Cloud motion prediction v1

My final year project is Chase-the-cloud: Cloud motion prediction using INSAT 3DR data. And, it’s been some time since I’ve sat down to write about what I have been working on. And to be fair, this project has made me question my life’s existence more than any other project, like ever. So, let’s talk about it. To make you interested in what we’re going to be talking about, here’s a picture of a trained model’s prediction: ...

text-to-image retrieval

With the advancements in AI, there have been a lot of problems that have seen ideas from statistics and math applied to them. One of them is retrieval. We can broadly look at retrieval as: same modal retrieval cross modal retrieval What I want to discuss today is different ways we can embed information in a vector space from one modality and use a different modality to access that information. ...

LSTM from scratch in PyTorch

Today we’re looking at LSTM (Long Short Term Memory) neural networks. The standard for sequential data was RNNs (Recurrent Neural Networks). RNNs had an issue. They were good at remembering things, but they… well, they kept forgetting too! They had what we call a vanishing gradient problem. Small example to guide your visual senses: The spine of the problem is, when the gradients flow backwards, they get multiplied. And say if that number that we’re multiplying with is smaller - which a lot of times the gradients are, then at some point the gradient will be close to zero and boom you’ve lost signal. At each timestep, the gradient gets multiplied by the derivative of the activation function (like sigmoid) — a number that maxes out at 0.25. Ten steps back, your gradient is 0.25¹⁰ — essentially zero. ...

May 22, 2026 · 5 min

From scratch Quantization in neural networks

“compute solves a lot of problem” If we just had enough compute, a lot of the problems that we experience today would be solved. Loger contexts, smarter weights and biases, etc. But right now we don’t have infinite compute. That’s the sad reality. So we optimize. Quantization is our attempt at just that. history Reference: https://arxiv.org/abs/2103.13630 Quantization is a way of compression. It is a process of mapping a large set of continous or high-precision values into smaller discrete set of values. ...

April 7, 2026 · 10 min

How PolyBlocks lowers tensor programs for GPUs

Recently, at PyTorch Day India in Bangalore, I saw a talk on AI compilers. Here is the link: YouTube Picture from the session I didn't know there were Indian labs working on the AI compiler problem. But it turns out there are. PolyMage Labs is an IISc lab in Bangalore working on PolyBlocks. Since AI is moving fast, there is a clear need for efficient AI compilers that can lower high-level tensor programs to IR for GPUs, TPUs, and other backends. PolyBlocks minimizes dependency on external vendor libraries like cuBLAS/cuDNN while still generating highly optimized code via compiler-driven transformations and tiling. ...

What torch.compile actually does under the hood

Before we see what torch.compile does, we should first understand pytorch’s default mode and why we’d ever want to move away from it. PyTorch runs in eager mode by default. Think of it as PyTorch reading and executing your code op by op, as Python encounters each line. It’s immediate, flexible, and great for prototyping — but it pays a Python interpreter cost on every single operation. For production and deployment, we want to skip that cost. That’s where compilation comes in. ...

Backpropagation from scratch

I’m assuming you understand the basic idea of neural networks. This essay focuses purely on the backpropagation algorithm itself. What is Backpropagation? Backpropagation is an algorithm that computes how much each weight and bias should change to reduce the loss. It tells us not just whether parameters should go up or down, but by how much, based on their actual impact on the loss function. We use math to figure out that. ...

January 30, 2026 · 7 min