NLP Language Models 4 — Questions and Answers
Question 1: What is 'transfer learning' in the context of NLP language models?
- Training a model simultaneously on multiple languages to transfer knowledge across them
- Pretraining a model on large general corpora then fine-tuning it on a downstream task (Correct answer)
- Copying weights from one model architecture to another of the same size
- Transferring training data from one dataset to another to avoid duplicates
Correct answer: Pretraining a model on large general corpora then fine-tuning it on a downstream task
Transfer learning in NLP involves pretraining a model on a large dataset (e.g., Common Crawl) then adapting those learned representations to specific tasks with less data.
Question 2: What distinguishes a 'causal' language model from a 'non-causal' (bidirectional) one during training?
- Causal models only use right-to-left context; bidirectional models use left-to-right
- Causal models mask future tokens so each position only attends to past tokens; bidirectional models attend to all positions (Correct answer)
- Causal models are trained with cross-entropy loss; bidirectional models use contrastive loss
- Causal models use byte-pair encoding; bidirectional models use wordpiece tokenization
Correct answer: Causal models mask future tokens so each position only attends to past tokens; bidirectional models attend to all positions
Causal (autoregressive) models use a triangular attention mask to prevent each token from attending to future positions, making them suitable for generation.
Question 3: In language model training, what is 'teacher forcing'?
- Using a larger 'teacher' model to generate training labels for a smaller 'student' model
- Feeding ground-truth tokens as inputs at each decoding step rather than the model's own previous predictions (Correct answer)
- Forcing the model to attend to teacher-annotated spans via special tokens
- Applying curriculum learning by gradually increasing sequence length
Correct answer: Feeding ground-truth tokens as inputs at each decoding step rather than the model's own previous predictions
Teacher forcing provides the ground-truth previous token as input at each training step, stabilizing gradients compared to feeding the model's own potentially wrong predictions.
Question 4: What is 'catastrophic forgetting' in the context of fine-tuning a pretrained language model?
- The model forgets low-frequency vocabulary during fine-tuning on specialized text
- The model loses general knowledge acquired during pretraining when fine-tuned aggressively on a narrow task (Correct answer)
- The model's attention heads collapse to a single pattern after many fine-tuning steps
- The model fails to converge when the learning rate is too high
Correct answer: The model loses general knowledge acquired during pretraining when fine-tuned aggressively on a narrow task
Catastrophic forgetting occurs when fine-tuning on task-specific data overwrites the broad representations learned during pretraining, degrading performance on other tasks.
Question 5: What does the acronym RLHF stand for, and how is it used in language model alignment?
- Recursive Language Hallucination Filtering — removes false outputs post-generation
- Reinforcement Learning from Human Feedback — trains models to produce outputs preferred by human raters (Correct answer)
- Regularized Loss with Hierarchical Fine-tuning — a multi-stage training technique
- Retrieval-augmented Language with Hybrid Filtering — combines retrieval and generation
Correct answer: Reinforcement Learning from Human Feedback — trains models to produce outputs preferred by human raters
RLHF uses human preference rankings to train a reward model, which then guides policy optimization (via PPO or similar) to make the language model more helpful and aligned.
Question 6: What is the role of 'Layer Normalization' in a Transformer language model?
- It reduces the number of layers needed by normalizing gradient magnitude
- It stabilizes training by normalizing activations across the feature dimension within each layer (Correct answer)
- It maps attention outputs back to the original vocabulary space
- It prevents attention weights from summing to more than 1.0
Correct answer: It stabilizes training by normalizing activations across the feature dimension within each layer
Layer normalization standardizes activations within each layer to zero mean and unit variance, stabilizing training and allowing higher learning rates.
Question 7: What is 'in-context learning' as exhibited by large language models like GPT-3?
- Fine-tuning the model on examples provided within the prompt at inference time
- The model adapting its behavior based on examples provided in the prompt without any weight updates (Correct answer)
- A training technique where the model is shown its own outputs as context
- Using the document's surrounding context to improve named entity recognition
Correct answer: The model adapting its behavior based on examples provided in the prompt without any weight updates
In-context learning allows a model to perform new tasks by conditioning on a few examples in the prompt at inference time, with no gradient updates to model weights.
What is 'transfer learning' in the context of NLP language models?