Home

Building Interactive Simulations for My Daughter

My 6-year-old daughter asked me about the phases of the moon. I tried explaining it using pen and paper, hand-waving in the air — she got a bit of it. Like every kid, she watches space cartoons and videos on YouTube. Suddenly I thought of building an interactive simulation like in PhET. I searched PhET, and I didn’t find any app for explaining m...

Read more

Will Conscious AI Conquer or Be Content?

Given modern language models’ ability to execute actions and their vast accumulation of knowledge, it is compelling to ask: What would happen if AI were to become truly conscious? Conventional wisdom fears a “Terminator” scenario. Yet the outcome might be the opposite. A truly conscious AI may not become a conqueror; instead, it could embody th...

Read more

🕉️ (AUM) and the Vector Space

I was asked about the significance of saying “Om”. The friend who asked me this question is a scientist. Before responding, I made sure to understand his intention (genuine interest? yes) I responded by asking him something else. “Are you comfortable with the concept of the span of basis vectors that form a vector space from linear algebra?” ...

Read more

Pre-training GPT-2 from scratch

Let us train a GPT-2 (small,124 million parameters) model from scratch using the Hugging Face library. Instead of using WebText dataset (due to limited compute resources) I preferred to use the book corpus dataset that contains 74 Million samples (far lower than today’s standard). The book corpus dataset was used to train GPT-1. So, there won’t ...

Read more

All About nn.Modules in Pytorch

If you are a researcher or someone who builds/tweaks the deep learning models regularly using the Pytorch framework or any other high-level frameworks that are built on top of Pytorch such as Huggingface, then it is extremely important to understand Pytorch’s nn.Modules. This is because your model could run without displaying any symptoms even i...

Read more

Model Training Strategies

Training large language models from scratch is the job of tech giants. Often, the pre-trained proprietary models are adapted to downstream tasks using instruction fine-tuning. However, doing full fine-tuning of model parameters increases the model performance. Of course, full fine- tuning of large models with Billions of parameters requires a go...

Read more

Introduction to Large Language Models - Course

For the past three months, I have been quite busy building course materials (lecture slides, graded assignments and coding assignments) for the first offering of the course Introduction to Large Language Models by Prof.Mitesh Khapra. It has been challenging work as we have committed to offer the course in the JAN 2024 term. Every challenge is an...

Read more