llm, simplify Continue config, add a function for pulling the LLMs outside of Ansible, adjust ollama settings.
This commit is contained in:
@@ -186,10 +186,10 @@
|
||||
exec 2>&1
|
||||
export HOME={{ user_user.home }}
|
||||
# Timeouts #
|
||||
export OLLAMA_LOAD_TIMEOUT=30m # default is 5m
|
||||
export OLLAMA_LOAD_TIMEOUT=20m # default is 5m
|
||||
export OLLAMA_REQUEST_TIMEOUT=3600 # default 300 (unconfirmed, not in the list of --help vars)
|
||||
# Resource Usage #
|
||||
export OLLAMA_KEEP_ALIVE=20m # default 5m
|
||||
export OLLAMA_KEEP_ALIVE=20m # default is 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={{ llm_context }} # default is 4096, https://docs.ollama.com/faq#how-can-i-specify-the-context-window-size
|
||||
@@ -323,6 +323,42 @@
|
||||
# create: false
|
||||
# backup: true
|
||||
|
||||
|
||||
- name: Workstation | Linux | Software | LLMs | Models | ollama | Manual Script
|
||||
ansible.builtin.blockinfile:
|
||||
path: "{{ user_user.home }}/{{ item }}"
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK | ollama | Manual Script"
|
||||
content: |
|
||||
function pull_llms() {
|
||||
echo "Manually Pulling Models"
|
||||
{% for llm in llm_installs %}
|
||||
|
||||
echo -e "\n\n Starting {{ llm.model }} \n\n"
|
||||
ollama pull {{ llm.model }} || {
|
||||
status=$?
|
||||
echo "ERROR: Pull failed with status $status, exiting."
|
||||
exit $status
|
||||
}
|
||||
{% endfor %}
|
||||
echo "Done!!"
|
||||
}
|
||||
alias pull-llms="pull_llms "
|
||||
alias pull-models="pull_llms "
|
||||
alias pull-ai="pull_llms "
|
||||
state: present
|
||||
create: false
|
||||
backup: true
|
||||
loop:
|
||||
- .bashrc
|
||||
- .zshrc
|
||||
|
||||
- name: Workstation | Linux | Software | LLMs | Models | ollama | Manual Script | Message
|
||||
ansible.builtin.debug:
|
||||
msg: |
|
||||
The next task may take hours, if not days. if you'd a status bar,
|
||||
I highly recommed reloading your RC file and running `pull-models`.
|
||||
That will give you a much better idea of what's going on.
|
||||
|
||||
- name: Workstation | Linux | Software | LLMs | Models | ollama | Install
|
||||
ansible.builtin.shell: |
|
||||
set -o pipefail
|
||||
@@ -391,24 +427,14 @@
|
||||
version: 1.0.0
|
||||
schema: v1
|
||||
models:
|
||||
mode: "0644"
|
||||
|
||||
- name: Workstation | Linux | Software | LLMs | Models | Continue | Models
|
||||
ansible.builtin.blockinfile:
|
||||
path: "{{ user_user.home }}/.continue/config.yml"
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK | llm.yml | Continue"
|
||||
insertafter: EOF
|
||||
block: |
|
||||
{% for llm in llm_installs %}
|
||||
- name: llm.provider
|
||||
- name: {{ llm.provider }}
|
||||
provider: ollama
|
||||
model: llm.model
|
||||
model: {{ llm.model }}
|
||||
defaultCompletionOptions:
|
||||
contextLength: {{ llm_context }}
|
||||
maxTokens: {{ llm_context }}
|
||||
{% endfor %}
|
||||
state: present
|
||||
create: false
|
||||
backup: true
|
||||
mode: "0644"
|
||||
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
|
||||
Reference in New Issue
Block a user