Zack Saadioui
8/27/2024
1
launchctl1
2
bash
launchctl setenv OLLAMA_HOST "0.0.0.0"1
2
bash
systemctl edit ollama.service1
[Service]1
2
bash
Environment="OLLAMA_HOST=0.0.0.0"1
OLLAMA_HOST1
OLLAMA_MODELS1
2
bash
ollama run llama3 --set parameter num_ctx 40961
num_ctx1
2
bash
curl http://localhost:11434/api/generate -d '{ "model": "llama3", "prompt": "Why is the sky blue?", "options": { "num_ctx": 4096 } }'1
2
bash
ollama ps1
2
NAME ID SIZE PROCESSOR UNTIL
llama3:70b bcfb190ca3a7 42 GB 100% GPU 4 minutes1
2
bash
export HTTPS_PROXY=https://your.proxy.com1
HTTP_PROXY1
2
bash
curl http://localhost:11434/api/generate -d '{ "model": "mistral" }'1
keep_alive1
2
bash
curl http://localhost:11434/api/generate -d '{ "model": "llama3", "keep_alive": -1 }'1
OLLAMA_MAX_LOADED_MODELS1
OLLAMA_NUM_PARALLEL1
OLLAMA_MAX_QUEUE1
2
3
4
bash
export OLLAMA_MAX_LOADED_MODELS=3
export OLLAMA_NUM_PARALLEL=4
export OLLAMA_MAX_QUEUE=5121
2
bash
journalctl -e -u ollamaCopyright © Arsturn 2025