Back to Learning Area

The Machine's Knobs — Parameters vs. Hyperparameters

The fine line between "learned by the machine" and "guessed by you".

  • Fundamentals
  • 8 min
  • Beginner

Plain Language

This preview is in Plain Language. The whole portal is also available in Plain Language. You can change the language at the top. Or use the button below. Our Plain Language texts are AI-assisted and editorially reviewed. They follow the core principles of easy-to-read language, but they are not certified Easy Read: a review panel of people with learning difficulties does not test them.

Preview: Parameters and hyperparameters

What are parameters?

AI models learn from data. AI means Artificial Intelligence. The model learns many numbers. These numbers are called parameters. The model finds them itself. The human does not set them.

What are hyperparameters?

Hyperparameters are settings for the model. The human chooses them. For example, the learning rate. Learning rate means: how fast does the model learn? Or the number of training rounds.

The difference

The AI learns parameters itself. The developer chooses hyperparameters. GPT-4 has trillions of parameters. But only a few dozen hyperparameters.

When headlines announce that GPT-4 has "trillions of parameters," most people imagine a developer sitting at a console, manually adjusting trillions of knobs. The reality is the exact opposite: those parameters are values the machine figured out entirely on its own. The actual knobs the developer turns — the hyperparameters — number in the dozens at most.

Confusing these two categories is a common beginner mistake in machine learning. In this article, you'll learn what the difference is, why it matters, and how to systematically find the right settings.

Parameters — The Machine's Internal Wiring

Definition

Parameter

Analogy

Imagine the internal circuitry of a high-end audio system during auto-calibration. Hundreds of resistors, capacitors, and amplifier stages adjust themselves automatically when the system runs its calibration routine. You never open the case or touch these components — they are the internal result of the machine's optimization process.

The hi-fi analogy breaks at three points: an audio system has hundreds of components — Llama 3 70B has 70 billion parameters. Calibration takes seconds — LLM training takes weeks to months. A technician could theoretically open the system and adjust components manually — the parameter space of a neural network is so high-dimensional that any manual intervention is impossible.

Concrete Example: Spam Filter

A spam filter using logistic regression with 5 features (exclamation marks, links, capitalization ratio, sender reputation, word count). The model automatically learns 5 weights (one per feature) plus 1 bias = exactly 6 parameters. After training on 1,000 emails, the weight for exclamation marks might be 0.8 (strong spam signal), sender reputation -0.3 (negative: a good reputation lowers the spam suspicion), and the bias -0.5. These 6 numbers ARE the trained model.

Caution

Common Misconception

"The billions of parameters mentioned in the news are settings the developer chose." — Wrong. They are weights the model learned by itself. A developer of GPT-4 chose perhaps a few dozen hyperparameters. The parameters — trillions, by estimates — were found by the training algorithm over months of computation.

Hyperparameters — The Developer's Control Panel

Definition

Hyperparameter

Analogy

The external knobs and dials on a radio — volume, bass, treble, reception mode. The engineer adjusts these before listening. The radio then operates within these settings. You can change the knobs and restart, but the radio will never turn its own knobs.

This analogy also breaks: a radio has about 5 knobs with immediately audible effects — an ML model has dozens of hyperparameters with complex, often counter-intuitive interactions. On a radio you hear the result instantly — after changing a hyperparameter you wait hours or days for the training run.

The learning rate determines the step size of the optimization. Too high: the model overshoots the optimum and loses all sense of direction. Too low: training takes forever and gets stuck in a good-but-not-best valley (a so-called local minimum). Epochs determine how many times the model processes all training data. Batch size determines how many data points are processed per update step.

RunLearning RateEpochsResult
10.11085% — Solid baseline run
20.0011072% — Learning rate too low, model barely learns
30.110092% — More passes find deeper patterns
410.01050% — Far too high, model lost all sense of direction (50% in spam-or-not means blind guessing)

Caution

Common Misconception

"More epochs always produce a better model." Wrong — beyond a certain point, the model starts memorizing the training data instead of finding generalizable patterns. That's overfitting (topic of the next article). Equally wrong: "A higher learning rate means faster, better learning." Too-high values cause the model to overshoot the optimum — it loses all sense of direction.

Parameters vs. Hyperparameters — Inside vs. Outside

Parameters (internal)

Learned by the model itself (weights, biases). Billions in large models. Automatically optimized via gradient descent. Cannot be set manually. Analogy: the internal circuitry of a hi-fi system.

Hyperparameters (external)

Set by the developer before training (learning rate, epochs, batch size). Dozens, not billions. Must be found manually or by search. Analogy: the external knobs on a radio.

Finding the Right Settings

There is no formula that computes the perfect hyperparameters. ML engineers spend a large fraction of their working time systematically trying different combinations — hyperparameter tuning.

  1. 1. Define search spaceWhich hyperparameters should be tested? What value ranges make sense?
  2. 2. Choose strategyGrid Search (all combinations), Random Search (random samples), Bayesian optimization (learns from previous trials), or AutoML (automated)
  3. 3. Run experimentsTrain each candidate and evaluate on a validation dataset (held-out data the model does not see during training)
  4. 4. Compare resultsWeigh accuracy, training time, and resource usage against each other
  5. 5. Select best configurationDo a final training run with the best hyperparameters and deploy

Grid Search defines a fixed grid of values and tests every combination. Guaranteed to find the best option within the grid — but expensive.

Random Search draws random combinations from the search space. Bergstra and Bengio showed in 2012 that Random Search is often more efficient than Grid Search, especially when only a few hyperparameters actually matter. Bayesian optimization goes one step further: it looks at the previous trials and tries next wherever things look most promising. Widely used tools such as Optuna use this kind of method by default.

AutoML goes further: a secondary ML system searches for the best hyperparameters of the primary model. AI optimizing AI. Google presented its approach, called “AutoML”, in 2017 and began offering it as a cloud service for businesses in 2018.

A fitting analogy: a chef developing a new recipe. He doesn't know if the cake bakes better at 180°C or 200°C, or whether 30 or 45 minutes is the right baking time. Grid Search: systematically try all combinations. Random Search: test random temperature-time pairs. AutoML: hire an autonomous sous-chef.

Grid Search

18  exp. / 36 hrs

3 learning rates × 3 batch sizes × 2 epoch values = 18 combinations — Best result: 94.2%

Random Search

8  exp. / 16 hrs

8 random trials — Best result: 93.8% — nearly as good in less than half the time

Caution

Common Misconception

"Just test every possible combination to guarantee the best model." — In theory, yes. In practice, impossible. Even a modest setup with 5 values for each of 6 hyperparameters yields 5⁶ = 15,625 experiments. At 2 hours each, that's 3.6 years of compute time.

Interactive: Why Grid Search Explodes

Grid Search tests all combinations. With n values per hyperparameter, the number of experiments grows with every additional hyperparameter: 1 hyperparameter = n trials, 2 = n², 3 = n³. Move the slider and observe how quickly costs explode — and why Random Search with a fixed number of trials becomes attractive.

Summary

Note

Key Takeaways

  1. Parameters are learned by the model during training (weights, biases) — the developer never touches them. When someone says a model has "70 billion parameters," they mean learned weights.
  2. Hyperparameters are configured by the developer before training (learning rate, epochs, batch size). They control HOW the model learns, not WHAT it learns.
  3. Finding good hyperparameters is trial-and-error, not calculation. Grid Search tests all combinations; Random Search samples randomly and is often faster. AutoML automates the search entirely.

Check

Quiz: Parameters vs. Hyperparameters

Not completed

A neural network has 1,000 weights and 50 biases. How many parameters does it have?

Select one answer

Answer Key: 1) C · 2) B · 3) D · 4) B

Checkpoint

Check

Learning Goals

Can you explain this in your own words? Tick what you've got.

0 of 3 done