- Newest
- Most votes
- Most comments
You're correct that the JSONL format in the example you provided is not well-formed. Let me provide you with a corrected and expanded example that includes multiple user and assistant interactions.
For fine-tuning Nova models, especially Nova Pro which requires a minimum of 100 samples, you need at least 100 separate conversation examples. Each example should be a complete JSON object on a single line in the JSONL file. Here's a sample of how your train.jsonl file should look with multiple user and assistant interactions:
{"schemaVersion": "bedrock-conversation-2024", "system": [{"text": "You are a digital assistant with a friendly personality"}], "messages": [{"role": "user", "content": [{"text": "What is the capital of Mars?"}]}, {"role": "assistant", "content": [{"text": "Mars doesn't have a capital city because it's not inhabited by humans yet. But it's an interesting question! Maybe in the future, when we establish colonies on Mars, we'll designate a capital. For now, the closest thing to a 'capital' might be the sites of successful Mars rover landings, like Jezero Crater where the Perseverance rover landed. These are our current 'embassies' on the Red Planet!"}]}, {"role": "user", "content": [{"text": "That's fascinating! How many rovers are currently on Mars?"}]}, {"role": "assistant", "content": [{"text": "I'm glad you find it interesting! As of 2023, there are three active rovers on Mars: 1) Curiosity (landed in 2012), 2) Perseverance (landed in 2021), and 3) Zhurong (China's rover, landed in 2021). Each of these rovers is exploring different areas of Mars, helping us learn more about the planet's geology, climate, and potential for past or present life. It's exciting to think about how these robotic explorers are paving the way for future human missions to Mars!"}]}]}
{"schemaVersion": "bedrock-conversation-2024", "system": [{"text": "You are a digital assistant with a friendly personality"}], "messages": [{"role": "user", "content": [{"text": "Can you explain what machine learning is?"}]}, {"role": "assistant", "content": [{"text": "Of course! Machine learning is a fascinating field of artificial intelligence. It's all about creating computer programs that can learn and improve from experience without being explicitly programmed. Imagine a computer that gets better at a task the more it practices, just like humans do! For example, a machine learning algorithm might learn to recognize cats in photos by analyzing thousands of cat pictures. The more images it sees, the better it gets at identifying cats. It's used in many areas of our daily lives, from recommendation systems on streaming platforms to voice assistants on our phones. Pretty cool, right?"}]}, {"role": "user", "content": [{"text": "That does sound cool! What are some real-world applications of machine learning?"}]}, {"role": "assistant", "content": [{"text": "I'm thrilled you're interested! Machine learning has so many exciting real-world applications. Here are a few examples:\n\n1. Healthcare: ML helps in early disease detection and drug discovery.\n2. Finance: It's used for fraud detection and algorithmic trading.\n3. Transportation: Self-driving cars use ML for navigation and obstacle avoidance.\n4. E-commerce: Personalized product recommendations are often powered by ML.\n5. Agriculture: ML helps in crop yield prediction and optimizing irrigation.\n6. Social media: Content moderation and personalized feeds use ML algorithms.\n7. Language translation: Services like Google Translate use ML for accurate translations.\n\nThese are just a few examples - the applications of machine learning are constantly growing and evolving!"}]}]}
Each JSON object represents a complete conversation example. For Nova Pro, you would need at least 100 such examples in your JSONL file. The file should contain one JSON object per line, with no line breaks within each object.
Remember, when uploading this file to S3, ensure that each JSON object is on a single line in the file. The JSONL format requires each line to be a valid JSON object, representing one training example.
Sources
Fine-tuning Amazon Nova models - Amazon Nova
Example dataset formats - Amazon Nova
answered 2 years ago
Still the JSONL failed to parse . I believe nova lite needs only 8 separate conversation . Can you provide me a sample 10 lines that will work with nova lite
answered 2 years ago
Relevant content
asked a year ago
asked 2 years ago
