Skip to content

[examples] feat: add DPPO teacher configs for pickscore/ocr/geneval - #200

Merged
Jayce-Ping merged 1 commit into
mainfrom
feat/dppo-teacher-configs
Jul 3, 2026
Merged

[examples] feat: add DPPO teacher configs for pickscore/ocr/geneval#200
Jayce-Ping merged 1 commit into
mainfrom
feat/dppo-teacher-configs

Conversation

@Jayce-Ping

Copy link
Copy Markdown
Collaborator

Summary

  • Adds three single-reward DPPO teacher training configs under examples/dppo/lora/sd3_5/, migrated from the private flow_dppo/ teacher configs:
  • Each file's first line is a # Checkpoint: <url> comment pointing to the published HuggingFace teacher LoRA, so the config is self-describing for downstream OPD distillation (examples/opd/lora/sd3_5/geneval_pickscore_ocr.yaml teachers[].path).
  • Algorithm mapping from private -> current framework:
    • trainer_type: grpo + mask_type: kl_adv -> trainer_type: dppo
    • kl_type: v-based -> kl_type: v-based + kl_mask_type: v-based (mask is now decoupled from the ref-KL space and must be set explicitly)
    • add_kl_coefficient / clip_range -> dropped (DPPO path has no PPO ratio-clip; kl_beta=0 disables the ref term)
  • Shared DPPO hyperparams: adv_clip_range=10.0, advantage_aggregation='sum', kl_mask_threshold=1e-6, kl_beta=0, group_size=18, per_device_batch_size=8, max_epochs=1000, CPS SDE (noise_level=0.8, num_sde_steps=3, sde_steps=[0,1,2,3,4]), SD3.5-Medium LoRA r=32 / a=64.
  • All three adopt the new data.datasets[] schema with force_reprocess: false (overrides private geneval.yaml's true).
  • Comment style follows geneval2_single.yaml (per-line inline comments); DPPO hyperparams are filled from the teacher values, not copied from the geneval2 example (which uses kl_mask_type: x-based and is not equivalent).

Test plan

  • All three YAMLs load via Arguments.load_from_yaml with no errors.
  • Verified parsed DPPO fields match the plan:
    • trainer_type == 'dppo'
    • kl_type == 'v-based', kl_mask_type == 'v-based'
    • kl_mask_threshold == 1e-6, kl_beta == 0
    • adv_clip_range == (-10.0, 10.0), advantage_aggregation == 'sum'
    • group_size == 18, per_device_batch_size == 8, max_epochs == 1000
  • Verified per-file identity: run_name, datasets[0].name, force_reprocess == False, and reward (name/reward_model/batch_size/dtype/async_reward) all match the spec.
  • (Manual) Smoke-train one config to confirm the registry resolves PickScore / OCR / GenEval and the CPS SDE scheduler fires — not run here, no GPU available locally.

Migrate three flow_dppo teacher configs from the private repo into
examples/dppo/lora/sd3_5/ as single-reward DPPO LoRA training configs
on SD3.5-Medium. Each file starts with a # Checkpoint: <url> comment
pointing to the published HuggingFace teacher LoRA.

Algorithm mapping (private -> current):
  grpo + mask_type: kl_adv  ->  trainer_type: dppo
  kl_type: v-based           ->  kl_type: v-based + kl_mask_type: v-based
  add_kl_coefficient/clip_range  ->  dropped (DPPO path has no ratio-clip)

Shared DPPO hyperparams: adv_clip_range=10.0, advantage_aggregation='sum',
kl_mask_threshold=1e-6, kl_beta=0, group_size=18, per_device_batch_size=8,
max_epochs=1000, CPS SDE (noise_level=0.8, num_sde_steps=3).

Per-file differences:
  pickscore_teacher.yaml: dataset/pickscore, PickScore bs=16 async (train),
    bs=32 sync (eval); ckpt Jayce-Ping/Pickscore-Teacher
  ocr_teacher.yaml: dataset/ocr, OCR bs=64 bfloat16 sync; ckpt Jayce-Ping/OCR-Teacher
  geneval_teacher.yaml: dataset/geneval, GenEval bs=64 float32 sync;
    force_reprocess=false (overrides private true); ckpt Jayce-Ping/GenEval-Teacher

All three adopt the new data.datasets[] schema and load cleanly via
Arguments.load_from_yaml with the expected DPPO fields.
Copilot AI review requested due to automatic review settings July 3, 2026 13:01
@Jayce-Ping
Jayce-Ping merged commit 0df3318 into main Jul 3, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds DPPO “teacher” training example configs for SD3.5-Medium LoRA, making three single-reward teacher setups (PickScore / OCR / GenEval) available under examples/ with self-describing checkpoint links for downstream distillation workflows.

Changes:

  • Added pickscore_teacher.yaml DPPO teacher config with async PickScore reward during training and sync eval reward settings.
  • Added ocr_teacher.yaml DPPO teacher config with OCR reward settings (bf16 reward inference, sync).
  • Added geneval_teacher.yaml DPPO teacher config with GenEval reward settings (float32 reward inference, sync) and short GenEval behavior notes.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
examples/dppo/lora/sd3_5/pickscore_teacher.yaml New DPPO teacher example config for PickScore (async train reward, sync eval reward).
examples/dppo/lora/sd3_5/ocr_teacher.yaml New DPPO teacher example config for OCR reward (sync).
examples/dppo/lora/sd3_5/geneval_teacher.yaml New DPPO teacher example config for GenEval reward (float32, sync).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants