I get frustrated with ChatGPT to the point I fully believe it is designed by OpenAI to not actually help people on this, I mean it would make sense they would want to ensure their product. Why sell a 3D printer than can print 3D printers, right? Because otherwise this confused bot was just put in charge of an entire country’s defense system, yikes. Here’s Chat telling me HuggingFace doesn’t have Unsloth installed.
From the error log and your configuration settings, it seems the problem lies in how the dataset is being processed and packed during the training phase. Specifically:
Key Error:
Error Message: KeyError: '{"input": "input", "output": "output"}'
This suggests that the dataset's column mapping is not being interpreted correctly by the system. The mapping you provided in JSON format ({"input": "input", "output": "output"}) is not directly compatible with how the trl library expects the columns to be defined.
Recommended Fixes:
Adjust the Column Mapping: The trl library expects the column mapping to be passed as separate arguments rather than as a JSON string. You may need to adjust how you pass the column mapping. Instead of {"input": "input", "output": "output"}, try explicitly setting the input and output columns in the interface or config like:
input_column: input
output_column: output
Ensure the dataset's columns match these names. Modify the Block Size:
The block size of 32 might be too small for packing sequences effectively. Increase the block size to, say, 128 or 256, depending on the average length of your input-output pairs.
Batch Size Adjustments:
With a batch size of 2 and gradient_accumulation=4, you are simulating an effective batch size of 8. Ensure your GPU has enough memory to handle this configuration. If memory is a concern, try reducing gradient_accumulation to 2.
Unsloth Dependency:
The warnings about Unsloth indicate it's not installed. Since Unsloth optimizes performance, consider installing it with:
pip install unsloth_zoo