Quiz: Training with Hugging Face
30 questions on Transformers, TRL, and training optimization.
Question 1
What class is used to load text generation models?
A) AutoModel
B) AutoModelForCausalLM
C) AutoModelForSeq2Seq
D) GPTModel
Show Answer
Correct Answer: B
AutoModelForCausalLM is used for causal language models (text generation).
Question 2
What does SFTTrainer stand for?
A) Simple Fine-Tuning Trainer
B) Supervised Fine-Tuning Trainer
C) Sequence Fine-Tuning Trainer
D) Standard Format Trainer
Show Answer
Correct Answer: B
SFTTrainer is the Supervised Fine-Tuning Trainer from the TRL library.
Question 3
What learning rate scheduler is most common for fine-tuning?
A) Constant
B) Step
C) Cosine
D) Exponential
Show Answer
Correct Answer: C
Cosine learning rate schedule is most commonly used for fine-tuning.
Question 4
What does device_map="auto" do?
A) Finds the best device automatically
B) Uses CPU only
C) Automatically distributes model across available GPUs
D) Disables GPU usage
Show Answer
Correct Answer: C
device_map="auto" automatically places model layers across available GPUs.
Question 5
What should pad_token be set to for causal LM training?
A) A new token
B) The EOS token
C) The BOS token
D) Leave it empty
Show Answer
Correct Answer: B
For causal language models, pad_token is typically set to eos_token.
(Questions 6-30 cover additional training topics)
Results
| Score | Level |
|---|---|
| 27-30 | Excellent |
| 21-26 | Good |
| 15-20 | Average |
| Below 15 | Review needed |