A sleek notebook with code snippets and a transformer diagram.

From‑Scratch LoRA Adapter Implementation in Pure PyTorch

A hands‑on guide to implementing LoRA adapters in pure PyTorch, training only the low‑rank parameters while freezing the base model.

October 31, 2026 · 7 min · 1387 words · martinuke0
Quantized transformer attention block

From Scratch: Quantized Transformer Attention with Int4 Weights and Int8 GEMM in Pure Python

A hands-on guide to implementing efficient low-precision attention in pure Python, showcasing quantization, GEMM, and architecture design for hiring managers.

October 30, 2026 · 10 min · 1921 words · martinuke0
A sleek notebook with code snippets and transformer diagrams.

Build a Pure‑Python Transformer Encoder with RoPE and Learned KV Cache

A step‑by‑step tutorial and runnable code for a minimal transformer encoder that uses RoPE and a mutable KV cache, perfect for a portfolio CV.

October 29, 2026 · 10 min · 1986 words · martinuke0
Sliding window attention diagram

Building a Sliding Window Attention Inference Engine with Compressed KV Cache in Pure Python

This post walks through building a sliding window attention inference engine with a compressed KV cache in pure Python, providing runnable code and architectural insights for a standout portfolio project.

October 29, 2026 · 8 min · 1703 words · martinuke0
Python code representing a logits processor and sampler

From-Scratch Logits Processor and Sampler: Temperature, Top‑k, Top‑p, and Min‑p Decoding in Pure Python

A minimal, pure‑Python implementation of temperature‑scaled, top‑k, top‑p and min‑p token sampling, ready to run, test, and extend for your portfolio.

October 29, 2026 · 8 min · 1552 words · martinuke0
Feedback