Block-tiled attention computation showing memory access patterns across query, key, and value matrices.

Building Flash Attention From Scratch in NumPy: A CV-Grade Side Project

A complete, runnable walkthrough of implementing flash attention from scratch in NumPy, including online softmax, block tiling, causal masking, and correctness checks — designed as a CV-worthy systems project.

September 5, 2026 · 13 min · 2743 words · martinuke0
Abstract visualization of attention weights flowing through a transformer.

Language Models Can Now Control Their Own Attention

New techniques let language models decide for themselves where to attend, cutting inference cost without retraining. We break down how gating, sparse kernels, and self-reflective decoding work in production systems.

September 5, 2026 · 10 min · 2048 words · martinuke0
Terminal screenshot of a fine-tuning training run showing loss curves.

Fine-Tuning a Small LLM: A Hands-On Experiment

A working engineer’s journal of fine-tuning a small open-source LLM with LoRA on a custom dataset — the full pipeline, the surprises, and the measurable results.

September 5, 2026 · 9 min · 1816 words · martinuke0
Diagram of tiled attention matrix blocks flowing through online softmax accumulation.

Building a FlashAttention-2 Forward Kernel in Pure NumPy

TL;DR — FlashAttention-2 is an IO-aware attention algorithm that fuses the softmax and matrix multiply into tiled CUDA kernels. We rebuild the forward pass from scratch in pure NumPy: blocking the QKV matrices into tiles, running a streaming softmax per block, and rescaling outputs online. The result is a runnable, testable side project that demonstrates memory-hierarchy thinking, numerical stability, and GPU-style programming patterns — exactly what hiring managers look for on a CV. ...

September 5, 2026 · 13 min · 2609 words · martinuke0
Abstract diagram of a mixture-of-experts router routing tokens to multiple expert networks.

Build a Mixture-of-Experts Router From Scratch in PyTorch

A portfolio-grade project: a pure PyTorch mixture-of-experts router with top-k gating, expert load-balancing loss, and Switch-style capacity factors — with runnable code, tests, and a roadmap to senior-level extensions.

September 5, 2026 · 15 min · 3051 words · martinuke0
Feedback