llm, add a few more ollama env variables as well as set the keep alive to -1 (infinite).
This commit is contained in:
@@ -207,6 +207,8 @@
|
||||
owner: "{{ user }}"
|
||||
mode: "0755"
|
||||
|
||||
# https://docs.ollama.com/faq#setting-environment-variables-on-linux
|
||||
# https://modelpiper.com/blog/ollama-environment-variables
|
||||
- name: Workstation | Linux | Software | LLMs | runit | ollama | Script | Run
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ ollama_runit_script }}"
|
||||
@@ -223,7 +225,7 @@
|
||||
export OLLAMA_REQUEST_TIMEOUT=3600 # default 300 (unconfirmed, not in the list of --help vars)
|
||||
|
||||
### Resource Usage ###
|
||||
export OLLAMA_KEEP_ALIVE=2h # default is 5m
|
||||
export OLLAMA_KEEP_ALIVE=-1 # 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
|
||||
@@ -239,6 +241,12 @@
|
||||
### Tokens ###
|
||||
{{ ("export HF_TOKEN=" ~ hf_token) if hf_token else '' }}
|
||||
|
||||
### Logging ###
|
||||
export OLLAMA_DEBUG=1
|
||||
|
||||
### Other ###
|
||||
export OLLAMA_ORIGINS=*
|
||||
|
||||
exec chpst -u {{ user }} ollama serve
|
||||
mode: "0755"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user