Recommended parameters for coding tasks?

#11
by kozusenok - opened

What are the best parameters for coding? I've tried the following:
Temperature: 1
Top-K: 64
Top-P: 0.95
Penalty: 1
Min-P: 0

The model then reasons and corrects itself during its response, uses tools more often, but sometimes invents methods and makes typos.

Parameters:
Temperature: 0.1
Top-K: 30
Top-P: 0.3
Penalty: 1
Min-P: 0

The model then writes more accurately (when it writes incorrectly, it doesn't correct its answer), rarely calls tools (it may say it called tools, but in fact it didn't), and sometimes gets stuck in loops.

Are there officially recommended parameters from Google?

Google org

Hi @kozusenok
Thanks for sharing your observations. The official baseline sampling configuration across all use cases is Temperature: 1.0, Top-P: 0.95, and Top-K: 64.
I would like to reproduce this behavior and share these insights with our internal team. Could you share a few more details to understand the issue bettter ?

  1. A minimal script/prompt, along with the system prompt or tool definition schema you're using.
  2. Which engine and version are you running (e.g., llama.cpp, Ollama, vLLM)
  3. if possible , a raw log or snippet of the output trace under both temperature setups showing where the tool calls or looping occur.

Hi @kozusenok
Thanks for sharing your observations. The official baseline sampling configuration across all use cases is Temperature: 1.0, Top-P: 0.95, and Top-K: 64.
I would like to reproduce this behavior and share these insights with our internal team. Could you share a few more details to understand the issue bettter ?

  1. A minimal script/prompt, along with the system prompt or tool definition schema you're using.
  2. Which engine and version are you running (e.g., llama.cpp, Ollama, vLLM)
  3. if possible , a raw log or snippet of the output trace under both temperature setups showing where the tool calls or looping occur.

Thanks for the feedback. I'll definitely collect and provide as much information about the source data and logs as possible. I'm using the latest version of LM Studio on Windows. Tool invocation fails if I force the model to perform syntax checking or explicitly specify the tool in the system prompt. If I request syntax checking in the user prompt, the tool invocation occurs more frequently, but not always perfectly.

Sign up or log in to comment