[GH-ISSUE #4352] How to set the parameters to make the ollama model output more detailed and comprehensive answers? #2715

Closed
opened 2026-04-12 13:01:56 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @wangkun199608300514 on GitHub (May 11, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/4352

The output content is not rich enough and appears to be very uniform.

Originally created by @wangkun199608300514 on GitHub (May 11, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/4352 The output content is not rich enough and appears to be very uniform.
Author
Owner

@wangkun199608300514 commented on GitHub (May 11, 2024):

I set these parameters. options: {
num_ctx: 4096,
num_predict: -1,
temperature: 0.7,
top_p: 0.7,
top_k: 50,
repeat_penalty: 1,
},

<!-- gh-comment-id:2105650230 --> @wangkun199608300514 commented on GitHub (May 11, 2024): I set these parameters. options: { num_ctx: 4096, num_predict: -1, temperature: 0.7, top_p: 0.7, top_k: 50, repeat_penalty: 1, },
Author
Owner

@TomLucidor commented on GitHub (Nov 21, 2024):

Next time ask elsewhere. But borrowing from this there are some answers https://medium.com/@_b/transforming-chaos-into-creativity-with-top-p-top-k-and-temperature-55808ac90314

  • Low Temperature Low P/K => copywriter (simple and straightforward)
  • Low Temperature High P/K => academic (detailed and complex)
  • High Temperature Low P/K => book writer (narrative and structured)
  • High Temperature High P/K => performer (chaotic and fun)

Top P can go higher like 0.8 or 0.9 or 0.95, while Top K can go higher like 80 or 100 or above

<!-- gh-comment-id:2489961224 --> @TomLucidor commented on GitHub (Nov 21, 2024): Next time ask elsewhere. But borrowing from this there are some answers https://medium.com/@_b/transforming-chaos-into-creativity-with-top-p-top-k-and-temperature-55808ac90314 - Low Temperature Low P/K => copywriter (simple and straightforward) - Low Temperature High P/K => academic (detailed and complex) - High Temperature Low P/K => book writer (narrative and structured) - High Temperature High P/K => performer (chaotic and fun) Top P can go higher like 0.8 or 0.9 or 0.95, while Top K can go higher like 80 or 100 or above
Author
Owner

@garricklw commented on GitHub (Mar 3, 2025):

Are the available options for a given Ollama model documented somewhere? I see these options like these listed in a few places but can't find a comprehensive list anywhere

<!-- gh-comment-id:2695045977 --> @garricklw commented on GitHub (Mar 3, 2025): Are the available options for a given Ollama model documented somewhere? I see these options like these listed in a few places but can't find a comprehensive list anywhere
Author
Owner

@p3rlphr33k commented on GitHub (May 17, 2025):

Are the available options for a given Ollama model documented somewhere? I see these options like these listed in a few places but can't find a comprehensive list anywhere

The modelfile, otherwise the source that released the model would have the data. If you are looking for all configurable parameters, you can view the Ollama API docs here: https://github.com/ollama/ollama/blob/main/docs/api.md?plain=1

<!-- gh-comment-id:2888527910 --> @p3rlphr33k commented on GitHub (May 17, 2025): > Are the available options for a given Ollama model documented somewhere? I see these options like these listed in a few places but can't find a comprehensive list anywhere The modelfile, otherwise the source that released the model would have the data. If you are looking for all configurable parameters, you can view the Ollama API docs here: [https://github.com/ollama/ollama/blob/main/docs/api.md?plain=1](https://github.com/ollama/ollama/blob/main/docs/api.md?plain=1)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#2715