LMFusion: Adapting Pretrained Language Models for Multimodal Generation

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Shi, Weijia, Han, Xiaochuang, Zhou, Chunting, Liang, Weixin, Lin, Xi Victoria, Zettlemoyer, Luke, Yu, Lili
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866916597812166656
author Shi, Weijia
Han, Xiaochuang
Zhou, Chunting
Liang, Weixin
Lin, Xi Victoria
Zettlemoyer, Luke
Yu, Lili
author_facet Shi, Weijia
Han, Xiaochuang
Zhou, Chunting
Liang, Weixin
Lin, Xi Victoria
Zettlemoyer, Luke
Yu, Lili
contents We present LMFusion, a framework for empowering pretrained text-only large language models (LLMs) with multimodal generative capabilities, enabling them to understand and generate both text and images in arbitrary sequences. LMFusion leverages existing Llama-3's weights for processing texts autoregressively while introducing additional and parallel transformer modules for processing images with diffusion. During training, the data from each modality is routed to its dedicated modules: modality-specific feedforward layers, query-key-value projections, and normalization layers process each modality independently, while the shared self-attention layers allow interactions across text and image features. By freezing the text-specific modules and only training the image-specific modules, LMFusion preserves the language capabilities of text-only LLMs while developing strong visual understanding and generation abilities. Compared to methods that pretrain multimodal generative models from scratch, our experiments demonstrate that, LMFusion improves image understanding by 20% and image generation by 3.6% using only 50% of the FLOPs while maintaining Llama-3's language capabilities. We also demonstrate that this framework can adapt existing vision-language models with multimodal generation ability. Overall, this framework not only leverages existing computational investments in text-only LLMs but also enables the parallel development of language and vision capabilities, presenting a promising direction for efficient multimodal model development.
format Preprint
id arxiv_https___arxiv_org_abs_2412_15188
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle LMFusion: Adapting Pretrained Language Models for Multimodal Generation
Shi, Weijia
Han, Xiaochuang
Zhou, Chunting
Liang, Weixin
Lin, Xi Victoria
Zettlemoyer, Luke
Yu, Lili
Computation and Language
Artificial Intelligence
Computer Vision and Pattern Recognition
Machine Learning
We present LMFusion, a framework for empowering pretrained text-only large language models (LLMs) with multimodal generative capabilities, enabling them to understand and generate both text and images in arbitrary sequences. LMFusion leverages existing Llama-3's weights for processing texts autoregressively while introducing additional and parallel transformer modules for processing images with diffusion. During training, the data from each modality is routed to its dedicated modules: modality-specific feedforward layers, query-key-value projections, and normalization layers process each modality independently, while the shared self-attention layers allow interactions across text and image features. By freezing the text-specific modules and only training the image-specific modules, LMFusion preserves the language capabilities of text-only LLMs while developing strong visual understanding and generation abilities. Compared to methods that pretrain multimodal generative models from scratch, our experiments demonstrate that, LMFusion improves image understanding by 20% and image generation by 3.6% using only 50% of the FLOPs while maintaining Llama-3's language capabilities. We also demonstrate that this framework can adapt existing vision-language models with multimodal generation ability. Overall, this framework not only leverages existing computational investments in text-only LLMs but also enables the parallel development of language and vision capabilities, presenting a promising direction for efficient multimodal model development.
title LMFusion: Adapting Pretrained Language Models for Multimodal Generation
topic Computation and Language
Artificial Intelligence
Computer Vision and Pattern Recognition
Machine Learning
url https://arxiv.org/abs/2412.15188