Reduce ctx to 2048 for Pi 5 CPU speed

This commit is contained in:
Claude Code
2026-04-08 19:40:52 +00:00
parent 072d64a5e9
commit 607192aaec

View File

@@ -197,7 +197,7 @@ spec:
# Default is OpenRouter; override to local Ollama on edge1
mkdir -p /a0/usr/plugins/_model_config
cat > /a0/usr/plugins/_model_config/config.json << 'MODELCFG'
{"allow_chat_override":true,"chat_model":{"provider":"ollama","name":"qwen2.5-coder:7b","api_base":"http://10.0.57.17:11434","ctx_length":32768,"ctx_history":0.7,"vision":false,"kwargs":{"temperature":0,"num_ctx":32768}},"utility_model":{"provider":"ollama","name":"qwen2.5-coder:7b","api_base":"http://10.0.57.17:11434","ctx_length":8192,"ctx_input":0.7,"kwargs":{"num_ctx":8192}},"embedding_model":{"provider":"ollama","name":"nomic-embed-text","api_base":"http://10.0.57.17:11434","kwargs":{}}}
{"allow_chat_override":true,"chat_model":{"provider":"ollama","name":"qwen2.5-coder:7b","api_base":"http://10.0.57.17:11434","ctx_length":2048,"ctx_history":0.7,"vision":false,"kwargs":{"temperature":0,"num_ctx":2048}},"utility_model":{"provider":"ollama","name":"qwen2.5-coder:7b","api_base":"http://10.0.57.17:11434","ctx_length":2048,"ctx_input":0.7,"kwargs":{"num_ctx":2048}},"embedding_model":{"provider":"ollama","name":"nomic-embed-text","api_base":"http://10.0.57.17:11434","kwargs":{}}}
MODELCFG
# Strip heredoc indentation
sed -i 's/^ //' /a0/usr/plugins/_model_config/config.json
@@ -217,9 +217,9 @@ spec:
- name: A0_SET_chat_model_api_base
value: "http://10.0.57.17:11434"
- name: A0_SET_chat_model_ctx_length
value: "32768"
value: "2048"
- name: A0_SET_chat_model_kwargs
value: '{"temperature": 0, "num_ctx": 32768}'
value: '{"temperature": 0, "num_ctx": 2048}'
# Utility model — same as chat (only one model available)
- name: A0_SET_util_model_provider
value: "ollama"
@@ -228,7 +228,7 @@ spec:
- name: A0_SET_util_model_api_base
value: "http://10.0.57.17:11434"
- name: A0_SET_util_model_kwargs
value: '{"num_ctx": 8192}'
value: '{"num_ctx": 2048}'
# Embedding model — nomic on edge1
- name: A0_SET_embed_model_provider
value: "ollama"