Fix misc. expiring logit/sparam bias bugs#1914
Conversation
|
@Ph0rk0z did you get around to test without bans? Also, do you see the bugs in the first response, or in the second and later? |
|
It still happens kind of randomly. Sometimes the first reply will be correct and reasoning ends, other times even that will eat the whole 2048 token budget. I also thought that maybe XTC is interacting with it too, due to the sporadic nature? I mean if we can't use string bans, xtc or any of that this will end up kind of pointless. Ideally it should control reasoning where the string bans don't really fire and I'm loading it from a file to bypass API bugs. |
bb74b08 to
281f69c
Compare
|
It looks like the rewind mechanism does not fully clear speculated tokens. ELB seems fine otherwise? Maybe. |
|
@Ph0rk0z I have been testing with XTC and string ban enabled. Simple cases, but things look good on my end. |
|
I will have to give it a go. |
|
@Ph0rk0z just fixed a major bug. |
- Implements `common_expiring_logit_bias_rewind` to allow ELB/EPB state rollbacks during speculative decoding and banned phrase triggers. - Replaces `to_generated_text` pointer logic in `common_sampler` with `generated_text` view and `playing_text`. - Adds `string_assign_append` helper to optimize string window concatenation. - Hooks up `n_rewind` tracking in `server-context.cpp`.
…tion This commit addresses several bugs in the sampling and server context: * Fixes a duplicate argument bug calculating search window length in ELB application. * Properly cleans up expiring logit bias states during a rewind. * Prevents the server from setting `is_decoding = true` before the prompt is fully ingested. * Minor debug logging fixes.
8f9230c to
7a7617d
Compare
Previous PRs: #1731, #1770
This PR addresses an issue where context rewinds (speculative decoding rollbacks or string bans) would desynchronize the Expiring Logit Bias (ELB) and Expiring Sampling Parameter Bias (EPB) state machines.
Also fixes various miscellaneous bugs + code QC.
Tests
Below are representative tests from the previous PRs, retested to see no regression.
New Test
This is a loopback test for testing compatibility with the rewind mechanism.
With the string
"The quick brown fox jumps over the lazy dog"is banned, the server is stuck repeatedly injecting the string and rewinding it.The rewinding part does not print the sparam bias, but the reapplication shows it was correctly restored.