The sampler chain gains llama.cpp's dry stage (penalties -> DRY -> top_k -> ...): a token that would extend a
repeat longer than dry_allowed_length over the last dry_penalty_last_n history tokens loses
dry_multiplier * dry_base^(repeat - allowed_length), with tokenized restart sequences capping the scan.
- kernels/cuda/sampler.cu: dry_window/dry_build/apply_dry in the greedy, old, one-block, split and coupled
penalize kernels; the DRY window is the same history row the penalties count, clamped to kDryWindowCap=512;
the membership bitmap spans the wider of the two windows and gates both. Off (the default) the neutral path
is unchanged: shmem 0, the cluster argmax still runs, the parity fixtures pin every path against a host
reference (sampler_parity, 19 fixtures).
- include/strata/kernels/sampler.hpp: the dry_* fields, DryBreakers (device flat/off), dry_enabled.
- verify / mtp: Verifier::set_breakers and MtpDrafter::set_draft_breakers thread the tokenized breakers to the
head sampling and the captured coupled-draft graph (stable device arrays).
- generate.cpp (engine): dry_multiplier / dry_base / dry_allowed_length / dry_penalty_last_n / dry_breakers GEN
keys; the breaker arrays are allocated once at the cap on the head device, the request refills them; a
DRY-only request still stages history (the wider of the two windows).
- front end: --dry-multiplier / --dry-base / --dry-allowed-length / --dry-penalty-last-n / --dry-breakers
defaults and dry_* / dry_sequence_breakers request fields; the front end tokenizes the restart sequences
(the engine has no tokenizer) and sends them as ids. The defaults are llama.cpp's: multiplier 0.8, base
1.75, allowed length 2, window 256, breakers newline, colon, quote, asterisk when unset.
Source: https://github.com/Niko1221/Strata, commit 6f32ec070f23ced9f50e704d854d775da52591ab
(engine 0.1.39, MIT). Every file is as upstream published it; later commits
show exactly what this fork changes.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>