Greedy Decoding
The most basic decoding strategy for autoregressive language models, in which the highest-probability token is selected as output at each step. The resulting output is deterministic and reproducible, but lacks diversity.
Core Facts
Timeline (last 90 days)
Greedy decoding can cause repetition loops, as seen when the model repeatedly outputs '今天天气不错' after the prompt '今天天气不错'.
Greedy decoding (always choosing the highest-probability token) leads to deterministic outputs; asking the same question 20 times yields identical results each time.
Even if the temperature is set to 0 (greedy decoding), the model output may still be inconsistent because factors such as batch size cause differences in the order of floating-point addition.
Greedy decoding always selects the highest-probability token, so after 'The' it necessarily chooses 'moon'; sampling decoding, however, draws randomly according to probability weights and may select low-probability tokens such as 'lunar'.
Greedy decoding selects the highest-scoring token at each step; sampling selects among candidate tokens according to probability.
At temperature: 0, sampling degenerates to greedy decoding, and given the same model weights and input token sequence, the decoding path is fully deterministic.
For deterministic requests with temperature=0, semantic caching can achieve near-zero-error reuse; for requests with temperature>0, it needs to be weighed together with a similarity threshold and the business's fault tolerance.
Greedy decoding means directly selecting the highest-probability token at each step, without any random sampling, so the output is fully deterministic and the same input always yields the same output.
The temperature parameter T adjusts the sharpness of the logits distribution via softmax(logits/T): the lower T is, the closer it is to greedy decoding, and the higher T is, the closer it is to uniform sampling.
Greedy decoding selects the highest-probability token at each generation step, producing deterministic and reproducible output, suitable for evaluation and scenarios requiring stable formatting, but it lacks diversity and tends to generate repetitive or conservative text.
3 more timeline events
All Facts (14)
Even when the temperature is set to 0, some inference frameworks still have non-determinism in underlying floating-point computations, causing output differences across hardware and across batches.
75%UnverifiedWhen a large language model generates text, each word is sampled from a probability distribution, and there are many equivalent alternatives between high-probability and low-probability words, providing space for watermark injection.
70%UnverifiedEven if the temperature is set to 0 (greedy decoding), the model output may still be inconsistent because factors such as batch size cause differences in the order of floating-point addition.
60%UnverifiedFor deterministic requests with temperature=0, semantic caching can achieve near-zero-error reuse; for requests with temperature>0, it needs to be weighed together with a similarity threshold and the business's fault tolerance.
60%UnverifiedGreedy decoding at temperature zero further suppresses the probability of a model outputting ESCALATE, because models tend to select the answer pattern that appeared most frequently during training, and escalation is inherently rare in instruction fine-tuning data.
60%UnverifiedGreedy decoding can cause repetition loops, as seen when the model repeatedly outputs '今天天气不错' after the prompt '今天天气不错'.
50%UnverifiedGreedy decoding (always choosing the highest-probability token) leads to deterministic outputs; asking the same question 20 times yields identical results each time.
50%UnverifiedGreedy decoding always selects the highest-probability token, so after 'The' it necessarily chooses 'moon'; sampling decoding, however, draws randomly according to probability weights and may select low-probability tokens such as 'lunar'.
50%UnverifiedGreedy decoding selects the highest-scoring token at each step; sampling selects among candidate tokens according to probability.
50%UnverifiedAt temperature: 0, sampling degenerates to greedy decoding, and given the same model weights and input token sequence, the decoding path is fully deterministic.
50%UnverifiedGreedy decoding means directly selecting the highest-probability token at each step, without any random sampling, so the output is fully deterministic and the same input always yields the same output.
50%UnverifiedThe temperature parameter T adjusts the sharpness of the logits distribution via softmax(logits/T): the lower T is, the closer it is to greedy decoding, and the higher T is, the closer it is to uniform sampling.
50%UnverifiedGreedy decoding selects the highest-probability token at each generation step, producing deterministic and reproducible output, suitable for evaluation and scenarios requiring stable formatting, but it lacks diversity and tends to generate repetitive or conservative text.
50%UnverifiedSome official documentation warns that thinking mode should avoid greedy decoding to prevent performance degradation or falling into repetitive loops.
50%