liveBook · Manning

Hyperparameter tuning

As explained in Building Specialized AI Systems

The systematic selection of training configuration values to improve model performance.

Hyperparameter tuning selects training settings that balance specialized adaptation against instability, resource use, and loss of foundational knowledge. It is especially important during fine-tuning, where domain constraints magnify the effect of each choice. section 1.4.2

Tune the settings together rather than in isolation:

  • Learning rate controls adaptation speed; higher values learn faster but can destabilize training or erode existing knowledge. section 1.4.2
  • Batch size affects update stability, efficiency, compute requirements, and final performance; gradient accumulation can approximate larger batches through smaller steps. section 1.4.2
  • Training epochs require control to avoid overfitting, where memorized examples fail to generalize; early stopping provides an automated safeguard. section 1.4.2
Figure 1.7 Task-specific fine-tuning process. Pretraining creates a base model that is then further trained to perform multiple, more complex tasks, such as summarization, classification, and code or text generation.

Situates tuning within task-specific fine-tuning from a pretrained base model toward summarization, classification, and generation tasks. section 1.4.2

How Building Specialized AI Systems covers it

How deep it goes
Explains learning rate, batch size, epochs, gradient accumulation, overfitting, and early stopping without optimization algorithms.
Examples
Uses refining an existing skill as an analogy and task-specific summarization, classification, and generation as model outcomes.
What it assumes
Assumes a selected model and prepared training data before fine-tuning begins.
What you can do after
Evaluate/understand configuration trade-offs among adaptation speed, stability, compute resources, and generalization.
How it connects
Connects fine-tuning to pre-training, learning rate, batch size, gradient accumulation, overfitting, early stopping, and LoRA.

Also explained in

Compare how 22 books explain hyperparameter tuning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Specialized AI Systems. The section links point to the parts of the book it draws on.