Extend expiring logit bias to other sampling parameters#1770
Open
dungquixote42 wants to merge 21 commits into
Open
Extend expiring logit bias to other sampling parameters#1770dungquixote42 wants to merge 21 commits into
dungquixote42 wants to merge 21 commits into
Conversation
|
For the previous version, I notice it sometimes doesn't fire but reasoning budget has been working surprisingly well. I also wanted as the token to start it off but that may be being added via the template :( |
Contributor
Author
Would you share your file content? I can take a look. |
|
Yea.. its what I had before.. I tried to change the first n-n with think but then it caught nothing. |
Contributor
Author
Try this with this PR. It seems to work fine for me. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previous PR: #1731
This PR extends the previous expiring logit bias to other sampling parameters such as temp, top_k and top_p. They can be modified and restored during generation based on specific phrases or durations. It also includes some minor bug fixes.
Syntax + Mechanism
(DURATION : PHRASE ... PHRASE : SPARAM ~ VALUE, ...)"EXITWORD" >>triggers jumping to the phase after the EXITWORD is matched. Mainly for the end-of-thinking tokenSee
X_COMMON_PARAMS_SAMPLINGin sampling.h for the full list of supported SPARAM.Changed Behaviors
(())before the last exitword to exclude from the last phase.Use Cases
Productivity, coding, etc:
Hot -> Cold -> Neutral
Chill -> Warm -> Hot
Early exit with
>>Hybrid use
Inline comments are now supported.
Honorable Mention for Gemma 4:
I suspect this works for Gemma 4 because its tool call uses
<think>. Perhaps it is drawing from other models' reasoning traces?