Chapter 6. Model Customization
Training an LLM from scratch requires significant computational resources and expertise that most organizations do not have. This chapter does not cover creating a model from scratch. Instead, it focuses on customizing an existing LLM for your specific use case. We will describe several tuning techniques and the Kubernetes technologies available to implement and deploy the corresponding training jobs. First, let’s briefly cover how LLMs are created and where customization fits in the pipeline.
Introduction to LLM Creation
LLM training techniques differ significantly across model providers that invest heavily in developing proprietary methods. Most technical papers published with model releases omit implementation details, making reproduction difficult. The technical paper for DeepSeekV3 is a notable exception with unusually detailed documentation.
Much of the innovation focuses on new model architectures with more efficient attention mechanisms. Dataset curation and tuning methods are rarely disclosed in detail.
Training starts with data cleaning and deduplication. The first phase, pre-training, consumes most of the time and cost: processing all data using thousands of GPUs for many weeks. The output is a base or foundation model that can predict text but lacks an understanding of tasks or appropriate content boundaries.
The next step is alignment, which teaches the LLM to perform tasks safely and reliably according to human preferences. This phase ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access