Learn Python - Free Tutorials & AI Guides

Free Python Tutorials, AI Guides & Coding Projects

AI Inference
YOLOv5: A Source Tour of Ultralytics' Real-Time Object Detector

YOLOv5: A Source Tour of Ultralytics' Real-Time Object Detector

When YOLOv5 appeared in mid-2020, it was slightly scandalous: a “YOLOv5” with no paper behind it, built directly in PyTorch while YOLOv4 was still a Darknet project. Four years of production use later, the Ultralytics/yolov5 repository has become one of...

AI Inference
timm: A Source Tour of PyTorch Image Models

timm: A Source Tour of PyTorch Image Models

PyTorch Image Models, known to everyone simply as timm, is the library you reach for when you need a vision backbone that actually works. Started and still curated by Ross Wightman, now hosted under the Hugging Face organization, it packs...

AI Inference
Stable Diffusion: A Source Tour of the Original Latent Diffusion Code

Stable Diffusion: A Source Tour of the Original Latent Diffusion Code

Every image generator you have used in the last three years — the browser apps, the commercial APIs, the open-source forks — descends from one small research repository: CompVis/stable-diffusion. In August 2022 it shipped the weights and the reference code...

AI Inference
SentencePiece: A Source Tour of Google's Language-Agnostic Tokenizer

SentencePiece: A Source Tour of Google's Language-Agnostic Tokenizer

Ask a Llama checkpoint what “tokenization” means and it will answer in the dialect of SentencePiece. Google’s tokenizer library — a compact C++ core with Python bindings — has quietly become the substrate under an enormous slice of modern NLP:...

AI Inference
Segment Anything: A Source Tour of Meta's Promptable Vision Model

Segment Anything: A Source Tour of Meta's Promptable Vision Model

The Segment Anything Model (SAM) is Meta AI’s answer to a simple but stubborn question: can a vision model segment any object in any image, given only a hint about what to look for? Published by the facebookresearch team in...

AI Inference
PaddleOCR: A Source Tour of the Multilingual OCR Toolkit

PaddleOCR: A Source Tour of the Multilingual OCR Toolkit

Optical character recognition looks deceptively simple from the outside — an image goes in, a string comes out — but the systems that make it work reliably are chains of specialized neural networks. PaddleOCR, the OCR toolkit from Baidu’s PaddlePaddle...

AI Inference
MNN: A Source Tour of Alibaba's Mobile Inference Engine

MNN: A Source Tour of Alibaba's Mobile Inference Engine

If you have installed a shopping app from Alibaba in the last decade, odds are good that MNN ran a piece of it. MNN is the lightweight inference engine behind Taobao, Tmall, Youku, DingTalk, and dozens of other apps, covering...

AI Inference
Megatron-LM: A Source Tour of NVIDIA's Large-Scale Training Framework

Megatron-LM: A Source Tour of NVIDIA's Large-Scale Training Framework

Megatron-LM is NVIDIA’s reference implementation for training large language models on clusters of GPUs, and it is the codebase behind many of the record-setting scaling results you see in model announcements. The repository actually ships two things: Megatron-LM, a set...

AI Inference
Llama 2: A Source Tour of Meta's Reference LLM Inference Code

Llama 2: A Source Tour of Meta's Reference LLM Inference Code

When Meta released Llama 2 in July 2023, the weights grabbed the headlines, but the small Python package that shipped alongside them — meta-llama/llama — quietly became one of the most consequential pieces of inference code in modern machine learning....

AI Inference
BLIP: A Source Tour of Salesforce's Vision-Language Pretraining Model

BLIP: A Source Tour of Salesforce's Vision-Language Pretraining Model

Most multimodal papers describe their models with a diagram and leave the wiring to your imagination. BLIP — Bootstrapping Language-Image Pre-training, released by Salesforce AI Research in 2022 — is nicer than average: the whole system lives in a handful...

AI Inference
PyTorch/XLA: Inside the Bridge from Eager PyTorch to TPU Hardware

PyTorch/XLA: Inside the Bridge from Eager PyTorch to TPU Hardware

Most deep learning engineers meet PyTorch as an eager framework: every op fires a kernel the moment you call it. On a TPU, that model of execution does not work. TPUs are fed by a compiler — XLA, the Accelerated...

AI Inference
TFLite Micro: How Neural Network Inference Fits in 256 KB Without malloc

TFLite Micro: How Neural Network Inference Fits in 256 KB Without malloc

Every inference runtime we have toured in this series — TensorFlow, ONNX Runtime, llama.cpp — assumes a fat host: gigabytes of RAM, an allocator that can hand out memory at will, maybe a GPU on the side. The repo under...

AI Inference
TensorRT Source Tour: From ONNX Graph to Serialized CUDA Engine

TensorRT Source Tour: From ONNX Graph to Serialized CUDA Engine

Most deep-learning frameworks you meet day to day are executors: they take a graph, schedule its ops, and hope the kernels underneath are fast. TensorRT is a different animal. It is a compiler: it ingests a trained network, picks concrete...

AI Inference
TensorRT Model Optimizer: A Source Tour of NVIDIA's Model Compression Toolkit

TensorRT Model Optimizer: A Source Tour of NVIDIA's Model Compression Toolkit

Most inference stacks spend their lives downstream of a model. NVIDIA’s Model Optimizer — ModelOpt for short — lives upstream, where the model itself is made smaller. The repository, NVIDIA/TensorRT-Model-Optimizer on GitHub, is the source behind the nvidia-modelopt PyPI package:...

AI Inference
KerasHub Deep Dive: The Pretrained-Model Hub That Makes Keras 3 Feel Like a Model Zoo

KerasHub Deep Dive: The Pretrained-Model Hub That Makes Keras 3 Feel Like a M...

Most deep learning work in 2026 starts from a checkpoint, not from a blank model. You pick an architecture, download pretrained weights, attach a small head or a prompt, and start training. KerasHub is the keras-team’s answer to that workflow:...

AI Inference
Flax Source Tour: Inside Linen, NNX, and the Functional Heart of JAX

Flax Source Tour: Inside Linen, NNX, and the Functional Heart of JAX

Flax is Google’s neural-network library built directly on top of JAX, and it occupies a peculiar position in the deep-learning ecosystem: it is the closest thing the functional-programming world has to a household framework. Where PyTorch gives you a mutable...

AI Inference
FastChat Source Tour: The Controller-Worker Mesh Behind Chatbot Arena

FastChat Source Tour: The Controller-Worker Mesh Behind Chatbot Arena

Before Chatbot Arena became the leaderboard everyone cites in model release tweets, there had to be a machine that could host seventy models at once, shuffle anonymous battles to millions of visitors, and record every vote. That machine is FastChat,...

AI Inference
DeepSpeed-MII: A Source Tour of Microsoft's Low-Latency Inference Library

DeepSpeed-MII: A Source Tour of Microsoft's Low-Latency Inference Library

Most inference libraries make you choose between a research project and a one-liner. Microsoft’s DeepSpeed-MII, the model-serving layer of the DeepSpeed ecosystem, bets that you can have both: a four-line script to try a model, and a load-balanced, multi-replica gRPC...

AI Inference
coremltools: How Apple Compiles PyTorch Models Onto the Neural Engine

coremltools: How Apple Compiles PyTorch Models Onto the Neural Engine

If you have ever trained a network in PyTorch and then wondered how it ends up running inside an iOS app with a 40% smaller footprint and zero Python interpreter in sight, the answer is almost always coremltools. Apple’s open-source...

AI Inference
BERT: A Source Tour of Google's Original Transformer Encoder

BERT: A Source Tour of Google's Original Transformer Encoder

When Google published “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding” in October 2018, the paper landed together with a reference implementation — the google-research/bert repository. That repo is the artifact this tour reads. It is written for TensorFlow...

AI Inference
XNNPACK Source Tour: The Microkernel Library Powering Mobile Inference

XNNPACK Source Tour: The Microkernel Library Powering Mobile Inference

If you have ever run a neural network on a phone, chances are the actual arithmetic was done by XNNPACK. It is the C library that sits underneath TensorFlow Lite, ExecuTorch, and the mobile builds of other runtimes, taking care...

AI Inference
torchvision Under the Hood: transforms v2 and the C++ Ops That Power Detection

torchvision Under the Hood: transforms v2 and the C++ Ops That Power Detection

Most people treat torchvision as a convenience layer: a Resize here, a pretrained ResNet there. But if you train or deploy detection models, you are standing on a much more interesting machine. The torchvision.transforms.v2 package rebuilt augmentation around a single...

AI Inference
torchaudio Source Tour: TorchCodec I/O, Custom Autograd, and the C++/CUDA Kernels Behind Forced Alignment

torchaudio Source Tour: TorchCodec I/O, Custom Autograd, and the C++/CUDA Ker...

Most people meet torchaudio as a one-liner: torchaudio.load("clip.wav") returns a tensor and a sample rate, and that is the end of the story. Under the hood, though, the pytorch/audio repository is a fascinating case study in how a PyTorch domain...

AI Inference
Inside TensorFlow 2: Eager Execution, tf.function Tracing, and the Grappler Machine

Inside TensorFlow 2: Eager Execution, tf.function Tracing, and the Grappler M...

TensorFlow has a strange reputation problem. Ten years ago it was the framework everyone complained about: graphs, sessions, feed dictionaries, a learning curve shaped like a wall. TensorFlow 2 deleted almost all of that. There is no tf.Session anymore, no...

Watch PyShine on YouTube