-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sampling : add DRY sampler (post-refactor) #9702
Co-authored-by: l3utterfly <gc.pthzfoldr@gmail.com> Co-authored-by: pi6am <34464159+pi6am@users.noreply.github.com> * Implementation of DRY Sampling (post-sampling-refactor) * Better merge of latest changes to master in server.cpp * Added co-authors, testing, fix for consistent prompt sampling * Misc. cleanup * Remove debug define * Fixing strict compile errors, cleaning up * Removed unnecessary include * Removed debugging code, moved (de)tokenizing functions * Bug fixes to z-alg implementation * small fix for string_format * restoring Koboldcpp comments, adding attribution in llama.h and llama-sampling.cpp * fixes, adjustments from code review * Removing sequence breaker functions * Addressed warnings from pedantic compile * Trying alternative ways to pull in external tokenize/detoneize functions * Removed C++ version of llama_sampler_init_dry * Implemented testing code * Switched to using llama_tokenize_internal * Removed support for JSON-within-JSON for seq breakers * Removed old llama_sampler_init_dry declaration * Trying ggerganov's suggestion with llama_n_ctx_train * Using vocab instead of model * Restored common_sampler_init signature, using llama_n_ctx_train for context, updated testing code * Minor cleanup * Added --dry-sequence-breaker arg for single breaker, fixed docs and default values * Removed mixed arrays for prompt
- Loading branch information
Showing
17 changed files
with
722 additions
and
62 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.