DataFlex schedules data selection, mixture, and reweighting inside LLM training loops as a drop-in extension of LLaMA-Factory.
Overview
DataFlex is a dynamic training framework layered on LLaMA-Factory. During optimization it schedules which training examples to use and unifies implementations of data selection, data mixture, and data reweighting that are otherwise scattered across hard-to-reproduce research code.
Data selection methods include loss-based pickers, distribution-based selectors, random baselines, and static full-data training. Mixture methods adjust domain ratios while training, and reweighting methods change per-sample weights during backpropagation. Some algorithms require the model in the training loop; others do not.
Training launches similarly to LLaMA-Factory, but YAML configs must include DataFlex-specific parameters. Optional DeepSpeed support covers ZeRO-3 gradient workflows, and an extra install provides TRAK for the LESS selector. The project positions itself as a unified benchmark and evaluation platform for data-centric large language model training.
Reported experiments compare selectors and mixers against random or default baselines on benchmarks such as MMLU. Output training JSON from tools like DataFlow or HuggingFace datasets can feed the same pipelines.
Key features
- In-loop data selection
- Dynamic domain mixture ratios
- Sample reweighting during training
- LLaMA-Factory compatible launch
- DeepSpeed ZeRO-3 gradient support
- Unified algorithm implementations
- Registry for custom selectors
Use cases
- Reproducible data-centric LLM training
- Hard-example focused fine-tuning
- Domain mixture optimization
- Research comparisons on standard benchmarks