Dataset card organized by task
Browse files
README.md
CHANGED
|
@@ -4,29 +4,33 @@ base_model: ByteDance-Seed/BAGEL-7B-MoT
|
|
| 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 |
---
|
| 12 |
|
| 13 |
# ThinkMorph-SSL-Base
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
a
|
| 18 |
-
|
| 19 |
-
|
|
|
|
| 20 |
|
| 21 |
-
|
| 22 |
-
[
|
|
|
|
|
|
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
|
|
|
| 26 |
|
| 27 |
-
##
|
| 28 |
|
| 29 |
-
The
|
|
|
|
|
|
|
| 30 |
|
| 31 |
```text
|
| 32 |
Use <think>...</think> for intermediate reasoning or planning.
|
|
@@ -45,54 +49,6 @@ Example:
|
|
| 45 |
<answer>final answer</answer>
|
| 46 |
```
|
| 47 |
|
| 48 |
-
When the model writes `<gen_image>[Image size: (height, width)]`, the inference loop generates
|
| 49 |
-
an image with the model's image branch, adds it to the context and continues decoding.
|
| 50 |
-
|
| 51 |
-
## Loading
|
| 52 |
-
|
| 53 |
-
The repository has the same layout as BAGEL-7B-MoT, so the official BAGEL inference code
|
| 54 |
-
(<https://github.com/ByteDance-Seed/Bagel>) loads it: point `model_path` at a local copy.
|
| 55 |
-
|
| 56 |
-
```bash
|
| 57 |
-
hf download ThinkMorph/ThinkMorph-SSL-Base --local-dir ThinkMorph-SSL-Base
|
| 58 |
-
```
|
| 59 |
-
|
| 60 |
-
Keep the VAE and the tokenizer files shipped here. The VAE is the one used in training, and
|
| 61 |
-
the tokenizer has the special tokens the model was trained with.
|
| 62 |
-
|
| 63 |
-
## Files
|
| 64 |
-
|
| 65 |
-
| File | Content |
|
| 66 |
-
| --- | --- |
|
| 67 |
-
| `ema.safetensors` | the model weights: bfloat16, 14.7B parameters (29.4 GB) |
|
| 68 |
-
| `ae.safetensors` | the VAE, frozen during training |
|
| 69 |
-
| `config.json`, `llm_config.json`, `vit_config.json`, `generation_config.json` | model configuration |
|
| 70 |
-
| `vocab.json`, `merges.txt`, `added_tokens.json`, `special_tokens_map.json`, `tokenizer_config.json` | the tokenizer, with the special tokens used in training |
|
| 71 |
-
|
| 72 |
-
All files except `ema.safetensors` are identical to those of ThinkMorph-SSL-Instruct. The EMA
|
| 73 |
-
state of the training checkpoint was merged and cast to bfloat16 in the same layout (1,451
|
| 74 |
-
tensors). The unused last SigLIP layer is left out, as in BAGEL.
|
| 75 |
-
|
| 76 |
-
## Training
|
| 77 |
-
|
| 78 |
-
| | Stage 1: pretext reasoning |
|
| 79 |
-
| --- | --- |
|
| 80 |
-
| Starts from | BAGEL-7B-MoT |
|
| 81 |
-
| Data | Pretext-270K, 270,896 training traces |
|
| 82 |
-
| GPUs | 32 |
|
| 83 |
-
| Learning rate, warmup | 2.83e-5, 1,000 steps |
|
| 84 |
-
| Sequence packing | up to 16,384 tokens |
|
| 85 |
-
| Released weights | EMA at step 5,500 |
|
| 86 |
-
|
| 87 |
-
Training uses 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 |
-
## License
|
| 92 |
-
|
| 93 |
-
The weights are released under Apache-2.0, following BAGEL-7B-MoT. The training data keep
|
| 94 |
-
the terms of their image sources; see the dataset card.
|
| 95 |
-
|
| 96 |
## Citation
|
| 97 |
|
| 98 |
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 |
---
|
| 10 |
|
| 11 |
# ThinkMorph-SSL-Base
|
| 12 |
|
| 13 |
+
<p>
|
| 14 |
+
<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>
|
| 15 |
+
<a href="https://huggingface.co/ThinkMorph/ThinkMorph-SSL-Instruct"><img src="https://img.shields.io/badge/ThinkMorph--SSL--Instruct-Model-orange?logo=huggingface&logoColor=orange" alt="ThinkMorph-SSL-Instruct Model"/></a>
|
| 16 |
+
</p>
|
| 17 |
+
|
| 18 |
+
## About
|
| 19 |
|
| 20 |
+
ThinkMorph-SSL-Base is [BAGEL-7B-MoT](https://huggingface.co/ByteDance-Seed/BAGEL-7B-MoT) after self-supervised pretext
|
| 21 |
+
reasoning on [Pretext-270K](https://huggingface.co/datasets/ThinkMorph/Pretext-270K). In each training trace the model
|
| 22 |
+
sees a corrupted image (grayscale, noisy, low-resolution, masked, warped, rotated or flipped, or
|
| 23 |
+
cut into shuffled tiles), describes it, generates the restored image, and describes the result.
|
| 24 |
|
| 25 |
+
This repository holds the EMA weights at step 5,500, the starting point of
|
| 26 |
+
[ThinkMorph-SSL-Instruct](https://huggingface.co/ThinkMorph/ThinkMorph-SSL-Instruct). The model has seen no
|
| 27 |
+
questions or answers; for visual question answering, use ThinkMorph-SSL-Instruct.
|
| 28 |
|
| 29 |
+
## Usage
|
| 30 |
|
| 31 |
+
The checkpoint has the same layout as BAGEL-7B-MoT and loads with the
|
| 32 |
+
[BAGEL code](https://github.com/ByteDance-Seed/Bagel). Keep the VAE and tokenizer files shipped
|
| 33 |
+
here. Prompt the model with the system prompt it was trained with:
|
| 34 |
|
| 35 |
```text
|
| 36 |
Use <think>...</think> for intermediate reasoning or planning.
|
|
|
|
| 49 |
<answer>final answer</answer>
|
| 50 |
```
|
| 51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
## Citation
|
| 53 |
|
| 54 |
The citation will be added with the paper.
|