mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2026-04-11 06:33:30 +00:00
79 lines
2.5 KiB
YAML
79 lines
2.5 KiB
YAML
name: Run ChatGPT examples
|
|
|
|
on:
|
|
pull_request:
|
|
types: [synchronize, opened, reopened]
|
|
paths:
|
|
- "applications/ColossalChat/coati/**"
|
|
- "applications/ColossalChat/requirements.txt"
|
|
- "applications/ColossalChat/setup.py"
|
|
- "applications/ColossalChat/examples/**"
|
|
- "applications/ColossalChat/tests/**"
|
|
|
|
jobs:
|
|
tests:
|
|
name: Run ChatGPT examples
|
|
if: |
|
|
github.event.pull_request.draft == false &&
|
|
github.base_ref == 'main' &&
|
|
github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
|
|
runs-on: [self-hosted, ubuntu-latest]
|
|
container:
|
|
image: image-cloud.luchentech.com/hpcaitech/pytorch-cuda:2.5.1-12.4.1
|
|
options: --gpus all --rm -v /data/scratch/examples-data:/data/scratch/examples-data --shm-size=10.24gb
|
|
timeout-minutes: 180
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Checkout ColossalAI
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install torch
|
|
run: |
|
|
pip uninstall flash-attn
|
|
pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124
|
|
|
|
- name: Install flash-attn
|
|
run: |
|
|
pip install https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.5cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
|
|
|
|
- name: Install Colossal-AI
|
|
run: |
|
|
BUILD_EXT=1 pip install --no-cache-dir -v -e .
|
|
|
|
- name: Install ChatGPT
|
|
env:
|
|
CFLAGS: "-O1"
|
|
CXXFLAGS: "-O1"
|
|
MAX_JOBS: 4
|
|
run: |
|
|
cd applications/ColossalChat
|
|
pip install --no-cache-dir -v -e .
|
|
pip install --no-cache-dir -r examples/requirements.txt
|
|
|
|
# - name: Install Transformers
|
|
# run: |
|
|
# pip install --no-cache-dir transformers==4.36.2
|
|
|
|
- name: Execute Examples
|
|
run: |
|
|
cd applications/ColossalChat
|
|
rm -rf ~/.cache/colossalai
|
|
mkdir models
|
|
mkdir sft_data
|
|
mkdir prompt_data
|
|
mkdir preference_data
|
|
mkdir kto_data
|
|
./tests/test_data_preparation.sh
|
|
./tests/test_train.sh
|
|
env:
|
|
NCCL_SHM_DISABLE: 1
|
|
MAX_JOBS: 8
|
|
PRETRAINED_MODEL_PATH: ./models
|
|
SFT_DATASET: ./sft_data
|
|
PROMPT_DATASET: ./prompt_data
|
|
PROMPT_RLVR_DATASET: ./prompt_data
|
|
PREFERENCE_DATASET: ./preference_data
|
|
KTO_DATASET: ./kto_data
|