-
Notifications
You must be signed in to change notification settings - Fork 30
116 lines (100 loc) · 3.3 KB
/
workflow_finetune.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Finetune
on:
workflow_call:
inputs:
ci_type:
type: string
default: 'pr'
runner_container_image:
type: string
default: '10.1.2.13:5000/llmray-build'
http_proxy:
type: string
default: 'http://proxy-prc.intel.com:912'
https_proxy:
type: string
default: 'http://proxy-prc.intel.com:912'
runner_config_path:
type: string
default: '/home/ci/llm-ray-actions-runner'
code_checkout_path:
type: string
default: '/home/ci/actions-runner/_work/llm-on-ray/llm-on-ray'
model_cache_path:
type: string
default: '/mnt/DP_disk1/huggingface/cache'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-ft
cancel-in-progress: true
permissions: # added using https://github.com/step-security/secure-repo
contents: read
jobs:
finetune:
name: finetune
strategy:
matrix:
model: [ EleutherAI/gpt-j-6b, NousResearch/Llama-2-7b-chat-hf, gpt2, bigscience/bloom-560m, facebook/opt-125m, mosaicml/mpt-7b, NousResearch/Llama-2-7b-hf, mistralai/Mistral-7B-v0.1]
isPR:
- ${{inputs.ci_type == 'pr'}}
exclude:
- { isPR: true }
include:
- { model: "EleutherAI/gpt-j-6b"}
- { model: "NousResearch/Llama-2-7b-chat-hf"}
- { model: "mistralai/Mistral-7B-v0.1"}
runs-on: self-hosted
defaults:
run:
shell: bash
container:
image: ${{ inputs.runner_container_image }}
env:
http_proxy: ${{ inputs.http_proxy }}
https_proxy: ${{ inputs.https_proxy }}
SHELL: bash -eo pipefail
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${{ inputs.runner_config_path }}:/root/actions-runner-config
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Build Docker Image
run: |
DF_SUFFIX=".cpu_and_deepspeed"
TARGET="finetune"
USE_PROXY="1"
source dev/scripts/ci-functions.sh
build_and_prune ${TARGET} ${DF_SUFFIX} ${USE_PROXY}
- name: Start Docker Container
run: |
TARGET="finetune"
code_checkout_path=${{ inputs.code_checkout_path }}
model_cache_path=${{ inputs.model_cache_path }}
USE_PROXY="1"
source dev/scripts/ci-functions.sh
start_docker ${TARGET} ${code_checkout_path} ${model_cache_path} ${USE_PROXY}
- name: Run Finetune Test
run: |
TARGET="finetune"
source dev/scripts/ci-functions.sh
finetune_test ${{ matrix.model }}
- name: Run Finetune DPO Test
run: |
TARGET="finetune"
source dev/scripts/ci-functions.sh
finetune_dpo_test ${{ matrix.model }}
- name: Run PEFT-LoRA Test
run: |
source dev/scripts/ci-functions.sh
peft_lora_test ${{ matrix.model }}
- name: Stop Ray
run: |
TARGET="finetune"
source dev/scripts/ci-functions.sh
stop_ray ${TARGET}
- name: Stop Container
if: success() || failure()
run: |
TARGET="finetune"
source dev/scripts/ci-functions.sh
stop_container ${TARGET}