amazon-bedrock-workshop icon indicating copy to clipboard operation
amazon-bedrock-workshop copied to clipboard

Error in fine-tuning job - must follow '{"prompt": "<input text>", "completion": "<output text>"}' format

Open jimmus69 opened this issue 1 year ago • 1 comments

Describe the bug When running 03_Model_customization/01_fine-tuning-titan-lite.ipynb or 02_fine-tuning_llama2.ipynb, the fine-tuning job fails with the error:

Input data at fine-tuning-datasets/train/train-cnn-5K.jsonl must follow '{"prompt": "<input text>", "completion": "<output text>"}' format

I have looked at the downloaded CNN data files, and they appear to be in the correct prompt/completion format.

To Reproduce

  • Run the above notebooks
  • Browse the Amazon Bedrock console > Foundation Models > Custom Models > Jobs

Expected behavior Expected behaviour is for the fine-tuning job to complete successfully.

Screenshots Screenshot 2024-06-13 at 10 44 03

Desktop (please complete the following information):

  • OS: Mac OSX
  • Browser: Chrome
  • Version: 125.0.6422.142

! Additional context !

  • Sagemaker Studio Kernel: Data Science 3.0 Files_from_s3.zip

  • Instance used: ml.c5.2xlarge

jimmus69 avatar Jun 13 '24 09:06 jimmus69

If you are still stuck on this you can check out a more recently updated example here

https://github.com/aws-samples/amazon-bedrock-samples/tree/main/custom-models/bedrock-fine-tuning/claude-haiku

EmilyWebber avatar Apr 09 '25 18:04 EmilyWebber