Learn Python - Free Tutorials & AI Guides

Free Python Tutorials, AI Guides & Coding Projects

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

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

Watch PyShine on YouTube