Abstract visualization of token sampling probabilities

Build a Pure Python LLM Decoder from Scratch: Temperature, Top-k, and Top-p Sampling

A hands-on guide to implementing temperature, top-k, and top-p sampling in pure Python, with runnable code that showcases systems engineering skills.

September 22, 2026 · 10 min · 2026 words · martinuke0
A code editor displaying a Python sampling loop with temperature and top-k parameters

Build a From-Scratch LLM Sampler: Temperature, Top-k, Top-p in Pure Python

A hands-on guide to building a pure-Python transformer model with a custom decoding loop implementing temperature, top-k, and top-p sampling — a CV-worthy project that demonstrates deep ML systems knowledge.

September 22, 2026 · 13 min · 2679 words · martinuke0
A visualization of LLM sampling distributions at different temperature settings, showing probability mass shifting from peaked to flat.

Build a From-Scratch LLM Sampler: Temperature, Top-k/Top-p, and Multinomial Sampling vs. Hugging Face

A hands-on guide to building a from-scratch LLM sampler with temperature scaling, top-k/top-p warping, and multinomial sampling, benchmarked against Hugging Face. Includes runnable code and a roadmap to production.

September 20, 2026 · 14 min · 2888 words · martinuke0
Adaptive nucleus sampler concept

Pure‑Python Adaptive Nucleus Sampler: A Portfolio Project

Implement an adaptive nucleus sampler in Python that adjusts temperature and top‑p from token entropy, demonstrating systems thinking for hiring managers.

September 17, 2026 · 6 min · 1182 words · martinuke0
A code editor showing a Python sampler class with visualization of probability distributions

Build an LLM Decoding Sampler from Scratch: A Portfolio Project That Signals Real Systems Skill

A hands-on guide to building a from-scratch LLM decoding sampler implementing temperature, top-k, top-p, and contrastive search in pure Python. Includes architecture, complete code, and a roadmap to senior-level extensions.

September 12, 2026 · 14 min · 2866 words · martinuke0
Feedback