Skip to content

Multi turn conversation Alpaca format for instruction fine tuning #579

Answered by rasbt
urbanspr1nter asked this question in Q&A

You must be logged in to vote

Good question. It was a bit too much for the already (too) long Chapter 7, but multi-turn would be an interesting case for a bonus material section one day...
How ChatGPT and other LLMs etc handle multi-turn questions is that they simply shove the previous conversation into the prompt.

This is true for the training (SFT) stage as well:

E.g. if the turn 1 json input is:

{
  "instruction": "I'm planning a trip to Italy. Can you suggest three cities I should visit?",
  "input": "",
  "output": "Absolutely! Here are three cities in Italy worth visiting: Rome, Florence, Venice."
}

and turn 2 is

{
  "instruction": "Nice. What’s the best time of year to visit those places?",
  "input": "",
  "ou…

Replies: 2 comments 7 replies

You must be logged in to vote
4 replies
@urbanspr1nter

@rasbt

@urbanspr1nter

@rasbt

Answer selected by urbanspr1nter

You must be logged in to vote
3 replies
@rasbt

@VachanVY

@rasbt

rasbt Apr 3, 2025
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants