You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docker/llm/finetune/lora/cpu/README.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,13 @@
2
2
3
3
[Alpaca Lora](https://github.com/tloen/alpaca-lora/tree/main) uses [low-rank adaption](https://arxiv.org/pdf/2106.09685.pdf) to speed up the finetuning process of base model [Llama2-7b](https://huggingface.co/meta-llama/Llama-2-7b), and tries to reproduce the standard Alpaca, a general finetuned LLM. This is on top of Hugging Face transformers with Pytorch backend, which natively requires a number of expensive GPU resources and takes significant time.
4
4
5
-
By constract, BigDL here provides a CPU optimization to accelerate the lora finetuning of Llama2-7b, in the power of mixed-precision and distributed training. Detailedly, [Intel OneCCL](https://www.intel.com/content/www/us/en/developer/tools/oneapi/oneccl.html), an available Hugging Face backend, is able to speed up the Pytorch computation with BF16 datatype on CPUs, as well as parallel processing on Kubernetes enabled by [Intel MPI](https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library.html).
5
+
By constract, IPEX-LLM here provides a CPU optimization to accelerate the lora finetuning of Llama2-7b, in the power of mixed-precision and distributed training. Detailedly, [Intel OneCCL](https://www.intel.com/content/www/us/en/developer/tools/oneapi/oneccl.html), an available Hugging Face backend, is able to speed up the Pytorch computation with BF16 datatype on CPUs, as well as parallel processing on Kubernetes enabled by [Intel MPI](https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library.html).
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.
11
+
As above, IPEX-LLM 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.
12
12
13
13
Now, let's go to deploy a Lora finetuning to create a LLM from Llama2-7b.
### 2. Download Image, Base Model and Finetuning Data
22
22
23
-
Follow [here](https://github.com/intel-analytics/BigDL/tree/main/docker/llm/finetune/lora/docker#prepare-bigdl-image-for-lora-finetuning) to prepare BigDL Lora Finetuning image in your cluster.
23
+
Follow [here](https://github.com/intel-analytics/IPEX-LLM/tree/main/docker/llm/finetune/lora/docker#prepare-ipex-llm-image-for-lora-finetuning) to prepare IPEX-LLM Lora Finetuning image in your cluster.
24
24
25
25
As finetuning is from a base model, first download [Llama2-7b model from the public download site of Hugging Face](https://huggingface.co/meta-llama/Llama-2-7b). Then, download [cleaned alpaca data](https://raw.githubusercontent.com/tloen/alpaca-lora/main/alpaca_data_cleaned_archive.json), which contains all kinds of general knowledge and has already been cleaned. Next, move the downloaded files to a shared directory on your NFS server.
26
26
@@ -34,21 +34,21 @@ After preparing parameters in `./kubernetes/values.yaml`, submit the job as befl
34
34
35
35
```bash
36
36
cd ./kubernetes
37
-
helm install bigdl-lora-finetuning .
37
+
helm install ipex-llm-lora-finetuning .
38
38
```
39
39
40
40
### 4. Check Deployment
41
41
```bash
42
-
kubectl get all -n bigdl-lora-finetuning # you will see launcher and worker pods running
42
+
kubectl get all -n ipex-llm-lora-finetuning # you will see launcher and worker pods running
43
43
```
44
44
45
45
### 5. Check Finetuning Process
46
46
47
47
After deploying successfully, you can find a launcher pod, and then go inside this pod and check the logs collected from all workers.
48
48
49
49
```bash
50
-
kubectl get all -n bigdl-lora-finetuning # you will see a launcher pod
51
-
kubectl exec -it <launcher_pod_name> bash -n bigdl-ppml-finetuning # enter launcher pod
50
+
kubectl get all -n ipex-llm-lora-finetuning # you will see a launcher pod
51
+
kubectl exec -it <launcher_pod_name> bash -n ipex-llm-lora-finetuning # enter launcher pod
52
52
cat launcher.log # display logs collected from other workers
RUN echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main " > /etc/apt/sources.list.d/oneAPI.list
20
20
21
-
RUN mkdir /bigdl/data && mkdir /bigdl/model && \
21
+
RUN mkdir /ipex_llm/data && mkdir /ipex_llm/model && \
RUN echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main " > /etc/apt/sources.list.d/oneAPI.list
20
20
21
-
RUN mkdir -p /bigdl/data && mkdir -p /bigdl/model && \
21
+
RUN mkdir -p /ipex_llm/data && mkdir -p /ipex_llm/model && \
RUN echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main " > /etc/apt/sources.list.d/oneAPI.list
21
21
22
-
RUN mkdir -p /bigdl/data && mkdir -p /bigdl/model && \
22
+
RUN mkdir -p /ipex_llm/data && mkdir -p /ipex_llm/model && \
0 commit comments