🌡 وقتی از LLM (مدلهای زبانی بزرگ) حرف میزنیم، دمـا (Temperature) یکی از پارامترهای کلیدیه که مشخص میکنه خروجی مدل چقدر «تصادفی» یا «خلاقانه» باشه.
مدلهای زبانی همیشه پیشبینی میکنن که کدوم کلمه (یا توکن) بعدی با چه احتمالی بیاد.
دما این توزیع احتمالات رو دستکاری میکنه:
دمای پایین: احتمال بیشتر برای انتخاب مطمئنترین کلمه ⬅️ متن قابل پیشبینیتر و منظمتر.
دمای بالا: فرصت بیشتر برای انتخاب کلمات غیرمنتظره ⬅️ متن متنوعتر و خلاقانهتر، ولی پرریسکتر.
پس بسته به هدف، میتونی دما رو تغییر بدی: برای جواب دقیق و محکم، دمای پایین؛ برای ایدهپردازی یا داستاننویسی، دمای بالاتر.
What is LLM Temperature?
When we talk about LLMs (Large Language Models), temperature is a key parameter that controls how “random” the generated text will be.
LLMs predict the next token (word or part of a word) based on a probability distribution over possible tokens.
The temperature setting modifies that distribution:
Lower temperature → pushes probability more toward the highest-probability tokens → more predictable, more coherent text.
Higher temperature → flattens the distribution (or gives more chance to less probable tokens) → more variety, more creativity, but also risks of incoherence.
Why it matters: depending on your use case, you might want precision and consistency (e.g. factual answers, documentation) or you might want creativity (e.g. story-writing, brainstorming)
🦴 @scopeofai | #concepts