QEUR23_PHI2SFT7: PromptEngineering~Reasoningを使ったLLM学習(Finetuning)

~ 「ほんの少し」だけの進歩です ~ D先生(設定年齢65歳) : “あたらしいデータセットが出来たんでしょ?Finetuningをしてみましょう!” QEU:FOUNDER(設定年齢65歳) : “じゃあ、やってみましょうか・・・。プログラムをドン!” # --- # プロンプト変換用の関数(Batch) def formatting_prompts_func ( examples ): output_text = [] for i in range ( len ( examples [ "instruction" ])): instruction = examples [ "instruction" ][ i ] input_text = examples [ "input" ][ i ] response = examples [ "output" ][ i ] if len ( input_text ) >= 2 : text = f '''Below is an Instruction that describes a task, paired with a Context that provides further information. Write a Response that appropriately completes the request. ### Instruction: { instruction } ### Context: { input_text } ### Response: { response } ''' else : ...