MMaDA icon indicating copy to clipboard operation
MMaDA copied to clipboard

Low Speed:when running inference_mmu.py, the text generation is too slow, averaging around 100 seconds per instance.

Open FaltingsA opened this issue 1 year ago • 4 comments

FaltingsA avatar Jun 08 '25 09:06 FaltingsA

I notice this problem too. I think we can optimize the output generation speed by modifying the generation parameters. For instance, using these settings:

output_ids = model.mmu_generate(input_ids, max_new_tokens=512, steps=256, block_length=128)

which is consistent with the default inference settings on HuggingFace Demo, is much faster than the settings in inference_mmu.py. However, it is unclear what impact this will have on performance.

friedrichor avatar Jun 12 '25 09:06 friedrichor

In addition, I have focused on the work of dLLM-Cache, which accelerates Diffusion LLM. It already supports LLaDA, Dream, and LLaDA-V. The thing is, we're not sure yet if it can work with MMaDA. I think this would be helpful since MMaDA is running pretty slowly right now during inference, even after modifying the generation parameters.

friedrichor avatar Jun 12 '25 10:06 friedrichor

In addition, I have focused on the work of dLLM-Cache, which accelerates Diffusion LLM. It already supports LLaDA, Dream, and LLaDA-V. The thing is, we're not sure yet if it can work with MMaDA. I think this would be helpful since MMaDA is running pretty slowly right now during inference, even after modifying the generation parameters.

Hi, thanks for your attention. In fact, any acceleration method based on LLaDA is compatible with MMaDA, as we share the same generation process. dLLM-Cache, Fast-dLLM are all compatiable to MMaDA with little modifications

tyfeld avatar Jun 13 '25 02:06 tyfeld

In addition, I have focused on the work of dLLM-Cache, which accelerates Diffusion LLM. It already supports LLaDA, Dream, and LLaDA-V. The thing is, we're not sure yet if it can work with MMaDA. I think this would be helpful since MMaDA is running pretty slowly right now during inference, even after modifying the generation parameters.

Hi, thanks for your attention. In fact, any acceleration method based on LLaDA is compatible with MMaDA, as we share the same generation process. dLLM-Cache, Fast-dLLM are all compatiable to MMaDA with little modifications

Thank you for your reply. I think I can try adopting these acceleration methods to MMaDA.

friedrichor avatar Jun 13 '25 07:06 friedrichor