I explain algorithms and AI infrastructure through familiar examples and practical decision guides. My posts move from how Transformer models process a sentence, to algorithms embedded in everyday technology, to choosing processors according to the work they perform.
I present how the Transformer works in 8 steps, tracing “Je suis étudiant” → “I am a student.”
- My walkthrough follows tokenization into IDs; embeddings plus positional signals; multi-head self-attention using softmax(QKᵀ/√d)·V; residual Add & Norm; a position-wise linear → ReLU → linear feed-forward network; repeated encoder blocks; masked decoder self-attention and cross-attention; and output generation. The output layer assigns probabilities, feeds the selected word back, and repeats until the sentence ends.
I explain that the encoder block repeats N times and that the 2017 paper used six repetitions.
I describe the model comparison this way: BERT keeps the encoder; GPT keeps the decoder; T5 uses both.
I attribute the Transformer’s effectiveness to this combination: no recurrence, so it trains in parallel; every token sees the whole context; and it scales with data.
I describe 9 algorithms that quietly run everyday technology and say people have used at least five of them before breakfast.
- I group the examples by role: Organise includes Sorting, Dijkstra, and Link Analysis; Understand includes Transformers and CNN; Protect includes RSA, Integer Factorization, and SHA-256; Shrink includes Huffman Coding. I connect them to databases and search, maps, GPT/Claude/Llama, PageRank, HTTPS, image recognition, ZIP/JPEG/MP3, and TLS/SSH/Git.
I leave the choice of a tenth algorithm open to readers, asking which one they would add as the 10th.
I argue that “Just throw more GPUs at it” is not an infrastructure strategy; modern AI runs on six kinds of processors.
- I match processors to workloads: CPUs handle operating systems, orchestration, data preparation, and application logic; GPUs suit training and high-throughput inference; TPUs suit huge tensor workloads at Google scale; NPUs run low-power INT8 / INT4 inference for on-device vision, voice, and private AI; LPUs serve real-time LLM inference; and DPUs offload data-centre networking, security, and storage I/O. Their trade-offs include parallel-math limits, GPU power and cost, cloud ties, small NPU models, LPU inference-only limits, and DPUs not running the model themselves.
I give this quick processor guide: Orchestration: CPU; Training: GPU; Tensors at scale: TPU; On-device AI: NPU; Real-time LLMs: LPU; Data-centre I/O: DPU.
My rule of thumb is to pick by workload, not by hype, while weighing latency, parallelism, power, cost, and scale.
I describe a real AI stack this way: CPUs orchestrate, GPUs or TPUs train, LPUs or GPUs serve, NPUs run on the edge, and DPUs keep the data moving.
Related: responsible ai and engineering, ai agent architecture and workflows, rag pipeline design and debugging