zeroclaw, still trying to fine-tune things, getting closer.

This commit is contained in:
me
2026-10-08 10:38:05 -07:00
parent d7c321adea
commit 10821d2317
+55 -28
View File
@@ -17,6 +17,9 @@
# #
# Models # Models
# - https://ollama.com/search # - https://ollama.com/search
#
# References
# - https://docs.zeroclaw.com/master/en/reference/config.html
# Currently only testing this on Arch based distros (pacman). # Currently only testing this on Arch based distros (pacman).
- name: Workstation | Linux | Software | ZeroClaw - name: Workstation | Linux | Software | ZeroClaw
@@ -27,17 +30,18 @@
ollama: ollama ollama: ollama
zeroclaw: zeroclaw zeroclaw: zeroclaw
zerocode: zerocode zerocode: zerocode
llm_concurrency: "{{ ansible_processor_vcpus / 4 | round(0, method='ceil') | int }}"
llm_installs: [] llm_installs: []
llm_micro_cpu: 1 llm_micro_cpu: 1
llm_micro_ram: 2000 llm_micro_ram: 2000
llm_micro: llm_micro:
- { "model": "qwen3.5:0.8b", "provider": "qwen_35_0008" } - { "model": "qwen3.5:0.8b", "provider": "qwen_35_0008" }
- { "model": "qwen2.5-coder:0.5b", "provider": "qwen_25_coder_0005" } - { "model": "qwen2.5-coder:0.5b", "provider": "qwen_25_coder_0005" }
- { "model": "qwen2.5-coder:1.5b", "provider": "qwen_25_coder_0015" }
llm_small_cpu: 2 llm_small_cpu: 2
llm_small_ram: 4000 llm_small_ram: 4000
llm_small: llm_small:
- { "model": "qwen3.5:2b", "provider": "qwen_35_0020" } - { "model": "qwen3.5:2b", "provider": "qwen_35_0020" }
- { "model": "qwen2.5-coder:1.5b", "provider": "qwen_25_coder_0015" }
- { "model": "qwen2.5-coder:3b", "provider": "qwen_25_coder_0030" } - { "model": "qwen2.5-coder:3b", "provider": "qwen_25_coder_0030" }
llm_medium_cpu: 4 llm_medium_cpu: 4
llm_medium_ram: 8000 llm_medium_ram: 8000
@@ -113,7 +117,6 @@
ollama_runit_log_script: "{{ ollama_runit_log_dir }}/{{ runit_log_script }}" ollama_runit_log_script: "{{ ollama_runit_log_dir }}/{{ runit_log_script }}"
zeroclaw_runit_log_script: "{{ zeroclaw_runit_log_dir }}/{{ runit_log_script }}" zeroclaw_runit_log_script: "{{ zeroclaw_runit_log_dir }}/{{ runit_log_script }}"
- name: Workstation | Linux | Software | ZeroClaw | Facts | Merge | Micro - name: Workstation | Linux | Software | ZeroClaw | Facts | Merge | Micro
ansible.builtin.set_fact: ansible.builtin.set_fact:
llm_installs: "{{ llm_installs + llm_micro }}" llm_installs: "{{ llm_installs + llm_micro }}"
@@ -122,7 +125,7 @@
- name: Workstation | Linux | Software | ZeroClaw | Facts | Merge | Micro | Uninstall - name: Workstation | Linux | Software | ZeroClaw | Facts | Merge | Micro | Uninstall
ansible.builtin.set_fact: ansible.builtin.set_fact:
llm_installs: "{{ llm_removals + llm_micro }}" llm_removals: "{{ llm_removals + llm_micro }}"
when: ansible_processor_vcpus < llm_micro_cpu when: ansible_processor_vcpus < llm_micro_cpu
or ansible_memtotal_mb < llm_micro_ram or ansible_memtotal_mb < llm_micro_ram
@@ -134,7 +137,7 @@
- name: Workstation | Linux | Software | ZeroClaw | Facts | Merge | Small | Uninstall - name: Workstation | Linux | Software | ZeroClaw | Facts | Merge | Small | Uninstall
ansible.builtin.set_fact: ansible.builtin.set_fact:
llm_installs: "{{ llm_removals + llm_small }}" llm_removals: "{{ llm_removals + llm_small }}"
when: ansible_processor_vcpus < llm_small_cpu when: ansible_processor_vcpus < llm_small_cpu
or ansible_memtotal_mb < llm_small_ram or ansible_memtotal_mb < llm_small_ram
@@ -146,7 +149,7 @@
- name: Workstation | Linux | Software | ZeroClaw | Facts | Merge | Medium | Uninstalls - name: Workstation | Linux | Software | ZeroClaw | Facts | Merge | Medium | Uninstalls
ansible.builtin.set_fact: ansible.builtin.set_fact:
llm_installs: "{{ llm_removals + llm_medium }}" llm_removals: "{{ llm_removals + llm_medium }}"
when: ansible_processor_vcpus < llm_medium_cpu when: ansible_processor_vcpus < llm_medium_cpu
or ansible_memtotal_mb < llm_medium_ram or ansible_memtotal_mb < llm_medium_ram
@@ -158,7 +161,7 @@
- name: Workstation | Linux | Software | ZeroClaw | Facts | Merge | Large | Uninstalls - name: Workstation | Linux | Software | ZeroClaw | Facts | Merge | Large | Uninstalls
ansible.builtin.set_fact: ansible.builtin.set_fact:
llm_installs: "{{ llm_removals + llm_large }}" llm_removals: "{{ llm_removals + llm_large }}"
when: ansible_processor_vcpus < llm_large_cpu when: ansible_processor_vcpus < llm_large_cpu
or ansible_memtotal_mb < llm_large_ram or ansible_memtotal_mb < llm_large_ram
@@ -170,7 +173,7 @@
- name: Workstation | Linux | Software | ZeroClaw | Facts | Merge | Huge | Uninstalls - name: Workstation | Linux | Software | ZeroClaw | Facts | Merge | Huge | Uninstalls
ansible.builtin.set_fact: ansible.builtin.set_fact:
llm_installs: "{{ llm_removals + llm_huge }}" llm_removals: "{{ llm_removals + llm_huge }}"
when: ansible_processor_vcpus < llm_huge_cpu when: ansible_processor_vcpus < llm_huge_cpu
or ansible_memtotal_mb < llm_huge_ram or ansible_memtotal_mb < llm_huge_ram
@@ -182,7 +185,7 @@
- name: Workstation | Linux | Software | ZeroClaw | Facts | Merge | Giant | Uninstalls - name: Workstation | Linux | Software | ZeroClaw | Facts | Merge | Giant | Uninstalls
ansible.builtin.set_fact: ansible.builtin.set_fact:
llm_installs: "{{ llm_removals + llm_giant }}" llm_removals: "{{ llm_removals + llm_giant }}"
when: ansible_processor_vcpus < llm_giant_cpu when: ansible_processor_vcpus < llm_giant_cpu
or ansible_memtotal_mb < llm_giant_ram or ansible_memtotal_mb < llm_giant_ram
@@ -190,6 +193,9 @@
ansible.builtin.debug: ansible.builtin.debug:
var: "{{ item }}" var: "{{ item }}"
loop: loop:
- ansible_processor_vcpus
- ansible_memtotal_mb
- llm_concurrency
- llm_installs - llm_installs
- llm_removals - llm_removals
@@ -232,9 +238,12 @@
# Allow pulling LLMs for use with ZeroClaw. # Allow pulling LLMs for use with ZeroClaw.
exec 2>&1 exec 2>&1
export HOME={{ user_user.home }} export HOME={{ user_user.home }}
export OLLAMA_KEEP_ALIVE=0 # default 5m export OLLAMA_KEEP_ALIVE=1h # default 5m
export OLLAMA_REQUEST_TIMEOUT=600 # default 300 export OLLAMA_REQUEST_TIMEOUT=3600 # default 300 (unconfirmed, not in the list of --help vars)
export OLLAMA_MAX_LOADED_MODELS=1 # default is 3 if using CPUs, or 3 * NumGPUs export OLLAMA_LOAD_TIMEOUT=30m # default is 5m
export OLLAMA_MAX_LOADED_MODELS={{ llm_concurrency }} # default is 3 if using CPUs, or 3 * NumGPUs
export OLLAMA_MAX_QUEUE=999999999 # default is 512 (unconfirmed)
export OLLAMA_NUM_PARALLEL={{ llm_concurrency }} # default is 1 and applies per-model (unconfirmed)
exec chpst -u {{ user }} ollama serve exec chpst -u {{ user }} ollama serve
dest: "{{ ollama_runit_script }}" dest: "{{ ollama_runit_script }}"
mode: "0755" mode: "0755"
@@ -283,7 +292,7 @@
#!/bin/sh -e #!/bin/sh -e
# Allow using the ZeroClaw frontend. # Allow using the ZeroClaw frontend.
exec 2>&1 exec 2>&1
exec chpst -u {{ user }} zeroclaw daemon exec chpst -u {{ user }} zeroclaw daemon -v --log-level info
dest: "{{ zeroclaw_runit_script }}" dest: "{{ zeroclaw_runit_script }}"
mode: "0755" mode: "0755"
@@ -327,20 +336,39 @@
- http://127.0.0.1:11434/ - http://127.0.0.1:11434/
- http://127.0.0.1:42617/health - http://127.0.0.1:42617/health
- name: Workstation | Linux | Software | ZeroClaw | Models | zeroclaw | Defaults #- name: Workstation | Linux | Software | ZeroClaw | Config | zeroclaw | Root
ansible.builtin.blockinfile: # ansible.builtin.blockinfile:
path: "{{ user_user.home }}/.zeroclaw/config.toml" # path: "{{ user_user.home }}/.zeroclaw/config.toml"
marker: "# {mark} ANSIBLE MANAGED BLOCK | zeroclaw | Defaults" # marker: "# {mark} ANSIBLE MANAGED BLOCK | zeroclaw | Defaults"
insertbefore: BOF # insertbefore: '(?m)^schema_version'
block: | # block: |
default_provider = "ollama" # default_provider = "ollama"
default_model = "qwen3.5:4b" # default_model = "qwen3.5:4b"
provider_timeout_secs = 3600 # provider_timeout_secs = 3600
state: present # state: present
create: false # create: false
backup: true # backup: true
owner: "{{ user }}"
mode: "0644" #- name: Workstation | Linux | Software | ZeroClaw | Config | zeroclaw | Channels | header
# ansible.builtin.lineinfile:
# path: "{{ user_user.home }}/.zeroclaw/config.toml"
# insertbefore: '(?m)^[channels]'
# block: |
# message_timeout_secs = 3600
# state: present
# create: false
# backup: true
#- name: Workstation | Linux | Software | ZeroClaw | Config | zeroclaw | Channels
# ansible.builtin.blockinfile:
# path: "{{ user_user.home }}/.zeroclaw/config.toml"
# marker: "# {mark} ANSIBLE MANAGED BLOCK | zeroclaw | Channels"
# insertbefore: '(?m)^[channels]'
# block: |
# message_timeout_secs = 3600
# state: present
# create: false
# backup: true
- name: Workstation | Linux | Software | ZeroClaw | Models | ollama | Install - name: Workstation | Linux | Software | ZeroClaw | Models | ollama | Install
ansible.builtin.shell: | ansible.builtin.shell: |
@@ -395,11 +423,10 @@
[providers.models.ollama.ansible_{{ llm.provider }}] [providers.models.ollama.ansible_{{ llm.provider }}]
model = "{{ llm.model }}" model = "{{ llm.model }}"
timeout_secs = 3600 # 1 hour, default is 120 (2 minutes), issue happens between 5 and 6 minutes though. timeout_secs = 3600 # 1 hour, default is 120 (2 minutes), issue happens between 5 and 6 minutes though.
context_window = 999999999
{% endfor %} {% endfor %}
state: present state: present
create: false create: false
backup: true backup: true
owner: "{{ user }}"
mode: "0644"
when: ansible_pkg_mgr == "pacman" when: ansible_pkg_mgr == "pacman"