Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
Reduce the UT evaluation time (#498)
Browse files Browse the repository at this point in the history
Signed-off-by: changwangss <chang1.wang@intel.com>
Signed-off-by: Wenxin Zhang <wenxin.zhang@intel.com>
Signed-off-by: Wang, Chang <chang1.wang@intel.com>
Co-authored-by: Wenxin Zhang <wenxin.zhang@intel.com>
  • Loading branch information
changwangss and VincyZhang committed Oct 23, 2023
1 parent ffc73bb commit dd9e8fe
Show file tree
Hide file tree
Showing 49 changed files with 83 additions and 109 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/unit-test-neuralchat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
include:
- test_branch: ${{ github.ref }}
test_name: "PR-test"
- test_branch: "main"
test_name: "baseline"
#- test_branch: "main"
# test_name: "baseline"
steps:
- name: podman Clean Up
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-test-optimize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
include:
- test_branch: ${{ github.ref }}
test_name: "PR-test"
- test_branch: "main"
test_name: "baseline"
#- test_branch: "main"
# test_name: "baseline"
steps:
- name: Docker Clean Up
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ accelerate
datasets >= 1.8.0
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
torchvision
onnx>=1.12
onnxruntime==1.13.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ accelerate
datasets >= 1.8.0
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
torchvision
onnx>=1.12
onnxruntime==1.13.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
transformers
torch==2.0.1
torch==2.1.0
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ accelerate
datasets >= 1.8.0
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
onnx>=1.12
onnxruntime==1.13.1

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ accelerate
datasets >= 1.8.0
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
onnx>=1.12
onnxruntime==1.12.1

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
transformers
datasets
torchprofile
torch==2.0.1
torch==2.1.0
intel_extension_for_pytorch
accelerate
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
datasets >= 1.8.0
torch==2.0.1
torch==2.1.0
transformers
wandb
accelerate
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
accelerate
datasets
transformers
torch==2.0.1
torch==2.1.0
neural-compressor==2.0
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ sentencepiece != 0.1.92
rouge-score
nltk
py7zr
torch==2.0.1
torch==2.1.0
transformers
protobuf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
torch==2.0.1
torch==2.1.0
numpy
transformers
datasets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ accelerate
datasets >= 1.8.0
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
onnx>=1.12
onnxruntime==1.13.1

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ accelerate
datasets >= 1.8.0
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
onnx>=1.12
onnxruntime==1.13.1

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ accelerate
datasets >= 1.8.0
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
onnx>=1.12
onnxruntime==1.13.1

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ accelerate
datasets >= 1.8.0
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
onnx>=1.12
onnxruntime==1.13.1

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ accelerate
datasets >= 1.8.0
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
onnx>=1.12
onnxruntime==1.13.1

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ accelerate
datasets >= 1.8.0
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
onnx>=1.12
onnxruntime==1.13.1

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ accelerate
datasets >= 1.8.0
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
onnx>=1.12
onnxruntime==1.13.1

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ accelerate
datasets >= 1.8.0
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
onnx>=1.12
onnxruntime==1.13.1

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ accelerate
datasets >= 1.8.0
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
onnx>=1.12
onnxruntime==1.13.1

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ accelerate
datasets >= 1.8.0
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
onnx>=1.12
onnxruntime==1.13.1

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ accelerate
datasets >= 1.8.0
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
onnx>=1.12
onnxruntime==1.13.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
torch==2.0.1
torch==2.1.0
transformers
datasets
allennlp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ sentencepiece
scipy
scikit-learn
protobuf
torch==2.0.1
torch==2.1.0
evaluate
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
accelerate
torch==2.0.1
torch==2.1.0
datasets >= 1.1.3
sentencepiece != 0.1.92
transformers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ accelerate
datasets >= 1.1.3
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
transformers
wandb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ accelerate
datasets >= 1.1.3
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
transformers
wandb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ accelerate
datasets >= 1.1.3
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
transformers
wandb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ accelerate
datasets >= 1.1.3
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
transformers
wandb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ accelerate
datasets >= 1.8.0
sentencepiece != 0.1.92
protobuf
torch==2.0.1
torch==2.1.0
onnx>=1.12
onnxruntime==1.13.1
diffusers==0.12.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diffusers==0.4.1
accelerate
torch==2.0.1
torch==2.1.0
torchvision
transformers
ftfy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
accelerate
seqeval
datasets >= 1.1.3
torch==2.0.1
torch==2.1.0
transformers
wandb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ sentencepiece != 0.1.92
protobuf
sacrebleu >= 1.4.12
py7zr
torch==2.0.1
torch==2.1.0
transformers
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ RUN conda init bash && \

## If local torch whl are feasible, use localfile to install, avoiding donwloading time
COPY ./torch*.whl /
RUN if [ -f /torch-2.0.1+cpu-cp3${PYTHON_VERSION##*.}-cp3${PYTHON_VERSION##*.}-linux_x86_64.whl ]; then source activate && conda activate neuralchat && pip install /torch-2.0.1+cpu-cp3${PYTHON_VERSION##*.}-cp3${PYTHON_VERSION##*.}-linux_x86_64.whl; fi
RUN if [ -f /torchaudio-2.0.2+cpu-cp3${PYTHON_VERSION##*.}-cp3${PYTHON_VERSION##*.}-linux_x86_64.whl ]; then source activate && conda activate neuralchat && pip install /torchaudio-2.0.2+cpu-cp3${PYTHON_VERSION##*.}-cp3${PYTHON_VERSION##*.}-linux_x86_64.whl; fi
RUN if [ -f /torchvision-0.15.2+cpu-cp3${PYTHON_VERSION##*.}-cp3${PYTHON_VERSION##*.}-linux_x86_64.whl ]; then source activate && conda activate neuralchat && pip install /torchvision-0.15.2+cpu-cp3${PYTHON_VERSION##*.}-cp3${PYTHON_VERSION##*.}-linux_x86_64.whl; fi
RUN if [ -f /torch-2.1.0+cpu-cp3${PYTHON_VERSION##*.}-cp3${PYTHON_VERSION##*.}-linux_x86_64.whl ]; then source activate && conda activate neuralchat && pip install /torch-2.0.1+cpu-cp3${PYTHON_VERSION##*.}-cp3${PYTHON_VERSION##*.}-linux_x86_64.whl; fi
RUN if [ -f /torchaudio-2.1.0+cpu-cp3${PYTHON_VERSION##*.}-cp3${PYTHON_VERSION##*.}-linux_x86_64.whl ]; then source activate && conda activate neuralchat && pip install /torchaudio-2.0.2+cpu-cp3${PYTHON_VERSION##*.}-cp3${PYTHON_VERSION##*.}-linux_x86_64.whl; fi
RUN if [ -f /torchvision-0.16.0+cpu-cp3${PYTHON_VERSION##*.}-cp3${PYTHON_VERSION##*.}-linux_x86_64.whl ]; then source activate && conda activate neuralchat && pip install /torchvision-0.15.2+cpu-cp3${PYTHON_VERSION##*.}-cp3${PYTHON_VERSION##*.}-linux_x86_64.whl; fi

RUN source activate && conda activate neuralchat && pip install oneccl_bind_pt==2.0.0 -f https://developer.intel.com/ipex-whl-stable-cpu && \
RUN source activate && conda activate neuralchat && pip install oneccl_bind_pt==2.1.0 -f https://developer.intel.com/ipex-whl-stable-cpu && \
cd /intel-extension-for-transformers && pip install -r requirements.txt && pip install -v . && \
cd ./intel_extension_for_transformers/neural_chat/examples/instruction_tuning && pip install -r requirements.txt && \
cd /intel-extension-for-transformers/intel_extension_for_transformers/neural_chat && pip install -r requirements_cpu.txt && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ RUN conda init bash && \
echo "conda activate chatbot-finetuning" >> ~/.bashrc && \
source ~/.bashrc

RUN source activate && conda activate chatbot-finetuning && pip install oneccl_bind_pt==2.0.0 -f https://developer.intel.com/ipex-whl-stable-cpu && \
RUN source activate && conda activate chatbot-finetuning && pip install oneccl_bind_pt==2.1.0 -f https://developer.intel.com/ipex-whl-stable-cpu && \
pip install datasets torch accelerate SentencePiece evaluate nltk rouge_score protobuf==3.20.1 tokenizers einops && \
git clone https://github.com/huggingface/peft.git && cd peft && python setup.py install && \
cd /itrex && pip install -v . && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"```bash\n",
"pip install -r requirements.txt\n",
"# To use ccl as the distributed backend in distributed training on CPU requires to install below requirement.\n",
"python -m pip install oneccl_bind_pt==2.0.0 -f https://developer.intel.com/ipex-whl-stable-cpu\n",
"python -m pip install oneccl_bind_pt==2.1.0 -f https://developer.intel.com/ipex-whl-stable-cpu\n",
"```\n",
"\n",
"Then, follow the [hugginface guide](https://huggingface.co/docs/transformers/perf_train_cpu_many) to install Intel® oneCCL Bindings for PyTorch, IPEX\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Recommend python 3.9 or higher version.
```shell
pip install -r requirements.txt
# To use ccl as the distributed backend in distributed training on CPU requires to install below requirement.
python -m pip install oneccl_bind_pt==2.0.0 -f https://developer.intel.com/ipex-whl-stable-cpu
python -m pip install oneccl_bind_pt==2.1.0 -f https://developer.intel.com/ipex-whl-stable-cpu
```

## 2. Prepare the Model
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
datasets
torch==2.0.1
torch==2.1.0
transformers>=4.32.0
sentencepiece
peft
Expand Down
4 changes: 2 additions & 2 deletions intel_extension_for_transformers/neural_chat/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
transformers>=4.32.0
peft
fschat
torch==2.0.1
torchaudio==2.0.2
torch==2.1.0
torchaudio==2.1.0
intel_extension_for_pytorch
num2words
speechbrain
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
transformers>=4.32.0
peft
fschat
intel_extension_for_pytorch==2.0.100
intel_extension_for_pytorch==2.1.0
num2words
speechbrain
paddlepaddle
Expand Down Expand Up @@ -37,7 +37,7 @@ tiktoken==0.4.0
lm_eval
transformers_stream_generator==0.0.4
--extra-index-url https://download.pytorch.org/whl/cpu
torch==2.0.1
torchaudio==2.0.2
torch==2.1.0
torchaudio==2.1.0
spacy
neural-compressor
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ numpy==1.23.5
tiktoken==0.4.0
lm_eval
--extra-index-url https://download.pytorch.org/whl/cpu
torch==2.0.1
torchaudio==2.0.2
torch==2.1.0
torchaudio==2.1.0
spacy
neural-compressor
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
transformers>=4.32.0
peft
fschat
torch==2.0.1
torchaudio==2.0.2
torch==2.1.0
torchaudio==2.1.0
intel_extension_for_pytorch
num2words
speechbrain
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pip
torch==2.0.1
torch==2.1.0
diffusers==0.8.1
transformers
requests
Expand Down
Loading

0 comments on commit dd9e8fe

Please sign in to comment.