Per-model context slider (Auto vs Manual)
Each model has its own context setting.
Short answer
Each model has its own context setting. Auto lets Abliteration pick a safe value based on your free RAM. Manual gives you a slider - drag through power-of-two steps to set the context, with live RAM cost showing next to the label.
Detailed explanation
Every model runs with a context length setting - how many tokens it can hold at once. Bigger context = more memory (KV cache) + slower prefill. Right-sizing this per model matters because different models have different practical needs.
Auto mode (default, “Auto (recommended)”). Abliteration picks a context based on:
- Model’s trained ceiling (
n_ctx_train) - Your current free RAM
- A reserve for the model weights plus about 1.2 GB of overhead
Auto rounds down to a power-of-two step between 4K and 128K, so it can go as high as the model’s trained ceiling allows if you have the RAM. If the model file lacks the metadata needed for the estimate, Auto falls back to 2K, 4K or 8K depending on free RAM.
Manual mode. A slider stepping through discrete powers of two:
2048 · 4096 · 8192 · 16384 · 32768 · 65536 · 131072.
The minimum is 2048; the maximum is min(n_ctx_train, 131072) - you can’t go above what the model was trained for, and there’s a hard 128K ceiling for practical RAM reasons. If the model doesn’t report n_ctx_train, the slider stops at 32768.
The label. Shows current setting, cap, and live RAM cost:
{ctx} / {max} — uses ~{kv} MB extra RAM
Example: 8192 / 131072 — uses ~N MB extra RAM (the MB figure depends on the model’s layer and KV-head counts). Below it, a line reads “Model was trained for up to {n_ctx_train} tokens”.
Live RAM warning. If the model file plus the KV estimate plus about 1.2 GB of overhead exceeds your free RAM, a warning appears immediately as you drag: “Not enough free RAM (need ~X GB, have Y GB) — may fail to load”. Nothing blocks you from saving - the warning is advisory.
Where to find it. MODELS page → click ⋯ on any model → EDIT → CONTEXT SIZE section. Choose Auto (recommended) or Manual with a radio pair.
Per-model, not global. Each model remembers its own context setting (on Windows, in the models folder’s manifest.json). Setting Llama 3B to 8K doesn’t affect Qwen 7B. This matters because a 3B model can afford 32K easily while a 30B model might only afford 4K on the same PC.
When to override Auto. Auto is fine for most cases. Manual matters when:
- Working with long documents - bump specific models up to 32K+
- Tight RAM situation - drop specific models to 4K to leave room for other apps
- Testing model behavior at different context sizes for research
Why it matters
Context is one of the biggest levers on RAM. The KV cache grows linearly with context, so the same model at 32K needs eight times the KV memory it needs at 4K. Being able to set it per-model lets you tune each one for its role instead of settling for one compromise value.
In Abliteration specifically
Changes save when you click the SAVE button (not on close). Next time you load the model, it uses your new context. Chats already active with that model keep their current context until reloaded.
On Windows, the per-model setting persists across app restarts via manifest.json in the models folder, and reinstalling the app keeps your per-model context choices if you kept the models folder. On Mac, the setting survives model-folder rescans but is held in memory only, so it resets when the app restarts.
On Windows, rough page-count equivalents (English text) are visible in the model info tooltip on the model row, not in the Edit slider itself.
Related
- Context length - the concept
- Edit model dialog - where the slider lives
- KV cache - the RAM the slider affects
- n_ctx_train - the ceiling the slider respects