diff --git a/.github/actions/llm/download-llm-binary/action.yml b/.github/actions/llm/download-llm-binary/action.yml index 0df6ec8f..15257ea0 100644 --- a/.github/actions/llm/download-llm-binary/action.yml +++ b/.github/actions/llm/download-llm-binary/action.yml @@ -10,7 +10,7 @@ runs: shell: bash run: | rm -rf python/llm/llm-binary || true - mkdir python/llm/llm-binary + mkdir -p python/llm/llm-binary mv linux-avx2/* python/llm/llm-binary/ mv linux-avx512/* python/llm/llm-binary/ mv linux-avxvnni/* python/llm/llm-binary/ diff --git a/.github/actions/llm/setup-llm-env/action.yml b/.github/actions/llm/setup-llm-env/action.yml index 06b21415..e843245e 100644 --- a/.github/actions/llm/setup-llm-env/action.yml +++ b/.github/actions/llm/setup-llm-env/action.yml @@ -1,5 +1,5 @@ -name: 'Setup BigDL-LLM Env' -description: 'Conda env create and BigDL-LLM installation' +name: "Setup BigDL-LLM Env" +description: "BigDL-LLM installation" runs: using: "composite" @@ -7,14 +7,9 @@ runs: - name: Create conda env for llm tests and conduct install tests shell: bash run: | - $CONDA_HOME/bin/conda env remove -y -n bigdl-llm-test || true - $CONDA_HOME/bin/conda create -n bigdl-llm-test -y python==3.9 setuptools==58.0.4 - source $CONDA_HOME/bin/activate bigdl-llm-test - $CONDA_HOME/bin/conda info pip install requests bash python/llm/dev/release_default_linux.sh default false whl_name=$(ls python/llm/dist) pip install -i https://pypi.python.org/simple "python/llm/dist/${whl_name}[all]" pip install pytest bash python/llm/test/run-llm-install-tests.sh - source $CONDA_HOME/bin/deactivate diff --git a/.github/workflows/llm-nightly-test.yml b/.github/workflows/llm-nightly-test.yml index 67ecad81..61ecbfcb 100644 --- a/.github/workflows/llm-nightly-test.yml +++ b/.github/workflows/llm-nightly-test.yml @@ -8,14 +8,14 @@ concurrency: # Controls when the action will run. on: schedule: - - cron: '00 13 * * *' # GMT time, 13:00 GMT == 21:00 China + - cron: "00 13 * * *" # GMT time, 13:00 GMT == 21:00 China pull_request: - branches: [ main ] + branches: [main] paths: - - '.github/workflows/llm-nightly-test.yml' - - '.github/actions/llm/setup-llm-env/action.yml' - - '.github/actions/llm/remove-llm-env/action.yml' - - '.github/actions/llm/convert-test/action.yml' + - ".github/workflows/llm-nightly-test.yml" + - ".github/actions/llm/setup-llm-env/action.yml" + - ".github/actions/llm/remove-llm-env/action.yml" + - ".github/actions/llm/convert-test/action.yml" # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -24,7 +24,7 @@ jobs: llm-cpp-build: uses: ./.github/workflows/llm-binary-build.yml llm-nightly-convert-test-avx512: - runs-on: [ self-hosted, llm, AVX512, ubuntu-20.04-lts ] + runs-on: [self-hosted, llm, AVX512, ubuntu-20.04-lts] needs: llm-cpp-build strategy: fail-fast: false @@ -42,10 +42,12 @@ jobs: GPTNEOX_INT4_CKPT_PATH: ./llm/ggml-actions/nightly/bigdl_llm_gptneox_q4_0.bin BLOOM_INT4_CKPT_PATH: ./llm/ggml-actions/nightly/bigdl_llm_bloom_q4_0.bin STARCODER_INT4_CKPT_PATH: ./llm/ggml-actions/nightly/bigdl_llm_starcoder_q4_0.bin + + ANALYTICS_ZOO_ROOT: ${{ github.workspace }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -56,16 +58,12 @@ jobs: - name: Download llm binary uses: ./.github/actions/llm/download-llm-binary - + - name: Install BigDL-LLM uses: ./.github/actions/llm/setup-llm-env - env: - ANALYTICS_ZOO_ROOT: ${{ github.workspace }} - - name: Download original models & convert + - name: Download original models & convert uses: ./.github/actions/llm/convert-test - env: - ANALYTICS_ZOO_ROOT: ${{ github.workspace }} - name: Upload ckpt to ftp run: | @@ -74,15 +72,10 @@ jobs: tnftp -u ${LLM_FTP_URL}/${INT4_CKPT_DIR:1}/bigdl_llm_redpajama_7b_q4_0.bin $GPTNEOX_INT4_CKPT_PATH tnftp -u ${LLM_FTP_URL}/${INT4_CKPT_DIR:1}/bigdl_llm_bloom_7b_q4_0.bin $BLOOM_INT4_CKPT_PATH tnftp -u ${LLM_FTP_URL}/${INT4_CKPT_DIR:1}/bigdl_llm_santacoder_1b_q4_0.bin $STARCODER_INT4_CKPT_PATH - - - name: Clean up test environment - uses: ./.github/actions/llm/remove-llm-env - env: - ANALYTICS_ZOO_ROOT: ${{ github.workspace }} llm-inference-test-on-linux: needs: llm-nightly-convert-test-avx512 uses: ./.github/workflows/llm_unit_tests_linux.yml llm-inference-test-on-windows: needs: llm-nightly-convert-test-avx512 - uses: ./.github/workflows/llm-nightly-test-windows.yml \ No newline at end of file + uses: ./.github/workflows/llm-nightly-test-windows.yml diff --git a/.github/workflows/llm_unit_tests_linux.yml b/.github/workflows/llm_unit_tests_linux.yml index 6b0e2ab3..0c52cf20 100644 --- a/.github/workflows/llm_unit_tests_linux.yml +++ b/.github/workflows/llm_unit_tests_linux.yml @@ -63,10 +63,11 @@ jobs: runs-on: [self-hosted, llm, "${{matrix.instruction}}", ubuntu-20.04-lts] env: THREAD_NUM: 24 + ANALYTICS_ZOO_ROOT: ${{ github.workspace }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -80,8 +81,6 @@ jobs: - name: Run LLM install (all) test uses: ./.github/actions/llm/setup-llm-env - env: - ANALYTICS_ZOO_ROOT: ${{ github.workspace }} - name: Download ckpt & original models run: | @@ -124,20 +123,9 @@ jobs: - 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 }}