AWS Certified AI PractitionerAI/ML and Generative AI FundamentalsEasy
A team is developing a generative AI model to create new musical compositions. They want to control the 'creativity' or 'randomness' of the generated music, specifically how much the model deviates from its learned patterns when generating new sequences. Which parameter should they adjust to achieve this control?
- ABatch Size
- BLearning Rate
- CEpochs
- DTemperature
Show answer & explanationAnswer & explanation
Correct answer: D. Temperature
Temperature is a crucial parameter in generative AI, especially for models like Large Language Models and other sequence generators. It controls the randomness of the output by scaling the logits before the softmax function. A higher temperature leads to more diverse and 'creative' (but potentially less coherent) outputs, while a lower temperature produces more predictable and 'safer' outputs.
Why the other options are wrong
- A. Batch size refers to the number of training examples processed before updating model parameters, impacting training efficiency, not generation randomness.
- B. Learning rate controls how much the model's weights are adjusted during training, not the randomness of generation at inference time.
- C. Epochs represent the number of times the entire training dataset is passed through the model, affecting how well the model learns, not the creativity of its output during generation.
Temperature Parameter (Generative AI)
A parameter used in generative models to control the randomness or 'creativity' of the output. It scales the logits before the softmax function, influencing the probability distribution of the next predicted token.
- Higher temperature = more random/diverse output.
- Lower temperature = more predictable/conservative output.
- Often set between 0 and 1, but can be higher.
Memory trick: Generative AI: Create with Control.