Skip to content
ImagineWorld

The Three Paths Overview

node_idnode-book_llm-systems-engineering_module-10-the-three-paths-overview
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num10
chapter_titleThe Three Paths Overview
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Once a team has decided that building an LLM is warranted, the question becomes which development path to follow. Three distinct pathways have emerged as the dominant options in contemporary practice, each with its own starting point and resource profile.

  1. Fine-tuning takes an existing model and adjusts its behavior through continued weight updates on targeted data.

  2. Continued pretraining resumes the original language modeling objective on new material to extend what the model knows.

  3. Training from scratch builds a model from randomly initialized weights using the full pretraining pipeline.

These approaches are introduced in turn, then their key variables are examined, informing the choice between them.

Fine-tuning is the practice of taking a pretrained base model and continuing to train it on a smaller, targeted dataset so that its behavior aligns with a specific task, style, or domain of use. The weights of the base model serve as the starting point, and gradient updates adjust those weights in response to the new examples. Because the model already possesses broad linguistic competence from its original pretraining run, fine-tuning does not need to teach it grammar or general reasoning patterns from the ground up. What fine-tuning does is steer an already capable system toward the behavior the developer actually wants to see at inference time.

What makes fine-tuning attractive is its comparative efficiency. A team can achieve measurable improvements in task performance using datasets that are smaller than those required for initial pretraining, and with compute budgets that fit within a single multi-GPU node in many cases. Parameter-efficient techniques such as Low-Rank Adaptation (LoRA, Module 28) further reduce the practical cost by freezing the base model’s weights and training only a small set of low-rank matrices inserted into each transformer layer (Hu et al., 2022).

Fine-tuning is especially well suited to situations where a capable base model exists and the goal is to reshape how it responds. Instruction tuning and tone adaptation fall within its scope. Format enforcement and refusal behavior are similarly addressable through careful supervised fine-tuning on curated examples. The limits of the approach become visible when teams attempt to use it for purposes it was never designed to serve. Fine-tuning struggles to install deep new factual knowledge that was absent from the original pretraining corpus, since the scale of fine-tuning data is typically too small and the learning rate too conservative to overwrite what the base model already encodes. The base model sets the ceiling for what fine-tuning can achieve, and no amount of supervised adaptation will push a weak foundation beyond its underlying limits. For more information on fine-tuning, see Module 26.

flowchart LR
    B((Pretrained<br/>base)) --> D["Task-specific dataset<br/>(data)"] --> T["Hours – days<br/>(duration)"] --> O["Specialized model<br/>(output model)"]

Figure 2-6. Fine-Tuning Workflow from Pretrained Base to Specialized Model

Continued pretraining occupies a middle position along the development spectrum. The process resumes the original language modeling objective, the same next-token prediction task that produced the base model, and applies it to a new corpus that differs from the original training distribution. The goal is to extend or deepen what the model knows about a particular domain while preserving the broad competence it acquired during its initial training run. The data involved looks more like pretraining data than like fine-tuning data. Documents are long, unlabeled, and measured in billions of tokens for serious domain adaptation work.

Research on domain-adaptive pretraining has shown that a second phase of pretraining on in-domain text yields consistent improvements across specialized tasks, including those drawn from biomedical and computer science literature (Gururangan et al., 2020). These gains appeared across both high-resource and low-resource settings in their study, suggesting that the technique generalizes across domains with varying data availability. The authors also found that further adapting to task-specific unlabeled data on top of domain-adaptive pretraining produced additional improvements beyond what either stage provided alone.

Continued pretraining differs from fine-tuning in what it is optimizing for, absorbing statistical regularities from raw text at a much larger scale. Continued pretraining is most effective when the problem is what the model knows. A medical assistant built from a general base model often benefits from exposure to a large corpus of clinical literature before any instruction tuning is applied, so that the subsequent fine-tuning stage can steer a model whose internal representations already carry domain-specific information. Without that intermediate step, no amount of supervised fine-tuning on physician dialogues will install the underlying medical vocabulary the model needs in order to reason about symptoms and treatments fluently. For more information on continued pretraining, see Module 31.

flowchart LR
    B((Existing<br/>checkpoint)) --> D["Large raw corpus<br/>(data)"] --> T["Days – weeks<br/>(duration)"] --> O["Extended base model<br/>(output model)"]

Figure 2-7. Continued Pretraining Workflow from Existing Checkpoint to Extended Base Model

Training from scratch means initializing a model with random weights and running the full pretraining pipeline from the beginning. No prior model is used as a departure point. The tokenizer must be constructed and the architecture specified before the data pipeline and training run can be set in motion, and the compute budget is typically measured in thousands of GPU hours at minimum, often in millions for competitive models.

This path is the most demanding of the three by a wide margin. Every capability the model will possess must emerge from the training run itself, which places enormous weight on data composition and architectural choices. The economics are unforgiving. Hoffmann and colleagues demonstrated that many large models produced before their 2022 study were substantially undertrained relative to their parameter count, meaning that the resources spent on them would have yielded better results at smaller model sizes paired with more training tokens (Hoffmann et al., 2022). As an improvement, they trained their own model (Module 18) using the same compute budget as a much larger predecessor and outperformed it substantially on downstream evaluations. For more information on building from scratch, see Module 36.

The implication for teams considering a from-scratch build is sobering. Getting the sizing wrong in either direction produces a model that wastes compute. A model that is too large for its data allocation underperforms what a smaller model on the same budget could have achieved. A model that is too small for the available data plateaus before the compute runs out. Getting the sizing right requires both empirical guidance from scaling law research and the discipline to follow that guidance even when it suggests a smaller headline parameter count than a team had hoped to announce.

Given these demands, training from scratch is the correct choice only in a narrow set of circumstances. It is appropriate when no suitable base model exists for the target language or domain. It may also be justified when complete control over the tokenizer vocabulary is a hard requirement, or when the research agenda itself is about architectural and training innovations that cannot be pursued from a frozen starting point. For most production applications, this path represents a cost profile (as discussed in Module 11) that is difficult to justify once the alternatives are honestly considered.

flowchart LR
    B(("?<br/>Random init")) --> D["Full pretraining corpus<br/>(data)"] --> T["Weeks – months<br/>(duration)"] --> O["New foundation model<br/>(output model)"]

Figure 2-8. Training from Scratch Workflow from Random Initialization to New Foundation Model

The choice among the three approaches is rarely arbitrary when the relevant variables are laid out honestly.

The first variable is the quality of the available base model relative to the target capability. If a strong open-weight model already covers the general language and reasoning skills needed for the application, then building on top of it through fine-tuning or continued pretraining will almost always produce better results faster than starting over. If no suitable base exists for the target language or domain, the calculus changes, and from-scratch training becomes a more defensible option.

The second variable is the nature of the capability gap between the base model and the desired outcome. Gaps in behavior, including response style and instruction adherence, point toward fine-tuning. Gaps in knowledge, including unfamiliar terminology and coverage of specialized literature, point toward continued pretraining. Some projects require both in sequence, with continued pretraining preceding fine-tuning so that the final alignment step operates on a model whose internal representations already carry the needed domain content. Treating these as sequential stages of a single development effort is often more productive than choosing between them in isolation.

The third variable is the data the team actually has available. Fine-tuning benefits from carefully curated prompt-response examples in relatively small quantities. Continued pretraining benefits from large volumes of clean domain text that resemble natural documents. Training from scratch requires pretraining-scale data along with the infrastructure to process and serve that data to the training loop reliably over weeks or months of continuous operation. A team that cannot honestly account for where its training data will come from is not ready to commit to any path that depends on it.

The fourth variable is the resource envelope. Compute budgets and personnel expertise together determine which paths are practically reachable within a given timeline. A small or solo team with a single GPU node can pursue parameter-efficient fine-tuning effectively using techniques such as LoRA. A mid-sized organization with a modest cluster can execute continued pretraining on a targeted corpus. Training from scratch at competitive scale remains the province of organizations that can commit substantial infrastructure and dedicated personnel over extended periods, and that have the evaluation discipline to detect problems early enough to correct them.

These variables do not operate independently, as changes in one often force reconsideration of the others. A team that begins planning a from-scratch run and then discovers that a newly released open-weight base model covers most of its capability needs should treat that discovery as new information and revisit its pathway choice accordingly. The decision is a planning artifact that should be updated as evidence accumulates. Treating the pathway selection as fixed early in the project tends to produce efforts that continue down a path long after the justification for it has eroded, and the compounding cost of course corrections made late in a training program is one of the more expensive ways a project can fail.

A useful discipline is to re-examine the pathway decision at every major milestone. The conditions that supported the original choice may no longer hold. New base models are released regularly. Open-source tooling for parameter-efficient fine-tuning continues to mature. Domain-specific models that did not exist a year ago may now serve as viable starting points that were previously unavailable. Teams that build this re-examination into their planning cadence tend to produce better outcomes than teams that commit to a path at the outset and treat any reconsideration as a failure of resolve.

The later sections of this book examine each pathway in the depth it requires. Fine-tuning receives extended treatment in Chapter V, continued pretraining in Chapter VI, and from-scratch training in Chapter VII.