Any-to-Any
Transformers
Safetensors
gestalt
multimodal
discrete-diffusion
vision-language
unified-model
custom_code
Instructions to use GeWu-Lab/Gestalt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GeWu-Lab/Gestalt with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import GestaltModelLM model = GestaltModelLM.from_pretrained("GeWu-Lab/Gestalt", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,112 +1,85 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
-
pipeline_tag: any-to-any
|
| 4 |
-
library_name: transformers
|
| 5 |
tags:
|
| 6 |
-
- multimodal
|
| 7 |
-
-
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
-
- image-to-text
|
| 11 |
-
language:
|
| 12 |
-
- en
|
| 13 |
---
|
| 14 |
|
| 15 |
<p align="center">
|
| 16 |
-
<img src="assets/gestalt-logo.svg" alt="Gestalt" width="360"/>
|
| 17 |
</p>
|
| 18 |
|
| 19 |
<h1 align="center">Gestalt: Large Multimodal Interplay Model</h1>
|
| 20 |
|
| 21 |
<p align="center">
|
| 22 |
<a href="https://gewu-lab.github.io/Gestalt/"><img src="https://img.shields.io/badge/Gestalt-Website-0A66C2?logo=safari&logoColor=white" alt="Website"/></a>
|
| 23 |
-
<a href="
|
| 24 |
<a href="https://github.com/GeWu-Lab/Gestalt"><img src="https://img.shields.io/badge/Gestalt-Code-181717?logo=github" alt="Code"/></a>
|
| 25 |
-
<a href="https://huggingface.co/
|
| 26 |
</p>
|
| 27 |
|
| 28 |
-
> **Gestalt** is a new paradigm of large multimodal model built around **multimodal interplay**. Guided by a multimodal interplay pyramid β from modality-specific modeling, through cross-modal alignment, to multimodal synergy β Gestalt adopts a unified **discrete diffusion** framework with an interplay-partitioned architecture, where learnable interplay tokens mediate cross-modal exchange and integration. The name is inspired by Gestalt psychology: *the whole is greater than the sum of its parts.*
|
| 29 |
-
|
| 30 |
<p align="center">
|
| 31 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
</p>
|
| 33 |
|
| 34 |
-
## ποΈ Architecture
|
| 35 |
-
|
| 36 |
-
Gestalt brings vision and language into a shared discrete diffusion framework. The Transformer is divided into two successive zones, with **learnable interplay tokens** mediating cross-modal information flow throughout:
|
| 37 |
-
|
| 38 |
<p align="center">
|
| 39 |
-
<
|
| 40 |
</p>
|
| 41 |
|
| 42 |
-
|
| 43 |
-
- **Interplay Zone II β Full Multimodal Interplay.** The restriction is removed: image, text, and interplay tokens interact through full multimodal self-attention and a shared FFN, integrating complementary information across all tokens.
|
| 44 |
-
|
| 45 |
-
## π₯ Quick Start
|
| 46 |
-
|
| 47 |
-
Please refer to the [GitHub repository](https://github.com/GeWu-Lab/Gestalt) for the full training and inference code.
|
| 48 |
-
|
| 49 |
-
```bash
|
| 50 |
-
git clone https://github.com/GeWu-Lab/Gestalt.git
|
| 51 |
-
cd Gestalt
|
| 52 |
-
pip install -r requirements.txt
|
| 53 |
-
|
| 54 |
-
huggingface-cli download GeWu-Lab/Gestalt --local-dir /path/to/checkpoint
|
| 55 |
-
```
|
| 56 |
-
|
| 57 |
-
**Multimodal understanding (MMU)** β image tokens + question β text:
|
| 58 |
-
|
| 59 |
-
```bash
|
| 60 |
-
python scripts/inference/run_mmu.py \
|
| 61 |
-
--model /path/to/checkpoint \
|
| 62 |
-
--image-tokens image_tokens.npy \
|
| 63 |
-
--question "What is in this image?" \
|
| 64 |
-
--token-h 32 --token-w 32
|
| 65 |
-
```
|
| 66 |
-
|
| 67 |
-
**Text-to-image (T2I)** β text β VQVAE tokens:
|
| 68 |
-
|
| 69 |
-
```bash
|
| 70 |
-
python scripts/inference/run_t2i.py \
|
| 71 |
-
--model /path/to/checkpoint \
|
| 72 |
-
--prompt "A cat sitting on a windowsill" \
|
| 73 |
-
--output output_tokens.npy \
|
| 74 |
-
--lat-h 32 --lat-w 32
|
| 75 |
-
```
|
| 76 |
-
|
| 77 |
-
## π Benchmarks
|
| 78 |
-
|
| 79 |
-
### π¨ Fine-Grained Text-to-Image Generation
|
| 80 |
-
|
| 81 |
-
**UniGenBench** β Gestalt achieves the strongest overall result among the evaluated models, combining fine-grained semantic alignment with compositional generation.
|
| 82 |
|
| 83 |
<p align="center">
|
| 84 |
-
<img src="assets/
|
| 85 |
</p>
|
| 86 |
|
| 87 |
-
|
| 88 |
|
| 89 |
-
|
| 90 |
-
<img src="assets/tiifbench.png" alt="TIIF-Bench results" width="95%"/>
|
| 91 |
-
</p>
|
| 92 |
|
| 93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
|
| 95 |
-
|
| 96 |
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
|
| 101 |
-
#
|
|
|
|
|
|
|
|
|
|
| 102 |
|
| 103 |
-
|
| 104 |
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
|
|
|
|
|
|
| 108 |
|
| 109 |
-
##
|
| 110 |
|
| 111 |
If you find Gestalt useful for your research, please cite:
|
| 112 |
|
|
@@ -121,10 +94,10 @@ If you find Gestalt useful for your research, please cite:
|
|
| 121 |
}
|
| 122 |
```
|
| 123 |
|
| 124 |
-
##
|
| 125 |
|
| 126 |
-
This
|
| 127 |
|
| 128 |
-
##
|
| 129 |
|
| 130 |
-
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
| 3 |
tags:
|
| 4 |
+
- multimodal
|
| 5 |
+
- discrete-diffusion
|
| 6 |
+
- vision-language
|
| 7 |
+
- continual-pretraining
|
|
|
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
<p align="center">
|
| 11 |
+
<img src="https://raw.githubusercontent.com/GeWu-Lab/Gestalt/main/assets/gestalt-logo.svg" alt="Gestalt" width="360"/>
|
| 12 |
</p>
|
| 13 |
|
| 14 |
<h1 align="center">Gestalt: Large Multimodal Interplay Model</h1>
|
| 15 |
|
| 16 |
<p align="center">
|
| 17 |
<a href="https://gewu-lab.github.io/Gestalt/"><img src="https://img.shields.io/badge/Gestalt-Website-0A66C2?logo=safari&logoColor=white" alt="Website"/></a>
|
| 18 |
+
<a href="https://github.com/GeWu-Lab/Gestalt/blob/main/archive/Gestalt.pdf"><img src="https://img.shields.io/badge/Gestalt-Paper-red?logo=arxiv&logoColor=red" alt="Paper"/></a>
|
| 19 |
<a href="https://github.com/GeWu-Lab/Gestalt"><img src="https://img.shields.io/badge/Gestalt-Code-181717?logo=github" alt="Code"/></a>
|
| 20 |
+
<a href="https://huggingface.co/GeWuLab/Gestalt"><img src="https://img.shields.io/badge/Gestalt-Model-yellow?logo=huggingface&logoColor=yellow" alt="Model"/></a>
|
| 21 |
</p>
|
| 22 |
|
|
|
|
|
|
|
| 23 |
<p align="center">
|
| 24 |
+
<a href="https://bjlfzs.github.io/">Zequn Yang</a><sup>β </sup> 
|
| 25 |
+
<a href="https://github.com/fishmeoww">Yu Miao</a><sup>β </sup> 
|
| 26 |
+
<a href="https://github.com/nihaotian1">Haotian Ni</a><sup>β </sup> 
|
| 27 |
+
<a href="https://github.com/Gutsczh">Ziheng Chen</a><sup>β </sup> 
|
| 28 |
+
<a href="https://scholar.google.com/citations?user=YJWX9e0AAAAJ">Chengxiang Huang</a><sup>β </sup>
|
| 29 |
+
<br/>
|
| 30 |
+
<a href="https://scholar.google.com/citations?user=Ox6SxpoAAAAJ">Dongzhan Zhou</a> 
|
| 31 |
+
<a href="https://chenkai.site/">Kai Chen</a> 
|
| 32 |
+
<a href="http://qizhang.info/">Qi Zhang</a> 
|
| 33 |
+
<a href="https://gsai.ruc.edu.cn/english/jrwen">Ji-Rong Wen</a> 
|
| 34 |
+
<a href="https://echo0409.github.io/">Yake Wei</a><sup>β‘</sup> 
|
| 35 |
+
<a href="https://dtaoo.github.io/">Di Hu</a><sup>β‘,β</sup>
|
| 36 |
</p>
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
<p align="center">
|
| 39 |
+
<sub><sup>β </sup> Equal contribution <sup>β‘</sup> Team leader <sup>β</sup> Corresponding author</sub>
|
| 40 |
</p>
|
| 41 |
|
| 42 |
+
> **Gestalt** is a new paradigm of large multimodal model built around **multimodal interplay**. Guided by a multimodal interplay pyramid β from modality-specific modeling, through cross-modal alignment, to multimodal synergy β Gestalt adopts a unified **discrete diffusion** framework with an interplay-partitioned architecture, where learnable interplay tokens mediate cross-modal exchange and integration. The name is inspired by Gestalt psychology: *the whole is greater than the sum of its parts.*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
<p align="center">
|
| 45 |
+
<img src="https://raw.githubusercontent.com/GeWu-Lab/Gestalt/main/assets/gestalt_1.png" alt="Gestalt teaser" width="95%"/>
|
| 46 |
</p>
|
| 47 |
|
| 48 |
+
## Model Description
|
| 49 |
|
| 50 |
+
This is the **Continual Pretraining (CPT)** checkpoint of Gestalt, trained with conditional masked prediction on 8M samples. For the full SFT model, see [GeWuLab/Gestalt-SFT](https://huggingface.co/GeWuLab/Gestalt-SFT).
|
|
|
|
|
|
|
| 51 |
|
| 52 |
+
| Property | Value |
|
| 53 |
+
|:--|:--|
|
| 54 |
+
| Architecture | GestaltModelLM (discrete diffusion with interplay tokens) |
|
| 55 |
+
| Parameters | ~8B |
|
| 56 |
+
| Hidden size | 4096 |
|
| 57 |
+
| Layers | 32 |
|
| 58 |
+
| Attention heads | 32 |
|
| 59 |
+
| Vocab size | 142,848 |
|
| 60 |
+
| Max sequence length | 4,096 |
|
| 61 |
+
| Precision | bfloat16 |
|
| 62 |
|
| 63 |
+
## Download
|
| 64 |
|
| 65 |
+
```bash
|
| 66 |
+
# Using huggingface-cli
|
| 67 |
+
huggingface-cli download GeWuLab/Gestalt --local-dir /path/to/checkpoint
|
| 68 |
|
| 69 |
+
# Or using git
|
| 70 |
+
git lfs install
|
| 71 |
+
git clone https://huggingface.co/GeWuLab/Gestalt
|
| 72 |
+
```
|
| 73 |
|
| 74 |
+
## Training Pipeline
|
| 75 |
|
| 76 |
+
| Stage | Data | Objective |
|
| 77 |
+
|:--|:--:|:--|
|
| 78 |
+
| **Multimodal Pretraining** | 70M | Joint masked prediction |
|
| 79 |
+
| **Continual Pretraining** β this checkpoint | 8M | Conditional masked prediction |
|
| 80 |
+
| **Supervised Fine-Tuning** | 13.7M (+β2.5M T2I) | Four interplay categories, three-phase curriculum |
|
| 81 |
|
| 82 |
+
## Citation
|
| 83 |
|
| 84 |
If you find Gestalt useful for your research, please cite:
|
| 85 |
|
|
|
|
| 94 |
}
|
| 95 |
```
|
| 96 |
|
| 97 |
+
## License
|
| 98 |
|
| 99 |
+
This project is released under the Apache 2.0 license.
|
| 100 |
|
| 101 |
+
## Acknowledgements
|
| 102 |
|
| 103 |
+
This work is supported in part by the Beijing Natural Science Foundation under Grant No. 4262050, and by the Beijing Nova Program under Grant No. 202604841277.
|