Skip to content

Update low-level examples to use new sampling API #141

Closed

Description

@abetlen

llama.cpp recently changed the sampling API to make sampling more configurable. Unfortunately this broke many of the low-level examples so we should update these.

Activity

  1. mikeggh commented on May 3, 2023

    @mikeggh

    I'd like to know an example for using:
    llama_load_session_file(ctx, session_file, embd, out_len, (llama_cpp.c_int * out_len)(*embd_inp_out))

    and save of course... if you get a chance :> i'll try to brute force it later though..

  2. SagsMug commented on May 3, 2023

    @SagsMug
    Contributor

    Im gonna work on updating the chat example, it might take a moment given the number of changes 😉

  3. abetlen commented on May 3, 2023

    @abetlen
    OwnerAuthor

    Thanks @SagsMug yeah I was a little overwhelmed with the new sampling API but overall it seems like the right direction to have more control over sampling. Check out https://github.com/abetlen/llama-cpp-python/blob/main/llama_cpp/llama.py#L255 might help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions