Setting up top k , Max tokens , context length ? #51

Closed
opened 2026-02-15 16:27:43 -05:00 by yindo · 1 comment
Owner

Originally created by @timtensor on GitHub (Mar 10, 2024).

Hi I am using an ollama chat model to call Mistral-model . How can one set the different parameters such as top k , top p, context, length and temperature ?

T

Originally created by @timtensor on GitHub (Mar 10, 2024). Hi I am using an ollama chat model to call Mistral-model . How can one set the different parameters such as top k , top p, context, length and temperature ? T
yindo closed this issue 2026-02-15 16:27:43 -05:00
Author
Owner

@mxyng commented on GitHub (Mar 19, 2024):

You can set it with the options keyword parameter, e.g. ollama.chat(..., options={...}). There's an example here

@mxyng commented on GitHub (Mar 19, 2024): You can set it with the `options` keyword parameter, e.g. `ollama.chat(..., options={...})`. There's an example [here](https://github.com/ollama/ollama-python/blob/main/examples/fill-in-middle/main.py#L14-L19)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#51