Gemma 4 seems to work best with high temperature for coding

Reddit r/LocalLLaMA / 4/9/2026

💬 OpinionSignals & Early TrendsModels & Research

Key Points

  • Reddit投稿者は、Gemma 4 31Bのコード生成性能が、推奨パラメータ(temp=1.0)では既に高いと感じたと述べています。
  • 一般的にコーディングでは低いtemperatureが望ましいという前提で0.8〜0.3を試したが、temperatureを下げるほど結果が悪化したと報告しています。
  • 逆にtemperatureを上げ(1.2、1.5)たところ、一部のより難しいコーディング課題で大幅に改善したとのことです。
  • 投稿者は、Clineのような実運用で同様の傾向があるかを他の利用者に質問しており、コミュニティでの再現性が論点になっています。

I've been playing with Gemma 4 31B for coding tasks since it came out and been genuinely impressed with how capable it is. With the benchmarks putting it a little behind Qwen3.5 I didn't have high expectations, but it's honestly been performing better with what I've thrown at it so far

This has all been at the recommended parameters (temp 1.0, top-k 65 and top-p 0.95). With the general consensus being that for coding tasks you want a lower temperature I began repeating some of my tests with lower values (0.8, 0.6 and 0.3) but found if anything each step down made it worse

So I went up instead. First 1.2, and it did a little better on some. Then 1.5 and on a couple of harder coding tasks the results were massively better

I've yet to try it in something like Cline for real coding tasks but has anyone else found similar that its code generation ability improves with higher temperatures?

submitted by /u/BigYoSpeck
[link] [comments]