Skip to content

Releases: KerfuffleV2/llm-samplers

v0.0.7

09 Nov 08:28
788e181
Compare
Choose a tag to compare
  • 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 and f32 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

06 Aug 15:03
Compare
Choose a tag to compare
  • Add initial implementation of sequence repetition sampler.

  • New approach to dynamic sampler config

  • Adjust types so ConfigurableSampler can be a trait object.

  • Code reorganizations.

  • Fix invariants for frequency/presence sampler.

v0.0.5

27 Jul 12:56
30953f6
Compare
Choose a tag to compare
  • Initial support for general configuring of sampler options.

  • Various cleanups.

  • Improve sampler documentation.

  • Construct SampleFlatBias using an iterator of owned tuples

v0.0.4

05 Jul 15:17
0081d3b
Compare
Choose a tag to compare
  • 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

30 Jun 17:13
91c8abf
Compare
Choose a tag to compare
  • Add sampler chains.
  • Improve RNG handling.
  • Documentation improvements.
  • Other fixes and cleanups.

Full Changelog: v0.0.2...v0.0.3

v0.0.2

22 Jun 18:05
Compare
Choose a tag to compare
v0.0.2 Pre-release
Pre-release
  • Basic functionality in place.