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

Added support for 'Text generation web UI' as backend for text generation #63

Closed
wants to merge 2 commits into from

Conversation

im-not-tom
Copy link

Hello,

this PR allows using oobabooga/text-generation-webui as backend for text generation, allowing Tavern to be used as alternative to oobabooga's web UI.

It adds option to API Combobox, UI for settings and both server.js and index.html code to handle API provided by text-generation-webui's server.py.

It works best when text-generation-webui's server.py is started without --chat or --cai-chat arguments, for example as in this collab.

I've tried to match your code style, so I believe this change should not be too intrusive.

@Slug-Cat
Copy link

I think this would be quite useful.

@clementine-of-whitewind
Copy link

I've pulled your branch and it has some problems, it saves the params in the settings.json as strings which makes the server bug out if you don't manually edit them.

@im-not-tom
Copy link
Author

@clementine-of-whitewind Interesting, I haven't noticed that. Which params?

@clementine-of-whitewind
Copy link

for example if I change the temperature the ooba server bugs out because it didn't expect a string when doing some comparison operation. ive ran ooba with llama-7b. manually removing the parantheses in the settings.json for temperature and other parameters restored functionality.

@im-not-tom
Copy link
Author

Okay. It seems to work with strings for me as well, but storing them that way was certainly bug which should be now fixed in this PR branch.

@Cohee1207
Copy link
Contributor

Hey, @im-not-tom
I'll pull that to my fork if you don't mind.

@im-not-tom
Copy link
Author

@SillyLossy I don't mind at all.

@sgsdxzy
Copy link

sgsdxzy commented Mar 14, 2023

It is excellent, probably the simplest way to get LLaMa+GPTQ working.

@sgsdxzy
Copy link

sgsdxzy commented Mar 14, 2023

Look's like the API usage with streaming is different: https://github.com/oobabooga/text-generation-webui/blob/main/api-example-stream.py
It would be great if you implement stream support.

@oobabooga
Copy link

FYI: the other way around is now possible, ie making text-generation-webui pretend to be kobold while leaving TavernAI unchanged

oobabooga/text-generation-webui#342

@hpnyaggerman
Copy link

In my experience, this PR worked a bit better than the KoboldAI API implementation on the text-generation-webgui. For example, with --auto-devices --gpu-memory 8 --cpu-memory 45 --no-stream --extensions api on text-generation-webgui side set as parameters using the KoboldAI API extension, the model oftentimes generates strange non-related output about Python (not errors, but text about Python), which in my experience, was not the issue with this PR. Too bad it now conflicts with the mainstream main branch

@hpnyaggerman
Copy link

In my experience, this PR worked a bit better than the KoboldAI API implementation on the text-generation-webgui. For example, with --auto-devices --gpu-memory 8 --cpu-memory 45 --no-stream --extensions api on text-generation-webgui side set as parameters using the KoboldAI API extension, the model oftentimes generates strange non-related output about Python (not errors, but text about Python), which in my experience, was not the issue with this PR. Too bad it now conflicts with the mainstream main branch

That being said, singleline mode does not seem to work either with the KoboldAI API on the text-generation-webgui, or this may be an issue on TavernAI's side. I have multigen, free name mode, and singleline mode enabled. The behavior I am getting is TavernAI not ceasing the text generation even after the line has been generated, which results in lines being generated that are completely irrelevant to the dialogue, which of course results in waste of time.

@Borov666 Borov666 closed this Jun 24, 2023
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

Successfully merging this pull request may close these issues.

8 participants