I am trying to use Generative AI studio to tune a model. Can someone send me the example of JSONL file that I should use. I build following file and I am getting an error:
Hi @mmilanovic,
Welcome to Google Cloud Community!
You are encountering this error since input_text and output_text field in your JSONL file is missing, it must have each line containing a single tuning example, and each example must at least contain the following:
1. input_text field - this contains the model prompt.
2. ouput_text field - this contains the tuned model expected response.
Here is an example in the documentation:
{"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"}
For best practice, your dataset must match your production traffic and it must be consistent, this means if other fields are included in your dataset such as "context:" and "question:", the production traffic should also contain these fields and it must be in the same order. If you want to learn more about the JSONL format, you can check this link: https://cloud.google.com/vertex-ai/docs/generative-ai/models/tune-models#prepare_your_model_tuning_d...
Also here is a step by step process on how to tune and deploy a foundation model, this can also serve as a guide for your case:
https://github.com/GoogleCloudPlatform/generative-ai/blob/main/language/examples/tuning/getting_star...
Hope this is useful!
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |