Python token sampler illustration

Hands‑On Build Guide: Pure‑Python Token Sampler with Temperature, Top‑k, and Nucleus Sampling

A step‑by‑step guide to building a runnable Python token sampler with temperature, top‑k, and nucleus sampling, perfect for a CV demo.

October 14, 2026 · 7 min · 1434 words · martinuke0
A diagram of a sampler pipeline

Building a Pure-Python Top-p/Top-k Sampler with Temperature Scaling for LLM Logits

This post walks through building a pure-Python top-p/top-k sampler with temperature scaling, providing runnable code and a roadmap for productionizing it.

October 14, 2026 · 7 min · 1299 words · martinuke0
A clean visualization of probability distributions after different decoding strategies

From Scratch Decoding: Building a Pure-Python Sampler for Transformer Logits

A hands-on guide to building a pure-Python sampler for transformer logits, covering temperature scaling, top-k, top-p, and typical-p decoding from scratch.

October 11, 2026 · 9 min · 1860 words · martinuke0
Python code visualizing token probability distributions and nucleus sampling

Pure-Python Top-P Nucleus Sampler with Adaptive Temperature Scheduling

A complete build guide for a pure-Python top-p nucleus sampler with adaptive temperature scheduling and token probability tools, ready to run and extend.

September 28, 2026 · 8 min · 1647 words · martinuke0
A Python code editor displaying sampling probability distributions and logits on a dark terminal.

Building a Production-Grade Sampling Engine in Pure Python

A hands-on guide to building a deterministic sampling engine in pure Python, covering temperature, top-k, top-p, and nucleus sampling with production-grade architecture patterns you can showcase to hiring managers.

September 28, 2026 · 11 min · 2308 words · martinuke0
Feedback