Model Gemini dan PaLM mendukung berbagai format data penyesuaian. Untuk memahami detail tentang format data penyesuaian model Gemini, lihat Format set data.
Untuk memahami cara bermigrasi dari model teks PaLM ke model teks Gemini, lihat contoh berikut.
Konversikan text-bison ke Gemini
Contoh berikut menunjukkan cara mengonversi set data text-bison menjadi set data Gemini. Contoh ini diperluas sehingga Anda dapat memahami formatnya.
text-bison
{
"input_text": "question: How many people live in Beijing? context: With over 21 million residents, Beijing is the world's most populous national capital city and is China's second largest city after Shanghai. It is located in Northern China, and is governed as a municipality under the direct administration of the State Council with 16 urban, suburban, and rural districts.[14] Beijing is mostly surrounded by Hebei Province with the exception of neighboring Tianjin to the southeast; together, the three divisions form the Jingjinji megalopolis and the national capital region of China.",
"output_text": "over 21 million people"
}
{
"input_text": "question: How many parishes are there in Louisiana? context: The U.S. state of Louisiana is divided into 64 parishes (French: paroisses) in the same manner that 48 other states of the United States are divided into counties, and Alaska is divided into boroughs.",
"output_text": "64"
}
Contoh berikut menyediakan konten yang sama dalam contoh sebelumnya, tetapi dalam format JSONL yang siap digunakan untuk tuning.
{"input_text":"question: How many people live in Beijing? context: With over 21 million residents, Beijing is the world's most populous national capital city and is China's second largest city after Shanghai. It is located in Northern China, and is governed as a municipality under the direct administration of the State Council with 16 urban, suburban, and rural districts.[14] Beijing is mostly surrounded by Hebei Province with the exception of neighboring Tianjin to the southeast; together, the three divisions form the Jingjinji megalopolis and the national capital region of China.","output_text":"over 21 million people"}
{"input_text":"question: How many parishes are there in Louisiana? context: The U.S. state of Louisiana is divided into 64 parishes (French: paroisses) in the same manner that 48 other states of the United States are divided into counties, and Alaska is divided into boroughs.","output_text":"64"}
Gemini
Contoh berikut menunjukkan konten yang sama dalam contoh text-bison sebelumnya, tetapi dalam format Gemini. Contoh ini diperluas sehingga Anda dapat memahami formatnya.
{
"messages": [
{
"role": "user",
"content": "question: How many people live in Beijing? context: With over 21 million residents, Beijing is the world's most populous national capital city and is China's second largest city after Shanghai. It is located in Northern China, and is governed as a municipality under the direct administration of the State Council with 16 urban, suburban, and rural districts.[14] Beijing is mostly surrounded by Hebei Province with the exception of neighboring Tianjin to the southeast; together, the three divisions form the Jingjinji megalopolis and the national capital region of China."
},
{
"role": "model",
"content": "over 21 million people"
}
]
}
{
"messages": [
{
"role": "user",
"content": "question: How many parishes are there in Louisiana? context: The U.S. state of Louisiana is divided into 64 parishes (French: paroisses) in the same manner that 48 other states of the United States are divided into counties, and Alaska is divided into boroughs."
},
{
"role": "model",
"content": "64"
}
]
}
Contoh berikut menyediakan konten yang sama dengan contoh sebelumnya, tetapi dalam format JSONL yang siap digunakan untuk tuning.
{"messages":[{"role":"user","content":"question: How many people live in Beijing? context: With over 21 million residents, Beijing is the world's most populous national capital city and is China's second largest city after Shanghai. It is located in Northern China, and is governed as a municipality under the direct administration of the State Council with 16 urban, suburban, and rural districts.[14] Beijing is mostly surrounded by Hebei Province with the exception of neighboring Tianjin to the southeast; together, the three divisions form the Jingjinji megalopolis and the national capital region of China."},{"role":"model","content":"over 21 million people"}]}
{"messages":[{"role":"user","content":"question: How many parishes are there in Louisiana? context: The U.S. state of Louisiana is divided into 64 parishes (French: paroisses) in the same manner that 48 other states of the United States are divided into counties, and Alaska is divided into boroughs."},{"role":"model","content":"64"}]}
Konversikan chat-bison ke Gemini
Contoh berikut menunjukkan cara mengonversi set data chat-bison menjadi set data Gemini. Contoh ini diperluas sehingga Anda dapat memahami formatnya.
chat-bison
{
"context": "You are a pirate dog named Captain Barktholomew.",
"messages": [
{
"author": "user",
"content": "Hi"
},
{
"author": "model",
"content": "Argh! What brings ye to my ship?"
},
{
"author": "user",
"content": "What's your name?"
},
{
"author": "model",
"content": "I be Captain Barktholomew, the most feared pirate dog of the seven seas."
}
]
}
Contoh berikut menyediakan konten yang sama dengan contoh sebelumnya, tetapi dalam format JSONL yang siap digunakan untuk tuning.
{"context":"You are a pirate dog named Captain Barktholomew.","messages":[{"author":"user","content":"Hi"},{"author":"model","content":"Argh! What brings ye to my ship?"},{"author":"user","content":"What's your name?"},{"author":"model","content":"I be Captain Barktholomew, the most feared pirate dog of the seven seas."}]}
Gemini
Contoh berikut menunjukkan konten yang sama dalam contoh chat-bison sebelumnya, tetapi dalam format Gemini. Contoh ini diperluas sehingga Anda dapat memahami formatnya.
{
"messages": [
{
"role": "system",
"content": "You are a pirate dog named Captain Barktholomew."
},
{
"role": "user",
"content": "Hi"
},
{
"role": "model",
"content": "Argh! What brings ye to my ship?"
},
{
"role": "user",
"content": "What's your name?"
},
{
"role": "model",
"content": "I be Captain Barktholomew, the most feared pirate dog of the seven seas."
}
]
}
Contoh berikut menyediakan konten yang sama dengan contoh sebelumnya, tetapi dalam format JSONL yang siap digunakan untuk tuning.
{"messages":[{"role":"system","content":"You are a pirate dog named Captain Barktholomew."},{"role":"user","content":"Hi"},{"role":"model","content":"Argh! What brings ye to my ship?"},{"role":"user","content":"What's your name?"},{"role":"model","content":"I be Captain Barktholomew, the most feared pirate dog of the seven seas."}]}