[PR #3141] feat: ollama run --parameters/-p #36950

Open
opened 2026-04-22 21:35:55 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/3141
Author: @adrienbrault
Created: 3/14/2024
Status: 🔄 Open

Base: mainHead: run-params


📝 Commits (1)

  • 00e04b2 feat: ollama run --parameters/-p

📊 Changes

1 file changed (+12 additions, -1 deletions)

View changed files

📝 cmd/cmd.go (+12 -1)

📄 Description

Hey,

This allows overriding parameters when using the CLI without having to create a Modelfile.

ollama run model prompt -p num_ctx=32768 -p temperature=1
$ ./ollama run -h

Run a model

Usage:
  ollama run MODEL [PROMPT] [flags]

Flags:
      --format string               Response format (e.g. json)
  -h, --help                        help for run
      --insecure                    Use an insecure registry
      --nowordwrap                  Don't wrap words to the next line automatically
  -p, --parameters stringToString   Parameters to pass to the model. Example: -p num_ctx=32768 -p temperature=0 (default [])
      --verbose                     Show timings for response

Environment Variables:
      OLLAMA_HOST        The host:port or base URL of the Ollama server (e.g. http://localhost:11434)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/3141 **Author:** [@adrienbrault](https://github.com/adrienbrault) **Created:** 3/14/2024 **Status:** 🔄 Open **Base:** `main` ← **Head:** `run-params` --- ### 📝 Commits (1) - [`00e04b2`](https://github.com/ollama/ollama/commit/00e04b2a042d72028fc0b672804a0fcd1a27cc4e) feat: ollama run --parameters/-p ### 📊 Changes **1 file changed** (+12 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+12 -1) </details> ### 📄 Description Hey, This allows overriding parameters when using the CLI without having to create a Modelfile. ``` ollama run model prompt -p num_ctx=32768 -p temperature=1 ``` ```console $ ./ollama run -h Run a model Usage: ollama run MODEL [PROMPT] [flags] Flags: --format string Response format (e.g. json) -h, --help help for run --insecure Use an insecure registry --nowordwrap Don't wrap words to the next line automatically -p, --parameters stringToString Parameters to pass to the model. Example: -p num_ctx=32768 -p temperature=0 (default []) --verbose Show timings for response Environment Variables: OLLAMA_HOST The host:port or base URL of the Ollama server (e.g. http://localhost:11434) ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-22 21:35:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#36950