This repository contains the implementation for the paper "Multi-task Code LLMs: Data Mix or Model Merge?" accepted by the third international workshop on large language models for code.
This research explores two fundamental approaches for creating multi-task code large language models:
We provide comprehensive implementations, 28 pre-trained model checkpoints, and evaluation frameworks to reproduce our results.
All 28 chekpoints from the experiments reported in Table 3 of the paper can be accessed from Google Drive using the links in the file checkpoints.csv
Each models is zipped with the following naming convention:
MODEL_NAME_SIZE_TRAINING_TASK.zip
For example
Deepseek_Coder_1_3B_SFT_Code_Gen.zip
contains the DeepseekCoder 1.3B model which was fine-tuned for the Code Generation task.
├── llama_factory/ # SFT training framework (based on LLaMA-Factory)
│ ├── my_yaml/ # Training configuration files
│ │ ├── 2b/ # 2B parameter model configs
│ │ ├── 8b/ # 8B parameter model configs
│ │ └── 20b/ # 20B parameter model configs
│ └── job_sh/ # Training job scripts
├── mergekit/ # Model merging toolkit and scripts
│ ├── job_sh/ # Merging job scripts
│ └── my_yaml/ # Merging configuration files
├── eval_hm/ # Evaluation framework
│ ├── job_sh/ # Evaluation job scripts
│ ├── eval_codesum.py # Code summarization evaluation
│ └── json_to_markdowns.py # Result processing
└── README.md # This file
git clone <repository-url>
cd Model_Merging_Data_Mixture
cd llama_factory
pip install -e .
# OR install requirements
pip install -r requirements.txt
cd mergekit
pip install -e .
export HF_HOME="/path/to/your/huggingface/cache"
export HF_TOKEN="your_huggingface_token_here"
export TOKENIZERS_PARALLELISM="false"
# Optional: for wandb logging
wandb login your_wandb_token_here
Training configurations are organized in llama_factory/my_yaml/ by model size:
2b/ct/, 2b/kod/, 2b/gs_dm/8b/kod/, 8b/gs_dm/20b/cd llama_factory
llamafactory-cli train my_yaml/2b/ct/dscoder_full_sftct.yaml
llamafactory-cli train my_yaml/2b/kod/dscoder_full_sft4o.yaml
llamafactory-cli train my_yaml/2b/gs_dm/dscoder_full_sftdm.yaml
For batch job submission:
cd llama_factory/job_sh
# Edit paths in the script before running
bash run_sft_kod_qwc2515.sh
Important: Update all file paths in job scripts to match your environment before running.
We implement several state-of-the-art merging techniques:
Merging configurations are in mergekit/my_yaml/ organized by method and model combinations.
cd mergekit
mergekit-yaml my_yaml/merge_ties_config.yaml ./output/merged_model
mergekit-yaml my_yaml/merge_dare_config.yaml ./output/merged_model
cd mergekit/job_sh
# Example: TIES merging for Qwen2.5-Coder-7B models
bash merge_ties_qwc7.sh
cd eval_hm
python eval_codesum.py \
--model /path/to/your/model \
--data /path/to/test/data.jsonl \
--output results.json
cd eval_hm/job_sh/g_eval
bash evalplus_sft_model_name.sh
cd eval_hm
bash sub_s_e.sh # Submit code summarization evaluation jobs
bash sub_g_e.sh # Submit code generation evaluation jobs
Convert summarization evaluation results to markdown format:
python json_to_markdowns.py \
--input results/ \
--output reports/ \
--prefix experiment_
Our 28 pre-trained models include:
Single-task SFT Checkpoints (8 models):
Multi-task Data Mixing Checkpoints (4 models):
Model Merging Checkpoints (16 models):
Download all 28 pre-trained models from Google Drive:
Download the checkpoints from Google Drive using the links in the file checkpoints.csv
Important: Please modify the model paths in configuration files and scripts according to your download location. Update all references to model paths in:
llama_factory/job_sh/, mergekit/job_sh/, eval_hm/job_sh/)llama_factory/data/my_yaml/ subdirectoryjob_sh/mergekit/my_yaml/mergekit/job_sh/eval_hm/eval_hm/job_sh/json_to_markdowns.py# Code Summarization models
bash llama_factory/job_sh/ct/run_sft_ct_*.sh
# Code Generation models
bash llama_factory/job_sh/kod/run_sft_kod_*.sh
bash llama_factory/job_sh/gs_dm/run_sft_dm_*.sh
bash mergekit/job_sh/merge_ties_*.sh
bash mergekit/job_sh/merge_dare_*.sh
bash mergekit/job_sh/merge_della_*.sh
bash eval_hm/sub_s_e.sh # Code summarization
bash eval_hm/sub_g_e.sh # Code generation
Our experiments show that:
If you use this code or our models, please cite our paper:
@article{zhu2026multi,
title={Multi-task Code LLMs: Data Mix or Model Merge?},
author={Zhu, Mingzhi and Sobolev, Boris and Krishna, Rahul and Pavuluri, Raju and Patterson, Stacy and Merler, Michele},
journal={arXiv preprint arXiv:2601.21115},
year={2026}
}
This repository is released for research purposes. For questions or issues, please open a GitHub issue.
This project is licensed under the Apache License 2.0. See LICENSE for details.
This repository contains the implementation for the paper "Multi-task Code LLMs: Data Mix or Model Merge?" accepted by the third international workshop on large language models for code.
This research explores two fundamental approaches for creating multi-task code large language models:
We provide comprehensive implementations, 28 pre-trained model checkpoints, and evaluation frameworks to reproduce our results.
All 28 chekpoints from the experiments reported in Table 3 of the paper can be accessed from Google Drive using the links in the file checkpoints.csv
Each models is zipped with the following naming convention:
MODEL_NAME_SIZE_TRAINING_TASK.zip
For example
Deepseek_Coder_1_3B_SFT_Code_Gen.zip
contains the DeepseekCoder 1.3B model which was fine-tuned for the Code Generation task.
├── llama_factory/ # SFT training framework (based on LLaMA-Factory)
│ ├── my_yaml/ # Training configuration files
│ │ ├── 2b/ # 2B parameter model configs
│ │ ├── 8b/ # 8B parameter model configs
│ │ └── 20b/ # 20B parameter model configs
│ └── job_sh/ # Training job scripts
├── mergekit/ # Model merging toolkit and scripts
│ ├── job_sh/ # Merging job scripts
│ └── my_yaml/ # Merging configuration files
├── eval_hm/ # Evaluation framework
│ ├── job_sh/ # Evaluation job scripts
│ ├── eval_codesum.py # Code summarization evaluation
│ └── json_to_markdowns.py # Result processing
└── README.md # This file
git clone <repository-url>
cd Model_Merging_Data_Mixture
cd llama_factory
pip install -e .
# OR install requirements
pip install -r requirements.txt
cd mergekit
pip install -e .
export HF_HOME="/path/to/your/huggingface/cache"
export HF_TOKEN="your_huggingface_token_here"
export TOKENIZERS_PARALLELISM="false"
# Optional: for wandb logging
wandb login your_wandb_token_here
Training configurations are organized in llama_factory/my_yaml/ by model size:
2b/ct/, 2b/kod/, 2b/gs_dm/8b/kod/, 8b/gs_dm/20b/cd llama_factory
llamafactory-cli train my_yaml/2b/ct/dscoder_full_sftct.yaml
llamafactory-cli train my_yaml/2b/kod/dscoder_full_sft4o.yaml
llamafactory-cli train my_yaml/2b/gs_dm/dscoder_full_sftdm.yaml
For batch job submission:
cd llama_factory/job_sh
# Edit paths in the script before running
bash run_sft_kod_qwc2515.sh
Important: Update all file paths in job scripts to match your environment before running.
We implement several state-of-the-art merging techniques:
Merging configurations are in mergekit/my_yaml/ organized by method and model combinations.
cd mergekit
mergekit-yaml my_yaml/merge_ties_config.yaml ./output/merged_model
mergekit-yaml my_yaml/merge_dare_config.yaml ./output/merged_model
cd mergekit/job_sh
# Example: TIES merging for Qwen2.5-Coder-7B models
bash merge_ties_qwc7.sh
cd eval_hm
python eval_codesum.py \
--model /path/to/your/model \
--data /path/to/test/data.jsonl \
--output results.json
cd eval_hm/job_sh/g_eval
bash evalplus_sft_model_name.sh
cd eval_hm
bash sub_s_e.sh # Submit code summarization evaluation jobs
bash sub_g_e.sh # Submit code generation evaluation jobs
Convert summarization evaluation results to markdown format:
python json_to_markdowns.py \
--input results/ \
--output reports/ \
--prefix experiment_
Our 28 pre-trained models include:
Single-task SFT Checkpoints (8 models):
Multi-task Data Mixing Checkpoints (4 models):
Model Merging Checkpoints (16 models):
Download all 28 pre-trained models from Google Drive:
Download the checkpoints from Google Drive using the links in the file checkpoints.csv
Important: Please modify the model paths in configuration files and scripts according to your download location. Update all references to model paths in:
llama_factory/job_sh/, mergekit/job_sh/, eval_hm/job_sh/)llama_factory/data/my_yaml/ subdirectoryjob_sh/mergekit/my_yaml/mergekit/job_sh/eval_hm/eval_hm/job_sh/json_to_markdowns.py# Code Summarization models
bash llama_factory/job_sh/ct/run_sft_ct_*.sh
# Code Generation models
bash llama_factory/job_sh/kod/run_sft_kod_*.sh
bash llama_factory/job_sh/gs_dm/run_sft_dm_*.sh
bash mergekit/job_sh/merge_ties_*.sh
bash mergekit/job_sh/merge_dare_*.sh
bash mergekit/job_sh/merge_della_*.sh
bash eval_hm/sub_s_e.sh # Code summarization
bash eval_hm/sub_g_e.sh # Code generation
Our experiments show that:
If you use this code or our models, please cite our paper:
@article{zhu2026multi,
title={Multi-task Code LLMs: Data Mix or Model Merge?},
author={Zhu, Mingzhi and Sobolev, Boris and Krishna, Rahul and Pavuluri, Raju and Patterson, Stacy and Merler, Michele},
journal={arXiv preprint arXiv:2601.21115},
year={2026}
}
This repository is released for research purposes. For questions or issues, please open a GitHub issue.
This project is licensed under the Apache License 2.0. See LICENSE for details.