Skip to content

ZJU-CTAG/MCCom

Repository files navigation

DataProcess

retrieve the first time

bash preprocess.sh

Local Stage Generation

Before running, it is necessary to ensure that the corresponding FIMs format for the model type has been added to the dual_decoring.py, first_SD.py and single_decoding.py files. Here, we use the Qwen2.5-Coder-0.5B as example since we couldn't release our small model.

python main.py \
    --model_name_or_path Qwen/Qwen2.5-Coder-0.5B \
    --input_dir preprocessed/ \
    --output_dir outputs/SLM_static_routing \
    --generation_type 1st \
    --retrieval_type simple \
    --model_type qwen \
    --static_routing

Iterative retrieve

retrieve based on the small model's outputs

bash preprocess_twice.sh outputs/SLM_static_routing/ preprocessed_retrieval_twice/SLM

Cloud Stage Generation

python main.py \
    --model_name_or_path Qwen/Qwen2.5-Coder-7B \
    --input_dir preprocessed_retrieval_twice/SLM/ \
    --output_dir outputs/MCCom_qwen \
    --generation_type 2nd \
    --retrieval_type resort \
    --model_type qwen

Evaluation

python main.py \
    -S outputs/SLM_static_routing \
    -M outputs/MCCom_qwen \
    -L outputs/qwen

Baselines

SLM and LLM

python main.py \
    --model_name_or_path Qwen/Qwen2.5-Coder-0.5B \
    --input_dir preprocessed \
    --output_dir outputs/SLM \
    --generation_type simple \
    --retrieval_type simple \
    --model_type qwen
    --relevant_code_num 1

python main.py \
    --model_name_or_path Qwen/Qwen2.5-Coder-7B \
    --input_dir preprocessed \
    --output_dir outputs/qwen \
    --generation_type simple \
    --retrieval_type simple \
    --model_type qwen

SLM twice and LLM twice

python main.py \
    --model_name_or_path Qwen/Qwen2.5-Coder-0.5B \
    --input_dir preprocessed \
    --output_dir outputs/SLM_twice \
    --generation_type twice \
    --retrieval_type simple \
    --model_type qwen \
    --relevant_code_num 1

python main.py \
    --model_name_or_path Qwen/Qwen2.5-Coder-7B \
    --input_dir preprocessed \
    --output_dir outputs/qwen_twice \
    --generation_type twice \
    --retrieval_type simple \
    --model_type qwen

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors