Skip to content
2 min read · 403 words

Interface: OllamaRuntimeOptions ​

Defined in: src/batteries/llm/ollama/types.ts:91

Native Ollama runtime/sampling parameters — sent NESTED under the request body's options key, NOT at the top level (this is the key structural divergence from the OpenAI wire, where these sit at the top level). All fields are optional; set only the ones you want to override. An index signature allows forward-compatible passthrough of llama.cpp parameters this type has not yet enumerated.

Indexable ​

ts
[key: string]: unknown

Forward-compatible passthrough for additional llama.cpp parameters.

Properties ​

PropertyTypeDescriptionDefined in
frequency_penalty?numberFrequency penalty.src/batteries/llm/ollama/types.ts:119
main_gpu?numberPrimary GPU index.src/batteries/llm/ollama/types.ts:127
min_p?numberMin-p sampling cutoff.src/batteries/llm/ollama/types.ts:101
num_batch?numberPrompt-processing batch size.src/batteries/llm/ollama/types.ts:123
num_ctx?numberContext window (KV-cache) size in tokens. Independent of the ADK contextWindow guard.src/batteries/llm/ollama/types.ts:93
num_gpu?numberNumber of layers to offload to GPU(s).src/batteries/llm/ollama/types.ts:125
num_keep?numberTokens to keep from the initial prompt when context is exceeded.src/batteries/llm/ollama/types.ts:111
num_predict?numberMax tokens to predict (-1 = infinite, -2 = fill context).src/batteries/llm/ollama/types.ts:109
num_thread?numberCPU thread count.src/batteries/llm/ollama/types.ts:129
numa?booleanEnable NUMA support.src/batteries/llm/ollama/types.ts:131
penalize_newline?booleanPenalize newline tokens.src/batteries/llm/ollama/types.ts:121
presence_penalty?numberPresence penalty.src/batteries/llm/ollama/types.ts:117
repeat_last_n?numberLook-back window for repeat penalty.src/batteries/llm/ollama/types.ts:115
repeat_penalty?numberPenalty applied to repeated tokens.src/batteries/llm/ollama/types.ts:113
seed?numberRNG seed for reproducible outputs.src/batteries/llm/ollama/types.ts:105
stop?string | string[]Stop sequence(s).src/batteries/llm/ollama/types.ts:107
temperature?numberSampling temperature.src/batteries/llm/ollama/types.ts:95
top_k?numberTop-k sampling cutoff.src/batteries/llm/ollama/types.ts:99
top_p?numberNucleus sampling cutoff.src/batteries/llm/ollama/types.ts:97
typical_p?numberTypical-p sampling cutoff.src/batteries/llm/ollama/types.ts:103
use_mmap?booleanMemory-map the model.src/batteries/llm/ollama/types.ts:133