Per-chat parameters
Every chat has a slide-out Parameters panel on the right of the window. It exposes the knobs the provider offers and remembers per-chat overrides so you can dial each conversation independently.
Open it with the sliders button at the right end of the chat header, or press Ctrl + Shift + P; the same shortcut closes it.
Simple and Advanced modes
The panel has two views:
- Simple - the Thinking toggle, Context Length, the Low VRAM toggle, image scaling, persona, tone and the per-chat Additional instructions box. Deliberately terse so the common knobs are reachable without scrolling.
- Advanced - adds Temperature, Top-P, Top-K, Min-P, Max Tokens, Repeat Penalty, Frequency and Presence Penalty, GPU Layers and Seed.
Switch between them at the top of the panel; Loach remembers the view you used last. Values you set in one view stay set in the other. Just below the switch, a short line says where the values come from - the model’s Modelfile defaults, the app defaults, or Custom - adjusted for this chat once you have changed something.
Private Chat has its own copy of the Simple view (there is no Advanced view there, and no Images section - its images follow the app setting), and it is wiped along with the rest of the overlay.
How the values cascade
What a chat actually sends to the model is a merge of several layers. From broadest to narrowest, with later layers winning:
- App defaults - a universal fallback: temperature 0.7, top-p 0.95, top-k 40, min-p 0.05, max tokens 4096, context length 8K, repeat penalty 1.1, no frequency or presence penalty, and a random seed.
- Global Thinking default - the Settings → Features → Thinking switch (Ollama only).
- Model defaults - the
PARAMETERlines of the Ollama model’s Modelfile (temperature, top-p, top-k, min-p,num_predict,num_ctx,num_gpu, the penalties and seed). Read from Ollama when you open or send in a chat with the model, and cached while Loach runs; a read that fails - say, before Ollama has started - is tried again next time. A value a chat can’t send, such asnum_predict -1, is skipped, so the app default applies. - Per-model Thinking preference - the toggle you set in the Models editor, remembered on this device.
- Per-chat overrides - what you change in this panel (or with
/thinking on|off). - Global Low VRAM pin - Settings → Features → Low VRAM mode forces
low_vram: trueon every Ollama request and beats the per-chat toggle.
Changing any value saves the whole set you see as this chat’s overrides, so switching the chat to another model later doesn’t quietly shift them. The Reset to defaults button below the sliders - labelled Reset to model defaults when the model ships Modelfile defaults - drops the chat’s overrides and falls back to the layers above. It stays greyed out until something has been overridden. If a change can’t be saved, a Couldn’t save parameters toast says why and the chat keeps its previous values.
From the composer, /set <param> <value> changes one value - for example /set temperature 0.4 - but saves just that one as an override, not the whole set you see (/thinking on|off works the same way), and /set reset does what the reset button does. It takes temperature, top_p, top_k, min_p, num_ctx, max_tokens, repeat_penalty, frequency_penalty, presence_penalty, num_gpu and seed, within the panel’s own ranges (num_ctx must be one of the slider’s stops). See Slash commands.
Settings reference
A short description of every knob the panel exposes, grouped the way the panel groups them. Anything tagged Ignored by OpenAI providers is sent to Ollama only - OpenAI-compatible endpoints decide that knob server-side, and the panel dims it on those chats. Temperature, Top-P, Max Tokens, both penalties and Seed are sent to either kind of provider (when a reasoning model refuses one, Loach adjusts the request and sends it again - see Provider selection).
Thinking
- Thinking - lets the model reason step-by-step before replying. Adds latency on long answers but often improves quality on complex prompts. Only takes effect on models that advertise thinking capability; ignored by OpenAI providers. See Thinking toggle.
Sampling
- Temperature
0–1- controls randomness. Lower stays focused and predictable; higher gets more creative and varied. Capped at 1 because output usually breaks down beyond that. A Modelfile can still set more - the readout then shows the real value, such as 1.2, with the slider at its end. - Top-P
0–1- nucleus sampling. The model picks from the smallest set of tokens whose probabilities sum to this value. Lower = more on-track; higher = more variety. - Top-K
0–200- only consider the K most likely tokens at each step. Lower is more focused;0disables the cap. Ignored by OpenAI providers. - Min-P
0–0.5- drops any token whose probability is below this fraction of the top token’s. A robust alternative to tuning Top-P/Top-K. Ignored by OpenAI providers.
Length
- Context Length (
num_ctx) - how much conversation history the model can see at once. Larger windows remember more but use more VRAM. Snaps to power-of-two stops (4K → 1M); a Modelfile value off the stops, such as 2048, still reads as is. Not sent to OpenAI providers - the server decides - but Loach sizes Library sources and the context bar by it there too, assuming 32K until you set it, so set it to your model’s window. The context-usage bar measures against this value, and on Ollama chats its Expand context window button doubles it. - Max Tokens
128–32768- hard cap on the length of a single reply. Generation stops here even if the model isn’t finished.
Repetition
- Repeat Penalty
0.8–2.0- penalizes tokens the model has just used, discouraging loops.1.0is off; much above1.3starts to sound robotic. Ignored by OpenAI providers. - Frequency Penalty
−2 to 2- pushes down tokens in proportion to how often they’ve already appeared in this reply. Negative values encourage repetition instead. - Presence Penalty
−2 to 2- flat one-time penalty for any token that has already appeared. Nudges the model toward fresh vocabulary and new topics.
Performance
- GPU Layers (
num_gpu) - how many model layers to offload to the GPU. Blank = the model’s default when its Modelfile sets one, otherwise Ollama auto-detects;0= CPU only; a positive integer = explicit layer count (useful when a model almost fits but its KV cache spills off the GPU). The clear button next to the field goes back to that default. Ignored by OpenAI providers. - Low VRAM - trades throughput for footprint (smaller batches, leaner KV cache). Flip on when you’re hitting OOMs and
num_gpualone isn’t enough. Can be pinned on globally in Settings → Features, which forces the per-chat toggle on. Ignored by OpenAI providers.
Reproducibility
- Seed - a fixed integer makes the model’s output reproducible for the same input. Leave empty for a fresh random seed each run. The dice button generates a random seed in place, and the clear button goes back to random. Only whole numbers are accepted, below 253 either way; anything else reverts to the seed in effect.
Images
- Image scaling - how images are scaled down before they reach the model in this chat: Default follows the chat’s Space, or else the app setting (Settings → Features → Image scaling; Library images check Settings → Library first); Scale down caps the longest side in pixels or shrinks to a percentage; Original sends them as they are. The image stored in the chat stays the original. Shown in both views, below the reset button, and not cleared by it. See Image scaling.
Prompt layering
- Persona - defines the assistant’s role (e.g. Code Reviewer, Writing Editor). Layered into the system prompt at send time. See Personas and tones.
- Tone - style modifier appended after the system prompt. Falls back to the global default (Settings → General) when not set per chat.
- Additional instructions (this chat) - free-form instructions for this chat. Sits between the persona and the tone. Empty falls back to the global custom instructions. See Per-chat instructions.
Thinking toggle
The Thinking row is always shown, but it only switches on for Ollama models whose capabilities include thinking. On other models it is disabled with This model doesn’t support a thinking step; on OpenAI-compatible chats it is disabled and reads off. It sets the think parameter on the chat request, which Loach sends only to models that list the capability - any other model, or one whose capabilities couldn’t be read, uses its own default.
The default comes from Settings → Features → Thinking, which is on out of the box; a per-model preference from the Models editor or this chat’s toggle wins over it. Type /thinking on or /thinking off in the composer to flip it for the current chat without opening the panel.
Low VRAM toggle
Ollama-only. Forces smaller batches and a leaner KV cache - useful when you are tight on GPU memory. The per-chat toggle is overridden if Settings → Features → Low VRAM mode is enabled globally; in that case the panel shows the toggle pinned on and disabled with a pointer back to the global setting. See Low VRAM mode.
Per-chat instructions
The Additional instructions (this chat) box at the bottom of the panel holds instructions for this chat only; it saves when you click away. They replace your global custom instructions for this chat. A new chat starts with a copy of the global instructions in this box, so editing the global ones later only reaches chats you start afterwards - empty the box to make an existing chat follow the current global instructions. In a Space that has its own instructions, the Space’s instructions are used instead and this box is ignored.
From the composer, /instructions <text> sets the box, a bare /instructions shows what’s in it, and /instructions clear empties it.
After you compact a chat, its summary is kept in this box between [Loach: earlier conversation summary] and [End of Loach summary] markers. The summary still reaches the model inside a Space and alongside your global instructions, and /instructions leaves it in place. Delete it only if you want the model to lose that context.