-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[megatron] feat: qwen2.5vl #1286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 28 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
592d619
offline weight converter
ISEEKYAN ff9d367
forward with geo3k.
ISEEKYAN 87f508e
scrips
ISEEKYAN 959ce5a
qwen25vl mcore weight converter
ISEEKYAN c7f177a
fix qwen2.5vl model converter
ISEEKYAN 5b6eaad
sequence packing
ISEEKYAN ca05a00
tmp
ISEEKYAN d53de0e
clean
ISEEKYAN 068d82f
flash
ISEEKYAN 1d3a39b
qwen pp
ISEEKYAN b89c6b7
fix PP
ISEEKYAN 406d80e
support 7b and more qwen25vl models
ISEEKYAN dd16c7f
enable sp
ISEEKYAN dc0205c
align some configs
ISEEKYAN bf541b3
Merge commit '867d3024bf7af6aee2cd785cfd573aec561f212d' into mcore_qw…
ISEEKYAN 75dd567
Merge commit '04acd09d65900521e8019adefd10308220cb7ee2' into mcore_qw…
ISEEKYAN d1f5320
Merge commit '02862103babdd0df4fe70d9b236926fcc02bac27' into mcore_qw…
ISEEKYAN 95ebb55
Merge commit '7d26d7359e17937d2590093f51b3e9de2e5e131d' into mcore_qw…
ISEEKYAN cffa9c1
fix
ISEEKYAN a2a6dba
Merge branch 'main' into mcore_qwen25vl_tmp_update0527_v6
ISEEKYAN 8d6ac6c
clean the implementation of qwen25vl
ISEEKYAN ecc7c9f
clean
ISEEKYAN 4ffe705
add copyright
ISEEKYAN d3b829d
clean
ISEEKYAN 91f9692
Merge branch 'main' into mcore_qwen25vl_clean
ISEEKYAN b50e6be
add example
ISEEKYAN ae83ce5
add ci
ISEEKYAN 96ad63a
fix ci
ISEEKYAN eeba24d
small fix
ISEEKYAN 94871b1
change the way converter_hf_to_mcore loading model
ISEEKYAN e4527a0
Merge branch 'main' into mcore_qwen25vl
ISEEKYAN aadd5dc
Merge branch 'main' into mcore_qwen25vl
ISEEKYAN b23a6fa
Merge branch 'main' into mcore_qwen25vl
ISEEKYAN 21dcbd8
fix vpp for ci
ISEEKYAN c9820a8
Merge branch 'main' into mcore_qwen25vl
ISEEKYAN c0b61e1
fix ci
ISEEKYAN c89c54f
fix pipeline parallel
ISEEKYAN File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| set -x | ||
| ENGINE=${1:-vllm} | ||
| export CUDA_DEVICE_MAX_CONNECTIONS=1 # For megatron communication/computation overlapping | ||
|
|
||
| HF_MODEL_PATH=Qwen/Qwen2.5-VL-7B-Instruct | ||
| DIST_CKPT_PATH=${DIST_CKPT_PATH} | ||
|
|
||
| # convert HF model to verl format | ||
| # python scripts/converter_hf_to_verl.py --hf_model_path $HF_MODEL_PATH --output_dir $DIST_CKPT_PATH | ||
|
|
||
| train_path=/data/geo3k/train.parquet | ||
| test_path=/data/geo3k/test.parquet | ||
|
|
||
| python3 -m verl.trainer.main_ppo --config-path=config \ | ||
| --config-name='ppo_megatron_trainer.yaml'\ | ||
| algorithm.adv_estimator=grpo \ | ||
| data.train_files="$train_path" \ | ||
| data.val_files="$test_path" \ | ||
| data.train_batch_size=512 \ | ||
| data.max_prompt_length=1024 \ | ||
| data.max_response_length=2048 \ | ||
| data.filter_overlong_prompts=True \ | ||
| data.truncation='error' \ | ||
| actor_rollout_ref.model.path=$HF_MODEL_PATH \ | ||
| actor_rollout_ref.actor.optim.lr=1e-6 \ | ||
| actor_rollout_ref.actor.ppo_mini_batch_size=128 \ | ||
| actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=4 \ | ||
| actor_rollout_ref.actor.megatron.pipeline_model_parallel_size=1 \ | ||
| actor_rollout_ref.actor.megatron.tensor_model_parallel_size=2 \ | ||
| actor_rollout_ref.actor.use_kl_loss=True \ | ||
| actor_rollout_ref.actor.kl_loss_coef=0.01 \ | ||
| actor_rollout_ref.actor.kl_loss_type=low_var_kl \ | ||
| actor_rollout_ref.actor.entropy_coeff=0 \ | ||
| actor_rollout_ref.model.enable_gradient_checkpointing=True \ | ||
| actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=20 \ | ||
| actor_rollout_ref.rollout.tensor_model_parallel_size=2 \ | ||
| actor_rollout_ref.rollout.name=$ENGINE \ | ||
| actor_rollout_ref.rollout.gpu_memory_utilization=0.6 \ | ||
| actor_rollout_ref.rollout.n=5 \ | ||
| actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=20 \ | ||
| actor_rollout_ref.ref.megatron.pipeline_model_parallel_size=1 \ | ||
| actor_rollout_ref.ref.megatron.tensor_model_parallel_size=2 \ | ||
| actor_rollout_ref.actor.megatron.use_dist_checkpointing=True \ | ||
| actor_rollout_ref.ref.megatron.use_dist_checkpointing=True \ | ||
| actor_rollout_ref.actor.megatron.dist_checkpointing_path=$DIST_CKPT_PATH \ | ||
| actor_rollout_ref.ref.megatron.dist_checkpointing_path=$DIST_CKPT_PATH \ | ||
| algorithm.use_kl_in_reward=False \ | ||
| trainer.critic_warmup=0 \ | ||
| trainer.logger=['console','wandb'] \ | ||
| trainer.project_name='verl_grpo_example_geo3k' \ | ||
| trainer.experiment_name='qwen2_5_vl_7b_megatron' \ | ||
| trainer.n_gpus_per_node=8 \ | ||
| trainer.nnodes=1 \ | ||
| trainer.save_freq=20 \ | ||
| trainer.test_freq=5 \ | ||
| trainer.total_epochs=15 $@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.