llama.cpp
implement adaptive-p sampler
#17927
Merged

implement adaptive-p sampler #17927

ggerganov merged 92 commits into ggml-org:master from ddh0:power-law-sampler
ddh0
ddh0 initial commit for branch
774cf23e
ddh0 simplify constants
5ab4ff7e
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
66e2d17c
ddh0 add params to `struct common_params_sampling`, add reference to PR
88fb0f3f
ddh0 explicitly clamp `min_target` and `max_target` to `[0.0, 1.0]`
374bfd43
ddh0 add args, rename `queue_size` -> `window_size`
ffe16391
ddh0 improved comments
4959878a
ddh0 minor
f3457a83
ddh0 remove old unused code from algorithm
93169593
ddh0 minor
b3aea577
ddh0 add power law case to `common_sampler_init`, add sampler name mappings
cd7de7c7
ddh0 clarify behaviour when `window_size = 0`
534cb4fb
ddh0 add missing enums
dcada035
ddh0
ddh0 ddh0 marked this pull request as ready for review 100 days ago
ddh0 ddh0 requested a review from ggerganov ggerganov 100 days ago
ddh0
ddh0 ddh0 marked this pull request as draft 100 days ago
ddh0 remove `target_range` param, make `target == 1` no-op, cleanup code
2d62bbea
ddh0 oops, straggler
5c78b792
pnb
pnb commented on 2025-12-12
ddh0 add missing parameters in `server-task.cpp`
53380c18
github-actions github-actions added examples
github-actions github-actions added server
ddh0 copy from author
94cb883e
ddh0 remove old debug log, style nit
0a19a3fd
ddh0 fix compiler warning, add commented-out logging per token
824bb3aa
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
1879fc6d
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
67a73367
ddh0 re-write + change parameters + simplify
a96ddd74
ddh0 oops forgot args.cpp
b8a9626a
ddh0 fix leftover `window_size`
965bcc9d
ddh0 add missing values to `common_params_sampling::print()`
d1e5c604
ddh0 with logging
9613c481
ddh0 does this fix it?
2a3f579d
ddh0 no, but does this?
ec54fe5f
ddh0 update default decay
667b70fd
ddh0 Merge branch 'master' into power-law-sampler
36b526d7
ddh0 optimize
69347806
ddh0 fix bad merge
f5d08724
ddh0 silence `missing initializer for member`
493bf301
ddh0 update default decay to 0.9
68543257
ddh0 fix logging
b5ed673c
ddh0 format (double)
4e28eb2f
ddh0 add power law to the new `samplers` vector
1c58e9a9
ddh0 ddh0 force pushed from 778a00ed to 1c58e9a9 97 days ago
ddh0 log sampler init values
4e04bd1c
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
6e66095e
ddh0 improve logging messages in llama_sampler_power_law
9c50b573
ddh0 remove extraneous logging
0344068c
ddh0 simplify target computation
1c2d2e90
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
85b6e52e
ddh0 remove debug logging, explicitly clamp params at init
fcb51290
ddh0 ddh0 marked this pull request as ready for review 96 days ago
ddh0 ddh0 requested a review from ngxson ngxson 96 days ago
ddh0
Geechan
AesSedai
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
58aa1c6f
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
27dda80d
z80maniac
MaggotHATE
ddh0
pnb
ddh0 add `use_power_law` flag + logic, minor cleanup
77529989
ddh0
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
60235724
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
dedbe367
ggerganov
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
f4703d42
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
89ebdf00
Spike645
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
55ad4a89
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
6bad4aef
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
295d1d89
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
ed2890e6
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
51070e0d
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
90f3bfbe
ddh0 update `power-law` -> `adaptive-p`
b95b0884
ddh0 ddh0 changed the title implement Power Law sampling implement adaptive-p sampler 85 days ago
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
f0d3f131
ddh0 fix cold start EMA
e7a89206
ddh0
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
05d7dc9e
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
2d67b1c0
ddh0 update `SHARPNESS` constant to `10.0f`
c6a6f635
ddh0 minor style fixes
08074990
ddh0 minor style fixes cont.
eb854e73
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
55757dcb
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
660a3b27
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
7173e84e
ddh0 update `llama_sampler_adaptive_p_i` for backend sampling (ref: #17004)
c27df510
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
5fdc5307
ddh0
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
0400611a
ggerganov
ggerganov commented on 2026-01-06
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
684c5ff0
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
7ffd3a8c
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
f48413c8
ddh0 separate into `apply` + `accept` functions
bef75d90
ddh0
Beinsezii
ddh0
MrJackSpade
Beinsezii
MrJackSpade
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
8b1292a9
ddh0 `pending_token_idx`: switch from `llama_token` to `int32`
e99a4a66
MrJackSpade
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
af0596c2
ddh0
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
5f04265d
ggerganov
ddh0
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
7f409285
ddh0
ddh0 don't transform logits <= -1e9f
3aa23f3f
ddh0
Beinsezii
ddh0
ggerganov
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
1eff502d
ddh0 fix masking in backend top-p, min-p
d21c87ea
ddh0
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
4b92e3aa
ggerganov
ggerganov
ggerganov approved these changes on 2026-01-14
ddh0 address review comments
33c635e0
ddh0
ddh0 typo in comments `RND` -> `RNG`
4b06e083
z80maniac
ddh0
z80maniac
ddh0 add docs
42af39d6
ddh0
ddh0 add recommended values in completion docs
81af54c6
ddh0
ggerganov
ggerganov commented on 2026-01-14
ddh0 address PR feedback
40fd48f5
ddh0 remove trailing whitespace (for CI `editorconfig`)
b6041b10
timwu
timwu commented on 2026-01-15
ddh0 Merge branch 'ggml-org:master' into power-law-sampler
f222e175
ddh0 add to adaptive-p to `common_sampler_types_from_chars`
d7e3b866
ddh0
ggerganov ggerganov merged 13f1e4a9 into master 66 days ago
ddh0 ddh0 deleted the power-law-sampler branch 29 days ago

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone