Do I need to apply_chat_template before Supervised Fine-tuning Gemma-1.1-7b-it?

#19
by Syax19 - opened

I'm a novice in training LLM for the first time and would greatly appreciate any assistance.

I noticed that in the "example_sft_qlora.py" script, there's a formatting function defined as:

def formatting_func(example):
    text = f"### USER: {example['data'][0]}\n### ASSISTANT: {example['data'][1]}"
    return text

I don't see any mention of applying apply_chat_template as using Gemma-1.1-7b-it model for inference.
Is it because supervised fine-tuning doesn't require using the original template?
Will my custom template which is like in the formatting_func overwrite original template during training, or do I need to modify the formatting_func to apply the original chat_template?

Looking forward for replying.
Thanks!

Sign up or log in to comment