From ed76205e0b6087745d645dbd099570adf55c22be Mon Sep 17 00:00:00 2001 From: Jasonzzt Date: Tue, 24 Oct 2023 14:44:55 +0800 Subject: [PATCH 1/4] hosted k8s.png on readthedocs --- docker/llm/finetune/lora/cpu/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/llm/finetune/lora/cpu/README.md b/docker/llm/finetune/lora/cpu/README.md index 8eb8e486..47ab9d24 100644 --- a/docker/llm/finetune/lora/cpu/README.md +++ b/docker/llm/finetune/lora/cpu/README.md @@ -6,7 +6,7 @@ By constract, BigDL here provides a CPU optimization to accelerate the lora fine The architecture is illustrated in the following: -![image](https://github.com/Jasonzzt/BigDL/assets/60865256/b66416bc-ad07-49af-8cb0-8967dffb5f58) +![image](https://llm-assets.readthedocs.io/en/latest/_images/llm-finetune-lora-cpu-k8s.png) As above, BigDL implements its MPI training with [Kubeflow MPI operator](https://github.com/kubeflow/mpi-operator/tree/master), which encapsulates the deployment as MPIJob CRD, and assists users to handle the construction of a MPI worker cluster on Kubernetes, such as public key distribution, SSH connection, and log collection. From 37b1708d165a7b740225cb6d55dac42fcf98ec28 Mon Sep 17 00:00:00 2001 From: Jasonzzt Date: Thu, 26 Oct 2023 15:53:44 +0800 Subject: [PATCH 2/4] Add bigdl-llm-finetune-cpu to manually_build --- .github/workflows/manually_build.yml | 28 +++++++++++++++++ .../workflows/manually_build_for_testing.yml | 30 +++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/.github/workflows/manually_build.yml b/.github/workflows/manually_build.yml index f4728c02..720b4e96 100644 --- a/.github/workflows/manually_build.yml +++ b/.github/workflows/manually_build.yml @@ -10,6 +10,7 @@ on: type: choice options: - all + - bigdl-llm-finetune-cpu - bigdl-llm-finetune-xpu - bigdl-llm-xpu - bigdl-llm-cpu @@ -59,6 +60,33 @@ permissions: packages: write jobs: + bigdl-llm-finetune-cpu: + if: ${{ github.event.inputs.artifact == 'bigdl-llm-finetune-cpu' || github.event.inputs.artifact == 'all' }} + runs-on: [self-hosted, Shire] + + steps: + - uses: actions/checkout@v3 + - name: docker login + run: | + docker login -u ${DOCKERHUB_USERNAME} -p ${DOCKERHUB_PASSWORD} + - name: bigdl-llm-finetune-cpu + run: | + echo "##############################################################" + echo "####### bigdl-llm-finetune-cpu ########" + echo "##############################################################" + export image=intelanalytics/bigdl-llm-finetune-cpu + cd docker/llm/finetune/lora/cpu/docker + sudo docker build \ + --no-cache=true \ + --build-arg http_proxy=${HTTP_PROXY} \ + --build-arg https_proxy=${HTTPS_PROXY} \ + --build-arg no_proxy=${NO_PROXY} \ + -t ${image}:${TAG} -f ./Dockerfile . + sudo docker push ${image}:${TAG} + sudo docker tag ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} + sudo docker push 10.239.45.10/arda/${image}:${TAG} + sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} + bigdl-llm-finetune-xpu: if: ${{ github.event.inputs.artifact == 'bigdl-llm-finetune-xpu' || github.event.inputs.artifact == 'all' }} runs-on: [self-hosted, Shire] diff --git a/.github/workflows/manually_build_for_testing.yml b/.github/workflows/manually_build_for_testing.yml index b9c8932b..a25c47e9 100644 --- a/.github/workflows/manually_build_for_testing.yml +++ b/.github/workflows/manually_build_for_testing.yml @@ -14,6 +14,7 @@ on: type: choice options: - all + - bigdl-llm-finetune-cpu - bigdl-llm-finetune-xpu - bigdl-llm-xpu - bigdl-llm-cpu @@ -56,6 +57,35 @@ permissions: packages: write jobs: + bigdl-llm-finetune-cpu: + if: ${{ github.event.inputs.artifact == 'bigdl-llm-finetune-cpu' || github.event.inputs.artifact == 'all' }} + runs-on: [self-hosted, Shire] + + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.inputs.sha }} + - name: docker login + run: | + docker login -u ${DOCKERHUB_USERNAME} -p ${DOCKERHUB_PASSWORD} + - name: bigdl-llm-finetune-cpu + run: | + echo "##############################################################" + echo "####### bigdl-llm-finetune-cpu ########" + echo "##############################################################" + export image=intelanalytics/bigdl-llm-finetune-cpu + cd docker/llm/finetune/lora/cpu/docker + sudo docker build \ + --no-cache=true \ + --build-arg http_proxy=${HTTP_PROXY} \ + --build-arg https_proxy=${HTTPS_PROXY} \ + --build-arg no_proxy=${NO_PROXY} \ + -t ${image}:${TAG} -f ./Dockerfile . + sudo docker push ${image}:${TAG} + sudo docker tag ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} + sudo docker push 10.239.45.10/arda/${image}:${TAG} + sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} + bigdl-llm-finetune-xpu: if: ${{ github.event.inputs.artifact == 'bigdl-llm-finetune-xpu' || github.event.inputs.artifact == 'all' }} runs-on: [self-hosted, Shire] From 14a23015f8eee0f7be06160d3f2a24997c0d657e Mon Sep 17 00:00:00 2001 From: Ziteng Zhang <87107332+Jasonzzt@users.noreply.github.com> Date: Thu, 26 Oct 2023 16:24:03 +0800 Subject: [PATCH 3/4] Update manually_build.yml --- .github/workflows/manually_build.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/manually_build.yml b/.github/workflows/manually_build.yml index 720b4e96..86e5e1d8 100644 --- a/.github/workflows/manually_build.yml +++ b/.github/workflows/manually_build.yml @@ -10,8 +10,8 @@ on: type: choice options: - all - - bigdl-llm-finetune-cpu - - bigdl-llm-finetune-xpu + - bigdl-llm-finetune-lora-cpu + - bigdl-llm-finetune-qlora-xpu - bigdl-llm-xpu - bigdl-llm-cpu - bigdl-llm-serving-xpu @@ -60,8 +60,8 @@ permissions: packages: write jobs: - bigdl-llm-finetune-cpu: - if: ${{ github.event.inputs.artifact == 'bigdl-llm-finetune-cpu' || github.event.inputs.artifact == 'all' }} + bigdl-llm-finetune-lora-cpu: + if: ${{ github.event.inputs.artifact == 'bigdl-llm-finetune-lora-cpu' || github.event.inputs.artifact == 'all' }} runs-on: [self-hosted, Shire] steps: @@ -69,12 +69,12 @@ jobs: - name: docker login run: | docker login -u ${DOCKERHUB_USERNAME} -p ${DOCKERHUB_PASSWORD} - - name: bigdl-llm-finetune-cpu + - name: bigdl-llm-finetune-lora-cpu run: | echo "##############################################################" - echo "####### bigdl-llm-finetune-cpu ########" + echo "####### bigdl-llm-finetune-lora-cpu ########" echo "##############################################################" - export image=intelanalytics/bigdl-llm-finetune-cpu + export image=intelanalytics/bigdl-llm-finetune-lora-cpu cd docker/llm/finetune/lora/cpu/docker sudo docker build \ --no-cache=true \ @@ -87,8 +87,8 @@ jobs: sudo docker push 10.239.45.10/arda/${image}:${TAG} sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} - bigdl-llm-finetune-xpu: - if: ${{ github.event.inputs.artifact == 'bigdl-llm-finetune-xpu' || github.event.inputs.artifact == 'all' }} + bigdl-llm-finetune-qlora-xpu: + if: ${{ github.event.inputs.artifact == 'bigdl-llm-finetune-qlora-xpu' || github.event.inputs.artifact == 'all' }} runs-on: [self-hosted, Shire] steps: @@ -96,12 +96,12 @@ jobs: - name: docker login run: | docker login -u ${DOCKERHUB_USERNAME} -p ${DOCKERHUB_PASSWORD} - - name: bigdl-llm-finetune-xpu + - name: bigdl-llm-finetune-qlora-xpu run: | echo "##############################################################" - echo "####### bigdl-llm-finetune-xpu ########" + echo "####### bigdl-llm-finetune-qlora-xpu ########" echo "##############################################################" - export image=intelanalytics/bigdl-llm-finetune-xpu + export image=intelanalytics/bigdl-llm-finetune-qlora-xpu cd docker/llm/finetune/qlora/xpu/docker sudo docker build \ --no-cache=true \ From 916ccc07794cf8b14cd01d6dc942e34be2c7a66a Mon Sep 17 00:00:00 2001 From: Ziteng Zhang <87107332+Jasonzzt@users.noreply.github.com> Date: Thu, 26 Oct 2023 16:26:14 +0800 Subject: [PATCH 4/4] Update manually_build_for_testing.yml --- .../workflows/manually_build_for_testing.yml | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/manually_build_for_testing.yml b/.github/workflows/manually_build_for_testing.yml index a25c47e9..f9683c92 100644 --- a/.github/workflows/manually_build_for_testing.yml +++ b/.github/workflows/manually_build_for_testing.yml @@ -14,8 +14,8 @@ on: type: choice options: - all - - bigdl-llm-finetune-cpu - - bigdl-llm-finetune-xpu + - bigdl-llm-finetune-lora-cpu + - bigdl-llm-finetune-qlora-xpu - bigdl-llm-xpu - bigdl-llm-cpu - bigdl-llm-serving-xpu @@ -57,8 +57,8 @@ permissions: packages: write jobs: - bigdl-llm-finetune-cpu: - if: ${{ github.event.inputs.artifact == 'bigdl-llm-finetune-cpu' || github.event.inputs.artifact == 'all' }} + bigdl-llm-finetune-lora-cpu: + if: ${{ github.event.inputs.artifact == 'bigdl-llm-finetune-lora-cpu' || github.event.inputs.artifact == 'all' }} runs-on: [self-hosted, Shire] steps: @@ -68,12 +68,12 @@ jobs: - name: docker login run: | docker login -u ${DOCKERHUB_USERNAME} -p ${DOCKERHUB_PASSWORD} - - name: bigdl-llm-finetune-cpu + - name: bigdl-llm-finetune-lora-cpu run: | echo "##############################################################" - echo "####### bigdl-llm-finetune-cpu ########" + echo "####### bigdl-llm-finetune-lora-cpu ########" echo "##############################################################" - export image=intelanalytics/bigdl-llm-finetune-cpu + export image=intelanalytics/bigdl-llm-finetune-lora-cpu cd docker/llm/finetune/lora/cpu/docker sudo docker build \ --no-cache=true \ @@ -86,8 +86,8 @@ jobs: sudo docker push 10.239.45.10/arda/${image}:${TAG} sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} - bigdl-llm-finetune-xpu: - if: ${{ github.event.inputs.artifact == 'bigdl-llm-finetune-xpu' || github.event.inputs.artifact == 'all' }} + bigdl-llm-finetune-qlora-xpu: + if: ${{ github.event.inputs.artifact == 'bigdl-llm-finetune-qlora-xpu' || github.event.inputs.artifact == 'all' }} runs-on: [self-hosted, Shire] steps: @@ -97,12 +97,12 @@ jobs: - name: docker login run: | docker login -u ${DOCKERHUB_USERNAME} -p ${DOCKERHUB_PASSWORD} - - name: bigdl-llm-finetune-xpu + - name: bigdl-llm-finetune-qlora-xpu run: | echo "##############################################################" - echo "####### bigdl-llm-finetune-xpu ########" + echo "####### bigdl-llm-finetune-qlora-xpu ########" echo "##############################################################" - export image=intelanalytics/bigdl-llm-finetune-xpu + export image=intelanalytics/bigdl-llm-finetune-qlora-xpu cd docker/llm/finetune/qlora/xpu/docker sudo docker build \ --no-cache=true \