ship codegen sampler params + escalation ladder per Qwen3.8 card

CodegenClient now sends temperature/top_p/presence_penalty/frequency_penalty
(card-endorsed high presence_penalty, temp 0.7 instead of greedy 0.0) and
generate_skill_body escalates on invalid parse with an escalated sampler
(temp 0.5/presence 2.0) and a fresh short corrective prompt, up to max_attempts.
Degeneration aborts are a distinct DegenerationError(CodegenError) that
propagates without retry; retry-on-degeneration is left open. Marks guardrail
items 5/6 per the model card.
This commit is contained in:
Denton Social committed 2026-09-24 20:24:20 -05:00
1 parent 7c5cd2b685
commit d18f0ccdb6
5 files changed
+363 -38

No files matched your search

+5
View File
@@ -70,6 +70,11 @@ def build_scheduler(config: dict) -> tuple[Scheduler, dict]:
degeneration_interval=int(deg_cfg.get("interval", 8000)),
degeneration_window=int(deg_cfg.get("window", 2000)),
degeneration_min_chars=int(deg_cfg.get("min_chars", 4000)),
temperature=float(codegen_cfg.get("temperature", 0.7)),
top_p=float(codegen_cfg.get("top_p", 0.85)),
presence_penalty=float(codegen_cfg.get("presence_penalty", 1.5)),
frequency_penalty=float(codegen_cfg.get("frequency_penalty", 0.2)),
max_attempts=int(codegen_cfg.get("max_attempts", 3)),
)
def make_degeneration_check(run_id: str):