AI Parameter Playbook โ Master LLM Parameters (Free & Local-First)¶
Learn exactly what each LLM parameter does through hands-on experiments on your laptop. No APIs, no cloud costs.
๐ Start Here: 45-Minute Learning Path¶
Understand parameters by testing them locally:
- Temperature Sweep (5 min) โ How does randomness change?
- Top-p Sweep (5 min) โ How do filters restrict candidates?
- Top-k Sweep (5 min) โ How do ranked cutoffs work?
- Combined Filters (10 min) โ What happens when you mix them?
- Repetition Penalties (5 min) โ How do penalties work?
- Real Use Cases (15 min) โ How to tune for different tasks?
โ Start the Learning Path (no prior knowledge needed)
Or run the simulator right now (5 minutes):
pip install -r requirements-experiments.txt
python3 experiments/local/sampling_simulator.py
Why Parameters Matter¶
Every LLM has the same problem: at each step, it generates probabilities for every possible next token. Parameters control how it picks the next token.
flowchart LR
A["Prompt<br/>(your input)"] --> B["Model predicts<br/>next-token odds"]
B --> C["Parameter transforms<br/>(temperature, filters, penalties)"]
C --> D["Sample a token<br/>(pick the next word)"]
D --> E["Repeat until<br/>done or stop"]
E --> F["Output<br/>(LLM response)"]
The magic: Different parameters lead to wildly different behaviors on the same prompt.
- Low temperature = deterministic, safe, boring
- High temperature = creative, risky, interesting
- Top-p filters = dynamic nucleus based on confidence
- Penalties = reduce repetition
This playbook teaches you to control this intentionally.
Three Learning Paths¶
๐ฏ Path 1: Quick Intuition (30 minutes)¶
Result: You'll know what each parameter does and how to tune for common tasks.
๐ง Path 2: Deep Dive (90 minutes)¶
Complete all 6 experiments in sequence. Build intuition about: - How parameters reshape distributions - How filters interact - How penalties discourage repetition - How to design parameters for different use cases
โ Start here: Learning Path Overview
โ๏ธ Path 3: Cloud Validation (optional)¶
Once you've mastered parameters locally, test on any cloud platform of your choice:
- Azure OpenAI โ Enterprise compliance focus
- OpenAI โ Latest models (GPT-4, o1)
- Google Vertex AI โ Gemini family, GCP integration
- Amazon Bedrock โ Multiple vendors (Claude, Llama, Mistral)
All platforms support the same core parameters. Learn them once, apply everywhere.
โ Choose Your Cloud Platform
What You'll Know After¶
โ
What each parameter actually does (math + intuition)
โ
How parameters interact and affect each other
โ
How to tune for different tasks (creative vs. safe)
โ
How to diagnose parameter problems
โ
How to apply this to any LLM (Azure, OpenAI, local, etc.)
Local Playground¶
No credentials needed. These run entirely offline:
- Sampling Simulator โ See how parameters reshape distributions
- Experiment Harness โ Run local sweeps (coming soon)
Install experiment dependencies with pip install -r requirements-experiments.txt.
Reference (When You're Ready)¶
- Parameter Map โ What parameters exist?
- Decoding Controls โ Temperature and top-p details
- Repetition & Novelty โ Penalties explained
- Use Cases โ Task-specific tuning
Authoritative References¶
This playbook is based on official specs:
- Azure OpenAI inference REST API (GA 2024-10-21)
- OpenAI Chat Completions API reference
- Open-source sampler implementations (llama.cpp, Hugging Face)
TL;DR¶
Your first step:
pip install -r requirements-experiments.txt
python3 experiments/local/sampling_simulator.py # 2 minutes
Then:
โ Read the Learning Path Overview (5 min)
That's it. 7 minutes and you'll understand LLM parameters deeper than most people.