Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/694057b6-101c-8007-9a65-c40578c7252d
(section)
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Since you’re already planning internal streaming, you can add a loop detector that triggers before max_tokens when the output is clearly stuck. ==== ===== - Runs only while streaming output is coming in. ===== * If it triggers, it cancels that request and frees the slot. * It should not automatically restart the worker process (a looping model is usually not a dead server). * Records a short “why” snippet in request debug info. Terminal reason example: FAILED(reason="loop_detected"). ===== Use multiple weak signals together (to avoid false positives): ===== # Repeated line detector * Keep the last K lines (e.g., 20–50). * If the same line appears N times in a row (e.g., 8+) or dominates the window (e.g., >70%), flag. # Repeated suffix detector * Keep last M characters/tokens (e.g., 2–8k chars). * If the newest chunk makes the output end with a suffix that has appeared repeatedly (same ~200–500 char tail repeated 3+ times), flag. # Low novelty / low entropy * Track unique-token or unique-3gram rate over a sliding window. * If novelty drops below a threshold for long enough and output length keeps growing, flag. ===== This matters because some legitimate outputs look repetitive: ===== * tables, logs, code templates, poetry refrains, etc. So add to worker config / per-request overrides: * loop_detection_enabled (default on, but tunable) * thresholds (line repeats, suffix length, window size) * min_generated_tokens_before_check (don’t trigger too early)
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)