Skip to content

Commit 52ac4a9

Browse files
committed
AI: Update model Options overview in docs to align with code photoprism#5361
Signed-off-by: Michael Mayer <[email protected]>
1 parent 2660bac commit 52ac4a9

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

internal/ai/vision/README.md

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -51,43 +51,43 @@ The `vision.yml` file is usually kept in the `storage/config` directory (overrid
5151
5252
#### Model Options
5353

54-
The model `Options` adjust model parameters such as temperature, top-p, and schema constraints when using [Ollama](ollama/README.md) or [OpenAI](openai/README.md):
55-
56-
| Option | Default | Description |
57-
|--------------------|-----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|
58-
| `Temperature` | engine default (`0.1` for Ollama) | Controls randomness with a value between `0.01` and `2.0`; not used for OpenAI's GPT-5. |
59-
| `TopK` | engine default (model-specific) | Limits sampling to the top K tokens to reduce rare or noisy outputs. |
60-
| `TopP` | engine default (`0.9` for some Ollama label defaults; unset for OpenAI) | Nucleus sampling; keeps the smallest token set whose cumulative probability ≥ `p`. |
61-
| `MinP` | engine default (unset unless provided) | Drops tokens whose probability mass is below `p`, trimming the long tail. |
62-
| `TypicalP` | engine default (unset unless provided) | Keeps tokens with typicality under the threshold; combine with TopP/MinP for flow. |
63-
| `Seed` | random per run (unless set) | Fix for reproducible outputs; unset for more variety between runs. |
64-
| `RepeatLastN` | engine default (model-specific) | Number of recent tokens considered for repetition penalties. |
65-
| `RepeatPenalty` | engine default (model-specific) | Multiplier >1 discourages repeating the same tokens or phrases. |
66-
| `PenalizeNewline` | engine default | Whether to apply repetition penalties to newline tokens. |
67-
| `PresencePenalty` | engine default (OpenAI-style) | Increases the likelihood of introducing new tokens by penalizing existing ones. |
68-
| `FrequencyPenalty` | engine default (OpenAI-style) | Penalizes tokens in proportion to their frequency so far. |
69-
| `TfsZ` | engine default | Tail free sampling parameter; lower values reduce repetition. |
70-
| `NumKeep` | engine default (Ollama) | How many tokens to keep from the prompt before sampling starts. |
71-
| `NumPredict` | engine default (Ollama only) | Ollama-specific max output tokens; synonymous intent with `MaxOutputTokens`. |
72-
| `MaxOutputTokens` | engine default (OpenAI caption 512, labels 1024) | Upper bound on generated tokens; adapters raise low values to defaults. |
73-
| `ForceJson` | engine-specific (`true` for OpenAI labels; `false` for Ollama labels; captions `false`) | Forces structured output when enabled. |
74-
| `SchemaVersion` | derived from schema name | Override when coordinating schema migrations. |
75-
| `Stop` | engine default | Array of stop sequences (e.g., `["\\n\\n"]`). |
76-
| `NumThread` | runtime auto | Caps CPU threads for local engines. |
77-
| `NumCtx` | engine default | Context window length (tokens). |
78-
| `Mirostat` | engine default (Ollama) | Enables Mirostat sampling (`0` off, `1/2` modes). |
79-
| `MirostatTau` | engine default | Controls surprise target for Mirostat sampling. |
80-
| `MirostatEta` | engine default | Learning rate for Mirostat adaptation. |
81-
| `NumBatch` | engine default (Ollama) | Batch size for prompt processing. |
82-
| `NumGpu` | engine default (Ollama) | Number of GPUs to distribute work across. |
83-
| `MainGpu` | engine default (Ollama) | Primary GPU index when multiple GPUs are present. |
84-
| `LowVram` | engine default (Ollama) | Enable VRAM-saving mode; may reduce performance. |
85-
| `VocabOnly` | engine default (Ollama) | Load vocabulary only for quick metadata inspection. |
86-
| `UseMmap` | engine default (Ollama) | Memory map model weights instead of fully loading them. |
87-
| `UseMlock` | engine default (Ollama) | Lock model weights in RAM to reduce paging. |
88-
| `Numa` | engine default (Ollama) | Enable NUMA-aware allocations when available. |
89-
| `Detail` | engine default (OpenAI) | Controls OpenAI vision detail level (`low`, `high`, `auto`). |
90-
| `CombineOutputs` | engine default (OpenAI multi-output) | Controls whether multi-output models combine results automatically. |
54+
The model `Options` adjust model parameters such as temperature, top-p, and schema constraints when using [Ollama](ollama/README.md) or [OpenAI](openai/README.md). Rows are ordered exactly as defined in `vision/model_options.go`.
55+
56+
| Option | Engines | Default | Description |
57+
|--------------------|------------------|----------------------|-----------------------------------------------------------------------------------------|
58+
| `Temperature` | Ollama, OpenAI | engine default | Controls randomness with a value between `0.01` and `2.0`; not used for OpenAI's GPT-5. |
59+
| `TopK` | Ollama | engine default | Limits sampling to the top K tokens to reduce rare or noisy outputs. |
60+
| `TopP` | Ollama, OpenAI | engine default | Nucleus sampling; keeps the smallest token set whose cumulative probability ≥ `p`. |
61+
| `MinP` | Ollama | engine default | Drops tokens whose probability mass is below `p`, trimming the long tail. |
62+
| `TypicalP` | Ollama | engine default | Keeps tokens with typicality under the threshold; combine with TopP/MinP for flow. |
63+
| `TfsZ` | Ollama | engine default | Tail free sampling parameter; lower values reduce repetition. |
64+
| `Seed` | Ollama | random per run | Fix for reproducible outputs; unset for more variety between runs. |
65+
| `NumKeep` | Ollama | engine default | How many tokens to keep from the prompt before sampling starts. |
66+
| `RepeatLastN` | Ollama | engine default | Number of recent tokens considered for repetition penalties. |
67+
| `RepeatPenalty` | Ollama | engine default | Multiplier >1 discourages repeating the same tokens or phrases. |
68+
| `PresencePenalty` | OpenAI | engine default | Increases the likelihood of introducing new tokens by penalizing existing ones. |
69+
| `FrequencyPenalty` | OpenAI | engine default | Penalizes tokens in proportion to their frequency so far. |
70+
| `PenalizeNewline` | Ollama | engine default | Whether to apply repetition penalties to newline tokens. |
71+
| `Stop` | Ollama, OpenAI | engine default | Array of stop sequences (e.g., `["\\n\\n"]`). |
72+
| `Mirostat` | Ollama | engine default | Enables Mirostat sampling (`0` off, `1/2` modes). |
73+
| `MirostatTau` | Ollama | engine default | Controls surprise target for Mirostat sampling. |
74+
| `MirostatEta` | Ollama | engine default | Learning rate for Mirostat adaptation. |
75+
| `NumPredict` | Ollama | engine default | Ollama-specific max output tokens; synonymous intent with `MaxOutputTokens`. |
76+
| `MaxOutputTokens` | Ollama, OpenAI | engine default | Upper bound on generated tokens; adapters raise low values to defaults. |
77+
| `ForceJson` | Ollama, OpenAI | engine default | Forces structured output when enabled. |
78+
| `SchemaVersion` | Ollama, OpenAI | derived from schema | Override when coordinating schema migrations. |
79+
| `CombineOutputs` | OpenAI | engine default | Controls whether multi-output models combine results automatically. |
80+
| `Detail` | OpenAI | engine default | Controls OpenAI vision detail level (`low`, `high`, `auto`). |
81+
| `NumCtx` | Ollama, OpenAI | engine default | Context window length (tokens). |
82+
| `NumThread` | Ollama | runtime auto | Caps CPU threads for local engines. |
83+
| `NumBatch` | Ollama | engine default | Batch size for prompt processing. |
84+
| `NumGpu` | Ollama | engine default | Number of GPUs to distribute work across. |
85+
| `MainGpu` | Ollama | engine default | Primary GPU index when multiple GPUs are present. |
86+
| `LowVram` | Ollama | engine default | Enable VRAM-saving mode; may reduce performance. |
87+
| `VocabOnly` | Ollama | engine default | Load vocabulary only for quick metadata inspection. |
88+
| `UseMmap` | Ollama | engine default | Memory map model weights instead of fully loading them. |
89+
| `UseMlock` | Ollama | engine default | Lock model weights in RAM to reduce paging. |
90+
| `Numa` | Ollama | engine default | Enable NUMA-aware allocations when available. |
9191

9292
#### Model Service
9393

0 commit comments

Comments
 (0)