huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
131.35k stars 26.12k forks source link

Batch is empty when fine-tuning flan-t5 using LoRA #31357

Open MorenoLaQuatra opened 2 months ago

MorenoLaQuatra commented 2 months ago

System Info

Who can help?

@muellerzr @SunMarc

Information

Tasks

Reproduction

The issue is reported here: https://discuss.huggingface.co/t/valueerror-the-batch-received-was-empty-your-model-wont-be-able-to-train-on-it-double-check-that-your-training-dataset-contains-keys-expected-by-the-model-args-kwargs-label-ids-label/20200

Expected behavior

Correctly working fine-tuning with LoRA. Anyway, I thing the bug can be solved adding:

self._signature_columns += list(set(["labels", "input_ids"]))

To the function _set_signature_columns_if_needed - here.

May not be the best way to go tho.

amyeroberts commented 2 weeks ago

Gentle ping @muellerzr @SunMarc