Purpose
This article explains the main concepts behind training and fine-tuning LLMs and connects them to the parameters used in Giotto offline configurations.
Overview
Before an LLM can be used effectively for a specific task, it often needs some form of training or adaptation.
This may include:
- pretraining
- fine-tuning
- parameter-efficient methods such as LoRA
- evaluation and benchmarking
These ideas map directly to the offline pipeline in Giotto.
Pretraining
Pretraining is the large-scale training phase in which a model learns broad language patterns from a large corpus.
Most users of Giotto will not pretrain a model from scratch. Instead, they start from a pretrained model artifact.
Fine-tuning
Fine-tuning adapts a pretrained model to a narrower dataset, task, or domain.
This is what most users mean when they talk about training a model in a practical platform setting.
In Giotto, this corresponds to the offline training stage.
Important training parameters
Some of the most important training concepts are:
learning_rate
How strongly the model updates during optimization.
per_device_batch_size
How many examples each device processes per step.
gradient_accumulation_steps
How many steps are accumulated before an update, allowing a larger effective batch.
num_train_epochs
How many full passes are made over the dataset.
weight_decay
A regularization term used during optimization.
warmup_ratio
The fraction of early training reserved for learning-rate warmup.
max_grad_norm
The gradient clipping threshold.
gradient_checkpointing
A memory-saving technique used during training.
These are not just abstract concepts. They are exactly the kind of parameters users see in 2_training.
LoRA
LoRA, or Low-Rank Adaptation, is a parameter-efficient fine-tuning method.
Instead of updating all model parameters, LoRA introduces smaller trainable components that adapt the base model with lower compute and memory cost.
This is why Giotto training configurations may include:
lora_finetuninglora_config
Evaluation and benchmarking
Training is not enough on its own. The outputs also need to be evaluated.
That is why offline flows typically continue beyond training into stages such as:
- decoding
- filtering
- scoring
- grid search
This reflects the broader ML lifecycle: train, inspect, compare, improve.
Why this matters for Giotto
Understanding these concepts makes offline YAML much easier to read.
For example:
model_idanddataset_ididentify what is being trained- training hyperparameters control optimization behavior
- Ray settings control distributed execution
- output model fields define what later stages will consume
Key takeaways
- Most practical LLM work is fine-tuning, not pretraining from scratch.
- Training parameters directly affect quality, speed, memory use, and stability.
- LoRA is a lightweight adaptation method.
- In Giotto, these ideas are expressed through the offline training configuration.
Comments
0 comments
Article is closed for comments.