Update modeling_molmo to work with transformers 4.56.2
#50
by
mlopezantequera
- opened
Avoid errors like this:
[rank0]: past_length = past_key_values[0][0].size(-2)
[rank0]: AttributeError: 'NoneType' object has no attribute 'size'
still not work with 4.56.2
output = model.generate_from_batch(
inputs,
GenerationConfig(max_new_tokens=1000, stop_strings="<|endoftext|>"),
tokenizer=processor.tokenizer
)
'NoneType' object has no attribute 'size'