Category: PyTorch

LLMs Scratch #004: Mixture of Experts (MoE) Models: The Architecture Powering 2025’s Best AI Systems

🎯 What You’ll Learn This comprehensive guide takes you from MoE fundamentals to state-of-the-art implementations like DeepSeek V3. You’ll understand why sparse architectures outperform dense models at every compute scale, master the critical routing mechanisms that determine expert selection, and learn the training techniques that make these complex systems work. We’ll examine real benchmark results from Llama 4, Grok, and DeepSeek, explore load balancing challenges and solutions, and walk through the complete evolution of DeepSeek’s…
Read more

#027 R-CNN, Fast R-CNN, and Faster R-CNN explained with a demonstration in PyTorch

Highlights: Object detection is one of the most important tasks in Computer Vision. In this post, we will give an overview of one of the most influential families of object detection algorithms: R-CNN, Fast R-CNN, and Faster R-CNN. We will highlight the main novelties and improvements for each of them.  Finally, we will focus on the Faster R-CNN and explore the code and how it can be used in PyTorch.  Tutorial Overview: 1. Introduction to…
Read more

#004 Advanced Computer Vision – YOLO Object Detection

Highlights. Hello and welcome. In this post, we are going to talk about one of the most popular algorithms for object detection called the Yolo object detection algorithm.  We will cover the basic theory behind YOLO object detection [1], its benefits, and how this algorithm has evolved over the last couple of years. Finally, we will examine some real-life applications of YOLO object detection, more specifically, we will explain how to use YOLO for detecting…
Read more

#007 How to implement GAN Hacks to Train Stable Models?

Highlights: In this post, we are going to learn several hacks that we can use to train stable GAN models. First, we are going to provide a quick recap of the GANs theory, and then, we are going to talk about challenges when training GANs. After that, we will provide solutions for these challenges in Python. So, let’s begin with our post. Tutorial Overview: Challenges when training GANs Heuristics for Training Stable GANs Architecture for guidelines…
Read more

#006 GANs – How to Develop a 1D GAN from Scratch

Highlight: In this post, we will briefly review the theory behind Generative Adversarial Networks and then we will learn to implement that knowledge in PyTorch. We will actually build our first GAN from scratch so that all the details are demystified. Initially, we will start with generator modeling or faking a simple 1D function (sine wave). In the later posts, we will build on the fundamental GAN architecture presented in this post.  Tutorial Overview: GAN…
Read more