How do we know the prompt template used to train a model?

ASSUMPTION: fine-tuning an LLM that has already been tuned will see the best results if the prompt template originally used for tuning is used for fine tuning. I could be wrong…(not totally uncommon :slight_smile: ).

IF TRUE: Then the prompt template for each LLM we fine tune on top of is known, I just don’t know where to look.

IF FALSE: Why use the prompt template that was used in the course for the “EleutherAI/pythia-70m” LLM?


  1. Llama-2 seems to have a prompt template format of:
"### Instruction: Why can't we send cupcakes to Nations that are mad at us? \n\n### Response:"

It is not obvious to me how to know what prompt template to use when fine tuning. From what I can tell, it is somewhat arbitrary what the prompt template should be. the short course, we used the “EleutherAI/pythia-70m” LLM. The prompt template used:

if "question" in examples and "answer" in examples:
  text = examples["question"][0] + examples["answer"][0]
elif "instruction" in examples and "response" in examples:
  text = examples["instruction"][0] + examples["response"][0]
elif "input" in examples and "output" in examples:
  text = examples["input"][0] + examples["output"][0]
  text = examples["text"][0]

prompt_template = """### Question:

### Answer:"""

num_examples = len(examples["question"])
finetuning_dataset = []
for i in range(num_examples):
  question = examples["question"][i]
  answer = examples["answer"][i]
  text_with_prompt_template = prompt_template.format(question=question)
  finetuning_dataset.append({"question": text_with_prompt_template, "answer": answer})

Although, I don’t recall any comment on why this particular template was used I assume it was because of how this LLM was originally trained.

Thank you.