mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1560] Field data: the greedy/tool-loop issue measured with a replay harness built from real production loops — and a layer-by-layer view of where each mitigation actually helps #624
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#624
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @liqiang74 on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1560
Hi — thank you for #728 and for your Oct 7 diagnosis there ("the cause is greedy default sampling when the client sends none"). That sentence is the actual fix; everything below is just our attempt to measure it properly on our own stack and to share a method other users could reuse. Please read the data as a modest field report, not a claim of anything new.
Our setup: Qwen3.8-Flash-Next IQ3_S, Strata v0.1.40.2, single Tesla V100, behind an agent harness (OpenClaw) that talks to the model through tool calls. Our workload is tool calls, so we had also avoided global sampling defaults in the past — which is exactly the trap #728 describes.
What we think is the one useful contribution: a replay harness from real loops
Most loop reports (including #980, #710, and ours earlier) use synthetic induction — a tool that always fails, repeated prompts, etc. Those are easy to dismiss as artificial. So we built the test set out of loops that actually happened in production:
rule=loop), each carrying the real task goal, the real repeated command and the real tool result.build-real-corpus.pyextracts "the complete real prefix up to the point the loop started";realprefix-replay.pyfeeds that prefix back and lets the model continue, with a fixed return per turn (the same semantics that produced the loop).The value of this is the two-way anchor: the old behavior reproduces the real production loop (so the sample is genuine, not staged), and the new behavior suppresses it (so the fix is real). A synthetic loop only shows the second half.
Result (same 16 real cases, loop = max streak ≥ 4 identical calls)
sampling {1.0/0.95/20}Cross-checked with a separate synthetic harness (20 runs/arm): config defaults cut loop onset ~90% (guard engagement counter 41 → 4), consistent with your #728 conclusion.
The layer-by-layer part, stated honestly
If it is ever useful: the cross-request guard design (not a request to merge)
Your
reasoning_loop_recovery(c3473262) is per-reply and, as you noted in #710, cannot see a loop that spans requests. If you ever want to cover that family too, here is the minimal thing we tried, in the same opt-in style — offered only as a reference, not as something you should take:repetition_penalty=1.1, penalty_last_n=512only if the client sent no penalty of its own; never add temperature/top_p; never rewrite the request bytes (injection happens after tokenization, so caching and pass-through stay intact).Limits (so the numbers are not over-read)
16 real cases, one model/tier (IQ3_S), one GPU (V100), one harness — this is mechanistic evidence, not a statistical law. The penalty of 1.1 and K=4 are local sweet spots, not universal optima. Shared in the hope the method (real-loop replay + layer attribution) is more useful to others than our particular numbers.
Happy to share the full corpus, the raw JSONL and summary CSVs if anyone wants to reproduce it.
@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.