NExT-GPT

NExT-GPT/NExT-GPT

Code and models for ICML 2024 paper, NExT-GPT: Any-to-Any Multimodal Large Language Model

3.6k
Stars
361
Forks
81
Open issues
59
Watchers
Python BSD-3-ClauseLast pushed May 13, 2025

Overview

This repository hosts the code, data, and model weights for NExT-GPT, a multimodal large language model capable of handling text, image, video, audio, and more in any combination.

Categories

Tags

Similar tools

Install

pip install NExT-GPT

README

NExT-GPT: Any-to-Any Multimodal LLM

Shengqiong Wu, Hao Fei*, Leigang Qu, Wei Ji, and Tat-Seng Chua. (*Correspondence )

ICML 2024, Oral Paper

NExT++ Research Center, School of Computing, National University of Singapore


This repository hosts the code, data and model weight of NExT-GPT, the first end-to-end MM-LLM that perceives input and generates output in arbitrary combinations (any-to-any) of text, image, video, and audio and beyond.

Noted: we wrap the former old codebase into the NExT-GPT-Lagacy. Please refer to this new codebase for all training and tuning procedures.


๐ŸŽ‰ News

  • [2023.09.15] ๐Ÿš€๐Ÿš€ Release the code of NExT-GPT in version 7b_tiva_v0.
  • [2023.09.27] ๐Ÿ”จ๐Ÿงฉ Added modality-blended batch sampler.
  • [2023.10.01] ๐Ÿ“ข๐Ÿ“ข Release the T2M instruction dataset.
  • [2023.10.04] ๐Ÿ‘๐Ÿ‘ Release the checkpoint of NExT-GPT in version 7b_tiva_v0 .
  • [2023.10.15] ๐Ÿ”จ๐Ÿš€ Update of NExT-GPT in version 7b_tiva_v0 .
  • [2024.10.07] ๐Ÿ‘๐Ÿ‘ Release the data and the corresponding construction methods, please refer DATA_README.md for more details.

๐Ÿ‘‰ TODO

  • Updating NExT-GPT in more types&sizes of LLMs.
  • Empowering NExT-GPT with more modalities of inputs&outputs.
  • ...

Example Demos

Here we showcase examples generated from NExT-GPT. For more examples, kindly visit the webpage, or the online live demo.

https://github.com/NExT-GPT/NExT-GPT/assets/18722770/0c2b3d88-a533-4899-ab44-65580fe54538

https://github.com/NExT-GPT/NExT-GPT/assets/18722770/eb1319a6-38aa-4546-a96e-163207e7de93

https://github.com/NExT-GPT/NExT-GPT/assets/18722770/36bec0ad-9bad-4bcf-bc37-92b028f1bc6a

Brief Introduction

NExt-GPT is built on top of existing pre-trained LLM, multimodal encoder and SoTA diffusion models, with sufficient end-to-end instruction tuning.

  • Multimodal Encoding Stage. Leveraging established encoders to encode inputs in various modalities, where these representations are projected into language-like representations comprehensible to the LLM through a projection layer.
  • LLM Understanding and Reasoning Stage. Harnessing an existing open-sourced LLM as the core to process input information for semantic understanding and reasoning. The LLM not only directly generates text tokens but also produces unique โ€œmodality signalโ€ tokens that serve as instructions to dictate the decoding layers whether & what modal content to output correspondingly.
  • Multimodal Generation Stage. Receiving the multimodal signals with specific instructions from LLM (if any), the Transformer-based output projection layers map the signal token representations into the ones that are understandable to following multimodal decoders.

For more technical details, kindly refer to the paper.


Getting Started

Table of Contents:

  • 1. Code Structure
  • 2. Environment Prepar