Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't provide stop tokens/patterns #21

Open
jameshfisher opened this issue Apr 16, 2023 · 1 comment
Open

Can't provide stop tokens/patterns #21

jameshfisher opened this issue Apr 16, 2023 · 1 comment

Comments

@jameshfisher
Copy link

This lib does a great job of downloading and running the model! But it provides a very restricted API for interacting with it.

Here's the type signature for prompt. Comparing to other LLMs, I expect some other params, e.g. stop tokens and temperature. At the very least, my use-case requires stop tokens.

@hpxiong
Copy link

hpxiong commented Feb 27, 2024

any updates on this? when I created a langchain with gpt4all model, it never stops at the given keyword.

    llm = GPT4All(
        model=model, 
        max_tokens=model_config['max_tokens'], 
        n_predict=model_config['n_predict'], 
        n_threads=model_config['n_threads'], 
        temp=model_config['temp'], 
        device=model_config['device'], 
        verbose=model_config['verbose'], 
        streaming=model_config['streaming'], 
        callbacks=callbacks,
    )

chain = prompt | llm.bind(stop=["Human:"]) | parser

sample reply:

Screenshot 2024-02-26 165122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants