llama.cpp/examples/server/public
MaggotHATE fbc98b748e
sampling : add XTC sampler (#9742)
* Initial XTC commit

Adds XTC sampler, not activated by default, but recommended settings by default.

* Cleanup

* Simplified chances calculation

To be more inline with the original implementation, chance is calculated once at the beginning.

* First fixes by comments

Still need to look into sorting

* Fixed trailing backspaces

* Fixed RNG to be reproduceable 

Thanks to @slaren for directions

* Fixed forgotten header

* Moved `min_keep` 

Moved from conditions to a simple check at the end.

* Fixed broken randomization

Thanks to @slaren for explanation

* Swapped sorting for a custom algorithm

Shifts tokens to remove the penalized ones, then puts the penalized at the back. Should make `min_keep` still viable.

* Algorithm rework

1. Scan token from top till the first non-penalizable
2. Remove the last captured token (the least probable above threshold)
3. Shift all tokens to override the remaining penalizable
4. Penalize and put them at the the bottom.

* Added XTC to `test-sampling`

* Simplified algorithm and more tests

* Updated info in common and args

* Merged back lost commits in common and arg

* Update dump info in common

* Fixed incorrect min_keep check

* Added XTC to README

* Renamed parameters, fixed info and defaults

* probability is at 0 by default, but XTC is included in sampling queue
* threshold higher than 0.5 switches XTC off

* Initial server support

* Added XTC to server UIs

* Fixed labels in old server UI

* Made algorithm safer and more readable

* Removed xtc_threshold_max

* Fixed arg after update

* Quick fixes by comments

* Simplified algorithm since threshold_max is removed

* Renamed random distribution

* Fixed tests and outdated README

* Small fixes
2024-10-15 12:54:55 +02:00
..
colorthemes.css server : new UI (#7633) 2024-06-01 22:31:48 +03:00
completion.js server: use relative routes for static files in new UI (#8552) 2024-07-18 12:43:49 +02:00
favicon.ico server : add themes + favicon (#6848) 2024-05-08 22:12:06 +03:00
index-new.html sampling : add XTC sampler (#9742) 2024-10-15 12:54:55 +02:00
index.html sampling : add XTC sampler (#9742) 2024-10-15 12:54:55 +02:00
index.js server : update preact (#9895) 2024-10-15 12:48:44 +03:00
json-schema-to-grammar.mjs json: restore default additionalProperties to false, fix some pattern escapes (#8180) 2024-06-28 09:26:45 +01:00
loading.html server : add loading html page while model is loading (#9468) 2024-09-13 14:23:11 +02:00
prompt-formats.js server : new UI (#7633) 2024-06-01 22:31:48 +03:00
style.css server : new UI (#7633) 2024-06-01 22:31:48 +03:00
system-prompts.js server : new UI (#7633) 2024-06-01 22:31:48 +03:00
theme-beeninorder.css server : new UI (#7633) 2024-06-01 22:31:48 +03:00
theme-ketivah.css server : new UI (#7633) 2024-06-01 22:31:48 +03:00
theme-mangotango.css server : new UI (#7633) 2024-06-01 22:31:48 +03:00
theme-playground.css server : new UI (#7633) 2024-06-01 22:31:48 +03:00
theme-polarnight.css server : new UI (#7633) 2024-06-01 22:31:48 +03:00
theme-snowstorm.css server : new UI (#7633) 2024-06-01 22:31:48 +03:00