AttributeError: 'NoneType' object has no attribute 'to
The parameter "answer_lengths_lm" has no input.
Hi, thanks for your attention.
I believe you can simply comment lines 267-268 in modeling_mmada.py for the first stage, where the language model part does not follow an instruction-following pattern.
Alternatively, you can start your training with an instruction-following text dataset, and directly copy the lm part in train_mmada_stage2.py for your first stage training.
I got the same error. why answer_lengths_lm does not exist in train_mmada_stage2.py?
MMaDA/models/modeling_mmada.py", line 267, in forward_process answer_lengths_lm = answer_lengths_lm.to(masked_indices_lm.device) ^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'to'