Ashish's notebook

Notebooks, in full.

Taking machine learning apart, one notebook at a time.

Notebook · 18 SEP 2026

How Top-P Sampling Works in LLMs

Top-K keeps a fixed number of words every time. Top-P keeps fewer when the model is sure and more when it isn't.

Read notebook →
Notebook · 07 SEP 2026

How Top-K Sampling Works in LLMs

The model ranks thousands of words to pick just one. Top-K keeps a few and drops the rest.

Read notebook →
Notebook · 28 AUG 2026

Playing with Temperature in LLMs

I turned one dial and watched a model go from boring and predictable to weird and creative. Here's what temperature actually does.

Read notebook →
Notebook · 25 AUG 2026

How LLMs Actually Work

Taking a small language model apart and rebuilding text generation by hand, one step at a time.

Read notebook →