streamline code; add intermediate saving support for ep

This commit is contained in:
ZihanWang314
2025-05-22 07:21:52 +00:00
parent 98fd21ce21
commit f38f67706c
123 changed files with 710 additions and 5601 deletions

View File

@@ -1,15 +1,17 @@
export PYTHONPATH=$PYTHONPATH:$(pwd)
python scripts/expert/get_expert_scores.py \
--eval_dataset=translation \
--eval_dataset=intent \
--base_model_path=deepseek-ai/ESFT-vanilla-lite \
--output_dir=results/expert_scores/translation \
--output_dir=results/expert_scores/intent \
--n_sample_tokens=131072 \
--world_size=4 \
--gpus_per_rank=2
python scripts/expert/generate_expert_config.py \
--eval_datasets=intent,summary,law,translation \
--expert_scores_dir=results/expert_scores \
--output_dir=results/expert_configs \
--eval_dataset=intent \
--expert_scores_dir=results/expert_scores/intent \
--output_path=results/expert_configs/intent.json \
--score_function=token \
--top_p=0.2 # the scoring function and top_p are hyperparameters
# --train_shared_experts