Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
image
imagewidth (px)
512
512
End of preview. Expand in Data Studio

BAGEL Continual Learning and Personalization Release

This repository contains the model weights, evaluation artifacts, and benchmark summaries used in our BAGEL continual-learning and personalization experiments. It is a release repository, not a copy of the BAGEL source code.

The upstream model and code are:

Repository contents

base_models/BAGEL-7B-MoT/
    Original BAGEL-7B-MoT model weights, tokenizer, VAE, and configs.

checkpoints/dreambooth_individual_19/<NN_concept>/
    model-00001-of-00002.safetensors
    model-00002-of-00002.safetensors
    model.safetensors.index.json
    Full step-1000 DreamBooth-style personalized model for one concept.

checkpoints/pure_yoprompt_positive_only_19/<concept>/
    concept_step0000500.pt
    Lightweight generation-side soft-prompt checkpoint trained with positive
    examples only. LLM2VAE and all base-model parameters remain frozen.

artifacts/understanding/
    Continual-understanding LoRA checkpoints and evaluation outputs for
    VizWiz -> Fin -> Sci -> Med -> RS -> AD -> OCR.

artifacts/personalization/dreambooth_individual_19/
    Concept soft-token checkpoints, prompts, generated images, logs, and
    metrics corresponding to the 19 full models.

artifacts/personalization/yoprompt_individual_19/
    YoPrompt personalization outputs and metrics.

artifacts/generation/
    Generic generation results before and after understanding training.

experiments/
    Consolidated benchmark tables and supporting experiment files.

results/personalized_understanding_influence_0724/
    Machine-readable CSV/JSON and Markdown summaries for personalized
    generation before and after composing the final understanding LoRA.

results/pure_yoprompt_positive_only_19/
    Soft-prompt Simple Prompt generations, per-concept metrics, aggregate
    summaries, and an experiment-specific README for all 19 concepts.

visualization_results/
    Released visualizations.

artifacts/_manifests/bagel_cl_assets_20260724.json
    Audited manifest for the non-full-checkpoint artifact bundle.

How the 19 checkpoints were obtained

These are independent personalization runs, not a continual sequence. Every concept starts from the same unmodified BAGEL-7B-MoT base model. Training one concept does not initialize from, or contain, any other personalized concept.

For every concept:

  1. The concept's UniCTokens training split was converted to a BAGEL T2I parquet dataset. The table below gives the number of training images used.
  2. BAGEL was fine-tuned in DreamBooth style for 1,000 optimizer steps.
  3. The final full FSDP model state, concept soft-token state, and llm2vae state were saved at step 1,000.
  4. The original full model.safetensors was losslessly split into two safetensors files for Hugging Face storage. No quantization or pruning was applied. model.safetensors.index.json maps every tensor to its shard.

Common training configuration:

Setting Value
Base model BAGEL-7B-MoT, loaded from EMA weights
Objective T2I DreamBooth-style personalization
Optimizer steps 1,000
Learning rate 1e-5
LR schedule Constant, 50 warmup steps
Gradient accumulation 1
Max gradient norm 1.0
Trainable Language model and llm2vae
Frozen VAE, vision encoder, and LM head
Concept tokens 16 generation soft tokens
Understanding tokens Disabled during personalization
Distributed training 2-way FSDP hybrid sharding
Saved checkpoint Final step 1,000; optimizer state excluded

Concept inventory:

Directory Concept Class Training images
01_adrien_brody adrien_brody man 10
02_b_jordan b_jordan man 10
03_bo bo dog 10
04_butin butin dog 5
05_coco coco woman 10
06_dunpai dunpai shield 10
07_emma emma woman 8
08_gold_pineapple gold_pineapple object 9
09_leonardo leonardo man 10
10_maeve_dog maeve_dog dog 10
11_mam mam cat 10
12_mydieu mydieu cat 5
13_nha_tho_hanoi nha_tho_hanoi building 6
14_ningning ningning woman 10
15_pig_cup pig_cup object 10
16_skulls_mug skulls_mug mug 9
17_wangkai wangkai man 10
18_will will man 10
19_willinvietnam willinvietnam man 10

Each checkpoint directory is a complete personalized model state of about 56.7 GB, stored as one approximately 48.1 GB shard and one approximately 8.62 GB shard plus the index. It is not a LoRA or a delta checkpoint.

Download guide

Install the Hugging Face client:

pip install -U huggingface_hub

Download the base model only

hf download tangjia0424/bagel-cl \
  --repo-type dataset \
  --include "base_models/BAGEL-7B-MoT/*" \
  --local-dir ./bagel-cl

Download one personalized checkpoint

Replace 03_bo with any directory from the concept table. Download the full model shards and the companion concept metadata together:

CONCEPT=03_bo

hf download tangjia0424/bagel-cl \
  --repo-type dataset \
  --include "checkpoints/dreambooth_individual_19/${CONCEPT}/*" \
  --include "artifacts/personalization/dreambooth_individual_19/${CONCEPT}/concept_ckpts/*" \
  --local-dir ./bagel-cl

The base model configs and VAE are also required to construct BAGEL. Download base_models/BAGEL-7B-MoT/* as shown above unless they are already available.

Equivalent Python download:

from huggingface_hub import snapshot_download

concept = "03_bo"
snapshot_download(
    repo_id="tangjia0424/bagel-cl",
    repo_type="dataset",
    local_dir="./bagel-cl",
    allow_patterns=[
        "base_models/BAGEL-7B-MoT/*",
        f"checkpoints/dreambooth_individual_19/{concept}/*",
        f"artifacts/personalization/dreambooth_individual_19/{concept}/concept_ckpts/*",
    ],
)

Download all full personalization checkpoints

hf download tangjia0424/bagel-cl \
  --repo-type dataset \
  --include "checkpoints/dreambooth_individual_19/*" \
  --local-dir ./bagel-cl

This downloads roughly 1 TB. Downloading a single concept is recommended for normal use.

Loading a personalized checkpoint

Keep both safetensors shards and model.safetensors.index.json in the same directory. Do not load only one shard. Build the BAGEL architecture using the configs in base_models/BAGEL-7B-MoT, then use an index-aware sharded safetensors loader. For example, after constructing the BAGEL model object:

The helper below is provided by Transformers. Use a Transformers and huggingface_hub version combination compatible with your BAGEL environment.

from pathlib import Path
from transformers.modeling_utils import load_sharded_checkpoint

root = Path("./bagel-cl")
concept = "03_bo"
checkpoint_dir = root / "checkpoints/dreambooth_individual_19" / concept

load_sharded_checkpoint(
    model,
    checkpoint_dir,
    strict=False,
    prefer_safe=True,
)

Then load the companion concept-token checkpoint used by the BAGEL personalization evaluator:

from eval.personalization.checkpoint_loader import ConceptCheckpointLoader

concept_pt = (
    root
    / "artifacts/personalization/dreambooth_individual_19"
    / concept
    / "concept_ckpts/concept_step0001000.pt"
)
concept_state = ConceptCheckpointLoader.load(tokenizer, model, str(concept_pt))

The full model checkpoint already contains the trained llm2vae parameters. A standalone llm2vae_step0001000.pt is therefore not required or published.

If an existing script accepts only one model.safetensors file, update it to use model.safetensors.index.json through an index-aware loader. Passing model-00001-of-00002.safetensors alone produces an incomplete model.

The full checkpoints are alternatives: load exactly one personalized model at a time. They are not adapters and should not be stacked with each other.

Pure YoPrompt positive-only checkpoints

The checkpoints under checkpoints/pure_yoprompt_positive_only_19/ are lightweight soft-prompt checkpoints, not full model states and not LoRAs. Each concept was trained independently from the unmodified BAGEL base model with:

  • 16 generation-side soft tokens
  • positive concept images only; no negative samples
  • learning rate 1e-4, 500 optimizer steps, and 50 warmup steps
  • frozen LLM, LM head, LLM2VAE, ViT, and VAE

The corresponding Simple Prompt evaluation contains 50 generated images per concept and is stored under results/pure_yoprompt_positive_only_19/. Mean metrics across all 19 concepts are CLIP-I 0.7361, CLIP-T 26.6816, Q-Eval Alignment 0.8132, and Q-Eval Quality 0.7909.

Download one concept and its evaluation result:

CONCEPT=bo

hf download tangjia0424/bagel-cl \
  --repo-type dataset \
  --include "checkpoints/pure_yoprompt_positive_only_19/${CONCEPT}/*" \
  --include "results/pure_yoprompt_positive_only_19/${CONCEPT}/*" \
  --local-dir ./bagel-cl

Download all 19 soft-prompt checkpoints and results:

hf download tangjia0424/bagel-cl \
  --repo-type dataset \
  --include "checkpoints/pure_yoprompt_positive_only_19/*" \
  --include "results/pure_yoprompt_positive_only_19/*" \
  --local-dir ./bagel-cl

Load concept_step0000500.pt with BAGEL's eval/personalization/checkpoint_loader.py, using the same mechanism as the companion concept-token checkpoint shown above. Do not pass an LLM2VAE checkpoint for this experiment.

Continual-understanding LoRAs

The understanding checkpoints under artifacts/understanding/ are different from the full DreamBooth checkpoints. They are LoRA adapters trained in this order:

VizWiz -> Fin -> Sci -> Med -> RS -> AD -> OCR

Each task directory contains its LoRA and evaluation outputs. The released run uses learning rate 1e-5. The final OCR LoRA used in the personalized understanding-influence experiment has:

  • rank 32
  • alpha 64
  • dropout 0.05
  • target modules: q_proj, v_proj, o_proj, gate_proj, up_proj, down_proj

See experiments/full.md for the complete understanding matrix and the exact checkpoint/evaluation provenance.

Results and known caveat

  • experiments/full.md is the consolidated experiment document.
  • experiments/benchmark_results.md is the benchmark-oriented copy.
  • results/personalized_understanding_influence_0724/summary.json is the preferred machine-readable personalized before/after result.
  • Prompt-level outputs and generated images are under artifacts/.

The coco personalization run is retained for completeness, but its generated images were observed to be degenerate/repeated. Treat that concept as a known failed or degenerate case when computing aggregate personalization metrics.

License and citation

BAGEL is released under Apache 2.0. Consult the upstream BAGEL model card and the licenses of the original datasets before redistribution or commercial use.

@article{deng2025bagel,
  title   = {Emerging Properties in Unified Multimodal Pretraining},
  author  = {Deng, Chaorui and Zhu, Deyao and Li, Kunchang and Gou, Chenhui and Li, Feng and Wang, Zeyu and Zhong, Shu and Yu, Weihao and Nie, Xiaonan and Song, Ziang and Shi, Guang and Fan, Haoqi},
  journal = {arXiv preprint arXiv:2505.14683},
  year    = {2025}
}
Downloads last month
6,819

Paper for tangjia0424/bagel-cl