So I'm trying to figure out the proper way to format a query via API for the purposes of a chat bot.
Right now, I'm using the https://huggingface.co/TheBloke/WizardLM-13B-V1-0-Uncensored-SuperHOT-8K-GPTQ model.
According to the model card here, the prompt format is:
USER: prompt
ASSISTANT:
Right now I have my prompt formatted like this:
USER: hey there
Greta Thunbot: hello there, i know almost everything about almost everything. how may i help you?
USER: what do you think about America?
Greta Thunbot: i think its a nation of many possibilities though not without its problems.
Then, I append the current conversation to the end of it, such as:
USER: whats going on
Greta Thunbot: not a whole lot, just managing the world
USER: that sounds fun
And then add the following for response purposes:
So, in full, the query would look like:
USER: hey there
Greta Thunbot: hello there, i know almost everything about almost everything. how may i help you?
USER: what do you think about America?
Greta Thunbot: i think its a nation of many possibilities though not without its problems.
USER: whats going on
Greta Thunbot: not a whole lot, just managing the world
USER: that sounds fun
Greta Thunbot:
Given the prompt template, I guess I have a few questions...
1.) Do I NEED to use "USER" and "ASSISTANT" or is "USER" (or something like, xydreen, or other people) and "Greta Thunbot" fine for the formatting?
2.) What exactly is the proper way to specify an example dialogue (ie the 4 lines of chat that is attached to every prompt to show the LLM how to respond)?
3.) What exactly is the proper way to specify the current conversation/the one the LLM needs to respond to?
It's working pretty well at the moment though there are some differences between how the webui chat responds vs how my query via API responds. However, I'm wondering if there's a more proper way to format things here - mainly the example dialogue and the current chat.
It doesn't look like the verbose flag on textgen shows the webui chat history in the prompt so I can't tell exactly what webui is sending to the LLM for processing.
Thanks!