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

No obvious way to choose generation settings #29

Open
rcchan123 opened this issue Aug 4, 2023 · 2 comments
Open

No obvious way to choose generation settings #29

rcchan123 opened this issue Aug 4, 2023 · 2 comments

Comments

@rcchan123
Copy link

Right now, I can't figure out how to alter generation settings, such as temperature, rept-penalty, tail-free sampling etc, and I also don't know how to change maximum generation length. Digging around, it seems that the option used to be in cogs/pygbot.py, but it doesn't seem to be in there now.

@ausboss
Copy link
Owner

ausboss commented Aug 4, 2023

you are right it is not obvious. I have been wanting to add a feature that makes it easy.

Here is a workaround if you are not afraid of editing a line in python, you can go to this line in the discordbot.py and add custom parameters after the endpoint.

Example
before:

bot.llm = KoboldApiLLM(endpoint=bot.endpoint)

after:

bot.llm = KoboldApiLLM(endpoint=bot.endpoint, temperature=0.75, max_length=512)

Here I added temperature and max length parameters. Don't forget the commas.

A list of all the parameters can be seen here:
https://api.python.langchain.com/en/latest/llms/langchain.llms.koboldai.KoboldApiLLM.html

@rcchan123
Copy link
Author

Ok, Just want to say that this works perfectly, thanks!
I will still leave this issue open though, as I think we both agree it it neither obvious nor intuitive.

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