Abstract visualization of a KV cache with tokens being selectively retained and evicted by a learned importance scorer

Build a Learnable Token-Importance KV Cache for LLM Inference

A hands-on build guide for a learnable token-importance KV cache that optimizes LLM inference memory. Includes real PyTorch code, architecture diagrams, and a roadmap to production-grade extensions.

September 13, 2026 · 14 min · 2899 words · martinuke0
Neural network weights and code editor representing QLoRA fine‑tuning.

Hands-On Build Guide: QLoRA Fine‑Tuner From Scratch in PyTorch with NF4 Quantization and LoRA Merging

A step‑by‑step guide to training a quantized LLaMA‑style model with QLoRA, merging LoRA adapters, and packaging the result as a portable CV asset.

September 11, 2026 · 7 min · 1333 words · martinuke0
LoRA adapter illustration

Build a LoRA Adapter Layer from Scratch in PyTorch

A hands‑on guide to building a LoRA adapter layer in pure PyTorch, with complete code, merge/unmerge, and tips for turning the project into a CV‑standing side project.

September 10, 2026 · 7 min · 1439 words · martinuke0
PyTorch code and neural network architecture diagram

Building a Multi-Head Self-Attention Block with RoPE and ALiBi from Scratch

A hands-on guide to building a multi-head self-attention block with RoPE and ALiBi from scratch, signaling advanced ML and systems engineering skills to hiring managers.

September 10, 2026 · 9 min · 1903 words · martinuke0
Abstract illustration of a neural network with routing switches.

Switch Transformer-Style Sparse MoE Layer from Scratch in PyTorch

Implement a Switch Transformer‑style sparse mixture‑of‑experts layer in PyTorch, complete with differentiable routing, capacity limits, and load‑balancing loss.

September 10, 2026 · 5 min · 974 words · martinuke0
Feedback