Skip to content

DataFlex v1.2.0

Latest

Choose a tag to compare

@Walnutes Walnutes released this 02 Dec 10:57

DataFlex v1.2.0 Release Notes

This release graduates the v2 scheduling stack (Reorder and composable LEGO pipelines) out of preview with end-to-end multimodal vision-language (VLM) support, introduces PreSel, Adapt-∞, TracIn / Cluster-TracIn / Cluster-Loss, and three multimodal reweighting methods, extends ODM and DoReMi to multimodal training, and unifies interval-scoped scheduling and compute fairness across all dynamic trainers.

✨ New Algorithms

Component Method Reference Implementation
Selector PreSel & DynamicPreSel Filter Images First, Generate Instructions Later: Pre-Instruction Data Selection for Visual Instruction Tuning (arXiv:2503.07591) dataflex-cli presel · offline_selector/offline_presel_selector.py & dynamic_presel · train/selector/dynamic_presel_selector.py (#67, #72, #73)
Selector Adapt-∞ Scalable Continual Multimodal Instruction Tuning via Dynamic Data Selection (arXiv:2410.10813) adapt_inf · train/selector/adapt_inf_selector.py (#67)
Selector TracIn & Cluster-TracIn Estimating Training Data Influence by Tracing Gradient Descent, NeurIPS 2020 (arXiv:2002.08484) & cluster-accelerated variant tracin, cluster_tracin · train/selector/{tracin,cluster_tracin}_selector.py (#71)
Selector Cluster-Loss Cluster-accelerated forward-loss selection with z-score standardization cluster_loss · train/selector/cluster_loss_selector.py (#71)
Weighter Multimodal Loss Dynamic Loss-Based Sample Reweighting for Improved LLM Pretraining, ICLR 2025 (multimodal adaptation) multimodal_loss · train/weighter/multimodal_loss_weighter.py (#71, b33f2df)
Weighter Multimodal Δ-Loss Prioritizing Image-Related Tokens Enhances Vision-Language Pre-Training (arXiv:2406.04884) multimodal_deltaloss · train/weighter/multimodal_deltaloss_weighter.py (#71, b33f2df)
Weighter Multimodal ADAPT Rethinking Data Curation in LLM Training: Online Reweighting Offers Better Generalization, ICLR 2026 (multimodal adaptation) multimodal_adapt · train/weighter/multimodal_adapt_weighter.py (#71, b33f2df)
Reorder Perplexity Dynamic Reorder Online perplexity-driven curriculum ordering across all 7 patterns (sorting, segment, folding, zigzag, stair, saw, shuffle) model_perplexity · train/reorder/score_provider.py (#68, f5910ca)

PreSel & DynamicPreSel allocate task-level budgets via Instruction-Following Difficulty / Image-Instruction Reliance Scores (IRS) on a small reference set and select the most visually typical prototypes per DINOv2 cluster. Both the offline dataflex-cli presel pipeline and the online periodic dynamic_presel selector (with configurable allow_cross_round_overlap) are supported.

Adapt-∞ clusters Rademacher-projected parameter gradients and dynamically selects the highest-entropy scoring expert (log_ppl, el2n, predictive_entropy, or zero-image ig) within each cluster via stratified Coverage-Centric Selection (CCS).

TracIn, Cluster-TracIn & Cluster-Loss bring full-dataset SGD gradient tracing and cluster-amortized gradient/loss selection into a shared ClusterBaseSelector abstraction, supporting optional standalone frozen embedding models.

Multimodal Loss, Multimodal Δ-Loss & Multimodal ADAPT extend dynamic sample reweighting to VLMs: multimodal_loss scores $L(R \mid Q, I)$, multimodal_deltaloss measures visual gain $L(R \mid Q) - L(R \mid Q, I)$ via paired vision-token ablation, and multimodal_adapt weights samples by multimodal hidden-state cosine similarity against an anchor set (supporting mode: unified | reproduce | custom).

🧩 Composable Multimodal LEGO & Unified v2 Scheduling

The LEGO (train_type: dynamic_lego) and Reorder (train_type: dynamic_reorder) modules introduced in v1.1.0 preview are now finalized for multimodal and text training (#72, #73, 9fb61ef, 7d35367, 420d222, 432dcd6):

  • All 15 $C(4,k)$ Stage Combinations: Compose coarse-to-fine Selection -> Mixture -> Reorder -> Reweight in a single run and toggle any non-empty subset from the CLI via lego_enabled_stages=selector,mixer,reorder,weighter (7d35367).
  • Shared ScoreBoard & Exact Checkpointing: ScoreBoard caches per-sample forward losses (loss_full, loss_no_image) and selector rankings across stages so chained selectors, reorders, and weighters never recompute forward passes, with full rank-synchronized checkpoint save/restore (#72, 7d35367).
  • Unified Active-Interval Scope (SeededIndexStream & norm_scope="interval"):
    • SeededIndexStream guarantees single-seed, zero-overlap interval slicing across warmup and fallback stages (9fb61ef).
    • Multimodal weighters default to norm_scope="interval", scoring and normalizing strictly over the upcoming training interval (~3% slice) rather than 100% of the candidate pool — reducing Loss / Δ-Loss scoring overhead by ~97% (b33f2df).
    • DynamicReorder (pool_scope="interval") and LEGO ReorderStage apply multi-wave curriculum patterns (folding, zigzag, stair, saw, segment, sorting) directly to the active interval slice (3bc618d, f5910ca).
    • SelectStage(mode="draw") -> MixStage supports stratified within-domain quota resampling so ODM proportions take full effect over selected intervals (7d35367).

🚀 Improvements & Fixes

  • Multimodal ODM & Unbiased Per-Step Domain Rewards: Replaced mixed-batch domain_id[0] scalar attribution in ODMMixer with zero-overhead per-step domain-grouped detached loss accumulation (per_step_domain), Rao-Blackwellized step sizes, and in-memory Exp3 policy co-evolution, eliminating feedback drop and cross-interval weight oscillation (6ff3aab, 420d222).
  • Multimodal DoReMi Support: Upgraded DoremiMixer to forward multimodal vision tensors, auto-load VLM (AutoModelForImageTextToText) and PEFT LoRA Step-1 reference checkpoints (with ZeRO-3 isolation), and synchronize excess token losses across DDP ranks (f5910ca).
  • Official-Aligned ICONS Selector: Added task_boundaries, MME max-pooled pool_groups, and vote_percentile to match the reference ICONS implementation (#66).
  • LLaVA-1.5 Stage-1 Checkpoint Merger: Added src/dataflex/utils/llava_v1d5_ckpt_merge.py for preparing HuggingFace-compatible LLaVA-1.5 Stage-1 checkpoints (#69).
  • Aligned Post-Warmup Schedule & Multimodal Presets: Standardized all dynamic modules to trigger their first active update immediately at warmup_step (22, 164, 306, 448, 590 on the 732-step LLaVA-620K benchmark) and added ready-to-run examples/train_lora/lego/multimodal_lego.yaml (420d222, 432dcd6).

📦 Installation

pip install --index-url https://download.pytorch.org/whl/cu124 \
    torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0
pip install dataflex==1.2.0
# DeepSpeed configs:
pip install "dataflex[deepspeed]"
# Multimodal selectors (PreSel / Adapt-inf; includes scikit-learn, faiss-cpu, traker):
pip install "dataflex[multimodal-selection]"
# LESS / Cluster-LESS / TracIn selectors (need TRAK):
pip install "dataflex[less]"

Full changelog: v1.1.0...v1.2.0