zeroclaw, variablize the context amount to be per-machine.
This commit is contained in:
@@ -43,6 +43,8 @@
|
||||
# Conversely:
|
||||
# - qwen3.5:4b would be 3.3GB * 1.3 = 4290, rather than 4000.
|
||||
llm_size_coef: 1.3
|
||||
# Take the GB of RAM and use it as the MB of context.
|
||||
llm_context: "{{ ansible_memtotal_mb | int }}"
|
||||
|
||||
- name: Workstation | Linux | Software | ZeroClaw | Facts 02
|
||||
ansible.builtin.set_fact:
|
||||
@@ -181,7 +183,7 @@
|
||||
export OLLAMA_KEEP_ALIVE=20m # default 5m
|
||||
export OLLAMA_MAX_LOADED_MODELS={{ llm_concurrency }} # default is 3 if using CPUs, or 3 * NumGPUs
|
||||
export OLLAMA_NUM_PARALLEL={{ llm_parallel }} # default is 1 and applies per-model (unconfirmed)
|
||||
export OLLAMA_CONTEXT_LENGTH=32000 # default is 4096, https://docs.ollama.com/faq#how-can-i-specify-the-context-window-size
|
||||
export OLLAMA_CONTEXT_LENGTH={{ llm_context }} # default is 4096, https://docs.ollama.com/faq#how-can-i-specify-the-context-window-size
|
||||
export OLLAMA_MAX_QUEUE=999 # default is 512 (unconfirmed)
|
||||
exec chpst -u {{ user }} ollama serve
|
||||
dest: "{{ ollama_runit_script }}"
|
||||
@@ -364,7 +366,7 @@
|
||||
[providers.models.ollama.{{ llm.provider }}]
|
||||
model = "{{ llm.model }}"
|
||||
timeout_secs = 3600 # 1 hour, default is 120 (2 minutes), issue happens between 5 and 6 minutes though.
|
||||
context_window = 999999999
|
||||
context_window = {{ llm_context }}
|
||||
{% endfor %}
|
||||
state: present
|
||||
create: false
|
||||
|
||||
Reference in New Issue
Block a user