wyjlu commited on
Commit
2fa342f
·
verified ·
1 Parent(s): 059e1e8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -86
README.md CHANGED
@@ -1,86 +0,0 @@
1
- ---
2
- license: apache-2.0
3
- base_model: ByteDance-Seed/BAGEL-7B-MoT
4
- tags:
5
- - image-editing
6
- - multimodal
7
- - bagel
8
- - reasoning
9
- library_name: bagel
10
- ---
11
-
12
- # Youtu-SFT
13
-
14
- BAGEL-7B-MoT 在 **V2-Nano250K**(257,730 条)上的 Reasoning Edit SFT 权重(**step 500**)。
15
-
16
- 给定 before 图 + 编辑指令,模型先输出 **target caption + `<think>` reasoning**,再生成 after 图。
17
-
18
- ## Model Details
19
-
20
- | 项 | 值 |
21
- |----|-----|
22
- | Base model | [BAGEL-7B-MoT](https://huggingface.co/ByteDance-Seed/BAGEL-7B-MoT) |
23
- | Training data | V2-Nano250K, 257,730 samples |
24
- | Training steps | 500 |
25
- | Architecture | BagelForConditionalGeneration (MoT) |
26
- | `max_latent_size` | 64(训练配置;config.json 内嵌字段可能为 32,加载时请传 `--max_latent_size 64`) |
27
-
28
- ## Files
29
-
30
- | 文件 | 说明 |
31
- |------|------|
32
- | `ema.safetensors` | **主权重**(EMA,推理与下游微调用这个) |
33
- | `ae.safetensors` | VAE |
34
- | `config.json` / `llm_config.json` / `vit_config.json` | 模型配置 |
35
- | `tokenizer.json` / `vocab.json` / `merges.txt` | 分词器 |
36
-
37
- > 本仓库不含 `optimizer` / `model.safetensors`,仅用于推理或作为预训练权重加载。
38
-
39
- ## Usage
40
-
41
- ### 加载(Bagel 训练 / 推理代码)
42
-
43
- ```python
44
- # 将 MODEL_DIR 设为本仓库 snapshot 路径
45
- resume_from = "wyjlu/Youtu-SFT" # 或本地目录
46
- # 加载时:
47
- # finetune_from_ema=True
48
- # resume_model_only=True
49
- # max_latent_size=64
50
- ```
51
-
52
- ```bash
53
- export PYTHONPATH=/path/to/Bagel_caption_thinking:$PYTHONPATH
54
-
55
- torchrun ... train/pretrain_unified_navit.py \
56
- --model_path wyjlu/Youtu-SFT \
57
- --resume-from wyjlu/Youtu-SFT \
58
- --finetune_from_ema True \
59
- --resume-model-only True \
60
- --max_latent_size 64 \
61
- ...
62
- ```
63
-
64
- ### 训练数据格式(参考)
65
-
66
- ```
67
- system prompt
68
- → before image
69
- → instruction
70
- → target_caption + <think>reasoning</think>
71
- → after image
72
- ```
73
-
74
- ## Training Hyperparameters
75
-
76
- | 参数 | 值 |
77
- |------|-----|
78
- | lr | 2e-5 (cosine) |
79
- | ce_weight | 2 |
80
- | ema | 0.995 |
81
- | freeze_vae | True |
82
- | 8 nodes × 8 GPUs | H20 |
83
-
84
- ## Citation
85
-
86
- Based on [BAGEL](https://arxiv.org/abs/2505.14683).