Before submitting your bug report
Relevant environment info
- Continue version: v0.8.58
Description
Ollama allows setting repeat_penalty, presence_penalty and frequency_penalty when doing API calls [1], neither of which can be used with it within Continue [2].
Also, available Ollama options [3] seem to be modelled after Model File [4] (which AFAIU is used to create models [5], not to make API calls), rather than API options from [1].
This is important, because Ollama sets repeat_penalty to 1.1 by default and instruction-tuned models should not penalize repetitions [6][7]. So to use these with Continue and Ollama, one has to create custom models just to hardcode this parameter.
- https://github.com/ollama/ollama/blob/a820d2b2673f7f8035e3a2a6f93c83af465f841c/docs/api.md#request-7
|
private _getModelFileParams(options: CompletionOptions): ModelFileParams { |
|
return { |
|
temperature: options.temperature, |
|
top_p: options.topP, |
|
top_k: options.topK, |
|
num_predict: options.maxTokens, |
|
stop: options.stop, |
|
num_ctx: this.contextLength, |
|
mirostat: options.mirostat, |
|
num_thread: options.numThreads, |
|
use_mmap: options.useMmap, |
|
min_p: options.minP, |
|
}; |
|
} |
|
// See https://github.com/ollama/ollama/blob/main/docs/modelfile.md for details on each parameter |
|
interface ModelFileParams { |
|
mirostat?: number; |
|
mirostat_eta?: number; |
|
mirostat_tau?: number; |
|
num_ctx?: number; |
|
repeat_last_n?: number; |
|
repeat_penalty?: number; |
|
temperature?: number; |
|
seed?: number; |
|
stop?: string | string[]; |
|
tfs_z?: number; |
|
num_predict?: number; |
|
top_k?: number; |
|
top_p?: number; |
|
min_p?: number; |
|
// deprecated? |
|
num_thread?: number; |
|
use_mmap?: boolean; |
|
num_gqa?: number; |
|
num_gpu?: number; |
|
} |
- https://github.com/ollama/ollama/blob/a820d2b2673f7f8035e3a2a6f93c83af465f841c/docs/modelfile.md#valid-parameters-and-values
- https://github.com/ollama/ollama/blob/a820d2b2673f7f8035e3a2a6f93c83af465f841c/docs/modelfile.md#ollama-model-file
- https://huggingface.co/google/gemma-2-2b-it-GGUF#gemma-model-card
- https://huggingface.co/google/gemma-7b-it/discussions/38#65d7b14adb51f7c160769fa1
To reproduce
No response
Log output
No response
Before submitting your bug report
Relevant environment info
- Continue version: v0.8.58Description
Ollama allows setting
repeat_penalty,presence_penaltyandfrequency_penaltywhen doing API calls [1], neither of which can be used with it within Continue [2].Also, available Ollama options [3] seem to be modelled after Model File [4] (which AFAIU is used to create models [5], not to make API calls), rather than API options from [1].
This is important, because Ollama sets
repeat_penaltyto1.1by default and instruction-tuned models should not penalize repetitions [6][7]. So to use these with Continue and Ollama, one has to create custom models just to hardcode this parameter.continue/core/llm/llms/Ollama.ts
Lines 184 to 197 in 2c59776
continue/core/llm/llms/Ollama.ts
Lines 15 to 36 in 2c59776
To reproduce
No response
Log output
No response