SamDNX Claude Opus 4.8 commited on
Commit
429fd32
·
1 Parent(s): e5fbc3f

Tune for free CPU tier: smaller ctx, trimmed retrieval, no re-rank, capped tokens

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -2
  2. config.yaml +5 -5
Dockerfile CHANGED
@@ -21,9 +21,9 @@ ENV HOME=/home/user \
21
  PORT=7860 \
22
  OLLAMA_URL=http://localhost:11434 \
23
  OLLAMA_MODEL=qwen2.5:1.5b \
24
- EMBED_MODEL=nomic-embed-text \
25
  INDEX_PATH=/tmp/mru_budget_index.parquet \
26
- OMP_NUM_THREADS=4 \
 
27
  OLLAMA_NUM_PARALLEL=1
28
 
29
  WORKDIR /home/user/app
 
21
  PORT=7860 \
22
  OLLAMA_URL=http://localhost:11434 \
23
  OLLAMA_MODEL=qwen2.5:1.5b \
 
24
  INDEX_PATH=/tmp/mru_budget_index.parquet \
25
+ RERANK=off \
26
+ OMP_NUM_THREADS=2 \
27
  OLLAMA_NUM_PARALLEL=1
28
 
29
  WORKDIR /home/user/app
config.yaml CHANGED
@@ -14,13 +14,13 @@ ollama:
14
  model: null # null = first installed model
15
  request_timeout: 300
16
  keep_alive: 30m # keep the model resident between questions
17
- num_ctx: 8192 # context window: fits the excerpts + answer without truncation
18
- num_predict: null # max answer tokens (null = model default)
19
  warm_on_start: true # preload the model at startup so the first answer is fast
20
 
21
  retrieval:
22
- top_k: 6
23
- context_budget: 11000 # chars of excerpt context handed to the model
24
- rerank: auto # embedding re-rank of BM25 hits: auto | on | off
25
  embed_model: nomic-embed-text # Ollama embedding model (auto-used only if installed)
26
  rerank_k: 30 # BM25 candidates to re-rank by embedding similarity
 
14
  model: null # null = first installed model
15
  request_timeout: 300
16
  keep_alive: 30m # keep the model resident between questions
17
+ num_ctx: 4096 # context window: smaller = much faster prefill on CPU
18
+ num_predict: 512 # cap answer tokens so long answers don't stall on CPU
19
  warm_on_start: true # preload the model at startup so the first answer is fast
20
 
21
  retrieval:
22
+ top_k: 4
23
+ context_budget: 5000 # chars of excerpt context handed to the model (smaller = faster on CPU)
24
+ rerank: off # embedding re-rank of BM25 hits: auto | on | off (off = no extra round-trip)
25
  embed_model: nomic-embed-text # Ollama embedding model (auto-used only if installed)
26
  rerank_k: 30 # BM25 candidates to re-rank by embedding similarity