forked from intel-analytics/ipex-llm
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (103 loc) · 4.36 KB
/
llm_unit_tests_linux.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
name: LLM Unit Tests on Linux
# Cancel previous runs in the PR when you push new commits
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
paths:
- 'python/llm/**'
- '.github/workflows/llm_unit_tests_linux.yml'
- '.github/workflows/llm-binary-build.yml'
- '.github/actions/llm/setup-llm-env/action.yml'
- '.github/actions/llm/remove-llm-env/action.yml'
- '.github/actions/llm/cli-test/action.yml'
- '.github/actions/llm/inference-test/action.yml'
- '.github/actions/llm/langchain-test/action.yml'
- '.github/actions/llm/download-llm-binary/action.yml'
pull_request:
branches: [ main ]
paths:
- 'python/llm/**'
- '.github/workflows/llm_unit_tests_linux.yml'
- '.github/workflows/llm-binary-build.yml'
- '.github/actions/llm/setup-llm-env/action.yml'
- '.github/actions/llm/remove-llm-env/action.yml'
- '.github/actions/llm/cli-test/action.yml'
- '.github/actions/llm/inference-test/action.yml'
- '.github/actions/llm/langchain-test/action.yml'
- '.github/actions/llm/download-llm-binary/action.yml'
workflow_dispatch:
env:
INT4_CKPT_DIR: ./llm/ggml-actions/stable
LLAMA_INT4_CKPT_PATH: ./llm/ggml-actions/stable/bigdl_llm_llama_7b_q4_0.bin
GPTNEOX_INT4_CKPT_PATH: ./llm/ggml-actions/stable/bigdl_llm_redpajama_7b_q4_0.bin
BLOOM_INT4_CKPT_PATH: ./llm/ggml-actions/stable/bigdl_llm_bloom_7b_q4_0.bin
STARCODER_INT4_CKPT_PATH: ./llm/ggml-actions/stable/bigdl_llm_santacoder_1b_q4_0.bin
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
llm-cpp-build:
uses: ./.github/workflows/llm-binary-build.yml
llm-unit-test-linux-avx512:
runs-on: [ self-hosted, llm, AVX512, ubuntu-20.04-lts ]
needs: llm-cpp-build
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
env:
THREAD_NUM: 24
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools==58.0.4
python -m pip install --upgrade wheel
- name: Download llm binary
uses: ./.github/actions/llm/download-llm-binary
- name: Run LLM install (all) test
uses: ./.github/actions/llm/setup-llm-env
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Download ckpt models
run: |
if [ ! -d $LLAMA_INT4_CKPT_PATH ]; then
echo "Directory $LLAMA_INT4_CKPT_PATH not found. Downloading from FTP server..."
wget --no-verbose $LLM_FTP_URL/${LLAMA_INT4_CKPT_PATH:1} -P $INT4_CKPT_DIR
fi
if [ ! -d $GPTNEOX_INT4_CKPT_PATH ]; then
echo "Directory $GPTNEOX_INT4_CKPT_PATH not found. Downloading from FTP server..."
wget --no-verbose $LLM_FTP_URL/${GPTNEOX_INT4_CKPT_PATH:1} -P $INT4_CKPT_DIR
fi
if [ ! -d $BLOOM_INT4_CKPT_PATH ]; then
echo "Directory $BLOOM_INT4_CKPT_PATH not found. Downloading from FTP server..."
wget --no-verbose $LLM_FTP_URL/${BLOOM_INT4_CKPT_PATH:1} -P $INT4_CKPT_DIR
fi
if [ ! -d $STARCODER_INT4_CKPT_PATH ]; then
echo "Directory $STARCODER_INT4_CKPT_PATH not found. Downloading from FTP server..."
wget --no-verbose $LLM_FTP_URL/${STARCODER_INT4_CKPT_PATH:1} -P $INT4_CKPT_DIR
fi
- name: Run LLM cli test
uses: ./.github/actions/llm/cli-test
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run LLM inference test
uses: ./.github/actions/llm/inference-test
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run LLM langchain test
uses: ./.github/actions/llm/langchain-test
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Clean up test environment
uses: ./.github/actions/llm/remove-llm-env
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}