8000 rand=-1 to use a random seed, not rand=0 as documented · Issue #386 · abetlen/llama-cpp-python · GitHub
[go: up one dir, main page]

Skip to content
rand=-1 to use a random seed, not rand=0 as documented #386
Closed
@rmngllnn

Description

@rmngllnn

Hello,

I use this library to use llama-cpp in Python.

It's working very well but the generation is always the same (no seed in the script). I use this function

from llama_cpp import Llama

llama = Llama("./path/models/7B/ggml-model-7b.bin")

gen = llama.create_completion("Cite the best movie citation you know.", 
                         max_tokens=50, 
                         temperature=0.95, 
                         top_p=0.95)

I ran it several times and it's always the same text generated. Is there like HuggingFace a do_sample parameter to trigger ? I didn't find anything in the documentation or the issues of this github (but maybe I missed it)

Thank you, whoever you are who will help me :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0