AIToday
Large Language ModelsQiita 機械学習Published: Nov 30, 2026, 16:00 JST

Qwen logits show own-token odds falling to 0.8125 at Temperature 1.2

Send on LINE
Qwen logits show own-token odds falling to 0.8125 at Temperature 1.2

3 Key Points

  1. What happened

    Using Qwen/Qwen2.5-1.5B-Instruct and the prompt on AI's future impact on society, the author pulled the top-5 next-token logits and applied Softmax at Temperature 0.1, 0.7 and 1.2; 'AI' scored 1.0000, 0.9961 and 0.8125 respectively.

  2. Why it matters

    Raising Temperature divides the logits before Softmax, so the spread can shift; tokens that rounded to 0.0000 at 0.1, such as '人工' and 'ア', gain visible probability as the distribution flattens, which appears to explain the unstable text seen at 1.2.

Ask AI

Ask the AI about this article. Questions and answers are published on this page

Context & Analysis

The piece follows a previous experiment that compared generated text at Temperature 0.1, 0.7 and 1.2 and found low values produced stable text while higher values widened expression but invited unnatural sentences. This time the author stays inside the model and reads out the next-token logits from Qwen/Qwen2.5-1.5B-Instruct, then applies the temperature-scaled Softmax formula step by step in Python using torch.softmax over the full vocabulary.

The worked arithmetic is the connective tissue between the two articles. Because Softmax takes logits divided by Temperature, a low temperature magnifies gaps between logits and concentrates probability on the top token, while a high one narrows those gaps. That is the mechanism the author points to when explaining why the earlier 1.2 runs produced unstable output, and it is also the basis for saying that lowering Temperature makes similar tokens more likely to be selected.

FAQ
What actually changes inside the model when Temperature is raised?
The logits are divided by Temperature before Softmax. At 0.5 a logit gap of 2 versus 1 becomes 4 versus 2, while at Temperature 2 the same logits come closer together, so the resulting probabilities spread out.
Does a token shown as 0.0000 really have zero probability?
No. The author notes that those tokens round to zero only because the displayed digits are limited, and their actual values remain very small.
What is a logit, briefly?
It is the raw score the model gives each vocabulary token before Softmax turns the scores into probabilities, as shown in the example table with 'AI' at 10.2.
Qiita 機械学習Read Original Article
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

By signing up you agree to the Terms of Service and Privacy Policy.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Related Articles

Next articleClaude Code works harder when told it trains another AI