#KeyError: '' During SFTTrainer Creation When Fine Tuning Llama-3.2-11B-Vision-Instruct

4 messages · Page 1 of 1 (latest)

bleak wadi
#

Hello, I’m trying to fine tune Llama 3.2 11B Vision Instruct to take inputs of an image and output text and a number.
I have been following the process documented by the Unsloth notebook:
https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Llama3.2_(11B)-Vision.ipynb

My code has been working until the point of training. When I try to create the SFTTrainer and establish its arguments, I receive the error:

Traceback (most recent call last): File "/home/ananya/AnanyaIR/training.py", line 146, in <module> trainer = SFTTrainer( ^^^^^^^^^^^ File "/home/ananya/.local/lib/python3.12/site-packages/unsloth/trainer.py", line 203, in new_init original_init(self, *args, **kwargs) File "/home/ananya/AnanyaIR/unsloth_compiled_cache/UnslothSFTTrainer.py", line 1022, in __init__ super().__init__( File "/home/ananya/.local/lib/python3.12/site-packages/transformers/utils/deprecation.py", line 165, in wrapped_func return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/home/ananya/AnanyaIR/unsloth_compiled_cache/UnslothSFTTrainer.py", line 551, in __init__ train_dataset = self._prepare_dataset( ^^^^^^^^^^^^^^^^^^^^^^ File "/home/ananya/AnanyaIR/unsloth_compiled_cache/UnslothSFTTrainer.py", line 636, in _prepare_dataset test_text = dataset[0][dataset_text_field] if (formatting_func is None and dataset_text_field is not None) else formatting_func(dataset[0])[0] ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ KeyError: ''

If anyone knows what the cause of this error might be, I’d really appreciate the help. Thank you.

humble quarry
#

I'm having the same problem

humble quarry
#

I reinstalled unsloth and apparently the error is gone