NLP - Text GenerationWhich of the following is the correct Python expression to apply temperature scaling to logits before softmax?Ascaled_logits = logits / temperatureBscaled_logits = logits * temperatureCscaled_logits = logits + temperatureDscaled_logits = logits - temperatureCheck Answer
Step-by-Step SolutionSolution:Step 1: Recall temperature scaling formulaLogits are divided by temperature to adjust sharpness before softmax.Step 2: Check each optionOnly dividing logits by temperature matches the correct formula.Final Answer:scaled_logits = logits / temperature -> Option AQuick Check:Divide logits by temperature to scale [OK]Quick Trick: Divide logits by temperature, never multiply or add [OK]Common Mistakes:MISTAKESMultiplying logits by temperature instead of dividingAdding or subtracting temperature to logitsConfusing temperature scaling with bias addition
Master "Text Generation" in NLP9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepModelTryChallengeExperimentRecallMetrics
More NLP Quizzes Sequence Models for NLP - Attention mechanism basics - Quiz 4medium Sequence Models for NLP - Embedding layer usage - Quiz 2easy Text Generation - Beam search decoding - Quiz 12easy Text Similarity and Search - Semantic similarity with embeddings - Quiz 10hard Topic Modeling - Latent Dirichlet Allocation (LDA) - Quiz 6medium Topic Modeling - Choosing number of topics - Quiz 5medium Topic Modeling - LDA with Gensim - Quiz 11easy Topic Modeling - Topic coherence evaluation - Quiz 12easy Word Embeddings - GloVe embeddings - Quiz 13medium Word Embeddings - FastText embeddings - Quiz 4medium