- Newest
- Most votes
- Most comments
I apologize for the inconvenience you're experiencing with fine-tuning the Llama 3.2 1B model using Amazon SageMaker JumpStart. Based on the error message and the CSV file you've shared, I can provide some insights and suggestions to help resolve the issue.
The error message indicates that there's a problem with the input data format. Specifically, it mentions "ValueError: Expected input to be a string, got float". This suggests that the model is expecting text input, but it's receiving numerical values instead.
Looking at your CSV file, I notice that the first column contains numerical values (0, 1, 2, etc.). For fine-tuning text generation models like Llama 3.2, the input data should typically be in a specific format. The CSV file should contain two columns: one for the input text and one for the target text.
Here are some steps you can take to address this issue:
-
Reformat your CSV file: Ensure that your CSV file has two columns. The first column should contain the input text (prompts or questions), and the second column should contain the corresponding output text (responses or completions).
-
Remove numerical labels: If the numbers in the first column are meant to be labels or identifiers, consider removing them or moving them to a separate file. The fine-tuning process doesn't require numerical labels.
-
Check data types: Make sure all entries in both columns are strings (text), not numbers or other data types.
-
Use the correct dataset format: When setting up the fine-tuning job, make sure you're using the appropriate dataset format. For instruction tuning, you should set the hyperparameter "instruction_tuned" to "True".
-
Verify S3 bucket location: Ensure that your S3 bucket containing the training data is in the same AWS region as your SageMaker instance.
Here's an example of how your code might look when setting up the fine-tuning job:
estimator = JumpStartEstimator( model_id="meta-textgeneration-llama-3-2-1b", environment={"accept_eula": "true"} ) estimator.set_hyperparameters( instruction_tuned="True", epoch="5", max_input_length="1024" ) estimator.fit({"training": "s3://your-bucket-name/path/to/your/data.csv"})
Make sure to replace "your-bucket-name/path/to/your/data.csv" with the actual S3 path to your CSV file.
If you continue to experience issues after making these changes, you may want to review the SageMaker JumpStart documentation for any specific requirements for the Llama 3.2 1B model, or consider reaching out to AWS support for further assistance.
Sources
Fine-tune Meta Llama 3.2 text generation models for generative AI inference using Amazon SageMaker JumpStart | AWS Machine Learning Blog
Fine-tune Llama 3 for text generation on Amazon SageMaker JumpStart | AWS Machine Learning Blog
answered 2 years ago
Relevant content
asked 3 years ago
asked 3 years ago

It says list index out of rang not Expected input to be a string, got float. AI needs to get smarter :P