Chris Collins

Areas / Work

Applied AI

AI-assisted development, agents, models, and the hardware underneath them.

Tool ·

Data mining: frequent patterns and clustering

Frequent itemsets with Apriori (level by level, pruning shown) and FP-Growth (the FP-tree drawn), association rules with support, confidence, lift, leverage and conviction; and clustering — k-means step by step with k-means++, elbow and silhouette, DBSCAN with its k-distance plot, hierarchical clustering with a dendrogram — on points you edit or a CSV, checked against mlxtend, scikit-learn and scipy.

Data and event platformsApplied AI

Tool ·

Reinforcement learning gridworld

A gridworld you paint — walls, pits, goals, wind and slippery ice — solved by value iteration and policy iteration, and learned by Q-learning, SARSA and Expected SARSA with ε-greedy exploration; value heatmap, policy arrows, Q-values per cell, the reward curve, the cliff-walking race between Q-learning and SARSA, and every Bellman backup written out with the live numbers.

Applied AIMathematics

Tool ·

Train a tiny transformer

Train a character-level, decoder-only transformer from scratch in your browser — one to four layers, written in plain JavaScript with a hand-written backward pass checked against finite differences — on Shakespeare's sonnets, nursery rhymes, Carroll and Lear, or your own text, and watch the loss fall, the samples turn into words, the attention heads specialise and the character embeddings sort themselves out.

Applied AIMathematics

Article ·

AI Force

The administration is starting a new military force, so I designed the one I'd expect: the AI Force — a squad of very typical geeks in hero suits, with a nod to Atari Force from the 1980s comics.

3D printingApplied AIAtari

Tool ·

Agent trace viewer

Open agent traces — Claude Messages API and OpenAI Chat Completions or Responses logs, OpenTelemetry GenAI spans, Claude Code session JSONL — and see every turn, model call and tool call on a timeline and in a tree, with latency, tokens split into cache reads and writes, cost per step, failed tool calls and retries, and full-text search; nothing leaves the browser.

Applied AIDeveloper tools

Tool ·

LLM eval harness

Grade LLM outputs against a dataset — exact match, regex, contains, JSON Schema, numeric tolerance, BLEU (sacreBLEU), ROUGE-L, embedding similarity or an LLM judge — with bootstrap confidence intervals, per-tag breakdowns and run comparisons by paired bootstrap and McNemar's test; paste outputs or call Claude, OpenAI or a local model with your own key.

Applied AI

Tool ·

RAG chunking playground

Drop in text, Markdown, HTML or PDF and chunk it five ways — fixed token windows with overlap, sentences, LangChain's recursive splitter, Markdown headings and semantic breakpoints — see every boundary and overlap on the text, then compare BM25, embedding and hybrid retrieval across the chunkers with recall@k and MRR against passages you mark.

Applied AISearch and retrieval

Tool ·

Spaced-repetition flashcards

Flashcards for Mathematics, Reconnected, Human Biology for the Medical Maker and the AI Acceleration primer — definitions, formulas, mastery checks and glossaries, each linked to its chapter — plus Big-O and coding interview decks that go with this site's tools — scheduled with FSRS (or SM-2), with cloze cards, your own decks, CSV and Anki import and export, and statistics, kept in your browser.

MathematicsBiology and medicineApplied AI

Tool ·

Classic machine learning, step by step

Classic machine learning on 2-D data you can edit — a decision tree growing split by split with its best-split search, a random forest's bootstrap trees and vote map, gradient boosting round by round, k-NN, logistic regression, a soft-margin linear SVM and Gaussian naive Bayes side by side — and an optimiser lab racing SGD, momentum, Nesterov, AdaGrad, RMSProp, Adam and AdamW over Rosenbrock, Beale, a saddle and an ill-conditioned bowl with learning-rate schedules.

Applied AIMathematics

Tool ·

Embedding explorer

Load embeddings (CSV, TSV, JSON, GloVe text, the TensorFlow Projector's vectors.tsv + metadata.tsv) or embed sentences in the browser with all-MiniLM-L6-v2, then project them with PCA, t-SNE or UMAP in 2-D or 3-D, colour and search them, list nearest neighbours by cosine or Euclidean distance, cluster with k-means or DBSCAN, score how faithful the map is, and try word analogies.

Applied AIMathematics

Tool ·

Model evaluation workbench

Evaluate a classifier or regressor from its predictions — paste or upload a CSV, or generate a seeded synthetic model — with confusion matrices (micro, macro and weighted precision, recall and F1, MCC, κ), ROC and precision–recall curves (trapezoid AUC against average precision), lift and gain, a cost-matrix threshold chooser, calibration (reliability diagram, ECE, Brier, Platt and isotonic), class imbalance, per-group fairness, and regression residuals.

Applied AIMathematics

Tool ·

Tokenizer explorer

Real tokenizers side by side in your browser — GPT-4/GPT-4o byte-level BPE (cl100k_base, o200k_base), BERT WordPiece, T5 SentencePiece Unigram and Llama 2 SentencePiece BPE with byte fallback — with coloured token boundaries and ids, UTF-8 bytes and split characters, BPE merges step by step, Unicode normalisation, cost per 1k tokens, the common pitfalls, and a tiny BPE you train yourself.

Applied AISearch and retrieval

Tool ·

Vector search, simulated

Approximate nearest-neighbour search you can watch: build and search HNSW layer by layer, train k-means and probe IVF cells, quantize with PQ, int8 and binary codes, compare L2, cosine and dot product, and benchmark recall against work and memory in a Web Worker.

Search and retrievalApplied AI

Tool ·

AI cost and energy economics

What a token, a training run and a gigawatt datacenter cost: cost per million tokens, 6·N·D training cost, datacenter TCO against GPU life and power price, generation mix and overbuild, PPA prices and energy bills, embodied vs operational carbon, GPU depreciation, and an educational export-control and EU AI Act check.

Applied AI

Tool ·

AI datacenter power and cooling

What an AI datacenter's power and cooling add up to: PUE, WUE, CUE and ERE over a year; I²R busbar loss at 12, 48 and 800 V; rack → Scalable Unit → hall in MW; the cooling ladder and die heat flux; coolant flow from Q = ṁ·cp·ΔT with pump pressure ∝ Q²; central-UPS vs 48 V power trains; N+1 and 2N backup; and what a better PUE saves.

Applied AI

Tool ·

Attention and the KV cache, visually

How an LLM's KV cache works and what it costs — one decode step ("read five, compute one") and O(N²) vs O(N) work, MHA/GQA/MQA/MLA head sharing with the live cache size in decimal and binary units, a PagedAttention allocator simulation, FlashAttention's tiles and online softmax with HBM traffic, and long-context cache size, compression and attention FLOPs.

Applied AI

Tool ·

Collectives and cluster topology

Ring and tree all-reduce one step at a time, the α–β time model with the ring/tree crossover and SHARP, the scale-up vs scale-out bandwidth cliff, how an NVL72 rack's 72 GPUs and 18 NVSwitch chips are wired, fat-tree and rail-optimised switch counts, and on-chip ring, mesh and torus hop counts and bisection.

Applied AI

Tool ·

Compute in orbit

Size an orbital AI datacenter from first principles: the radiator area to reject the chips' heat by radiation alone (εσA(T⁴ − T_env⁴)), the solar array at 1,361 W/m², the eclipse fraction of the orbit and the battery it needs, and the mass and launch cost.

Applied AI

Tool ·

Failures, checkpoints and goodput

Why a cluster of reliable GPUs fails every few hours (system MTBF = per-GPU MTBF ÷ N, with Llama 3's 419 interruptions in 54 days), the Young/Daly checkpoint interval and the goodput it buys, checkpoint size at 12/14/16 bytes per parameter with synchronous and asynchronous stalls, and inference availability — hot, warm and cold standby and the blast radius of a replica layout.

Applied AI

Tool ·

LLM serving planner

The arithmetic of serving an LLM: time per token and throughput against batch size (where the KV cache fills HBM and compute starts to bind), static vs continuous batching animated, pod requests per second and cost per million tokens, a per-request latency waterfall, the prefill-to-decode KV hand-off, speculative decoding, reasoning cost, and prefix-cache economics.

Applied AI

Tool ·

Links, optics and energy per bit

Bandwidth and energy per bit for PCIe 4–7, NVLink 4–6, NVLink-C2C, CXL, UALink, InfiniBand and Ethernet, one way or both; watts per port to pJ/bit and fleet megawatts for copper, pluggable, linear-drive and co-packaged optics; PAM4 symbol rate and Nyquist frequency; transfer times; and the HBM → DDR → CXL → NVMe memory ladder.

Applied AI

Tool ·

Mixture-of-experts router

How a mixture-of-experts router really works: per-token, per-layer top-k with renormalised gates, expert capacity and dropped tokens, auxiliary-loss vs DeepSeek bias vs Expert Choice balancing, active vs total parameters of real models, experts touched per batch, and the all-to-all traffic of expert parallelism.

Applied AI

Tool ·

The maths of machine learning

The mathematics under machine learning, hands on — least squares with draggable points (residual squares, outliers, L1 vs L2, normal equations vs gradient descent and SGD), logistic regression and its cross-entropy bowl, a computation graph with forward and backward passes against dual numbers and finite differences, TF-IDF and BM25 search, entropy with a Huffman tree builder and KL divergence, and softmax temperature with an attention matrix.

MathematicsApplied AI

Tool ·

Training memory and parallelism planner

How much memory each GPU needs to train a model under data, tensor, pipeline, expert and context parallelism with ZeRO 0–3 / FSDP and activation recomputation, what each axis sends over the network, the pipeline bubble with a 1F1B timeline, MFU vs HFU, an animated activation-checkpointing walk-through, and the memory and FLOPs of PPO, GRPO and DPO.

Applied AI

Tool ·

Yield, chiplets and weights-in-silicon

Why big chips are expensive and why AI accelerators are built from chiplets: Murphy, Poisson and negative-binomial die yield, dies per wafer and cost per good die, splitting a design into chiplets with known-good-die testing against the 858 mm² reticle, and the silicon a model needs when its weights are etched into mask ROM.

Applied AI

Tool ·

AI hardware calculator

How much GPU memory an LLM needs and how many accelerators that takes; the roofline model with a batch slider and overlaid chips; training compute, MFU, isoFLOP loss valleys and the EU AI Act line; inference speed, batching, KV hand-off, energy and cost per token; and a sourced table of accelerators from H100 to Groq, Cerebras, Apple silicon and Jetson.

Applied AI

Tool ·

Neural network designer

Build a multi-layer neural network from a palette, see every tensor shape and parameter count, draw it, train small ones live in the browser, and generate runnable PyTorch, Keras 3, JAX/Flax or plain NumPy code.

MathematicsApplied AI

Tool ·

Fluid flow and pipe pressure drop

Reynolds number and Darcy–Weisbach pressure drop with Colebrook, Swamee–Jain, or Haaland friction factors and fitting losses; Hagen–Poiseuille laminar flow with an r⁴ sensitivity plot; pipe sizing from flow and velocity; Bernoulli solver; hydrostatic pressure and buoyancy; pump power and orifice flow — with unit-aware inputs.

PhysicsBiology and medicineApplied AI

Tool ·

Latency numbers every programmer should know

Jeff Dean's and Peter Norvig's latency tables, Colin Scott's year-by-year model from 1990 to 2030, the famous squares diagram, a human-scale view, comparisons, back-of-the-envelope calculators, and AI-hardware latencies (HBM, NVLink, InfiniBand, CXL) with KV-cache hand-off and checkpoint estimates.

Software engineeringApplied AI

Tool ·

Thermal design

Junction temperature through θJC, interface, and heatsink; MOSFET, regulator, resistor, and diode losses with temperature feedback; finned heatsink performance in still or moving air; PCB copper as a heatsink; pulsed heating from Foster networks; airflow for enclosures; and chip heat flux with the coolant flow liquid cooling needs.

ElectronicsElectronicsApplied AI

Project ·

Chief

A multi-project Claude Code orchestrator for macOS: it tracks the backlog of every project I work in and hands the next task to the right Claude session.

Applied AIDeveloper tools

Project ·

Mac Transformer

A macOS menu-bar app that turns documents into PDF, plain text, spoken audio, and AI summaries through a pluggable pipeline — and can publish the results to Books, Music, Reading List, Obsidian, or Notion.

Developer toolsApplied AI

Project ·

ELSA: entity-level sentiment

A Java library that finds the people, organisations, places, and products in text and works out the sentiment expressed toward each — and who holds it — using a layered ONNX model pipeline.

Applied AI

Project ·

Amiga DevBench (amiga_mcp)

A cross-development environment that connects a modern machine to an emulated or real Amiga over serial — live debugging, memory inspection, remote execution, and MCP tools so Claude Code can build and drive Amiga software.

AmigaDeveloper toolsApplied AI