This repository has been archived by the owner on Jun 24, 2024. It is now read-only.
A path to adding more types of samplers, including Mirostat 1 and 2 #327
Closed
KerfuffleV2
started this conversation in
Show and tell
Replies: 1 comment
-
In v0.0.3, I've updated the interface to be a lot easier to use by adding in sampler chains (which also implement the It should now also be a lot more practical to provide last tokens to the samplers that need it (i.e. repetition penalty). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been working on a Rust implementation of the samplers llama.cpp supports, referencing their implementation. You can see the project here: https://github.com/KerfuffleV2/llm-samplers / https://crates.io/crates/llm-samplers
This is very lightly tested at the moment, all I can really say is my versions of samplers pass the existing llama.cpp sampler tests and when I tried some of them (including Mirostat 1 and 2) in my little RWKV project it seemed to produce pretty decent results.
The advanced samplers like Mirostat can really make a noticeable difference in generation quality.
Here's what using some of these samplers can look like:
edit: Updated for v0.0.3
Taken from a test branch in smolrsrwkv.
If there's interest, one thing I could really use help with is tests. Either PRs adding tests or just telling me given a set of logits + certain parameters for a sampler, the result should be something. I'm really not very confident in the tests I "ported" from llama.cpp (and they don't include all samplers either).
Beta Was this translation helpful? Give feedback.
All reactions