<aside> 📅
Date: Tuesday, September 29, 2026 · Week 1, Day 2 · Type: Build Day
</aside>
2.1 Generation Mechanics — what logits are and how the model converts raw scores into probabilities.
2.2 Temperature & Creativity — how temperature mathematically flattens or sharpens the probability curve.
2.3 Stopping Conditions — managing max_tokens, stop sequences, and handling truncation errors.
Build a "Temperature Playground CLI" that sends the exact same creative writing prompt to an LLM at temperatures 0.0, 0.7, and 1.5, displaying the outputs side-by-side alongside an analysis of repetitive versus diverse token selections.
+---> Temp 0.0 (Deterministic) ---> [Output A]
|
[User Test Prompt] -+---> Temp 0.7 (Balanced) ---> [Output B]
|
+---> Temp 1.5 (High Variance) ---> [Output C]
Problem 02. Write a Python function apply_temperature(logits: list[float], temperature: float) -> list[float] that takes an array of raw logit scores, scales them by the temperature value, and returns the normalized probability distribution summing to 1.0.
Algorithm: Softmax Normalization.
Mechanics: Converts real-valued numbers into a probability distribution where values sum to 1.0: Softmax(z_i) = e^(z_i) / Σ e^(z_j).
Real-World Production Use: Deployed on GPUs at the final output layer of all Transformer neural networks to convert token scores into probabilistic selections.