Any-to-Any
bagel
custom_code
kuvvi commited on
Commit
3e18431
·
verified ·
1 Parent(s): 23c3a89

Minimal card for now

Browse files
Files changed (1) hide show
  1. README.md +1 -118
README.md CHANGED
@@ -3,125 +3,8 @@ license: apache-2.0
3
  base_model: ByteDance-Seed/BAGEL-7B-MoT
4
  pipeline_tag: any-to-any
5
  library_name: bagel
6
- tags:
7
- - bagel
8
- - bagel-mot
9
- - thinkmorph-ssl
10
- - primer
11
- - multimodal
12
- - interleaved-reasoning
13
- - spatial-reasoning
14
- datasets:
15
- - ThinkMorph/Pretext-270K
16
- - ThinkMorph/Instruct-181K
17
  ---
18
 
19
  # ThinkMorph-SSL-Instruct
20
 
21
- ThinkMorph-SSL-Instruct is a unified multimodal model that reasons with interleaved text and
22
- generated images. It is trained from BAGEL-7B-MoT with the two-stage PRIMER recipe:
23
-
24
- 1. **Stage 1 (pretext).** Training on [Pretext-270K](https://huggingface.co/datasets/ThinkMorph/Pretext-270K),
25
- which has 270,896 instruction-free text-image-text traces built from source images.
26
- This repository starts from the Stage 1 EMA weights at step 5,500, published separately as
27
- [ThinkMorph-SSL-Base](https://huggingface.co/ThinkMorph/ThinkMorph-SSL-Base).
28
- 2. **Stage 2 (instruction).** Training on [Instruct-181K](https://huggingface.co/datasets/ThinkMorph/Instruct-181K),
29
- which has 181,291 question-driven interleaved traces.
30
-
31
- This repository holds the **Stage 2 EMA weights at step 5,500**. They are the weights the
32
- paper reports.
33
-
34
- ## Files
35
-
36
- | File | Bytes | SHA256 |
37
- | --- | ---: | --- |
38
- | `ema.safetensors` | 29,351,872,574 | `6497ea617dea4193d06135b97f00bc10bbdee1733789e489cae0f3c57141123f` |
39
- | `ae.safetensors` | 167,664,678 | `e49d48aa3474df744ad718d11736d87f38d52bf7ca57dee6b8417978bfbfc9ad` |
40
- | `config.json` | 5,175 | `4bc85a4daaef591f0b539216d09a1ee2294a1f3a3bda9f95885c13ed191ae701` |
41
- | `llm_config.json` | 2,136 | `cb884fc65d117b8e5ec3856090224cd739c511e01c5c1de488cede5a54c8e994` |
42
- | `vit_config.json` | 1,830 | `78664013bf6778ad4ecaebe78c153ef7fd46f7638fa78c0df1cb17d5bd7df0ab` |
43
- | `generation_config.json` | 243 | `3a8f9087e486054c8a4a08dae2e5a3ba62e23da212b5b8c08bc42cb983c3459f` |
44
- | `vocab.json` | 3,383,407 | `87a257b04b17642a0688c98cd1df89c398bda4fee532d6f88b38a659ecb4ac8d` |
45
- | `merges.txt` | 1,671,853 | `8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5` |
46
- | `added_tokens.json` | 630 | `a0582f48ed8e795fda5b7b8eb2d98b492842dc229e78b66793bf545ce7ec52c8` |
47
- | `special_tokens_map.json` | 613 | `76862e765266b85aa9459767e33cbaf13970f327a0e88d1c65846c2ddd3a1ecd` |
48
- | `tokenizer_config.json` | 4,864 | `b7af0d4c9b917db05150006b466cfa2e8424b3915ff5fe2023a6f512a5e16dd5` |
49
-
50
- - `ema.safetensors` holds the EMA weights in bfloat16: 1,451 tensors, 14,675,840,307
51
- parameters. The training model also had a 26th SigLIP layer. BAGEL inference never uses
52
- that layer (`vit_select_layer = -2`), so it is not stored, as in the original BAGEL release.
53
- - `ae.safetensors` is the VAE used in training (about 160 MB). It is the one from
54
- `lmms-lab/BAGEL-7B-MoT-ver.LE`. Do not replace it with the 320 MB VAE of the public BAGEL
55
- release.
56
- - Use the tokenizer files shipped here. They include the added special tokens used in
57
- training.
58
-
59
- ## Loading
60
-
61
- The directory has the same layout as the original BAGEL-7B-MoT release, and the weights file
62
- has the same name, `ema.safetensors`. To load:
63
-
64
- - **Official BAGEL inference code** (<https://github.com/ByteDance-Seed/Bagel>): point
65
- `model_path` at a local copy of this repository. The loader reads `llm_config.json`,
66
- `vit_config.json`, `ae.safetensors` and `ema.safetensors`.
67
- - **PRIMER code release:** `Bagel.from_pretrained(model_path, config, training_config=...)`
68
- detects `ema.safetensors` and loads it directly. The evaluation wrapper `wrapper: Bagel`
69
- also reads `ema.safetensors` when there is no `model.safetensors`.
70
-
71
- ```bash
72
- hf download ThinkMorph/ThinkMorph-SSL-Instruct --local-dir ThinkMorph-SSL-Instruct
73
- ```
74
-
75
- ## Training
76
-
77
- | Item | Stage 1 (pretext) | Stage 2 (instruction) |
78
- | --- | --- | --- |
79
- | Run | `0503_stage0_270k_32gpu` | `0505_s0s2_173k_48gpus` |
80
- | Initialization | BAGEL-7B-MoT (`lmms-lab/BAGEL-7B-MoT-ver.LE` layout) | Stage 1 EMA, step 5,500 |
81
- | Data | Pretext-270K: 270,896 train rows; the val files are not used | Instruct-181K: all 21 subsets, train and val files |
82
- | GPUs | 32 (4 nodes × 8) | 48 (6 nodes × 8) |
83
- | Learning rate | 2.83e-5 (warmup 1,000) | 2e-5 (warmup 1,000) |
84
- | Configured horizon | 10,000 steps | 12,000 steps |
85
- | Released save | EMA, step 5,500 | EMA, step 5,500 |
86
- | EMA | decay 0.9998 from step 1,000, fp32 shadow | decay 0.9998 from step 1,000, fp32 shadow |
87
- | Packing | dynamic, up to 16,384 tokens | dynamic, up to 20,480 tokens |
88
-
89
- The losses are text cross-entropy and image flow matching, both with weight 1. The VAE is
90
- frozen, and the SigLIP encoder is trained. Stage 2 keeps only traces that have a first
91
- reasoning image and an answer (`require_reasoning_image_0_and_answer`), and it trains on
92
- the val files too (`include_val_in_training`).
93
-
94
- ## Evaluation
95
-
96
- The scores will be filled in after the paper's main table is final.
97
-
98
- | Benchmark group | ThinkMorph-SSL-Instruct |
99
- | --- | --- |
100
- | Visible evidence | TBD |
101
- | Spatial structure | TBD |
102
- | Scene reconstruction | TBD |
103
-
104
- ## Intended use and limitations
105
-
106
- This is a research model. It answers visual questions by writing text and generating
107
- intermediate images.
108
-
109
- - The intermediate images can leave out or change evidence that the question depends on.
110
- - Default inference generates images, which costs a lot of compute.
111
- - The earlier `ThinkMorph/ThinkMorph-7B` is a different model and cannot stand in for this
112
- one.
113
-
114
- ## License
115
-
116
- The weights are released under Apache-2.0, following BAGEL-7B-MoT. The datasets carry their
117
- own source terms; see their cards.
118
-
119
- ## Citation
120
-
121
- ```bibtex
122
- @misc{thinkmorphssl2026,
123
- title = {TBD},
124
- author = {TBD},
125
- year = {2026}
126
- }
127
- ```
 
3
  base_model: ByteDance-Seed/BAGEL-7B-MoT
4
  pipeline_tag: any-to-any
5
  library_name: bagel
 
 
 
 
 
 
 
 
 
 
 
6
  ---
7
 
8
  # ThinkMorph-SSL-Instruct
9
 
10
+ Model weights. More details will be added later.