edit documentation for clarity, add table for per-query context composition

This commit is contained in:
Denton Social committed 2026-09-30 15:01:47 -05:00
1 parent e93db6ec09
commit 50c83c61fd
4 files changed
+80 -15

No files matched your search

+8 -7
View File
@@ -80,13 +80,14 @@ class OpenAICompatClient:
It lets a SemIf continue/stop decision cut off a generation that is
looping instead of converging, before it fills the context window.
Sampler defaults follow the Qwen3.8 model card's instruct-mode guidance
(unsloth/Qwen3.8-27B-GGUF): the anti-repetition cure is a high
`presence_penalty`, not greedy temperature. `temperature`/`top_p`/
`presence_penalty`/`frequency_penalty` are per-`chat` overridable; the
`generate_skill_body` escalation ladder bumps presence toward the card's
max (2.0) and lowers temperature on retries. `max_attempts` bounds that
ladder (default 3).
Sampler defaults are the Qwen3.8 card's instruct-mode preset
(unsloth/Qwen3.8-27B-GGUF) used as an anti-repetition sampler, not to
toggle reasoning: a high `presence_penalty` is the loop cure, while the
prototype thinking-mode preset (`presence_penalty=0.0`) is what this
codegen model loops under. `temperature`/`top_p`/`presence_penalty`/
`frequency_penalty` are per-`chat` overridable; the `generate_skill_body`
escalation ladder bumps presence toward the card's max (2.0) and lowers
temperature on retries. `max_attempts` bounds that ladder (default 3).
"""
error_class = ProviderError
+5 -5
View File
@@ -275,7 +275,7 @@ class Scheduler:
# ---- decision templates (all real SemIf, all logged) ----
def _choice(self, request: Request, current: Process) -> bool:
def _interrupt_choice(self, request: Request, current: Process) -> bool:
decision = DecisionRequest(
state=compose_state(request, current=current.skill),
question="Should this be allowed to interrupt the current process?",
@@ -292,7 +292,7 @@ class Scheduler:
)
return result.prob(CHOICE_INTERRUPT) >= self.tau
def _score(self, request: Request, current: str | None = None) -> tuple[float, str]:
def _priority_score(self, request: Request, current: str | None = None) -> tuple[float, str]:
decision = DecisionRequest(
state=compose_state(request, current=current),
question="How urgent is this request?",
@@ -335,7 +335,7 @@ class Scheduler:
self.trace.append("submit", request.id, text=text, source=source)
if self.current is None:
weight, label = self._score(request)
weight, label = self._priority_score(request)
self.current = Process(request=request, skill="(scheduling)", weight=weight)
try:
outcome = self._dispatch(request, weight=weight)
@@ -347,7 +347,7 @@ class Scheduler:
self.trace.append("ran", request.id, skill=outcome.skill, summary=outcome.summary)
return "running", f"[{label}] {outcome.summary}", request.id
interrupt = self._choice(request, self.current)
interrupt = self._interrupt_choice(request, self.current)
if interrupt:
if self.pending is not None:
self.trace.append("pending_abandoned", self.pending.request.id)
@@ -364,7 +364,7 @@ class Scheduler:
self.trace.append("ran", request.id, skill=outcome.skill, summary=outcome.summary)
return "preempted", f"interrupted {previous.skill}; {outcome.summary}", request.id
weight, label = self._score(request, current=self.current.skill)
weight, label = self._priority_score(request, current=self.current.skill)
ok = self.queue.push(request, weight)
if not ok:
self.trace.append("rejected", request.id, reason="queue is full")