ForBlog
CC BY-NC 4.0Visualizing Compressed Latents
This notebook is the source code for a VAE visualization app I created. It allows you to see how the compressed latents look like, and tweak certain parameters that produce the latents. You can explore the APP here. Works best with images whose dimensions are multiples of 8.
Working with Bytes in Python
How to create a temporary buffer in memory, and how to work with data stored there.
Tunneling from SolveIt to another Machine
This post details how one can provide SolveIt access to your local machine, thereby giving the LLM in SolveIt the context of your computer. Whilst the post focuses on macOS, the logic can be applied to other systems.
Ways to Pull Repos into LLM Context
Good context is key when working with LLMs. No matter if you're coding, writing, planning, problem solving, and whatnot. The LLM needs to know your context to help you effectively.
Building SolveIt in SolveIt
This blog post is a rendered documentation of a very, very basic re-implementation of SolveIt, using FastHTML as the web framework. The main goal of this exercise was to exercise my web development and HTMX skillz. Play with the app at this link, or watch the brief overview below.
Translating SolveIt Dialogs
In this notebook, I'll be demonstrating how one can update messages in SolveIt dialogues. Thereby also demonstrating how SolveIt dialogue messages can be translated with a LLM.
LLM Agents are Python While Loops
In this notebook, I'll be demonstrating how simple LLM agents are, that they're just LLMs in a while loop that call functions, and how to implement such a tool loop yourself using the Lisette and toolslm libraries.
Pulling Back the Curtain on VLM Attention
In this conversation, I attempted to understand how this notebook by user zjysteven visualized the attention placed on an image by a VLM. My main confusion stemmed from the two different attentions that are calculated in the notebook.
Pulling Back the Curtain on VLM Attention
I've been going through the RoboOS, RoboBrain, and RoboBrain 2.0 papers from the Beijing Academy of Artificial Intelligence (BAAI).
Most robotic solutions I've seen leave me feeeling like I'm watching yet another Jenga tower of hacks. Blocks ducktapes together for the purpose of solving the previous black's issues. All without fixing the real, fundamental issue that is the VLM.
Decomposing Problems and Working with Data will get us Working Robots
I've been going through the RoboOS, RoboBrain, and RoboBrain 2.0 papers from the Beijing Academy of Artificial Intelligence (BAAI).
Most robotic solutions I've encountered so far leave me feeling like I'm watching yet another Jenga tower of hacks. Blocks taped together for the purpose of solving the previous blocks' issues, all without fixing the actual fundamental issue, which is the VLM.
Decomposing Problems and Working with Data will get us Working Robots
I've been going through the RoboOS, RoboBrain, and RoboBrain 2.0 papers from the Beijing Academy of Artificial Intelligence (BAAI).
Most robotic solutions I've seen leave me feeeling like I'm watching yet another Jenga tower of hacks. Blocks ducktapes together for the purpose of solving the previous black's issues. All without fixing the real, fundamental issue that is the VLM.
Current Ideas in Spatial Understanding
I went through a bunch of papers relating to enhancing VLM spatial understanding. Here, I've extracted the main ideas that have been explored. The worthiness/effectiveness of each idea has not been evaluated.
The State of Pose Estimation
This post is an annotated presentation I gave at my university's multimodal intelligence lab. I'm a newcomber to general purpose robotics, so I had a different perspective going in.
How Deepseek R1 was Trained
In a nutshell, R1-Zero is a model created purely through reinforcement learning (RL), with Group Relative Policy Optmization (GRPO) as the policy. R1 is a model created with a combination of multiple RL and supervised finetuning (SFT) stages.
What I Learned in my Second and Third Internships
I recently completed my second and third internships. These were quite hands on, and involved tasks such as finetuning LLMs to generate Cantonese lyrics to the topic and tones specified.
Implementing a Neural Network from Scratch
In this notebook, I implement a neural network from scratch and iteratively reimplement with PyTorch. That is, I will implement each element of the training and inference process from scratch, before using the corresponding PyTorch element.
A Brief Token on Tokenizer
Tokenization is the process whereby text is given a numerical representation. Sentences are split into components known as tokens. These tokens represent numerical values that language models can work with.
Backpropagation Explained using English Words*
*Most words are in English.
Backpropagation sounds and looks daunting. It doesn't need to be. In fact, backpropagation is really a fancy word for the chain rule. Implementing backpropagation is implementing one big fat chain rule equation.
Implementing and Optimizing Meanshift Clustering
Meanshift clustering is a technique for unsupervised learning. Given a bunch of data, this algorithm will figure by itself what groups the data should be sorted into. It does this by iteratively moving all data points until they converge.
Einstein Summation Notation, Intuitively
An alternative way to write matrix operations.
(Un)successfully Implementing DiffEdit
An attempt at implementing the DiffEdit paper.
In this notebook, I attempt to implement the DiffEdit paper: a diffusion algorithm that allows one to replace the subject of an image with another subject, via a mere text prompt.
Iterators and Generators
Iterators and generators shown by example.
Implementing Stable Diffusion from its Components
In this notebook, we'll implement stable diffusion from its various components with Hugging Face's diffusers library.
Stable Diffusion, Summarized
A concise, high level overview on the mechanisms of stable diffusion.
My Musings through Stable Diffusion
Exploring the various knobs and dials of stable diffusion.
Converting Audio to Images
Here, I describe how one can create images from audio, by visualizing them as spectrograms, with PyTorch's torchaudio module.
Using M-Series Macs with PyTorch
If you have one of those fancy Macs with an M-Series chip (M1/M2, etc.), here is how to make use of their GPU in PyTorch for increased performance.
Adding Subscriptions to a Quarto Site
- Salman Naqvi - Isaac FlathThree wyas to implement subscriptions in your Quarto website.
The Quarto Documentation describes how to implement website subscriptions at a surface level.
AI Models in a Nutshell
This nutshell contains very little math! Artificial Intelligence. Machine Learning. Neural Networks. Deep Learning. Fancy Words. Deceptively Simple.
Detecting Floods for Disaster Relief
The model that will be created in this notebook can detect whether an area shown in an image is flooded or not.
Data Matters More than the Model
I recently created a car classifier that classified cars into their respective brands.
Despite having almost 5000 images in my training set, 100 layers in my model, and 20 epochs, I still had an error rate of 17.4%.
Reading a Confusion Matrix
A to the point guide about reading a confusion matrix.
My First AI Model
My first ever AI model that can tell apart grizzly bears, black bears, or teddy bears.
How to Look at Predictions
A different way to look at data, models, and predictions.