Releases: KerfuffleV2/llm-samplers
v0.0.7
- Fix a bug where Mirostat2 sampled twice.
- Fix a bug where the flat bias sampler assumed it had the full logits to work with and directly indexed based on token id.
- Simplify sampler types by removing type variables. Samplers always use
u32
as the token id andf32
as the logit type now. - Add min-p sampler. See: ggerganov/llama.cpp#3483 (comment)
- Add top-a sampler. See: https://github.com/BlinkDL/RWKV-LM#the-top-a-sampling-method
- Try to avoid unnecessarily running softmax calculation.
- Add a
try_from_iter_top_k
which pre-prunes the logits while building (and also results in the list starting out sorted).
0.0.6 to 0.0.7 Migration
Unfortunately, this involved some breaking changes. Basically, the samplers and chains no
longer take token id and logits type variables anymore. You can have your token ids in any
color you like, as long as it's u32
. Same for logits: they're always f32
now.
For example, where previously you would have done SampleRandDistrib::<u32>::new
or SampleMirostat2::<u32, f32>::new
,
you only need SampleRandDistrib::new
, SampleMirostat2::new
. Same for creating chains: SamplerChain::<u32, f32>::new
will
only need SamplerChain::new
.
v0.0.6
v0.0.5
-
Initial support for general configuring of sampler options.
-
Various cleanups.
-
Improve sampler documentation.
-
Construct SampleFlatBias using an iterator of owned tuples
v0.0.4
-
Better method of providing resources to samplers.
-
Add default instances and builder methods for most samplers.
-
Much more/better documentation and examples.
-
Eliminate rand feature, too much complication for too little gain.
-
Fix naming convention for random distribution and locally typical samplers.
-
Protect against divide by zero in temperature sampler.
-
Fix repo link in Cargo.toml
v0.0.3
- Add sampler chains.
- Improve RNG handling.
- Documentation improvements.
- Other fixes and cleanups.
Full Changelog: v0.0.2...v0.0.3
v0.0.2
- Basic functionality in place.