def prepare_dataset(qa_pairs): # Gemma-3形式に変換 formatted_data = [] for qa in qa_pairs: prompt = f"""<start_of_turn>user {qa['question']}<end_of_turn> <start_of_turn>model {qa['answer']}<end_of_turn>""" formatted_data.append({ "text": prompt }) return formatted_data