Learn Python - Free Tutorials & AI Guides

Free Python Tutorials, AI Guides & Coding Projects

AI Inference
Ultralytics Source Tour: One Codebase for Detect, Segment, Pose, OBB, and Classify

Ultralytics Source Tour: One Codebase for Detect, Segment, Pose, OBB, and Cla...

Ultralytics 8.x is the codebase behind YOLOv8, YOLOv9, YOLOv10, and YOLO11 — a single pip install ultralytics package that unified what used to be a family of separate YOLO releases. Instead of one repository per task, the 8.x reorganization folded...

AI Inference
TorchAO Source Tour: How PyTorch's Quantization Library Actually Works

TorchAO Source Tour: How PyTorch's Quantization Library Actually Works

If you have ever run a quantized LLM through plain PyTorch and wondered where the speed-up actually comes from, TorchAO is the answer hiding in plain sight. TorchAO (the torchao pip package, developed in the pytorch/ao repository) is PyTorch’s native...

AI Inference
Stable-Baselines3 Source Tour: How PyTorch Reinforcement Learning Is Wired

Stable-Baselines3 Source Tour: How PyTorch Reinforcement Learning Is Wired

Reinforcement learning has a reputation for being hard to implement correctly. Small details — how advantage estimates are normalized, when a target network copies weights, how entropy is folded into the objective — decide whether an agent learns or silently...

AI Inference
spaCy Source Tour: How the Industrial NLP Library Fits Together

spaCy Source Tour: How the Industrial NLP Library Fits Together

spaCy needs little introduction. It is the industrial-strength natural language processing library from Explosion, written in a deliberate mix of Python and Cython, and it has become the default choice when you need tokenization, part-of-speech tagging, dependency parsing, named entity...

AI Inference
scikit-learn Source Tour: The Estimator Contract Behind a Decade of Machine Learning

scikit-learn Source Tour: The Estimator Contract Behind a Decade of Machine L...

If you have trained a classifier in Python in the last decade, chances are you did it through scikit-learn. Born as a Google Summer of Code project in 2007 and shepherded since by a famously careful maintainer team, the library...

AI Inference
SAM 2 Source Tour: How Streaming Memory Powers Promptable Video Segmentation

SAM 2 Source Tour: How Streaming Memory Powers Promptable Video Segmentation

Segment Anything Model 2, released by Meta’s FAIR lab as the facebookresearch/sam2 repository, is the successor to the original Segment Anything model, and its most important idea is unification: one promptable segmentation model handles both still images and video. You...

AI Inference
PyTorch Geometric: A Source Tour of the Graph Neural Network Library

PyTorch Geometric: A Source Tour of the Graph Neural Network Library

Graph neural networks occupy a peculiar spot in deep learning research: everyone agrees they matter, yet the mechanics of a GNN layer feel far more opaque than those of a convolution or a transformer block. Images come with a fixed...

AI Inference
MMDetection Source Tour: How OpenMMLab's Detection Toolbox Really Fits Together

MMDetection Source Tour: How OpenMMLab's Detection Toolbox Really Fits Together

MMDetection, maintained under the OpenMMLab umbrella, is probably the most complete open-source toolbox for object detection research. It ships well over a hundred detector recipes — from the classic Faster R-CNN and Mask R-CNN families, through Cascade R-CNN and the...

AI Inference
Gymnasium: A Source Tour of the Reinforcement Learning API That Replaced Gym

Gymnasium: A Source Tour of the Reinforcement Learning API That Replaced Gym

Every reinforcement learning result you have ever read about, from an agent learning to balance a pole to a policy that lands a lunar module, rests on the same two method calls: env.reset() and env.step(action). Gymnasium, maintained by the Farama...

AI Inference
AutoAWQ Source Tour: Activation-Aware 4-Bit Quantization for LLMs

AutoAWQ Source Tour: Activation-Aware 4-Bit Quantization for LLMs

If you have ever loaded a 4-bit AWQ checkpoint and wondered what actually happened to the weights, the answer lives in one repository: casper-hansen/AutoAWQ. It is the reference implementation of the AWQ paper (Activation-aware Weight Quantization), the method that made...

AI Inference
WhisperX: Batched Whisper, wav2vec2 Alignment and Diarization From the Source Up

WhisperX: Batched Whisper, wav2vec2 Alignment and Diarization From the Source Up

WhisperX is one of those repositories that looks small from the outside — a Python package and a CLI called whisperx — but underneath it coordinates three very different machine learning models against the same audio buffer. A faster-whisper CTranslate2...

AI Inference
TensorFlow Serving: A Source Tour of Google's Model Server

TensorFlow Serving: A Source Tour of Google's Model Server

TensorFlow Serving is Google’s open-source model server: the piece of infrastructure that takes a trained TensorFlow model off a researcher’s laptop and makes it answer real network traffic, reliably, at low latency. You export a SavedModel into a versioned directory,...

AI Inference
Swin Transformer: A Source Tour of Microsoft's Hierarchical Vision Backbone

Swin Transformer: A Source Tour of Microsoft's Hierarchical Vision Backbone

When the Swin Transformer landed in 2021, most vision transformers were still computing attention over every pair of tokens in the image — quadratic cost, single-scale feature maps, and an awkward fit for dense prediction tasks that expect pyramid-shaped backbones....

AI Inference
pyannote.audio source tour: the PyTorch core behind speaker diarization

pyannote.audio source tour: the PyTorch core behind speaker diarization

If you have ever asked “who spoke when” about a meeting recording, there is a good chance pyannote.audio did the heavy lifting. It is the open-source Python toolkit behind many production diarization systems, a long-running entry in the Hugging Face...

AI Inference
Piper: A Tiny C++ Core That Speaks for Itself

Piper: A Tiny C++ Core That Speaks for Itself

Piper is a fast, fully local neural text-to-speech system from the Rhasspy project, the same community behind popular offline voice tooling for home automation. You hand it a sentence on standard input, it hands you a WAV file a fraction...

AI Inference
MediaPipe: A Source Tour of Google's On-Device ML Framework

MediaPipe: A Source Tour of Google's On-Device ML Framework

If you have ever pointed a phone camera at your own hand and watched a wireframe skeleton snap to your knuckles in real time, you have almost certainly met MediaPipe. The framework started life inside Google as a C++ engine...

AI Inference
GPT-2 at the Source: OpenAI's Original Next-Token Predictor, Line by Line

GPT-2 at the Source: OpenAI's Original Next-Token Predictor, Line by Line

In February 2019, OpenAI published a short paper with a long shadow: “Language Models are Unsupervised Multitask Learners.” The model it described, GPT-2, was trained on WebText, a large scrape of outbound Reddit links, and it demonstrated something uncanny for...

AI Inference
Detectron2: A Source Tour of Meta's Detection Platform

Detectron2: A Source Tour of Meta's Detection Platform

Detectron2 is Meta AI Research’s next-generation library for object detection and segmentation, and it is the direct successor of the original Detectron and of maskrcnn-benchmark. Written in PyTorch, it has carried a whole generation of computer vision research: Faster and...

AI Inference
Hugging Face Datasets Source Tour: From load_dataset to Arrow Shards

Hugging Face Datasets Source Tour: From load_dataset to Arrow Shards

If you have trained a model on a public corpus in the last five years, the odds are very high that the data reached you through huggingface/datasets. The library is the de facto data layer of the open-source model ecosystem:...

AI Inference
MosaicML Composer: A Source Tour of Event-Driven Speedup Training

MosaicML Composer: A Source Tour of Event-Driven Speedup Training

MosaicML composer is an open-source PyTorch training library built around one idea: if you can observe training as a sequence of well-defined moments, you can intervene at those moments to make models train faster without changing the math of your...

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:...

Watch PyShine on YouTube