From e6dfe65a6745d4f7ba9fffaa63b0d8b7ab880297 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Tue, 18 Jun 2024 11:19:10 +0800 Subject: [PATCH 1/6] limit setuptools version (#1615) Signed-off-by: Sun, Xuehao --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0b45ec85d3f..f73ff94bd6b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ py-cpuinfo -setuptools>=65 +setuptools==69.5.1 setuptools_scm[toml]>=6.2 From 583520579ea46de48c43083d9176ceea4a906275 Mon Sep 17 00:00:00 2001 From: ZePan110 Date: Tue, 18 Jun 2024 15:21:27 +0800 Subject: [PATCH 2/6] Remove permissions. (#1610) Signed-off-by: zepan Co-authored-by: Sun, Xuehao --- .github/checkgroup.yml | 7 ------- .github/workflows/Scaner_BDBA.yaml | 1 - .github/workflows/Scaner_Coverity.yaml | 1 - .github/workflows/Scaner_Trivy.yaml | 1 - .github/workflows/build-container.yaml | 1 - .github/workflows/chatbot-finetune-mpt-7b-chat-hpu.yml | 1 - .github/workflows/chatbot-finetune-mpt-7b-chat.yml | 1 - .../workflows/chatbot-inference-llama-2-7b-chat-hf.yml | 1 - .../chatbot-inference-llama-2-7b_70b-chat-hf-hpu.yml | 1 - .../workflows/chatbot-inference-mpt-7b-chat-hpu.yml | 1 - .github/workflows/chatbot-inference-mpt-7b-chat.yml | 1 - .github/workflows/chatbot-test.yml | 1 - .github/workflows/chatbot_finetuning.yml | 1 - .github/workflows/deploy-test.yml | 1 - .github/workflows/format_scan.yml | 1 - .github/workflows/llm-test.yml | 2 +- .github/workflows/optimize-test.yml | 1 - .github/workflows/publish.yml | 1 - .github/workflows/script/launch_llm.sh | 2 +- .github/workflows/script/models/run_llm.sh | 10 ++++------ .github/workflows/script/prepare_env_with_conda.sh | 9 +-------- .github/workflows/sparse_lib_CI.yml | 1 - .github/workflows/trellix.yaml | 1 - .github/workflows/unit-test-engine.yml | 1 - .github/workflows/unit-test-kernel.yml | 1 - .github/workflows/unit-test-neuralchat.yml | 1 - .github/workflows/unit-test-neuralspeed.yml | 1 - .github/workflows/unit-test-optimize.yml | 1 - .github/workflows/windows-test.yml | 1 - 29 files changed, 7 insertions(+), 47 deletions(-) diff --git a/.github/checkgroup.yml b/.github/checkgroup.yml index aadf36180b1..4ac0920c729 100644 --- a/.github/checkgroup.yml +++ b/.github/checkgroup.yml @@ -30,13 +30,6 @@ subprojects: - "optimize-unit-test-PR-test" - "Genreate-OptimizeUT-Report" - - id: "Neural Speed Unit Test workflow" - paths: - - .github/workflows/unit-test-neuralspeed.yml - - ".github/workflows/script/unitTest/run_unit_test_neuraspeed.sh" - checks: - - "neural-speed-unit-test" - - id: "NeuralChat Unit Test" paths: - ".github/workflows/unit-test-neuralchat.yml" diff --git a/.github/workflows/Scaner_BDBA.yaml b/.github/workflows/Scaner_BDBA.yaml index 1a84a54bf81..53fce282267 100644 --- a/.github/workflows/Scaner_BDBA.yaml +++ b/.github/workflows/Scaner_BDBA.yaml @@ -3,7 +3,6 @@ name: Scanner BDBA on: workflow_dispatch: -permissions: write-all jobs: bdba_job: name: BDBA Scan diff --git a/.github/workflows/Scaner_Coverity.yaml b/.github/workflows/Scaner_Coverity.yaml index 8a89ebbc808..a2ee1363a75 100644 --- a/.github/workflows/Scaner_Coverity.yaml +++ b/.github/workflows/Scaner_Coverity.yaml @@ -3,7 +3,6 @@ name: Scanner Coverity PYTHON on: workflow_dispatch: -permissions: write-all jobs: coverity_job: name: Coverity diff --git a/.github/workflows/Scaner_Trivy.yaml b/.github/workflows/Scaner_Trivy.yaml index 70dbb788016..cebddadb656 100644 --- a/.github/workflows/Scaner_Trivy.yaml +++ b/.github/workflows/Scaner_Trivy.yaml @@ -2,7 +2,6 @@ name: Trivy Scan for Containers on: workflow_dispatch: -permissions: write-all jobs: trivy_container_job: uses: "intel-innersource/frameworks.ai.infrastructure.code-scan-tools/.github/workflows/Scanner_Trivy.yml@one-ci-cd" diff --git a/.github/workflows/build-container.yaml b/.github/workflows/build-container.yaml index 332484c2bc3..b6ef1d207cf 100644 --- a/.github/workflows/build-container.yaml +++ b/.github/workflows/build-container.yaml @@ -3,7 +3,6 @@ on: workflow_dispatch: # Can be manually executed schedule: # 1/week Sunday at 07:00AM - cron: "5 7 * * 0" -permissions: write-all jobs: build: container: # MLOps Dev container for Compose Automation diff --git a/.github/workflows/chatbot-finetune-mpt-7b-chat-hpu.yml b/.github/workflows/chatbot-finetune-mpt-7b-chat-hpu.yml index 3ffac7f3131..175df5ab40a 100644 --- a/.github/workflows/chatbot-finetune-mpt-7b-chat-hpu.yml +++ b/.github/workflows/chatbot-finetune-mpt-7b-chat-hpu.yml @@ -6,7 +6,6 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-ft-mpt-7b-hpu cancel-in-progress: true -permissions: write-all jobs: finetuning: name: finetuning test diff --git a/.github/workflows/chatbot-finetune-mpt-7b-chat.yml b/.github/workflows/chatbot-finetune-mpt-7b-chat.yml index 398411d47a1..37177d55fa7 100644 --- a/.github/workflows/chatbot-finetune-mpt-7b-chat.yml +++ b/.github/workflows/chatbot-finetune-mpt-7b-chat.yml @@ -6,7 +6,6 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-ft-mpt-7b cancel-in-progress: true -permissions: write-all jobs: finetuning: name: finetuning test diff --git a/.github/workflows/chatbot-inference-llama-2-7b-chat-hf.yml b/.github/workflows/chatbot-inference-llama-2-7b-chat-hf.yml index b606c5ee138..ade6b97c9e5 100644 --- a/.github/workflows/chatbot-inference-llama-2-7b-chat-hf.yml +++ b/.github/workflows/chatbot-inference-llama-2-7b-chat-hf.yml @@ -6,7 +6,6 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-inf-lla-7b cancel-in-progress: true -permissions: write-all jobs: inference: name: inference test diff --git a/.github/workflows/chatbot-inference-llama-2-7b_70b-chat-hf-hpu.yml b/.github/workflows/chatbot-inference-llama-2-7b_70b-chat-hf-hpu.yml index 1627cb9bd74..bbefd811f6b 100644 --- a/.github/workflows/chatbot-inference-llama-2-7b_70b-chat-hf-hpu.yml +++ b/.github/workflows/chatbot-inference-llama-2-7b_70b-chat-hf-hpu.yml @@ -6,7 +6,6 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-inf-lla-7b-hpu cancel-in-progress: true -permissions: write-all jobs: inference: name: inference test diff --git a/.github/workflows/chatbot-inference-mpt-7b-chat-hpu.yml b/.github/workflows/chatbot-inference-mpt-7b-chat-hpu.yml index b7974c5db9f..0ab4630031e 100644 --- a/.github/workflows/chatbot-inference-mpt-7b-chat-hpu.yml +++ b/.github/workflows/chatbot-inference-mpt-7b-chat-hpu.yml @@ -6,7 +6,6 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-inf-mpt-7b-hpu cancel-in-progress: true -permissions: write-all jobs: inference: name: inference test diff --git a/.github/workflows/chatbot-inference-mpt-7b-chat.yml b/.github/workflows/chatbot-inference-mpt-7b-chat.yml index 96135ec5b33..e7ed8c612fc 100644 --- a/.github/workflows/chatbot-inference-mpt-7b-chat.yml +++ b/.github/workflows/chatbot-inference-mpt-7b-chat.yml @@ -6,7 +6,6 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-inf-mpt-7b cancel-in-progress: true -permissions: write-all jobs: inference: name: inference test diff --git a/.github/workflows/chatbot-test.yml b/.github/workflows/chatbot-test.yml index cd4a8e8dd32..64e16a9cf41 100644 --- a/.github/workflows/chatbot-test.yml +++ b/.github/workflows/chatbot-test.yml @@ -27,7 +27,6 @@ on: - '!intel_extension_for_transformers/neural_chat/README.md' workflow_dispatch: -permissions: write-all # If there is a new commit, the previous jobs will be canceled concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/chatbot_finetuning.yml b/.github/workflows/chatbot_finetuning.yml index ead32180106..e93355232f1 100644 --- a/.github/workflows/chatbot_finetuning.yml +++ b/.github/workflows/chatbot_finetuning.yml @@ -7,7 +7,6 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -permissions: write-all jobs: call-finetune-mpt-7b-chat: uses: ./.github/workflows/chatbot-finetune-mpt-7b-chat.yml diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/deploy-test.yml index d7d33c6b9cb..683665ba2ed 100644 --- a/.github/workflows/deploy-test.yml +++ b/.github/workflows/deploy-test.yml @@ -7,7 +7,6 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -permissions: write-all env: OUT_SCRIPT_PATH: ${{ github.workspace }}/.github/workflows/script/models SCRIPT_PATH: /intel-extension-for-transformers/.github/workflows/script diff --git a/.github/workflows/format_scan.yml b/.github/workflows/format_scan.yml index 01209afd5e3..2c8fbfed2eb 100644 --- a/.github/workflows/format_scan.yml +++ b/.github/workflows/format_scan.yml @@ -11,7 +11,6 @@ on: - .github/workflows/format_scan.yml - .github/workflows/script/formatScan/** workflow_dispatch: -permissions: write-all # If there is a new commit, the previous jobs will be canceled concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/llm-test.yml b/.github/workflows/llm-test.yml index 02b8e484b5f..9b5b68d74a4 100644 --- a/.github/workflows/llm-test.yml +++ b/.github/workflows/llm-test.yml @@ -13,7 +13,6 @@ on: - "!intel_extension_for_transformers/transformers/runtime/third_party/**" - "!intel_extension_for_transformers/transformers/runtime/docs/**" workflow_dispatch: -permissions: write-all # If there is a new commit, the previous jobs will be canceled concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -50,6 +49,7 @@ jobs: - name: Binary build run: | cd ${{ github.workspace }} + source ~/.bashrc conda activate llm-test || source activate llm-test compiler_version=11.1.0 conda install --update-deps -c conda-forge gxx==${compiler_version} gcc==${compiler_version} gxx_linux-64==${compiler_version} libstdcxx-ng sysroot_linux-64 libxcrypt -y diff --git a/.github/workflows/optimize-test.yml b/.github/workflows/optimize-test.yml index b0bf5922146..c0ae69e4beb 100644 --- a/.github/workflows/optimize-test.yml +++ b/.github/workflows/optimize-test.yml @@ -7,7 +7,6 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -permissions: write-all env: OUT_SCRIPT_PATH: ${{ github.workspace }}/.github/workflows/script/models SCRIPT_PATH: /intel-extension-for-transformers/.github/workflows/script diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2d5427a01bd..2d9a99d1d51 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,7 +5,6 @@ on: branches: - main workflow_dispatch: -permissions: write-all jobs: build: diff --git a/.github/workflows/script/launch_llm.sh b/.github/workflows/script/launch_llm.sh index 7e8dc3aebd2..74afd6738c3 100644 --- a/.github/workflows/script/launch_llm.sh +++ b/.github/workflows/script/launch_llm.sh @@ -23,7 +23,7 @@ function main() { fi # init conda - #. $(dirname ${CONDA_EXE})/../etc/profile.d/conda.sh + source ~/.bashrc conda activate $conda_env || source activate $conda_env # env diff --git a/.github/workflows/script/models/run_llm.sh b/.github/workflows/script/models/run_llm.sh index 30369b9543e..4ef62af935e 100644 --- a/.github/workflows/script/models/run_llm.sh +++ b/.github/workflows/script/models/run_llm.sh @@ -36,9 +36,9 @@ main() { } function prepare() { - [[ -d ${HOME}/anaconda3/bin ]] && export PATH=${HOME}/anaconda3/bin/:$PATH - [[ -d ${HOME}/miniconda3/bin ]] && export PATH=${HOME}/miniconda3/bin/:$PATH - export LD_LIBRARY_PATH=/lib64/libcrypto.so.1.1:${HOME}/miniconda3/envs/${conda_env_name}/lib/:$LD_LIBRARY_PATH + source ~/.bashrc + source activate ${conda_env_name} || conda activate ${conda_env_name} + export LD_LIBRARY_PATH=/lib64/libcrypto.so.1.1:${CONDA_PREFIX}/lib/:$LD_LIBRARY_PATH if [[ ${precision} == "fp8" ]]; then export NE_WEIGHT_FP8_4E3M=1 fi @@ -46,7 +46,6 @@ function prepare() { working_dir="${WORKING_DIR}/examples/huggingface/pytorch/text-generation/deployment" fi $BOLD_YELLOW && echo "Running ---- ${framework}, ${model}----Prepare" - source activate ${conda_env_name} || conda activate ${conda_env_name} if [[ ${cpu} == *"spr"* ]] || [[ ${cpu} == *"SPR"* ]] || [[ ${cpu} == *"Spr"* ]]; then export CC=/opt/rh/gcc-toolset-11/root/usr/bin/gcc export CXX=/opt/rh/gcc-toolset-11/root/usr/bin/g++ @@ -56,8 +55,7 @@ function prepare() { echo "Working in ${working_dir}" echo -e "\nInstalling model requirements..." export PATH=/lib64/libcrypto.so.1.1:$PATH - cp /lib64/libcrypto.so.1.1 ${HOME}/miniconda3/envs/${conda_env_name}/lib/libcrypto.so.1.1 - cp /lib64/libcrypto.so.1.1 ${HOME}/miniconda3/lib/libcrypto.so.1.1 + cp /lib64/libcrypto.so.1.1 ${CONDA_PREFIX}/lib/libcrypto.so.1.1 if [ -f "requirements.txt" ]; then sed -i '/^transformers/d' requirements.txt n=0 diff --git a/.github/workflows/script/prepare_env_with_conda.sh b/.github/workflows/script/prepare_env_with_conda.sh index b6622a08837..7f5f6784a51 100644 --- a/.github/workflows/script/prepare_env_with_conda.sh +++ b/.github/workflows/script/prepare_env_with_conda.sh @@ -6,13 +6,6 @@ if [[ -z "${conda_env_name}" ]] || [[ -z "${python_version}" ]]; then exit 1 fi +source ~/.bashrc conda create -n ${conda_env_name} python=${python_version} -y source activate ${conda_env_name} || conda activate ${conda_env_name} -#pip install -U pip -# -#if [ -f "requirements.txt" ]; then -# python -m pip install --default-timeout=100 -r requirements.txt -# pip list -#else -# echo "Not found requirements.txt file." -#fi diff --git a/.github/workflows/sparse_lib_CI.yml b/.github/workflows/sparse_lib_CI.yml index d908f994518..035c456e9e5 100644 --- a/.github/workflows/sparse_lib_CI.yml +++ b/.github/workflows/sparse_lib_CI.yml @@ -8,7 +8,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -permissions: write-all env: DOCKER_CONFIG_NAME: "commonDockerConfig" diff --git a/.github/workflows/trellix.yaml b/.github/workflows/trellix.yaml index ffed7d15e24..f9167339f27 100644 --- a/.github/workflows/trellix.yaml +++ b/.github/workflows/trellix.yaml @@ -3,7 +3,6 @@ name: Trellix Command Line Scanner on: workflow_dispatch: -permissions: write-all jobs: Trellix: runs-on: inner-source diff --git a/.github/workflows/unit-test-engine.yml b/.github/workflows/unit-test-engine.yml index fef1f600514..94c2a8c5166 100644 --- a/.github/workflows/unit-test-engine.yml +++ b/.github/workflows/unit-test-engine.yml @@ -14,7 +14,6 @@ on: - "!intel_extension_for_transformers/transformers/runtime/third_party/**" - "!intel_extension_for_transformers/transformers/runtime/docs/**" workflow_dispatch: -permissions: write-all # If there is a new commit, the previous jobs will be canceled concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/unit-test-kernel.yml b/.github/workflows/unit-test-kernel.yml index 75ba18a16c2..b551049081d 100644 --- a/.github/workflows/unit-test-kernel.yml +++ b/.github/workflows/unit-test-kernel.yml @@ -14,7 +14,6 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -permissions: write-all env: DOCKER_CONFIG_NAME: "commonDockerConfig" REPO_NAME: "intel-extension-for-transformers" diff --git a/.github/workflows/unit-test-neuralchat.yml b/.github/workflows/unit-test-neuralchat.yml index b5a13f9686b..1289e0ad2d1 100644 --- a/.github/workflows/unit-test-neuralchat.yml +++ b/.github/workflows/unit-test-neuralchat.yml @@ -25,7 +25,6 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -permissions: write-all env: DOCKER_CONFIG_NAME: "commonDockerConfig" REPO_NAME: "intel-extension-for-transformers" diff --git a/.github/workflows/unit-test-neuralspeed.yml b/.github/workflows/unit-test-neuralspeed.yml index f140c9601e9..14d9a538243 100644 --- a/.github/workflows/unit-test-neuralspeed.yml +++ b/.github/workflows/unit-test-neuralspeed.yml @@ -12,7 +12,6 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -permissions: write-all env: DOCKER_CONFIG_NAME: "commonDockerConfig" REPO_NAME: "intel-extension-for-transformers" diff --git a/.github/workflows/unit-test-optimize.yml b/.github/workflows/unit-test-optimize.yml index d210c6a26c3..3bbc782c76e 100644 --- a/.github/workflows/unit-test-optimize.yml +++ b/.github/workflows/unit-test-optimize.yml @@ -23,7 +23,6 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -permissions: write-all env: DOCKER_CONFIG_NAME: "commonDockerConfig" REPO_NAME: "intel-extension-for-transformers" diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 1905f5bb57a..1a6576d5761 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -14,7 +14,6 @@ on: - "!intel_extension_for_transformers/transformers/runtime/test/**" - "!intel_extension_for_transformers/qbits/qbits_ut/**" workflow_dispatch: -permissions: write-all # If there is a new commit, the previous jobs will be canceled concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} From b262d39af9675269120c7554821123b7d18c0b37 Mon Sep 17 00:00:00 2001 From: kevinintel Date: Wed, 19 Jun 2024 16:20:15 +0800 Subject: [PATCH 3/6] add badge (#1618) Add OpenSSF --- SECURITY.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SECURITY.md b/SECURITY.md index 71a71eff1b6..eb546f7f75a 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,3 +1,8 @@ +OpenSSF Badge +=============== + +## [OpenSSF Badge](https://www.bestpractices.dev/en/projects/9128) + Security Policy =============== From cb2725acf124bf2ea64eb34c4b0d4ad651211d52 Mon Sep 17 00:00:00 2001 From: kevinintel Date: Wed, 19 Jun 2024 16:21:47 +0800 Subject: [PATCH 4/6] Create scorecard.yml (#1619) Signed-off-by: kevinintel --- .github/workflows/scorecard.yml | 73 +++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/scorecard.yml diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml new file mode 100644 index 00000000000..79973f7cab7 --- /dev/null +++ b/.github/workflows/scorecard.yml @@ -0,0 +1,73 @@ +# This workflow uses actions that are not certified by GitHub. They are provided +# by a third-party and are governed by separate terms of service, privacy +# policy, and support documentation. + +name: Scorecard supply-chain security +on: + # For Branch-Protection check. Only the default branch is supported. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection + branch_protection_rule: + # To guarantee Maintained check is occasionally updated. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained + schedule: + - cron: '25 5 * * 5' + push: + branches: [ "main" ] + +# Declare default permissions as read only. +permissions: read-all + +jobs: + analysis: + name: Scorecard analysis + runs-on: ubuntu-latest + permissions: + # Needed to upload the results to code-scanning dashboard. + security-events: write + # Needed to publish results and get a badge (see publish_results below). + id-token: write + # Uncomment the permissions below if installing in a private repository. + # contents: read + # actions: read + + steps: + - name: "Checkout code" + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 + with: + results_file: results.sarif + results_format: sarif + # (Optional) "write" PAT token. Uncomment the `repo_token` line below if: + # - you want to enable the Branch-Protection check on a *public* repository, or + # - you are installing Scorecard on a *private* repository + # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional. + # repo_token: ${{ secrets.SCORECARD_TOKEN }} + + # Public repositories: + # - Publish results to OpenSSF REST API for easy access by consumers + # - Allows the repository to include the Scorecard badge. + # - See https://github.com/ossf/scorecard-action#publishing-results. + # For private repositories: + # - `publish_results` will always be set to `false`, regardless + # of the value entered here. + publish_results: true + + # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF + # format to the repository Actions tab. + - name: "Upload artifact" + uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + + # Upload the results to GitHub's code scanning dashboard (optional). + # Commenting out will disable upload of results to your repo's Code Scanning dashboard + - name: "Upload to code-scanning" + uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9 + with: + sarif_file: results.sarif From fce38b918e2818f1f6a803e2d094c4c4591761af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Guimar=C3=A3es?= Date: Wed, 19 Jun 2024 05:31:49 -0300 Subject: [PATCH 5/6] Fix typo at README.md (#1620) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed an extra space from two shell commands examples Signed-off-by: Lucas GuimarĂ£es --- .../tensorflow/language-modeling/quantization/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/huggingface/tensorflow/language-modeling/quantization/README.md b/examples/huggingface/tensorflow/language-modeling/quantization/README.md index 883689068bc..bb41901b183 100644 --- a/examples/huggingface/tensorflow/language-modeling/quantization/README.md +++ b/examples/huggingface/tensorflow/language-modeling/quantization/README.md @@ -31,7 +31,7 @@ pip install -r requirements.txt ``` cd ptq -bash run_tuning.sh --topology=[topology] +bash run_tuning.sh --topology=[topology] ``` * To benchmark the int8 model @@ -52,7 +52,7 @@ bash run_benchmark.sh --topology=[topology] --mode=benchmark --int8=true ``` cd ptq -bash run_tuning.sh --topology=[topology] +bash run_tuning.sh --topology=[topology] ``` * To benchmark the int8 model @@ -60,4 +60,4 @@ bash run_tuning.sh --topology=[topology] ``` cd ptq bash run_benchmark.sh --topology=[topology] --mode=benchmark --int8=true -``` \ No newline at end of file +``` From 9a5a578b686473a42ddc41af5fbb6fd5b09da948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Guimar=C3=A3es?= Date: Wed, 19 Jun 2024 05:32:01 -0300 Subject: [PATCH 6/6] Fix typo at README.md (#1621) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed typos and improved some phrases. Signed-off-by: Lucas GuimarĂ£es --- workflows/chatbot/inference/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/workflows/chatbot/inference/README.md b/workflows/chatbot/inference/README.md index ba5da39484a..1d9598953a1 100644 --- a/workflows/chatbot/inference/README.md +++ b/workflows/chatbot/inference/README.md @@ -49,7 +49,7 @@ numactl -m -C python generate.py \ To enable FP32 inference, you can add the parameter `--dtype "float32"`. To check the statistical information of inference, you can add the parameter `--return_stats`. ## LLama2 INT8 Inference -[Llama2](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf) int8 inference demonstrates in [int8_llama2](https://github.com/intel/intel-extension-for-transformers/tree/int8_llama2/workflows/chatbot/inference) branch and need install Intel-extension-for-pytorch [llm_feature_branch](https://github.com/intel/intel-extension-for-pytorch/tree/llm_feature_branch) branch. Please follow the [README.md](https://github.com/intel/intel-extension-for-transformers/blob/81a4484dcc93f09d7609e6896fe3fbc22756975b/workflows/chatbot/inference/README.md) to setup the environments and make quantization. +[Llama2](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf) int8 inference demonstrates in [int8_llama2](https://github.com/intel/intel-extension-for-transformers/tree/int8_llama2/workflows/chatbot/inference) branch and need install Intel-extension-for-pytorch [llm_feature_branch](https://github.com/intel/intel-extension-for-pytorch/tree/llm_feature_branch) branch. Please follow the [README.md](https://github.com/intel/intel-extension-for-transformers/blob/81a4484dcc93f09d7609e6896fe3fbc22756975b/workflows/chatbot/inference/README.md) to set up the environments and make quantization. # Inference on Habana Gaudi @@ -107,7 +107,7 @@ python ../utils/gaudi_spawn.py --use_deepspeed --world_size 8 generate.py \ Habana supports HPU graph mode for inference speedup, which is available for bloom, gpt2, opt, gptj, gpt_neox, mpt, llama. You can use the parameter `use_hpu_graphs` to speed up the inference. -you can use '--peft_model_path' to apply you peft finetuned output model during generation. +you can use '--peft_model_path' to apply your peft finetuned output model during generation. ```bash python ../utils/gaudi_spawn.py --use_deepspeed --world_size 8 generate.py \ @@ -122,7 +122,7 @@ python ../utils/gaudi_spawn.py --use_deepspeed --world_size 8 generate.py \ # Additional Notes -Here are the explanations of parameters in generate.py: +Here are the explanations of the parameters in generate.py: `--temperature`: Controls the diversity of generated text. Lower values result in more deterministic outputs. The default value is 0.1. `--top_p`: During text generation, only consider tokens with cumulative probability up to this value. This parameter helps to avoid extremely low probability tokens. The default value is 0.75. `--top_k`: The number of highest probability vocabulary tokens to consider for each step of text generation. The default value is 40.