Character Roleplay Prompt Format and Turn Template

#2
by practical-dreamer - opened

I've been reading your prompt instructions and analyzing your dataset and would like to ask a couple questions to ensure my instruction template is configured correctly for use with ooba's textgenui. My questions are specific to two-party multi-turn character roleplay.

  1. What pre-prompt was given when training this model? (the string that wraps around the "instruction" and "response" values in the dataset)
  • For example one of Alpaca's preprompts were defined as
Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
{instruction}

### Response:
{output}

Was the "instruction" value wrapped with "BEGIN INSTRUCTION", "END INSTRUCTION" before sending to .train()?
2. Do you recommend we contextualize the conversation between "USER:" and "ASSISTANT:"?

  • Based on line 4974 and 4614 of expert_createive.jsonl it looks like the turn template might do best if we prefance our character names with "USER: " and "ASSISTANT: "
  • For instance on line 4614 of expert_createive.jsonl I see
USER: Let's dive into the topic.
ASSISTANT: Nathaniel: Taking a moment to admire the...
  • Meaning the turn template that might work best here would be something like:
    USER: <|user|> <|user-message|>\nASSISTANT: <|bot|> <|bot-message|>\n
  1. Would you recommend wrapping the character cards with "BEGINCONTEXT" and "ENDCONTEXT"?

It seems like you use a diverse blend of instruction prompt formats so it may not make as much a difference I just want to make sure I'm inferencing with whatever format you recommend.

I would experiment with a many settings to see what works best, but most of the training data has a format similar to the following:

This is a chat between 2 characters: [name of your character] and USER

[name of character]: [description of the character, personality traits, backstory, speaking style, etc.]

[name of user]: [description of user]

USER is also known as [your name], and must be referred to with that name.

Setting for the chat:
[describe the setting where the chat takes place]
End of setting.
USER: Start the conversation.
ASSISTANT: 

Be sure to add a single space after ASSISTANT: The code used to fine-tune the model random selected newline or space before 'ASSISTANT: ', so you may wish to try both to see whether a newline helps or hurts performance.

I would also ensure you add a stopping criteria on "USER:" and "ASSISTANT:" to ensure it doesn't try continuing the chat on it's own without user input.

Other's have actually had better results with alpaca style instructions than the USER/ASSISTANT prompt format (with previous versions of the model). I'm not sure how much it really matters, if the model wasn't too overfit, but I haven't had a chance to test the model much yet.

Sign up or log in to comment