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!
==== I’d spec it like this: ==== * Maintain last_line and repeat_count. * As streamed text arrives, split into completed lines (buffer partial line until newline). * Normalize a line before comparison: - strip trailing whitespace - optionally collapse runs of spaces/tabs - ignore empty/very-short lines (e.g. < 8 chars) * If line == last_line: repeat_count += 1, else reset to 1 and update last_line. * If repeat_count >= N and line length >= min_len, trigger: - cancel request (free slot) - mark terminal: FAILED(reason="repeated_line_loop") - attach loop_line (truncated) and repeat_count to debug/status Conservative defaults that won’t trip on normal output: * N = 8–12 * min_len = 32–64 * ignore lines that are just punctuation/whitespace * optional: don’t start checking until min_generated_chars (e.g. 512) so you don’t kill harmless prompt echoes This plus max_tokens is a very solid “early kill the worst derangements” combo.
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)