Quiz: Full Fine-Tuning
Test your knowledge about full fine-tuning, computational requirements, and catastrophic forgetting.
30 questions - Click on each question to reveal the correct answer.
Question 1
What does "full fine-tuning" mean?
A) Training only the first layer
B) Updating all model parameters during training
C) Training for a full day
D) Using all available GPUs
Show Answer
Correct Answer: B
Full fine-tuning means updating all trainable parameters in the model during the training process, as opposed to PEFT methods which only update a subset.
Question 2
What are the four main components consuming GPU memory during training?
A) CPU, RAM, SSD, GPU
B) Model weights, gradients, optimizer states, activations
C) Input, output, loss, accuracy
D) Forward, backward, update, save
Show Answer
Correct Answer: B
The four main memory consumers are: model weights, gradients (same size as weights), optimizer states (AdamW stores 2 states per parameter), and activations (intermediate values for backpropagation).
Question 3
How much memory does AdamW optimizer add per parameter (in float32)?
A) 4 bytes
B) 8 bytes (2 states × 4 bytes)
C) 2 bytes
D) 16 bytes
Show Answer
Correct Answer: B
AdamW stores two states per parameter (momentum and variance), each in float32 (4 bytes), totaling 8 bytes per parameter.
Question 4
What is the approximate GPU memory needed for full fine-tuning a 7B model with bf16?
A) 7 GB
B) 14 GB
C) 60-80 GB
D) 280 GB
Show Answer
Correct Answer: C
A 7B model requires approximately 60-80 GB for full fine-tuning with bf16, including weights (14GB), gradients (14GB), optimizer states (56GB in fp32), and activations.
Question 5
Why is bfloat16 often preferred over float16 for training?
A) It's faster
B) It uses less memory
C) It has the same range as float32, reducing overflow risk
D) It's required by all GPUs
Show Answer
Correct Answer: C
BFloat16 maintains the same exponent range as float32 (just with less precision), making it more stable for training. Float16 has a narrower range and can cause overflow/underflow.
Question 6
What does gradient checkpointing do?
A) Saves checkpoints of the model
B) Trades compute for memory by recomputing activations
C) Clips large gradients
D) Accumulates gradients over batches
Show Answer
Correct Answer: B
Gradient checkpointing saves memory by not storing all activations during the forward pass. Instead, it recomputes them during the backward pass, trading extra computation for reduced memory.
Question 7
What is gradient accumulation used for?
A) Preventing gradient explosion
B) Simulating larger batch sizes with limited memory
C) Storing gradients for later analysis
D) Reducing training time
Show Answer
Correct Answer: B
Gradient accumulation allows you to simulate larger effective batch sizes by accumulating gradients over multiple small-batch forward passes before updating weights.
Question 8
What is the typical learning rate range for full fine-tuning?
A) 1e-2 to 1e-3
B) 1e-5 to 5e-5
C) 1e-7 to 1e-8
D) 1.0
Show Answer
Correct Answer: B
Full fine-tuning typically uses learning rates in the 1e-5 to 5e-5 range—lower than PEFT methods because more parameters are being updated.
Question 9
What is catastrophic forgetting?
A) When training data is lost
B) When a model loses previously learned knowledge after training on new data
C) When the model becomes too large
D) When gradients explode
Show Answer
Correct Answer: B
Catastrophic forgetting occurs when a neural network's performance on previously learned tasks degrades after being trained on new data.
Question 10
Why do PEFT methods help prevent catastrophic forgetting?
A) They use more data
B) They keep base model weights frozen
C) They train for more epochs
D) They use higher learning rates
Show Answer
Correct Answer: B
PEFT methods keep the base model weights frozen, so the original knowledge is preserved. Only small adapter parameters are trained.
Question 11
What is weight decay?
A) Model weights decreasing over time
B) A regularization technique that penalizes large weights
C) GPU memory degradation
D) Learning rate reduction
Show Answer
Correct Answer: B
Weight decay is a regularization technique that adds a penalty for large weight values, helping prevent overfitting and maintaining generalization.
Question 12
What is warmup in training?
A) Waiting for GPU to reach optimal temperature
B) Gradually increasing the learning rate at the start of training
C) Pre-loading data into memory
D) Running a small test batch first
Show Answer
Correct Answer: B
Warmup gradually increases the learning rate from a small value to the target rate, helping stabilize training in the early stages when gradients may be unstable.
Question 13
What is DeepSpeed ZeRO Stage 2?
A) No optimization
B) Partition optimizer states only
C) Partition optimizer states AND gradients
D) Partition everything including weights
Show Answer
Correct Answer: C
ZeRO Stage 2 partitions both optimizer states and gradients across GPUs, reducing per-GPU memory. Stage 3 adds weight partitioning.
Question 14
Which optimizer uses the least memory?
A) AdamW
B) Adam 8-bit
C) Adafactor
D) SGD
Show Answer
Correct Answer: D
SGD uses the least memory as it doesn't store momentum or variance states (though Adam 8-bit and Adafactor also significantly reduce memory compared to AdamW).
Question 15
What is mixed precision training?
A) Training on multiple GPUs
B) Using both fp16/bf16 and fp32 during training
C) Training on multiple datasets
D) Using different learning rates
Show Answer
Correct Answer: B
Mixed precision training uses lower precision (fp16/bf16) for most operations while keeping critical operations in fp32 for stability.
Question 16
What does torch.cuda.memory_allocated() show?
A) Total GPU memory
B) Currently allocated GPU memory by tensors
C) Free GPU memory
D) CPU memory usage
Show Answer
Correct Answer: B
torch.cuda.memory_allocated() returns the amount of GPU memory currently occupied by tensors.
Question 17
What is a good strategy to reduce catastrophic forgetting in full fine-tuning?
A) Higher learning rate
B) More training epochs
C) Data mixing with general instruction data
D) Larger batch sizes
Show Answer
Correct Answer: C
Mixing your specific fine-tuning data with general instruction data (data replay) helps maintain the model's general capabilities.
Question 18
What is the effective batch size with batch_size=2 and gradient_accumulation_steps=8?
A) 2
B) 8
C) 16
D) 10
Show Answer
Correct Answer: C
Effective batch size = per_device_batch_size × gradient_accumulation_steps = 2 × 8 = 16.
Question 19
When monitoring training, what might indicate overfitting?
A) Training loss and validation loss both decreasing
B) Training loss decreasing while validation loss increases
C) Both losses stable
D) Training loss increasing
Show Answer
Correct Answer: B
When training loss continues to decrease but validation loss starts increasing, it indicates the model is overfitting to the training data.
Question 20
What is early stopping?
A) Stopping training before it starts
B) Stopping training when validation performance stops improving
C) Stopping after one epoch
D) Stopping when GPU overheats
Show Answer
Correct Answer: B
Early stopping monitors validation performance and stops training when it stops improving, preventing overfitting.
Question 21
Approximately how much can spot instances save on cloud training costs?
A) 10%
B) 30%
C) 60-70%
D) 90%
Show Answer
Correct Answer: C
Spot instances typically cost 60-70% less than on-demand instances, though they can be interrupted.
Question 22
What happens if learning rate is too high?
A) Training is too slow
B) Model may diverge or lose pre-trained knowledge
C) Model converges faster
D) No effect
Show Answer
Correct Answer: B
A learning rate that's too high can cause the model to diverge (loss explodes) or make such large updates that pre-trained knowledge is destroyed.
Question 23
What is the benefit of saving checkpoints during training?
A) Reduces memory usage
B) Allows recovery and selection of best model
C) Speeds up training
D) Reduces dataset size
Show Answer
Correct Answer: B
Saving checkpoints allows you to recover from crashes, select the best-performing checkpoint, and continue training from any point.
Question 24
Which precision format uses 2 bytes per parameter?
A) float32
B) bfloat16/float16
C) int8
D) int4
Show Answer
Correct Answer: B
Both bfloat16 and float16 use 2 bytes (16 bits) per parameter, half of float32's 4 bytes.
Question 25
What is capability retention in the context of fine-tuning evaluation?
A) How much the model remembers during a session
B) The percentage of baseline benchmark performance maintained after fine-tuning
C) How many parameters are retained
D) Training data memorization
Show Answer
Correct Answer: B
Capability retention measures what percentage of the baseline model's performance on general benchmarks is maintained after fine-tuning.
Question 26
Why might you choose full fine-tuning over PEFT?
A) It's always better
B) Maximum customization potential and quality ceiling
C) It uses less memory
D) It's faster to train
Show Answer
Correct Answer: B
Full fine-tuning is chosen when you need maximum customization potential and have sufficient resources, as it has the highest quality ceiling.
Question 27
What is the formula for approximate training time?
A) Dataset size × GPU memory
B) (Dataset size × Epochs) / (Batch size × Throughput)
C) Learning rate × Epochs
D) Model size / GPU count
Show Answer
Correct Answer: B
Training time ≈ (Total training tokens or samples × Epochs) / (Effective batch size × Throughput in tokens/samples per second).
Question 28
What is distribution shift in fine-tuning?
A) Moving to a new GPU
B) When fine-tuning data has different patterns than pre-training data
C) Changing the optimizer
D) Adjusting batch size
Show Answer
Correct Answer: B
Distribution shift refers to the difference between the pre-training data distribution (broad, general) and fine-tuning data distribution (specialized, narrow).
Question 29
Which GPU would you need for full fine-tuning a 7B model with efficiency optimizations?
A) RTX 3090 (24GB)
B) A100-40GB
C) A100-80GB
D) H100
Show Answer
Correct Answer: C
Even with optimizations (bf16, gradient checkpointing), a 7B model requires 60-80GB for full fine-tuning, making A100-80GB the minimum suitable single GPU.
Question 30
What is the primary trade-off of gradient checkpointing?
A) Quality vs speed
B) Memory vs compute (more compute, less memory)
C) Speed vs quality
D) Dataset size vs epochs
Show Answer
Correct Answer: B
Gradient checkpointing trades compute for memory—it uses more computation (recomputing activations) to reduce memory usage.
Results
| Score | Level |
|---|---|
| 27-30 | Excellent - Strong understanding of full fine-tuning! |
| 21-26 | Good - Review compute requirements section |
| 15-20 | Average - Revisit all chapters |
| Below 15 | Needs comprehensive review |