His ask: one general construction door so a signature's model/settings change by editing config alone — no call-site ifs, now or ever after. lm[ExtractSignature]: as a config.yaml sibling of lm: (provider: inherits base_url + transport ceiling; model: builds a dedicated cached LM; other keys -> per-call lm_kwargs through Predict config, honored by dspy 3.4.1 _forward_preprocess). predict() is the door: the 13 construction sites swapped mechanically. First block shipped: ExtractSignature max_tokens=1800 (the 4096 cap was 3x headroom that only extended the worst case on slow local models — the 40-min arithmetic). run.log reports active blocks at startup. TDD: tests/lm_signature_router.py 5/5 (parse, no-block defaults, settings-only override, dedicated+cached LM, provenance listing).
52 lines
2.4 KiB
YAML
52 lines
2.4 KiB
YAML
# floop draft config — see README.md
|
|
lm:
|
|
# provider selected by FLOOP_LM env var (local | ollama-cloud), default below
|
|
default: local
|
|
local:
|
|
base_url: http://127.0.0.1:11435/v1 # silent ollama
|
|
# model: qwen3.8:27b
|
|
model: qwen3.8-27b-uc-64k:latest
|
|
max_tokens: 4096
|
|
temperature: 0.0
|
|
# transport ceiling (fix: EXTRACT hangs >600s on a busy 3090; the
|
|
# silent-ollama proxy in front cuts at its own READ_TIMEOUT=600s).
|
|
# read_timeout_s -> lm15 Timeouts(read=) — one attempt may run this long.
|
|
# num_retries -> dspy's retry loop (LMTransportError is retryable);
|
|
# each retry costs up to read_timeout_s, so keep retries LOW locally.
|
|
read_timeout_s: 1800 # 30 min: one honest attempt for a long EXTRACT
|
|
num_retries: 1 # one re-try after a cut, not 3x30min
|
|
ollama-cloud:
|
|
base_url: https://ollama.com/v1
|
|
model: glm-5.3-flash
|
|
max_tokens: 4096
|
|
temperature: 0.0
|
|
api_key_env: OLLAMA_API_KEY
|
|
read_timeout_s: 300 # glm answers EXTRACT in ~3s; 300s bounds a wedged call
|
|
num_retries: 2 # cloud retries are cheap
|
|
|
|
# per-signature settings: lm[<SignatureName>] overrides the active provider's
|
|
# settings for that stage ONLY (model/max_tokens/temperature/...). provider:
|
|
# selects which provider block inherits base_url + transport ceiling; model:
|
|
# builds a dedicated cached LM for that stage. No block -> run defaults.
|
|
lm[ExtractSignature]:
|
|
provider: local
|
|
max_tokens: 1800 # EXTRACT output is facts+quotes: ~120 tok/fact;
|
|
# 4096 was 3x headroom that only extended hangs
|
|
# on slow local models (the 40-min arithmetic)
|
|
|
|
budget:
|
|
max_llm_calls: 80 # per FLOOP run (children get a slice; fan-outs multiply
|
|
# entity questions — a 3-river fan needs ~3x a scalar)
|
|
min_child_budget: 6
|
|
max_depth: 2 # recursion cap (PIPELINE.md §8.4)
|
|
max_retries: 3 # bounded self-refinement on unparseable LLM output
|
|
missing_extensions: 1 # how many times "what is still missing?" may reopen questions per run
|
|
|
|
knowledge:
|
|
enabled: true # real KG pipeline for the knowledge expert; false -> baseline LLM
|
|
kb_path: knowledge_store/kg.sqlite
|
|
max_articles: 3 # per knowledge call
|
|
max_search_results: 4 # candidates considered
|
|
max_chunks_extracted: 6 # per call (lexical gate decides which)
|
|
chunk_chars_target: 32000
|
|
chunk_chars_cap: 48000 |