From fd641712a3123a45bc1c23cb99eac843b1932d41 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 00:19:38 +0000 Subject: [PATCH 1/6] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0) - [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](https://github.com/codespell-project/codespell/compare/v2.2.6...v2.3.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index da91235b092..1868d5f233b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: debug-statements - id: mixed-line-ending @@ -44,7 +44,7 @@ repos: )$ - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell args: [-w, --ignore-words=.github/workflows/script/formatScan/nlp_dict.txt] From 541313c96a97314cdfa5d139bb656ea7409bb5c6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 00:20:14 +0000 Subject: [PATCH 2/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/code_of_conduct.md | 2 +- .../ITREX_StableDiffusionInstructPix2PixPipeline.py | 2 +- .../text-to-image/deployment/stable_diffusion/README.md | 2 +- .../deployment/stable_diffusion/diffusion_utils_img2img.py | 2 +- .../neural_chat/docs/notebooks/build_chatbot_on_xpu.ipynb | 2 +- .../neural_chat/docs/notebooks/deploy_chatbot_on_xpu.ipynb | 2 +- .../examples/deployment/photo_ai/backend/README.md | 6 +++--- .../finetuning/multi_modal/eval/mmmu_eval/main_eval_only.py | 2 +- .../multi_modal/eval/mmmu_eval/main_parse_and_eval.py | 2 +- .../plugins/image2image/instructpix2pix_pipeline.py | 2 +- .../transformers/runtime/compile/graph_utils.py | 2 +- .../transformers/runtime/compile/onnx_utils.py | 4 ++-- .../transformers/runtime/compile/tf_utils.py | 2 +- .../transformers/runtime/executor/src/operators/cossin.cpp | 2 +- .../fastchat/eval/table/answer/answer_vicuna-13b.jsonl | 2 +- .../chatbot/demo/basic_frontend/fastchat/serve/inference.py | 2 +- 16 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/code_of_conduct.md b/docs/code_of_conduct.md index 15635ed3df8..92e2ca0a592 100644 --- a/docs/code_of_conduct.md +++ b/docs/code_of_conduct.md @@ -14,7 +14,7 @@ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal +level of experience, education, socioeconomic status, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards diff --git a/examples/huggingface/pytorch/text-to-image/deployment/stable_diffusion/ITREX_StableDiffusionInstructPix2PixPipeline.py b/examples/huggingface/pytorch/text-to-image/deployment/stable_diffusion/ITREX_StableDiffusionInstructPix2PixPipeline.py index a00ccb896cb..2d7ff24124e 100644 --- a/examples/huggingface/pytorch/text-to-image/deployment/stable_diffusion/ITREX_StableDiffusionInstructPix2PixPipeline.py +++ b/examples/huggingface/pytorch/text-to-image/deployment/stable_diffusion/ITREX_StableDiffusionInstructPix2PixPipeline.py @@ -14,7 +14,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Pipeline Modificaiton based from the diffusers 0.12.1 StableDiffusionInstructPix2PixPipeline""" +"""Pipeline Modification based from the diffusers 0.12.1 StableDiffusionInstructPix2PixPipeline""" import inspect from typing import Callable, List, Optional, Union diff --git a/examples/huggingface/pytorch/text-to-image/deployment/stable_diffusion/README.md b/examples/huggingface/pytorch/text-to-image/deployment/stable_diffusion/README.md index ade21d9086b..9a5c95bb271 100644 --- a/examples/huggingface/pytorch/text-to-image/deployment/stable_diffusion/README.md +++ b/examples/huggingface/pytorch/text-to-image/deployment/stable_diffusion/README.md @@ -137,7 +137,7 @@ python run_executor.py --ir_path=./qat_int8_ir --mode=latency --input_model=runw ## 3. Accuracy Frechet Inception Distance(FID) metric is used to evaluate the accuracy. This case we check the FID scores between the pytorch image and engine image. -By setting --accuracy to check FID socre. +By setting --accuracy to check FID score. Python API command as follows: ```python # FP32 IR diff --git a/examples/huggingface/pytorch/text-to-image/deployment/stable_diffusion/diffusion_utils_img2img.py b/examples/huggingface/pytorch/text-to-image/deployment/stable_diffusion/diffusion_utils_img2img.py index e464b07acef..4f6a50c9b81 100644 --- a/examples/huggingface/pytorch/text-to-image/deployment/stable_diffusion/diffusion_utils_img2img.py +++ b/examples/huggingface/pytorch/text-to-image/deployment/stable_diffusion/diffusion_utils_img2img.py @@ -14,7 +14,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Pipeline Modificaiton based from the diffusers 0.12.1 StableDiffusionImg2ImgPipeline""" +"""Pipeline Modification based from the diffusers 0.12.1 StableDiffusionImg2ImgPipeline""" import inspect from typing import Callable, List, Optional, Union diff --git a/intel_extension_for_transformers/neural_chat/docs/notebooks/build_chatbot_on_xpu.ipynb b/intel_extension_for_transformers/neural_chat/docs/notebooks/build_chatbot_on_xpu.ipynb index ea8e17c4616..d08bf0b3e1a 100644 --- a/intel_extension_for_transformers/neural_chat/docs/notebooks/build_chatbot_on_xpu.ipynb +++ b/intel_extension_for_transformers/neural_chat/docs/notebooks/build_chatbot_on_xpu.ipynb @@ -77,7 +77,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Install requirements that have denpendency on stock pytorch" + "Install requirements that have dependency on stock pytorch" ] }, { diff --git a/intel_extension_for_transformers/neural_chat/docs/notebooks/deploy_chatbot_on_xpu.ipynb b/intel_extension_for_transformers/neural_chat/docs/notebooks/deploy_chatbot_on_xpu.ipynb index 3e69827d59b..53b6c8a7757 100644 --- a/intel_extension_for_transformers/neural_chat/docs/notebooks/deploy_chatbot_on_xpu.ipynb +++ b/intel_extension_for_transformers/neural_chat/docs/notebooks/deploy_chatbot_on_xpu.ipynb @@ -69,7 +69,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Install requirements that have denpendency on stock pytorch" + "Install requirements that have dependency on stock pytorch" ] }, { diff --git a/intel_extension_for_transformers/neural_chat/examples/deployment/photo_ai/backend/README.md b/intel_extension_for_transformers/neural_chat/examples/deployment/photo_ai/backend/README.md index 19a8ef57564..4a95a01541c 100644 --- a/intel_extension_for_transformers/neural_chat/examples/deployment/photo_ai/backend/README.md +++ b/intel_extension_for_transformers/neural_chat/examples/deployment/photo_ai/backend/README.md @@ -75,7 +75,7 @@ mkdir /home/nfs_images export IMAGE_SERVER_IP="your.server.ip" ``` -# Configurate photoai.yaml +# Configure photoai.yaml You can customize the configuration file `photoai.yaml` to match your environment setup. Here's a table to help you understand the configurable options: @@ -91,9 +91,9 @@ You can customize the configuration file `photoai.yaml` to match your environmen | tasks_list | ['voicechat', 'photoai'] | -# Configurate Environment Variables +# Configure Environment Variables -Configurate all of the environment variables in file `run.sh` using `export XXX=xxx`. Here's a table of all the variables needed to configurate. +Configure all of the environment variables in file `run.sh` using `export XXX=xxx`. Here's a table of all the variables needed to configure. | Variable | Value | | ------------------- | ---------------------------------------| diff --git a/intel_extension_for_transformers/neural_chat/examples/finetuning/multi_modal/eval/mmmu_eval/main_eval_only.py b/intel_extension_for_transformers/neural_chat/examples/finetuning/multi_modal/eval/mmmu_eval/main_eval_only.py index f5e46a0f574..ca7fd0b3232 100644 --- a/intel_extension_for_transformers/neural_chat/examples/finetuning/multi_modal/eval/mmmu_eval/main_eval_only.py +++ b/intel_extension_for_transformers/neural_chat/examples/finetuning/multi_modal/eval/mmmu_eval/main_eval_only.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Parse and Evalate.""" +"""Parse and Evaluate.""" import os import json diff --git a/intel_extension_for_transformers/neural_chat/examples/finetuning/multi_modal/eval/mmmu_eval/main_parse_and_eval.py b/intel_extension_for_transformers/neural_chat/examples/finetuning/multi_modal/eval/mmmu_eval/main_parse_and_eval.py index 9203cedc638..adac92d6afb 100644 --- a/intel_extension_for_transformers/neural_chat/examples/finetuning/multi_modal/eval/mmmu_eval/main_parse_and_eval.py +++ b/intel_extension_for_transformers/neural_chat/examples/finetuning/multi_modal/eval/mmmu_eval/main_parse_and_eval.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Parse and Evalate.""" +"""Parse and Evaluate.""" import os import json import shlex diff --git a/intel_extension_for_transformers/neural_chat/pipeline/plugins/image2image/instructpix2pix_pipeline.py b/intel_extension_for_transformers/neural_chat/pipeline/plugins/image2image/instructpix2pix_pipeline.py index fa25db5e459..27ac3c94f99 100644 --- a/intel_extension_for_transformers/neural_chat/pipeline/plugins/image2image/instructpix2pix_pipeline.py +++ b/intel_extension_for_transformers/neural_chat/pipeline/plugins/image2image/instructpix2pix_pipeline.py @@ -14,7 +14,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Pipeline Modificaiton based from the diffusers 0.12.1 StableDiffusionInstructPix2PixPipeline.""" +"""Pipeline Modification based from the diffusers 0.12.1 StableDiffusionInstructPix2PixPipeline.""" import inspect from typing import Callable, List, Optional, Union diff --git a/intel_extension_for_transformers/transformers/runtime/compile/graph_utils.py b/intel_extension_for_transformers/transformers/runtime/compile/graph_utils.py index 74ffc80979d..83ee88265f8 100644 --- a/intel_extension_for_transformers/transformers/runtime/compile/graph_utils.py +++ b/intel_extension_for_transformers/transformers/runtime/compile/graph_utils.py @@ -140,7 +140,7 @@ def get_environ_info(): def search_straight_pattern(input_pattern, graph): - """Search user specified patterns on internal grpah structure. + """Search user specified patterns on internal graph structure. Attention: the input computation chain in the graph which can be called pattern, there must be straight (or sequence). It means it has not any subgraph nodes. Otherwise this diff --git a/intel_extension_for_transformers/transformers/runtime/compile/onnx_utils.py b/intel_extension_for_transformers/transformers/runtime/compile/onnx_utils.py index 93f0527baa1..7f7d22d3363 100644 --- a/intel_extension_for_transformers/transformers/runtime/compile/onnx_utils.py +++ b/intel_extension_for_transformers/transformers/runtime/compile/onnx_utils.py @@ -73,7 +73,7 @@ def get_initializer_children_names(model, initializer): def graph_node_names_details(model): """Parse the graph nodes ans get the graph_nodes_dict. - Be used for Grpah class with creating a new graph. + Be used for Graph class with creating a new graph. The node_name is the key, node in value is for getting the Const tensor value and the input_tensor source op; output_names in value is the node output name list; outputs in value is for output_tensor dest op @@ -155,7 +155,7 @@ def bias_to_int32(bias_node, a_scale, b_scale): bias_node: bias_add in graph (from onnx framework) a_scale: matmul node input matrice a scale tensor b_scale: matmul node input matrice b scale tensor - model: Grpah class + model: Graph class Returns: int32 bias numpy array diff --git a/intel_extension_for_transformers/transformers/runtime/compile/tf_utils.py b/intel_extension_for_transformers/transformers/runtime/compile/tf_utils.py index 237b564815b..b9b21de475c 100644 --- a/intel_extension_for_transformers/transformers/runtime/compile/tf_utils.py +++ b/intel_extension_for_transformers/transformers/runtime/compile/tf_utils.py @@ -48,7 +48,7 @@ def create_tf_node(op, name, inputs): def graph_node_names_details(nodes): """Parse the graph nodes ans get the graph_nodes_dict. - Be used for Grpah class when converting a tensorflow computation graph to an engine graph. + Be used for Graph class when converting a tensorflow computation graph to an engine graph. The node_name is the key, node in value is for getting the Const tensor value and the input_tensor source op; outputs in value is for output_tensor dest op. diff --git a/intel_extension_for_transformers/transformers/runtime/executor/src/operators/cossin.cpp b/intel_extension_for_transformers/transformers/runtime/executor/src/operators/cossin.cpp index b0f2a7ddf22..5a2fad2ba5d 100644 --- a/intel_extension_for_transformers/transformers/runtime/executor/src/operators/cossin.cpp +++ b/intel_extension_for_transformers/transformers/runtime/executor/src/operators/cossin.cpp @@ -68,7 +68,7 @@ PI32_CONST256(inv_mant_mask, ~0x7f800000); PI32_CONST256(0x7f, 0x7f); -// evaluation of 8 sines at once using AVX intrisics +// evaluation of 8 sines at once using AVX intrinsics __m256 sinf(__m256 x) { __m256 sign_bit = x; // take the absolute value diff --git a/workflows/chatbot/demo/basic_frontend/fastchat/eval/table/answer/answer_vicuna-13b.jsonl b/workflows/chatbot/demo/basic_frontend/fastchat/eval/table/answer/answer_vicuna-13b.jsonl index 872943cecae..a57ed5c8c8c 100644 --- a/workflows/chatbot/demo/basic_frontend/fastchat/eval/table/answer/answer_vicuna-13b.jsonl +++ b/workflows/chatbot/demo/basic_frontend/fastchat/eval/table/answer/answer_vicuna-13b.jsonl @@ -5,7 +5,7 @@ {"answer_id": "UMZod8JaWia9KB2EVXdYrF", "model_id": "vicuna-13b:20230322-clean-lang", "question_id": 5, "text": "Quantum computing is a type of computing that uses quantum-mechanical phenomena, such as superposition and entanglement, to perform operations on data. Unlike classical computers, which use binary digits (bits) that can only be in one of two states (0 or 1), quantum computers use quantum bits (qubits) that can exist in multiple states simultaneously. This allows quantum computers to perform certain types of calculations much faster than classical computers.\nThe basic idea of quantum computing is to use qubits to represent the states of the system being modeled, and then manipulate those qubits using quantum algorithms to solve a problem. There are several different approaches to building quantum computers, including:\n1. Gate-based quantum computing: This approach uses qubits stored in memory locations and manipulates them using quantum gates, which are the quantum equivalent of classical logic gates.\n2. Topological quantum computing: This approach uses qubits that are linked by quantum connections, and manipulates them using topological quantum operations.\n3. Adiabatic quantum computing: This approach uses a quantum circuit that evolves gradually over time, and manipulates the qubits using quantum gates at specific points in the evolution.\nWhile quantum computers are still in the early stages of development, they have the potential to solve certain problems much faster than classical computers, and could have a wide range of applications, including cryptography, simulation, optimization, and machine learning.", "metadata": {"huggingface_argument": {"do_sample": true, "temperature": 0.7, "max_new_tokens": 1024}}} {"answer_id": "WXRCqF34f4UUJzd3xbgAqT", "model_id": "vicuna-13b:20230322-clean-lang", "question_id": 6, "text": "Plant-based protein sources are derived from plant-based foods, such as legumes, grains, nuts, and seeds, while animal-based protein sources are derived from animals, such as meat, dairy, and eggs. Here are some key differences between the two:\n1. Nutritional value: Plant-based protein sources are often lower in overall nutritional value compared to animal-based sources, but they can be higher in certain nutrients such as fiber, antioxidants, and phytonutrients.\n2. Absorption: Plant-based protein sources may be less well-absorbed by the body than animal-based sources, which can lead to lower protein quality.\n3. Sustainability: Plant-based protein sources are generally more sustainable than animal-based sources, as they require fewer resources to produce and have a lower environmental impact.\n4. Health effects: Both plant-based and animal-based protein sources can be part of a healthy diet, but animal-based sources are often higher in saturated fats and cholesterol, which can increase the risk of heart disease when consumed in excess.\n5. Ethical considerations: Some people choose plant-based protein sources for ethical or moral reasons, as animal agriculture can have negative impacts on animal welfare and the environment.\n6. Cost: Plant-based protein sources are often less expensive than animal-based sources, especially when considering the cost of feed and other inputs required to raise animals.", "metadata": {"huggingface_argument": {"do_sample": true, "temperature": 0.7, "max_new_tokens": 1024}}} {"answer_id": "JREJbG5ZKXCNMoWoiJQxbC", "model_id": "vicuna-13b:20230322-clean-lang", "question_id": 7, "text": "Developing your critical thinking skills can help you to better analyze information, make more informed decisions, and solve complex problems. Here are some tips for improving your critical thinking skills:\n1. Practice active listening: Pay attention to what others are saying and try to understand their perspective.\n2. Ask questions: Be curious and ask questions to clarify information and better understand a situation.\n3. Analyze information: Take time to carefully analyze information and consider different viewpoints.\n4. Seek out diverse viewpoints: Expose yourself to a variety of viewpoints and ideas to challenge your own assumptions and biases.\n5. Practice logic and reasoning: Use logic and reasoning to evaluate arguments and make decisions.\n6. Learn from your mistakes: Be open to learning from your mistakes and using them as opportunities for growth.\n7. Read and watch a variety of sources: Read and watch a variety of sources to expand your knowledge and expose yourself to different perspectives.\n8. Engage in debates and discussions: Engage in debates and discussions with others to practice critical thinking and develop your skills.\n9. Take breaks and reflect: Take breaks and reflect on your thinking process to improve your critical thinking skills.\n10. Practice mindfulness: Mindfulness can help you to be more aware of your thoughts and biases, which can help you to think more critically.", "metadata": {"huggingface_argument": {"do_sample": true, "temperature": 0.7, "max_new_tokens": 1024}}} -{"answer_id": "mmVwmX6TGJ2Y72gCNac4EQ", "model_id": "vicuna-13b:20230322-clean-lang", "question_id": 8, "text": "The education sector faces a number of challenges today, including:\n\n1. Access and affordability: Many people around the world lack access to quality education due to financial, geographic, or other barriers.\n2. Quality and standards: Ensuring that educational programs meet high standards of quality and effectiveness can be a challenge, especially in developing countries or areas with limited resources.\n3. Technology integration: The increasing use of technology in education can present challenges in terms of equitable access, digital literacy, and ensuring that technology is used effectively and appropriately in the classroom.\n4. Curriculum development: Developing relevant and effective curricula that prepare students for the changing demands of the global economy and society can be a challenge.\n5. Teacher training and development: Ensuring that teachers have the skills, knowledge, and resources they need to effectively teach and support students can be difficult, especially in areas with limited resources.\n6. Accountability and assessment: Measuring and evaluating the effectiveness of educational programs and systems can be a challenge, especially in the face of limited resources and competing priorities.\n7. Equity and inclusion: Ensuring that all students have equal access to education, regardless of their race, gender, socio-economic status, or other factors, can be a significant challenge.\n8. Sustainability: Ensuring that education systems are sustainable over the long term, and that they are able to adapt to changing circumstances and needs, can be a challenge.", "metadata": {"huggingface_argument": {"do_sample": true, "temperature": 0.7, "max_new_tokens": 1024}}} +{"answer_id": "mmVwmX6TGJ2Y72gCNac4EQ", "model_id": "vicuna-13b:20230322-clean-lang", "question_id": 8, "text": "The education sector faces a number of challenges today, including:\n\n1. Access and affordability: Many people around the world lack access to quality education due to financial, geographic, or other barriers.\n2. Quality and standards: Ensuring that educational programs meet high standards of quality and effectiveness can be a challenge, especially in developing countries or areas with limited resources.\n3. Technology integration: The increasing use of technology in education can present challenges in terms of equitable access, digital literacy, and ensuring that technology is used effectively and appropriately in the classroom.\n4. Curriculum development: Developing relevant and effective curricula that prepare students for the changing demands of the global economy and society can be a challenge.\n5. Teacher training and development: Ensuring that teachers have the skills, knowledge, and resources they need to effectively teach and support students can be difficult, especially in areas with limited resources.\n6. Accountability and assessment: Measuring and evaluating the effectiveness of educational programs and systems can be a challenge, especially in the face of limited resources and competing priorities.\n7. Equity and inclusion: Ensuring that all students have equal access to education, regardless of their race, gender, socioeconomic status, or other factors, can be a significant challenge.\n8. Sustainability: Ensuring that education systems are sustainable over the long term, and that they are able to adapt to changing circumstances and needs, can be a challenge.", "metadata": {"huggingface_argument": {"do_sample": true, "temperature": 0.7, "max_new_tokens": 1024}}} {"answer_id": "DMTZyzd4rRAFV43xtBJ9ns", "model_id": "vicuna-13b:20230322-clean-lang", "question_id": 9, "text": "There are several primary factors that can influence consumer behavior, including:\n\n1. Personal factors: These include individual characteristics such as age, gender, education, income, personality, and values.\n2. Psychological factors: These include emotional, cognitive, and perceptual factors that can influence how a consumer perceives and processes information about products and services.\n3. Social factors: These include cultural, social, and environmental factors that can affect how consumers view and use products and services.\n4. Economic factors: These include factors such as the price of a product or service, the availability of alternative products or services, and the consumer's purchasing power.\n5. Marketing factors: These include the way a product or service is marketed, including advertising, packaging, and distribution.\n6. Product and service factors: These include the quality, features, and benefits of a product or service, as well as its design, performance, and warranty.\n\nUnderstanding these factors can help businesses and organizations develop effective marketing strategies and tailor their products and services to meet the needs and preferences of their target audience.", "metadata": {"huggingface_argument": {"do_sample": true, "temperature": 0.7, "max_new_tokens": 1024}}} {"answer_id": "dETAsj4xHnUCSTkZezz8aM", "model_id": "vicuna-13b:20230322-clean-lang", "question_id": 10, "text": "Conflict resolution in the workplace is the process of addressing and resolving disagreements or conflicts between employees or between employees and management. Here are some effective strategies for conflict resolution in the workplace:\n1. Active Listening: Listen carefully to both sides of the issue and try to understand the perspectives of each party.\n2. Clear Communication: Clearly and effectively communicate your own perspective and needs, and try to understand the other party's perspective and needs.\n3. Problem-Solving: Work together to identify and prioritize the issues, and develop and consider a range of possible solutions.\n4. Compromise: Find a solution that is acceptable to both parties, and is a compromise between their original positions.\n5. Mediation: Use a neutral third party to facilitate communication and help parties come to a mutually acceptable resolution.\n6. Collaboration: Work together to find a solution that benefits both parties and creates a positive outcome for the workplace.\n7. Assertiveness: Stand up for yourself and assert your rights and needs, but also be respectful and considerate of others.\n8. Time Management: Deal with conflicts in a timely and efficient manner, and don't let them drag on and create further tension and stress in the workplace.", "metadata": {"huggingface_argument": {"do_sample": true, "temperature": 0.7, "max_new_tokens": 1024}}} {"answer_id": "C8ksZxg3LshMUWiLxPanbt", "model_id": "vicuna-13b:20230322-clean-lang", "question_id": 11, "text": "Using a single-use plastic bottle versus a reusable bottle can have significant implications on both the environment and human health. Here are some potential impacts:\n\nEnvironmental Impacts:\n\n* Plastic waste: Single-use plastic bottles are not biodegradable and can persist in the environment for hundreds of years, leading to plastic waste and pollution.\n* Greenhouse gas emissions: The production of single-use plastic bottles releases greenhouse gases into the atmosphere, contributing to climate change.\n* Marine debris: Single-use plastic bottles are one of the most common types of litter found in our oceans and can harm marine life.\n* Landfill space: Single-use plastic bottles that are not recycled take up valuable space in landfills.\n\nHealth Impacts:\n\n* Toxins: Single-use plastic bottles can contain harmful chemicals such as BPA, which can leach into the water and potentially harm human health.\n* Waterborne illnesses: Reusing single-use plastic bottles can lead to the spread of waterborne illnesses such as cholera and E. coli.\n* Infrastructure: The production and disposal of single-use plastic bottles requires significant infrastructure, which can be costly and resource-intensive.\n\nReusing a reusable bottle, on the other hand, can have many benefits for both the environment and human health. Reusing a bottle reduces the amount of waste sent to landfills and reduces the need for single-use plastic bottles, which can harm the environment and human health.", "metadata": {"huggingface_argument": {"do_sample": true, "temperature": 0.7, "max_new_tokens": 1024}}} diff --git a/workflows/chatbot/demo/basic_frontend/fastchat/serve/inference.py b/workflows/chatbot/demo/basic_frontend/fastchat/serve/inference.py index f58013617b9..bb7f7804823 100644 --- a/workflows/chatbot/demo/basic_frontend/fastchat/serve/inference.py +++ b/workflows/chatbot/demo/basic_frontend/fastchat/serve/inference.py @@ -65,7 +65,7 @@ def raise_warning_for_old_weights(model_path, model): "current fschat.\nYou can try one of the following methods:\n" "1. Upgrade your weights to the new Vicuna-v1.1: https://github.com/lm-sys/FastChat#vicuna-weights.\n" "2. Use the old conversation template by `python3 -m fastchat.serve.cli --model-path /path/to/vicuna-v0 --conv-template conv_one_shot`\n" - "3. Downgrade fschat to fschat==0.1.10 (Not recommonded).\n" + "3. Downgrade fschat to fschat==0.1.10 (Not recommended).\n" ) From 6ab9105fb8beaae27e3619d972743d16c122abbe Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Wed, 3 Jul 2024 11:21:31 +0800 Subject: [PATCH 3/6] fix typo Signed-off-by: Sun, Xuehao --- .github/workflows/script/formatScan/nlp_dict.txt | 1 + .../deployment/squad/MLperf_example/csrc/bert_qsl.cpp | 2 +- .../deployment/squad/MLperf_example/utils_qa.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/script/formatScan/nlp_dict.txt b/.github/workflows/script/formatScan/nlp_dict.txt index 5f2505c1d0e..4bca6dbc47f 100644 --- a/.github/workflows/script/formatScan/nlp_dict.txt +++ b/.github/workflows/script/formatScan/nlp_dict.txt @@ -23,3 +23,4 @@ te tye ue wya +assertIn \ No newline at end of file diff --git a/examples/huggingface/pytorch/question-answering/deployment/squad/MLperf_example/csrc/bert_qsl.cpp b/examples/huggingface/pytorch/question-answering/deployment/squad/MLperf_example/csrc/bert_qsl.cpp index d808590ec15..2a43c9b51f5 100644 --- a/examples/huggingface/pytorch/question-answering/deployment/squad/MLperf_example/csrc/bert_qsl.cpp +++ b/examples/huggingface/pytorch/question-answering/deployment/squad/MLperf_example/csrc/bert_qsl.cpp @@ -74,7 +74,7 @@ namespace qsl { } } - // Splice them togather + // Splice them together Queue_t result; for (auto& q : Buckets) result.splice(result.end(), std::move(q)); diff --git a/examples/huggingface/pytorch/question-answering/deployment/squad/MLperf_example/utils_qa.py b/examples/huggingface/pytorch/question-answering/deployment/squad/MLperf_example/utils_qa.py index b65695b0108..6553dae0896 100644 --- a/examples/huggingface/pytorch/question-answering/deployment/squad/MLperf_example/utils_qa.py +++ b/examples/huggingface/pytorch/question-answering/deployment/squad/MLperf_example/utils_qa.py @@ -295,7 +295,7 @@ def postprocess_qa_predictions_with_beam_search( assert len(predictions[0]) == len( features - ), f"Got {len(predictions[0])} predicitions and {len(features)} features." + ), f"Got {len(predictions[0])} predictions and {len(features)} features." # Build a map example to its corresponding features. example_id_to_index = {k: i for i, k in enumerate(examples["id"])} From 42c5fed546c47bb921629d4a4311c87eec13ebd4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 03:24:56 +0000 Subject: [PATCH 4/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/script/formatScan/nlp_dict.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/script/formatScan/nlp_dict.txt b/.github/workflows/script/formatScan/nlp_dict.txt index 4bca6dbc47f..e7a0cbf0062 100644 --- a/.github/workflows/script/formatScan/nlp_dict.txt +++ b/.github/workflows/script/formatScan/nlp_dict.txt @@ -1,5 +1,6 @@ alse ans +assertIn bu charactor daa @@ -23,4 +24,3 @@ te tye ue wya -assertIn \ No newline at end of file From 6c8f1b60392db36752aabdf85ef7195b1f3832a5 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Wed, 3 Jul 2024 11:25:10 +0800 Subject: [PATCH 5/6] remove check Signed-off-by: Sun, Xuehao --- .github/checkgroup.yml | 74 +++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/checkgroup.yml b/.github/checkgroup.yml index 4ac0920c729..8ad771fc897 100644 --- a/.github/checkgroup.yml +++ b/.github/checkgroup.yml @@ -65,18 +65,18 @@ subprojects: - "engine-unit-test-PR-test" - "Genreate-Engine-Report" - - id: "Windows Binary Test" - paths: - - ".github/workflows/windows-test.yml" - - "requirements.txt" - - "setup.py" - - "intel_extension_for_transformers/transformers/runtime/**" - - "intel_extension_for_transformers/transformers/llm/operator/**" - - "!intel_extension_for_transformers/transformers/runtime/third_party/**" - - "!intel_extension_for_transformers/transformers/runtime/docs/**" - - "!intel_extension_for_transformers/transformers/runtime/test/**" - checks: - - "Windows-Binary-Test" + # - id: "Windows Binary Test" + # paths: + # - ".github/workflows/windows-test.yml" + # - "requirements.txt" + # - "setup.py" + # - "intel_extension_for_transformers/transformers/runtime/**" + # - "intel_extension_for_transformers/transformers/llm/operator/**" + # - "!intel_extension_for_transformers/transformers/runtime/third_party/**" + # - "!intel_extension_for_transformers/transformers/runtime/docs/**" + # - "!intel_extension_for_transformers/transformers/runtime/test/**" + # checks: + # - "Windows-Binary-Test" - id: "LLM Model Test workflow" paths: @@ -91,28 +91,28 @@ subprojects: - "LLM-Workflow (gpt-j-6b, engine, latency, bf16,int8,fp8)" - "Generate-LLM-Report" - - id: "Chat Bot Test workflow" - paths: - - ".github/workflows/chatbot-test.yml" - - ".github/workflows/chatbot-inference-llama-2-7b-chat-hf.yml" - - ".github/workflows/chatbot-inference-mpt-7b-chat.yml" - - ".github/workflows/chatbot-finetune-mpt-7b-chat.yml" - - ".github/workflows/chatbot-inference-llama-2-7b-chat-hf-hpu.yml" - - ".github/workflows/chatbot-inference-mpt-7b-chat-hpu.yml" - - ".github/workflows/chatbot-finetune-mpt-7b-chat-hpu.yml" - - ".github/workflows/script/chatbot/**" - - ".github/workflows/sample_data/**" - - "intel_extension_for_transformers/neural_chat/**" - - "intel_extension_for_transformers/transformers/llm/finetuning/**" - - "intel_extension_for_transformers/transformers/llm/quantization/**" - - "intel_extension_for_transformers/transformers/**" - - "workflows/chatbot/inference/**" - - "workflows/chatbot/fine_tuning/**" - - "!intel_extension_for_transformers/neural_chat/docs/**" - - "!intel_extension_for_transformers/neural_chat/tests/ci/**" - - "!intel_extension_for_transformers/neural_chat/examples/**" - - "!intel_extension_for_transformers/neural_chat/assets/**" - - "!intel_extension_for_transformers/neural_chat/README.md" - checks: - - "call-inference-llama-2-7b-chat-hf / inference test" - - "call-inference-mpt-7b-chat / inference test" + # - id: "Chat Bot Test workflow" + # paths: + # - ".github/workflows/chatbot-test.yml" + # - ".github/workflows/chatbot-inference-llama-2-7b-chat-hf.yml" + # - ".github/workflows/chatbot-inference-mpt-7b-chat.yml" + # - ".github/workflows/chatbot-finetune-mpt-7b-chat.yml" + # - ".github/workflows/chatbot-inference-llama-2-7b-chat-hf-hpu.yml" + # - ".github/workflows/chatbot-inference-mpt-7b-chat-hpu.yml" + # - ".github/workflows/chatbot-finetune-mpt-7b-chat-hpu.yml" + # - ".github/workflows/script/chatbot/**" + # - ".github/workflows/sample_data/**" + # - "intel_extension_for_transformers/neural_chat/**" + # - "intel_extension_for_transformers/transformers/llm/finetuning/**" + # - "intel_extension_for_transformers/transformers/llm/quantization/**" + # - "intel_extension_for_transformers/transformers/**" + # - "workflows/chatbot/inference/**" + # - "workflows/chatbot/fine_tuning/**" + # - "!intel_extension_for_transformers/neural_chat/docs/**" + # - "!intel_extension_for_transformers/neural_chat/tests/ci/**" + # - "!intel_extension_for_transformers/neural_chat/examples/**" + # - "!intel_extension_for_transformers/neural_chat/assets/**" + # - "!intel_extension_for_transformers/neural_chat/README.md" + # checks: + # - "call-inference-llama-2-7b-chat-hf / inference test" + # - "call-inference-mpt-7b-chat / inference test" From 241e49a1c5dab8ebddc3be7ff07899507b9b54ac Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Wed, 3 Jul 2024 12:49:37 +0800 Subject: [PATCH 6/6] remove check Signed-off-by: Sun, Xuehao --- .github/checkgroup.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/checkgroup.yml b/.github/checkgroup.yml index 8ad771fc897..57c7ab30a60 100644 --- a/.github/checkgroup.yml +++ b/.github/checkgroup.yml @@ -78,18 +78,18 @@ subprojects: # checks: # - "Windows-Binary-Test" - - id: "LLM Model Test workflow" - paths: - - ".github/workflows/llm-test.yml" - - ".github/workflows/script/models/run_llm.sh" - - "intel_extension_for_transformers/transformers/runtime/**" - - "!intel_extension_for_transformers/transformers/runtime/kernels/**" - - "!intel_extension_for_transformers/transformers/runtime/test/**" - - "!intel_extension_for_transformers/transformers/runtime/third_party/**" - - "!intel_extension_for_transformers/transformers/runtime/docs/**" - checks: - - "LLM-Workflow (gpt-j-6b, engine, latency, bf16,int8,fp8)" - - "Generate-LLM-Report" + # - id: "LLM Model Test workflow" + # paths: + # - ".github/workflows/llm-test.yml" + # - ".github/workflows/script/models/run_llm.sh" + # - "intel_extension_for_transformers/transformers/runtime/**" + # - "!intel_extension_for_transformers/transformers/runtime/kernels/**" + # - "!intel_extension_for_transformers/transformers/runtime/test/**" + # - "!intel_extension_for_transformers/transformers/runtime/third_party/**" + # - "!intel_extension_for_transformers/transformers/runtime/docs/**" + # checks: + # - "LLM-Workflow (gpt-j-6b, engine, latency, bf16,int8,fp8)" + # - "Generate-LLM-Report" # - id: "Chat Bot Test workflow" # paths: