-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor the sampling class #199
Merged
bdashore3
merged 23 commits into
theroyallab:main
from
SecretiveShell:refactor-sampling
Oct 27, 2024
Merged
Refactor the sampling class #199
bdashore3
merged 23 commits into
theroyallab:main
from
SecretiveShell:refactor-sampling
Oct 27, 2024
Conversation
This file contains 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
Chat completion and completion need to have prompt split out before pushing to the backend. Signed-off-by: kingbri <bdashore3@proton.me>
Some OAI implementations use -1 as disabled instead of 0. Therefore, add a coalesce case. Signed-off-by: kingbri <bdashore3@proton.me>
Make the code more readable. Signed-off-by: kingbri <bdashore3@proton.me>
Field items are nested in data within a Pydantic FieldInfo Signed-off-by: kingbri <bdashore3@proton.me>
Signed-off-by: kingbri <bdashore3@proton.me>
If the provided string has whitespace, trim it before splitting. Signed-off-by: kingbri <bdashore3@proton.me>
Let the user know if the sequence errors out. Signed-off-by: kingbri <bdashore3@proton.me>
Validators need to be applied in order from top to bottom, this is why the after validator was not being applied properly. Set the model to validate default params for sampler override purposes. This can be turned off if there are unclear errors. Signed-off-by: kingbri <bdashore3@proton.me>
Cleanup and semantically fix field validators Signed-off-by: kingbri <bdashore3@proton.me>
Validators on parent fields cannot see child fields. Therefore, validate using the child fields instead and alter the parent field data from there. Also fix badwordsids casting. Signed-off-by: kingbri <bdashore3@proton.me>
If a user sets an override to a non-default value, that's their own fault. Run validator on the actual mirostat_mode parameter rather than the alternate mirostat parameter. Signed-off-by: kingbri <bdashore3@proton.me>
Currently, this serves to ban the EOS token. All other functionality was legacy, so remove it. Signed-off-by: kingbri <bdashore3@proton.me>
This was only necessary for badwordsids. All other fields are handled by exl2. Keep the class as a stub if it's needed again. Signed-off-by: kingbri <bdashore3@proton.me>
TabbyAPI supports XTC now. Signed-off-by: kingbri <bdashore3@proton.me>
Reduces the probability for errors and makes the class consistent. Signed-off-by: kingbri <bdashore3@proton.me>
Instead of adding a model_validator, use greater than or equal to constraints provided by Pydantic. Signed-off-by: kingbri <bdashore3@proton.me>
Signed-off-by: kingbri <bdashore3@proton.me>
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.
This PR aims to refactor parts of the sampling to be much more compact.