Temperature, top-k and top-p, clearly explained!
@akshay_pachaar293K followers
16,127 views
16 Comments
Comments from the original post on X (Twitter)

@giacomomasseron
0.0 to 0.3 for code matches what i use. anything higher and it starts inventing method names
1 like

@Cozy2054934
Clear framing that it never picks a word directly. For coding agents, do you keep temperature near 0 on edits and only raise it for brainstorming turns?

@DimriLogic
Nicely explained. Everyone talk, when we say hey how llm responds, silence, same on the temperature ๐ก. It's all about probability, do I want to give chance to all ideas - have high temperature n then have HIL I don't need noise, give me best response- Low temperature Another example- hey I am not getting right resume? Can be two-fold, too many or too less? Have moderate temperature

@shuizhuyu
Top-k vs top-p finally clicks for me.

@JamieGale7
The bit people miss is top-p changes the shortlist size every token, top-k never does. which one do you default to for code?

@Dipanshu_AI
This is a great explanation of how LLMs work. It's fascinating to see the process behind how these models generate text.

@JMkernt
top-k keeps a fixed 3, top-p stops at 0.9, that cat/mat example finally makes it click

@aakashverma
The gotcha people hit in prod is stacking temperature with top-p until both are fighting each other. We should be picking one dial for exploration. Leave the other near default unless you measured the task.

@storylove1206
Excellent explanation of LLM sampling parameters.

@Viniai_
Temperature, top-k, top-p explained.

@gaubong0808
Excellent explanation of LLM token sampling.

@JWestDigital
This is the version I wish I'd had when people first asked me what temperature does. Sampling, not vibes ๐ฒ

@Vesper25251325
Great explanation of LLM sampling parameters.

@JourneyDeck
Thank you so much for this. pstack is a lot to take in, but everyone keeps saying to install it. But then you don't even know everything it can do.

@emhai0909
Excellent explanation of LLM sampling parameters. Clear and concise.

@hoaihoai69232
Excellent explanation of LLM sampling parameters. Clear and concise.
