Checklist for moving from simulated / fallback inference to a live vision-capable backend. The framework already supports llama_cpp and ollama_vision; this doc is the operational path.
- At least one image in
test_images/(or your profile’sfolders.input). - Inference server is running and reachable (see options below).
-
configs/dev.json(or your profile) setsmodel_settings.inference.backendto the backend you intend. - Timeouts are realistic for your hardware (
timeout_sin merged config fromconfigs/base.json).
Success signal in reports: decision.backend is llama_cpp or ollama_vision, not llama_cpp->simulated or ollama_vision->simulated. The msg field should not mention “fallback to simulated inference”.
dev profile defaults to llama_cpp and merges host settings from configs/base.json:
| Setting | Default (base) |
|---|---|
| Host | http://127.0.0.1:8080 |
| Endpoint | /v1/chat/completions |
| Model name | local-model (must match server) |
| Timeout | 45 seconds |
Use your usual llama.cpp / llama-server launch so it exposes chat completions on port 8080 (or change config to match). The model name in the server CLI must match llama_cpp.model in config.
PYTHONPATH=src python test_connection.pyAdjust URL/model inside test_connection.py if your server differs. You should see Connected. and no connection error.
configs/dev.json only needs the backend key today; add a block under model_settings.inference if you use a non-default port or model id:
"inference": {
"backend": "llama_cpp",
"llama_cpp": {
"host": "http://127.0.0.1:8080",
"model": "your-gguf-model-id",
"timeout_s": 60
}
}python3 src/ai_quality_agent.py --profile dev \
--inference-backend llama_cpp \
--async-batch --async-concurrency 4 \
--parallel-metricsStart with a few images before --stress-test-100.
ollama pull llava:7b
ollama serve # if not already runningDefault in configs/base.json: http://localhost:11434, model llava:7b.
curl -s http://localhost:11434/api/tagsCLI (no file edit):
python3 src/ai_quality_agent.py --profile dev --inference-backend ollama_visionOr in config:
"inference": {
"backend": "ollama_vision",
"ollama": {
"host": "http://localhost:11434",
"model": "llava:7b",
"timeout_s": 45
}
}Same as Option A step 4; use --inference-backend ollama_vision if not set in JSON.
| Flag | When to use |
|---|---|
--parallel-metrics |
Many images; CPU metrics (Pillow) are a large share of wall time. |
--async-batch |
Waiting on HTTP inference; limits in-flight requests with --async-concurrency (default 4). |
--repeatability-test dev --repeatability-runs 5 |
Check model output stability across runs (meaningless for pure simulated). |
Simulated-only dev work does not need --async-batch; real model batches benefit from both async I/O and parallel metrics.
| Symptom | Likely cause |
|---|---|
404 on 127.0.0.1:8080 |
llama server not running or wrong port/path |
backend: ...->simulated |
Request failed; see msg for exception text |
| Same pass rate as before, very low latency | Still on simulated path |
Timeouts / ERR_MODEL_BACKEND_503 |
Increase timeout_s; reduce --async-concurrency |
| Ollama errors | Model not pulled, wrong host, or non-vision model |
CI continues to use simulated inference for deterministic, fast gates. Real model runs are local or staging until you add optional integration jobs with a pinned server image.
See also: Architecture.md, README § “Config-only inference backend selection”.