{
  "sha": "6a261db7d87b13d76c5197cec636a0a3951afb36",
  "node_id": "C_kwDOJ0Z1PtoAKDZhMjYxZGI3ZDg3YjEzZDc2YzUxOTdjZWM2MzZhMGEzOTUxYWZiMzY",
  "commit": {
    "author": {
      "name": "Jesse Gross",
      "email": "jesse@kernel.org",
      "date": "2026-08-11T18:49:22Z"
    },
    "committer": {
      "name": "Jesse Gross",
      "email": "jesse@kernel.org",
      "date": "2026-08-12T04:47:51Z"
    },
    "message": "api: stop applying repeat_penalty 1.1 to models that don't set one\n\nRequest options are the model's published parameters and the request's\nown options layered over the server defaults, so the default\nrepeat_penalty of 1.1 reaches every model whose parameters leave it\nunset. No maker of the library's current models recommends 1.1: their\ngeneration configs either omit the penalty, meaning 1.0, or pin 1.05.\nllama.cpp dropped the same 1.1 default in 2024; vLLM, SGLang, and\ntransformers apply no penalty. An always-on penalty also distorts\noutput that legitimately repeats tokens, such as code, JSON, and long\nreasoning traces.\n\nThe penalty is especially costly for speculative decoding, where\ndrafts are proposed without it: the penalized target rejects drafted\ntokens and the depth controller backs off. On muse-glimmer 30B (DFlash\non M5 Max, HumanEval) the 1.1 default costs 13-16% of end-to-end\nthroughput at greedy and temperature 1 alike, and drops prose\nacceptance at temperature 0.8 from 0.44 to 0.30. On qwen3.6-35B it\ncuts the mean accepted draft length from 4.3 to 3.5 tokens and makes\nthe controller stop speculating on prose.\n\nDefaulting to 1.0 disables the penalty unless a model's parameters or\nthe request set one. Across the library:\n\n- qwen3, qwen3.6, and qwen3-coder pin their own values (1.0, 1.0, and\n  Qwen's recommended 1.05) and are unchanged.\n- Everything else local now matches its maker's no-penalty\n  recommendation, including gemma2 through gemma4, muse-glimmer, both\n  laguna 2.1 models, qwen3.5 (previously 1.1 stacked on its\n  presence_penalty of 1.5), gpt-oss, deepseek-r1 and v3.1, the\n  nemotron family, granite4, the mistral and llama3/llama4 families,\n  phi4, glm4, llava, and devstral.\n- qwen2.5 recommends 1.05 but ships no parameters, so it moves from\n  1.1 to 1.0 and still needs a parameters layer to conform.\n- Cloud models (kimi-k3, deepseek-v4-flash) never receive these\n  defaults.\n\nSmall older models may repeat themselves more without the penalty\nmasking it; the remedy is a per-model parameter, not a penalty applied\nto every model.",
    "tree": {
      "sha": "b086e3b0120411d11d1cb8a5a5957d89260efe38",
      "url": "https://api.github.com/repos/ollama/ollama/git/trees/b086e3b0120411d11d1cb8a5a5957d89260efe38"
    },
    "url": "https://api.github.com/repos/ollama/ollama/git/commits/6a261db7d87b13d76c5197cec636a0a3951afb36",
    "comment_count": 0,
    "verification": {
      "verified": false,
      "reason": "unsigned",
      "signature": null,
      "payload": null,
      "verified_at": null
    }
  },
  "url": "https://api.github.com/repos/ollama/ollama/commits/6a261db7d87b13d76c5197cec636a0a3951afb36",
  "html_url": "https://github.com/ollama/ollama/commit/6a261db7d87b13d76c5197cec636a0a3951afb36",
  "comments_url": "https://api.github.com/repos/ollama/ollama/commits/6a261db7d87b13d76c5197cec636a0a3951afb36/comments",
  "author": {
    "login": "jessegross",
    "id": 6468499,
    "node_id": "MDQ6VXNlcjY0Njg0OTk=",
    "avatar_url": "https://avatars.githubusercontent.com/u/6468499?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/jessegross",
    "html_url": "https://github.com/jessegross",
    "followers_url": "https://api.github.com/users/jessegross/followers",
    "following_url": "https://api.github.com/users/jessegross/following{/other_user}",
    "gists_url": "https://api.github.com/users/jessegross/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/jessegross/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/jessegross/subscriptions",
    "organizations_url": "https://api.github.com/users/jessegross/orgs",
    "repos_url": "https://api.github.com/users/jessegross/repos",
    "events_url": "https://api.github.com/users/jessegross/events{/privacy}",
    "received_events_url": "https://api.github.com/users/jessegross/received_events",
    "type": "User",
    "user_view_type": "public",
    "site_admin": false
  },
  "committer": {
    "login": "jessegross",
    "id": 6468499,
    "node_id": "MDQ6VXNlcjY0Njg0OTk=",
    "avatar_url": "https://avatars.githubusercontent.com/u/6468499?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/jessegross",
    "html_url": "https://github.com/jessegross",
    "followers_url": "https://api.github.com/users/jessegross/followers",
    "following_url": "https://api.github.com/users/jessegross/following{/other_user}",
    "gists_url": "https://api.github.com/users/jessegross/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/jessegross/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/jessegross/subscriptions",
    "organizations_url": "https://api.github.com/users/jessegross/orgs",
    "repos_url": "https://api.github.com/users/jessegross/repos",
    "events_url": "https://api.github.com/users/jessegross/events{/privacy}",
    "received_events_url": "https://api.github.com/users/jessegross/received_events",
    "type": "User",
    "user_view_type": "public",
    "site_admin": false
  },
  "parents": [
    {
      "sha": "948f69330acf96a2310f1b53fdfc211731a386d8",
      "url": "https://api.github.com/repos/ollama/ollama/commits/948f69330acf96a2310f1b53fdfc211731a386d8",
      "html_url": "https://github.com/ollama/ollama/commit/948f69330acf96a2310f1b53fdfc211731a386d8"
    }
  ],
  "stats": {
    "total": 4,
    "additions": 2,
    "deletions": 2
  },
  "files": [
    {
      "sha": "c0e771d4382988a115efa83a63944f3a037eb433",
      "filename": "api/types.go",
      "status": "modified",
      "additions": 1,
      "deletions": 1,
      "changes": 2,
      "blob_url": "https://github.com/ollama/ollama/blob/6a261db7d87b13d76c5197cec636a0a3951afb36/api%2Ftypes.go",
      "raw_url": "https://github.com/ollama/ollama/raw/6a261db7d87b13d76c5197cec636a0a3951afb36/api%2Ftypes.go",
      "contents_url": "https://api.github.com/repos/ollama/ollama/contents/api%2Ftypes.go?ref=6a261db7d87b13d76c5197cec636a0a3951afb36",
      "patch": "@@ -1105,7 +1105,7 @@ func DefaultOptions() Options {\n \t\tTopP:             0.9,\n \t\tTypicalP:         1.0,\n \t\tRepeatLastN:      64,\n-\t\tRepeatPenalty:    1.1,\n+\t\tRepeatPenalty:    1.0,\n \t\tPresencePenalty:  0.0,\n \t\tFrequencyPenalty: 0.0,\n \t\tSeed:             -1,"
    },
    {
      "sha": "32b61935d34435c5b0b37d7e759d309cecf2dfc4",
      "filename": "docs/modelfile.mdx",
      "status": "modified",
      "additions": 1,
      "deletions": 1,
      "changes": 2,
      "blob_url": "https://github.com/ollama/ollama/blob/6a261db7d87b13d76c5197cec636a0a3951afb36/docs%2Fmodelfile.mdx",
      "raw_url": "https://github.com/ollama/ollama/raw/6a261db7d87b13d76c5197cec636a0a3951afb36/docs%2Fmodelfile.mdx",
      "contents_url": "https://api.github.com/repos/ollama/ollama/contents/docs%2Fmodelfile.mdx?ref=6a261db7d87b13d76c5197cec636a0a3951afb36",
      "patch": "@@ -148,7 +148,7 @@ PARAMETER <parameter> <parametervalue>\n | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -------------------- |\n | num_ctx        | Sets the size of the context window used to generate the next token. (Default: 2048)                                                                                                                                                                                                                                                                                            | int        | num_ctx 4096         |\n | 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     |\n-| 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   |\n+| 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   |\n | temperature    | The temperature of the model. Increasing the temperature will make the model answer more creatively. (Default: 0.8)                                                                                                                                                                                                                                                             | float      | temperature 0.7      |\n | 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              |\n | 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:\" |"
    }
  ]
}
