Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
api: stop applying repeat_penalty 1.1 to models that don't set one
Jesse Gross6a261db7d87b
diff --git a/api/types.go b/api/types.goindex ad3c6e369..c0e771d43 100644--- a/api/types.go+++ b/api/types.go@@ -1105,7 +1105,7 @@ func DefaultOptions() Options {TopP: 0.9,TypicalP: 1.0,RepeatLastN: 64,- RepeatPenalty: 1.1,+ RepeatPenalty: 1.0,PresencePenalty: 0.0,FrequencyPenalty: 0.0,Seed: -1,diff --git a/docs/modelfile.mdx b/docs/modelfile.mdxindex 0226d6ac0..32b61935d 100644--- a/docs/modelfile.mdx+++ b/docs/modelfile.mdx@@ -148,7 +148,7 @@ PARAMETER <parameter> <parametervalue>| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -------------------- || num_ctx | Sets the size of the context window used to generate the next token. (Default: 2048) | int | num_ctx 4096 || repeat_last_n | Sets how far back for the model to look back to prevent repetition. (Default: 64, 0 = disabled, -1 = num_ctx) | int | repeat_last_n 64 |-| repeat_penalty | Sets how strongly to penalize repetitions. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient. (Default: 1.1) | float | repeat_penalty 1.1 |+| repeat_penalty | Sets how strongly to penalize repetitions. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient. (Default: 1.0, disabled) | float | repeat_penalty 1.1 || temperature | The temperature of the model. Increasing the temperature will make the model answer more creatively. (Default: 0.8) | float | temperature 0.7 || seed | Sets the random number seed to use for generation. Setting this to a specific number will make the model generate the same text for the same prompt. (Default: 0) | int | seed 42 || stop | Sets the stop sequences to use. When this pattern is encountered the LLM will stop generating text and return. Multiple stop patterns may be set by specifying multiple separate `stop` parameters in a modelfile. | string | stop "AI assistant:" |