|
| 1 | +name: checkpoint_converter |
| 2 | +# latest version: Megatron-LM core_r0.11.0 https://github.com/NVIDIA/Megatron-LM/tree/core_r0.11.0 |
| 3 | + |
| 4 | +on: |
| 5 | + # Trigger the workflow on push or pull request, |
| 6 | + # but only for the main branch |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + - v0.* |
| 11 | + pull_request: |
| 12 | + branches: |
| 13 | + - main |
| 14 | + - v0.* |
| 15 | + paths: |
| 16 | + - "**/*.py" |
| 17 | + # Other entrypoints |
| 18 | + - "!examples/**" |
| 19 | + - "!tests/**" |
| 20 | + - "!verl/trainer/main_*.py" |
| 21 | + - "!verl/trainer/fsdp_sft_trainer.py" |
| 22 | + # Recipes |
| 23 | + - "!recipe/**" |
| 24 | + # FSDP |
| 25 | + - "!verl/workers/**/*dp_*.py" |
| 26 | + # Entrypoints |
| 27 | + - ".github/workflows/checkpoint_converter.yml" |
| 28 | + - ".github/workflows/e2e_ppo_trainer_megatron.yml" |
| 29 | + - "examples/data_preprocess/gsm8k.py" |
| 30 | + - "tests/e2e/run_ppo_trainer_megatron.sh" |
| 31 | + - "verl/trainer/main_ppo.py" |
| 32 | + - "verl/trainer/config/ppo_megatron_trainer.yaml" |
| 33 | + |
| 34 | + |
| 35 | +# Cancel jobs on the same ref if a new one is triggered |
| 36 | +concurrency: |
| 37 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 38 | + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} |
| 39 | + |
| 40 | +# Declare permissions just read content. |
| 41 | +permissions: |
| 42 | + contents: read |
| 43 | + |
| 44 | +jobs: |
| 45 | + checkpoint_converter: |
| 46 | + runs-on: [L20x8] |
| 47 | + timeout-minutes: 20 # Increase this timeout value as needed |
| 48 | + env: |
| 49 | + HTTP_PROXY: ${{ secrets.PROXY_HTTP }} |
| 50 | + HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }} |
| 51 | + NO_PROXY: "localhost,127.0.0.1" |
| 52 | + HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable |
| 53 | + container: |
| 54 | + image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6-mcore0.12.0-te2.3 |
| 55 | + options: --gpus all --shm-size=10g |
| 56 | + steps: |
| 57 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 58 | + with: |
| 59 | + fetch-depth: 0 |
| 60 | + - name: Install the current repository |
| 61 | + run: | |
| 62 | + pip3 install -e .[test] |
| 63 | + - name: Running Huggingface to Megatron dist_ckpt converter (Qwen/Qwen2.5-0.5B) |
| 64 | + run: | |
| 65 | + ray stop --force |
| 66 | + python scripts/converter_hf_to_mcore.py --hf_model_path=${HOME}/models/Qwen/Qwen2.5-0.5B --output_path checkpoints/Qwen/Qwen2.5-0.5B |
| 67 | + - name: Running Huggingface to Megatron dist_ckpt converter (deepseek-ai/deepseek-coder-1.3b-instruct) |
| 68 | + run: | |
| 69 | + ray stop --force |
| 70 | + python scripts/converter_hf_to_mcore.py --hf_model_path=${HOME}/models/deepseek-ai/deepseek-coder-1.3b-instruct --output_path checkpoints/deepseek-ai/deepseek-coder-1.3b-instruct |
| 71 | + - name: Clean up |
| 72 | + run: | |
| 73 | + rm -rf checkpoints |
| 74 | + checkpoint_converter_large_moe_models: |
| 75 | + runs-on: [L20x8] |
| 76 | + timeout-minutes: 30 # Increase this timeout value as needed |
| 77 | + env: |
| 78 | + HTTP_PROXY: ${{ secrets.PROXY_HTTP }} |
| 79 | + HTTPS_PROXY: ${{ secrets.PROXY_HTTPS }} |
| 80 | + NO_PROXY: "localhost,127.0.0.1" |
| 81 | + HF_HUB_ENABLE_HF_TRANSFER: "0" # This is more stable |
| 82 | + HF_ENDPOINT: "https://hf-mirror.com" |
| 83 | + container: |
| 84 | + image: whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6-mcore0.12.0-te2.3 |
| 85 | + options: --gpus all --shm-size=10g |
| 86 | + steps: |
| 87 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 88 | + with: |
| 89 | + fetch-depth: 0 |
| 90 | + - name: Install the current repository |
| 91 | + run: | |
| 92 | + pip3 install -e .[test] |
| 93 | + - name: Download Model to Use |
| 94 | + run: | |
| 95 | + huggingface-cli download Qwen/Qwen1.5-MoE-A2.7B-Chat --local-dir ${HOME}/models/Qwen/Qwen1.5-MoE-A2.7B-Chat |
| 96 | + export HF_HUB_OFFLINE=1 |
| 97 | + - name: Running Huggingface to Megatron dist_ckpt CPU converter (Qwen/Qwen1.5-MoE-A2.7B-Chat) |
| 98 | + run: | |
| 99 | + ray stop --force |
| 100 | + python scripts/converter_hf_to_mcore.py --hf_model_path=${HOME}/models/Qwen/Qwen1.5-MoE-A2.7B-Chat --output_path checkpoints/Qwen/Qwen1.5-MoE-A2.7B-Chat --use_cpu_initialization |
| 101 | + - name: clean up |
| 102 | + run: | |
| 103 | + rm -rf checkpoints |
0 commit comments