---
title: "Discussion on \"How Temperature, Top‑K, and Top‑P Control LLM Output — A Practical Guide\" | Hashnode"
description: "Discussion on \"How Temperature, Top‑K, and Top‑P Control LLM Output — A Practical Guide\". When an LLM generates text, it isn't thinking in sentences. It computes a massive list of raw scores (logits) for its entire vocabulary, converts them into a probability distribution, and selects the"
url: "https://hashnode.com/posts/how-temperature-top-k-and-top-p-control-llm-output-a-practical-guide/6a1e92abb932be1fc56857ed"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How Temperature, Top‑K, and Top‑P Control LLM Output — A Practical Guide](https://blogs.thearjun.com/how-temperature-top-k-and-top-p-control-llm-output-a-practical-guide?utm_source=hashnode&utm_medium=feed)

When an LLM generates text, it isn't thinking in sentences. It computes a massive list of raw scores (logits) for its entire vocabulary, converts them into a probability distribution, and selects the

Jun 2 · 11 min read · blogs.thearjun.com  
Read the article

-   [#temperature](https://hashnode.com/tag/temperature)
-   [#ai](https://hashnode.com/tag/ai)
-   [#model](https://hashnode.com/tag/model)

## Written by

[Arjun Adhikari](https://hashnode.com/@arjunadhikari101)

@arjunadhikari101 · Pokhara, Nepal

  
[View profile](https://hashnode.com/@arjunadhikari101)

Every day is a new day to learn.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
