Any-to-Any
bagel
custom_code
kuvvi commited on
Commit
0523fce
·
verified ·
1 Parent(s): fa0c6a3

Dataset card organized by task

Browse files
Files changed (1) hide show
  1. README.md +20 -60
README.md CHANGED
@@ -4,8 +4,6 @@ base_model: ThinkMorph/ThinkMorph-SSL-Base
4
  base_model_relation: finetune
5
  pipeline_tag: any-to-any
6
  library_name: bagel
7
- language:
8
- - en
9
  datasets:
10
  - ThinkMorph/Pretext-270K
11
  - ThinkMorph/Instruct-180K
@@ -13,24 +11,30 @@ datasets:
13
 
14
  # ThinkMorph-SSL-Instruct
15
 
16
- ThinkMorph-SSL-Instruct is a unified multimodal model that reasons with interleaved text and
17
- images. On a visual question, it writes reasoning text, generates intermediate images such as a
18
- zoomed-in crop, a depth map, a bird's-eye view or the view from another position, and then
19
- gives the answer.
 
20
 
21
- It is built on [BAGEL-7B-MoT](https://huggingface.co/ByteDance-Seed/BAGEL-7B-MoT) in two stages:
22
 
23
- 1. **Self-supervised pretext reasoning** on [Pretext-270K](https://huggingface.co/datasets/ThinkMorph/Pretext-270K): the
24
- model restores corrupted images and describes them before and after. This stage gives
25
- [ThinkMorph-SSL-Base](https://huggingface.co/ThinkMorph/ThinkMorph-SSL-Base).
26
- 2. **Instruction tuning** on [Instruct-180K](https://huggingface.co/datasets/ThinkMorph/Instruct-180K): question-driven
27
- traces whose intermediate images come from 17 visual operations.
28
 
29
- This repository holds the EMA weights at step 5,500 of the second stage.
30
 
31
- ## Prompt format
 
 
 
 
 
32
 
33
- The model was trained with the system prompt below. Use it at inference:
 
 
34
 
35
  ```text
36
  Use <think>...</think> for intermediate reasoning or planning.
@@ -49,54 +53,10 @@ Example:
49
  <answer>final answer</answer>
50
  ```
51
 
52
- When the model writes `<gen_image>[Image size: (height, width)]`, the inference loop generates
53
- an image with the model's image branch, adds it to the context and continues decoding.
54
-
55
- ## Loading
56
-
57
- The repository has the same layout as BAGEL-7B-MoT, so the official BAGEL inference code
58
- (<https://github.com/ByteDance-Seed/Bagel>) loads it: point `model_path` at a local copy.
59
-
60
- ```bash
61
- hf download ThinkMorph/ThinkMorph-SSL-Instruct --local-dir ThinkMorph-SSL-Instruct
62
- ```
63
-
64
- Keep the VAE and the tokenizer files shipped here. The VAE is the one used in training, and
65
- the tokenizer has the special tokens the model was trained with.
66
-
67
- ## Files
68
-
69
- | File | Content |
70
- | --- | --- |
71
- | `ema.safetensors` | the model weights: bfloat16, 14.7B parameters (29.4 GB) |
72
- | `ae.safetensors` | the VAE, frozen during training |
73
- | `config.json`, `llm_config.json`, `vit_config.json`, `generation_config.json` | model configuration |
74
- | `vocab.json`, `merges.txt`, `added_tokens.json`, `special_tokens_map.json`, `tokenizer_config.json` | the tokenizer, with the special tokens used in training |
75
-
76
- ## Training
77
-
78
- | | Stage 1: pretext reasoning | Stage 2: instruction tuning |
79
- | --- | --- | --- |
80
- | Starts from | BAGEL-7B-MoT | ThinkMorph-SSL-Base |
81
- | Data | Pretext-270K, 270,896 training traces | Instruct-180K, 180,490 traces |
82
- | GPUs | 32 | 48 |
83
- | Learning rate, warmup | 2.83e-5, 1,000 steps | 2e-5, 1,000 steps |
84
- | Sequence packing | up to 16,384 tokens | up to 20,480 tokens |
85
- | Released weights | EMA at step 5,500 | EMA at step 5,500 (this repository) |
86
-
87
- Both stages train on next-token cross-entropy for text and flow matching for generated images,
88
- with weight 1 each. The VAE is frozen; the language model and the vision encoder are trained.
89
- EMA weights are kept in fp32 with decay 0.9998 from step 1,000.
90
-
91
- ## Evaluation
92
 
93
  Results will be added with the paper.
94
 
95
- ## License
96
-
97
- The weights are released under Apache-2.0, following BAGEL-7B-MoT. The training data keep
98
- the terms of their image sources; see the dataset cards.
99
-
100
  ## Citation
101
 
102
  The citation will be added with the paper.
 
4
  base_model_relation: finetune
5
  pipeline_tag: any-to-any
6
  library_name: bagel
 
 
7
  datasets:
8
  - ThinkMorph/Pretext-270K
9
  - ThinkMorph/Instruct-180K
 
11
 
12
  # ThinkMorph-SSL-Instruct
13
 
14
+ <p>
15
+ <a href="https://huggingface.co/datasets/ThinkMorph/Pretext-270K"><img src="https://img.shields.io/badge/Pretext--270K-Dataset-yellow?logo=huggingface&logoColor=yellow" alt="Pretext-270K Dataset"/></a>
16
+ <a href="https://huggingface.co/datasets/ThinkMorph/Instruct-180K"><img src="https://img.shields.io/badge/Instruct--180K-Dataset-yellow?logo=huggingface&logoColor=yellow" alt="Instruct-180K Dataset"/></a>
17
+ <a href="https://huggingface.co/ThinkMorph/ThinkMorph-SSL-Base"><img src="https://img.shields.io/badge/ThinkMorph--SSL--Base-Model-orange?logo=huggingface&logoColor=orange" alt="ThinkMorph-SSL-Base Model"/></a>
18
+ </p>
19
 
20
+ ## About
21
 
22
+ ThinkMorph-SSL-Instruct reasons with interleaved text and images. On a visual question it thinks
23
+ in text, generates intermediate images when they help (a zoomed-in crop, a depth map, a
24
+ bird's-eye view, the view from another position), and then answers.
 
 
25
 
26
+ It is trained from [BAGEL-7B-MoT](https://huggingface.co/ByteDance-Seed/BAGEL-7B-MoT) in two stages:
27
 
28
+ | Stage | Data | Model |
29
+ | --- | --- | --- |
30
+ | 1. Self-supervised pretext reasoning | [Pretext-270K](https://huggingface.co/datasets/ThinkMorph/Pretext-270K) | [ThinkMorph-SSL-Base](https://huggingface.co/ThinkMorph/ThinkMorph-SSL-Base) |
31
+ | 2. Instruction tuning | [Instruct-180K](https://huggingface.co/datasets/ThinkMorph/Instruct-180K) | ThinkMorph-SSL-Instruct (this model: EMA weights, step 5,500) |
32
+
33
+ ## Usage
34
 
35
+ The checkpoint has the same layout as BAGEL-7B-MoT and loads with the
36
+ [BAGEL code](https://github.com/ByteDance-Seed/Bagel). Keep the VAE and tokenizer files shipped
37
+ here. Prompt the model with the system prompt it was trained with:
38
 
39
  ```text
40
  Use <think>...</think> for intermediate reasoning or planning.
 
53
  <answer>final answer</answer>
54
  ```
55
 
56
+ ## Benchmarks
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
58
  Results will be added with the paper.
59
 
 
 
 
 
 
60
  ## Citation
61
 
62
  The citation will be added with the paper.