This is the implementation of this paper Data Efficacy for Language Model Training [https://arxiv.org/pdf/2506.21545] , which uses a preselection algorithm. The formulas depend on gradients and Hessian matrices, making the algorithm infeasible for models with more than ~200M–300M parameters.
Python
1
2 commits
updated Sep 1, 2025
The paper describing this algorithm is Data Efficacy for Language Model Training: PDF
Forked from the Data Selection via Optimal Control project
GitHub: https://github.com/microsoft/LMOps/tree/main/data_selection
The following pipeline can also be found in scripts/pipeline.sh.
conda create -n data_selection python=3.10
conda activate data_selection
bash install.sh
export BASE_PATH=/PATH/TO/THIS/PROJECT
# or export BASE_PATH=$PWD
First download Redpajama CC. Then run tokenization.
bash $BASE_PATH/scripts/tools/process_cc.sh $BASE_PATH
bash $BASE_PATH/scripts/tools/convert_tokenization.sh $BASE_PATH
bash $BASE_PATH/scripts/tools/sample_proxy_data.sh $BASE_PATH
bash $BASE_PATH/scripts/pretrain/160M_bsl.sh $BASE_PATH
First download lima. Then run tokenization.
bash $BASE_PATH/scripts/tools/process_data/lima.sh $BASE_PATH
bash $BASE_PATH/scripts/pmp_solver/proxy_algo_160M.sh $BASE_PATH
This is the implementation of this paper Data Efficacy for Language Model Training [https://arxiv.org/pdf/2506.21545] , which uses a preselection algorithm. The formulas depend on gradients and Hessian matrices, making the algorithm infeasible for models with more than ~200M–300M parameters.
Python
1
2 commits
updated Sep 1, 2025
The paper describing this algorithm is Data Efficacy for Language Model Training: PDF
Forked from the Data Selection via Optimal Control project
GitHub: https://github.com/microsoft/LMOps/tree/main/data_selection
The following pipeline can also be found in scripts/pipeline.sh.
conda create -n data_selection python=3.10
conda activate data_selection
bash install.sh
export BASE_PATH=/PATH/TO/THIS/PROJECT
# or export BASE_PATH=$PWD
First download Redpajama CC. Then run tokenization.
bash $BASE_PATH/scripts/tools/process_cc.sh $BASE_PATH
bash $BASE_PATH/scripts/tools/convert_tokenization.sh $BASE_PATH
bash $BASE_PATH/scripts/tools/sample_proxy_data.sh $BASE_PATH
bash $BASE_PATH/scripts/pretrain/160M_bsl.sh $BASE_PATH
First download lima. Then run tokenization.
bash $BASE_PATH/scripts/tools/process_data/lima.sh $BASE_PATH
bash $BASE_PATH/scripts/pmp_solver/proxy_algo_160M.sh $BASE_PATH