Imagine dual head transformer where one head is autoregressive language modelling (next…
- User
Imagine dual head transformer where one head is autoregressive language modelling (next token prediction) and other head responsible for latent diffusion (latent denoising steps sampling). It can process both text (tokenized, than passed through embedding layer) and images (encoded into latent space, then patchified, where continuous data is represented by N visual patches in embedding vectors space). Attention mask combines causal attention for discrete tokens and bidirectional attention for image patches, but if we have multiple images, attention between "frames" is causal as well. On output direction, tokens are predicted (sampled) individually, image patches are processed in batch. For reference: (START reference)arXiv:2408.11039v1 [cs.AI] 20 Aug 2024, "Transfusion: Predict the Next Token and Diffuse Images with One Multi-Modal Model Chunting Zhouµ∗ Lili Yuµ∗ Arun Babuδ† Kushal Tirumalaµ Michihiro Yasunagaµ Leonid Shamisµ Jacob Kahnµ Xuezhe Maσ Luke Zettlemoyerµ Omer Levy† µ Meta δ Waymo σ University of Southern California Abstract We introduce Transfusion, a recipe for training a multi-modal model over discrete and continuous data. Transfusion combines the language modeling loss function (next token prediction) with diffusion to train a single transformer over mixedmodality sequences. We pretrain multiple Transfusion models up to 7B parameters from scratch on a mixture of text and image data, establishing scaling laws with respect to a variety of uni- and cross-modal benchmarks. Our experiments show that Transfusion scales significantly better than quantizing images and training a language model over discrete image tokens. By introducing modality-specific encoding and decoding layers, we can further improve the performance of Transfusion models, and even compress each image to just 16 patches. We further demonstrate that scaling our Transfusion recipe to 7B parameters and 2T multi-modal tokens produces a model that can generate images and text on a par with similar scale diffusion models and language models, reaping the benefits of both worlds."(END of reference) . Analyse this architecture.
- Assistant
- User
Sadly, Meta didn't published pre-trained model. Nevermind, let's speculate on further improvements - how to properly add support for audio and/or video input-output into Transfusion? Audio can be represented by audio spectrogram, which is than encoded into latent space similar to visual data. And videos extend visual into temporal dimension, which naively can be represented by sequence of key frames and optical flow in between (compressing intermediate frames). But! Can we do better than that?
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.