Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/intel/intel-extension-for-pytorch
A Python package for extending the official PyTorch that can easily obtain performance on Intel platform
https://github.com/intel/intel-extension-for-pytorch
deep-learning intel machine-learning neural-network pytorch quantization
Last synced: 19 days ago
JSON representation
A Python package for extending the official PyTorch that can easily obtain performance on Intel platform
- Host: GitHub
- URL: https://github.com/intel/intel-extension-for-pytorch
- Owner: intel
- License: apache-2.0
- Created: 2020-04-15T23:35:29.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T09:38:44.000Z (7 months ago)
- Last Synced: 2024-04-14T02:19:18.067Z (7 months ago)
- Topics: deep-learning, intel, machine-learning, neural-network, pytorch, quantization
- Language: Python
- Homepage:
- Size: 92.1 MB
- Stars: 1,316
- Watchers: 34
- Forks: 193
- Open Issues: 219
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-oneapi - intel-extension-for-pytorch - Intel Extension for PyTorch provides features optimizations for an extra performance boost on Intel hardware including CPUs and Discrete GPUs and offers easy GPU acceleration for Intel Discrete GPUs with PyTorch. (Table of Contents / AI - Frameworks and Toolkits)
- awesome - intel/intel-extension-for-pytorch - A Python package for extending the official PyTorch that can easily obtain performance on Intel platform (Python)
README
Intelยฎ Extension for PyTorch\*
===========================**CPU** [๐ปmain branch](https://github.com/intel/intel-extension-for-pytorch/tree/main)ย ย ย |ย ย ย [๐ฑQuick Start](https://intel.github.io/intel-extension-for-pytorch/cpu/latest/tutorials/getting_started.html)ย ย ย |ย ย ย [๐Documentations](https://intel.github.io/intel-extension-for-pytorch/cpu/latest/)ย ย ย |ย ย ย [๐Installation](https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=cpu&version=v2.4.0%2Bcpu)ย ย ย |ย ย ย [๐ปLLM Example](https://github.com/intel/intel-extension-for-pytorch/tree/main/examples/cpu/llm)
**GPU** [๐ปmain branch](https://github.com/intel/intel-extension-for-pytorch/tree/xpu-main)ย ย ย |ย ย ย [๐ฑQuick Start](https://intel.github.io/intel-extension-for-pytorch/xpu/latest/tutorials/getting_started.html)ย ย ย |ย ย ย [๐Documentations](https://intel.github.io/intel-extension-for-pytorch/xpu/latest/)ย ย ย |ย ย ย [๐Installation](https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu)ย ย ย |ย ย ย [๐ปLLM Example](https://github.com/intel/intel-extension-for-pytorch/tree/xpu-main/examples/gpu/llm)
Intelยฎ Extension for PyTorch\* extends PyTorch\* with up-to-date features optimizations for an extra performance boost on Intel hardware. Optimizations take advantage of Intelยฎ Advanced Vector Extensions 512 (Intelยฎ AVX-512) Vector Neural Network Instructions (VNNI) and Intelยฎ Advanced Matrix Extensions (Intelยฎ AMX) on Intel CPUs as well as Intel Xe Matrix Extensions (XMX) AI engines on Intel discrete GPUs. Moreover, Intelยฎ Extension for PyTorch* provides easy GPU acceleration for Intel discrete GPUs through the PyTorch* xpu device.
## ipex.llm - Large Language Models (LLMs) Optimization
In the current technological landscape, Generative AI (GenAI) workloads and models have gained widespread attention and popularity. Large Language Models (LLMs) have emerged as the dominant models driving these GenAI applications. Starting from 2.1.0, specific optimizations for certain LLM models are introduced in the Intelยฎ Extension for PyTorch\*. Check [**LLM optimizations**](./examples/cpu/llm) for details.
### Optimized Model List
| MODEL FAMILY | MODEL NAME (Huggingface hub) | FP32 | BF16 | Static quantization INT8 | Weight only quantization INT8 | Weight only quantization INT4 |
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|LLAMA| meta-llama/Llama-2-7b-hf | ๐ฉ | ๐ฉ | ๐จ | ๐ฉ | ๐จ |
|LLAMA| meta-llama/Llama-2-13b-hf | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ |
|LLAMA| meta-llama/Llama-2-70b-hf | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ |
|LLAMA| meta-llama/Meta-Llama-3-8B | ๐ฉ | ๐ฉ | ๐จ | ๐ฉ | ๐จ |
|LLAMA| meta-llama/Meta-Llama-3-70B | ๐ฉ | ๐ฉ | ๐จ | ๐ฉ | ๐ฉ |
|LLAMA| meta-llama/Meta-Llama-3.1-8B-Instruct | ๐ฉ | ๐ฉ | ๐จ | ๐ฉ | ๐ฉ |
|GPT-J| EleutherAI/gpt-j-6b | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ |
|GPT-NEOX| EleutherAI/gpt-neox-20b | ๐ฉ | ๐จ | ๐จ | ๐ฉ | ๐จ |
|DOLLY| databricks/dolly-v2-12b | ๐ฉ | ๐จ | ๐จ | ๐ฉ | ๐จ |
|FALCON| tiiuae/falcon-7b | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ | |
|FALCON| tiiuae/falcon-11b | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ | ๐จ |
|FALCON| tiiuae/falcon-40b | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ |
|OPT| facebook/opt-30b | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ | ๐จ |
|OPT| facebook/opt-1.3b | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ | ๐จ |
|Bloom| bigscience/bloom-1b7 | ๐ฉ | ๐จ | ๐ฉ | ๐ฉ | ๐จ |
|CodeGen| Salesforce/codegen-2B-multi | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ |
|Baichuan| baichuan-inc/Baichuan2-7B-Chat | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ | ๐จ |
|Baichuan| baichuan-inc/Baichuan2-13B-Chat | ๐ฉ | ๐ฉ | ๐จ | ๐ฉ | ๐จ |
|Baichuan| baichuan-inc/Baichuan-13B-Chat | ๐ฉ | ๐จ | ๐ฉ | ๐ฉ | ๐จ |
|ChatGLM| THUDM/chatglm3-6b | ๐ฉ | ๐ฉ | ๐จ | ๐ฉ | ๐จ |
|ChatGLM| THUDM/chatglm2-6b | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ | ๐จ |
|GPTBigCode| bigcode/starcoder | ๐ฉ | ๐ฉ | ๐จ | ๐ฉ | ๐จ |
|T5| google/flan-t5-xl | ๐ฉ | ๐ฉ | ๐จ | ๐ฉ | |
|MPT| mosaicml/mpt-7b | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ |
|Mistral| mistralai/Mistral-7B-v0.1 | ๐ฉ | ๐ฉ | ๐จ | ๐ฉ | ๐จ |
|Mixtral| mistralai/Mixtral-8x7B-v0.1 | ๐ฉ | ๐ฉ | | ๐ฉ | ๐จ |
|Stablelm| stabilityai/stablelm-2-1_6b | ๐ฉ | ๐ฉ | ๐จ | ๐ฉ | ๐จ |
|Qwen| Qwen/Qwen-7B-Chat | ๐ฉ | ๐ฉ | ๐จ | ๐ฉ | ๐จ |
|Qwen| Qwen/Qwen2-7B | ๐ฉ | ๐ฉ | ๐จ | ๐ฉ | ๐จ |
|LLaVA| liuhaotian/llava-v1.5-7b | ๐ฉ | ๐ฉ | | ๐ฉ | ๐ฉ |
|GIT| microsoft/git-base | ๐ฉ | ๐ฉ | | ๐ฉ | |
|Yuan| IEITYuan/Yuan2-102B-hf | ๐ฉ | ๐ฉ | | ๐จ | |
|Phi| microsoft/phi-2 | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ | ๐จ |
|Phi| microsoft/Phi-3-mini-4k-instruct | ๐ฉ | ๐ฉ | ๐จ | ๐ฉ | ๐จ |
|Phi| microsoft/Phi-3-mini-128k-instruct | ๐ฉ | ๐ฉ | ๐จ | ๐ฉ | ๐จ |
|Phi| microsoft/Phi-3-medium-4k-instruct | ๐ฉ | ๐ฉ | ๐จ | ๐ฉ | ๐จ |
|Phi| microsoft/Phi-3-medium-128k-instruct | ๐ฉ | ๐ฉ | ๐จ | ๐ฉ | ๐จ |
|Whisper| openai/whisper-large-v2 | ๐ฉ | ๐ฉ | ๐ฉ | ๐ฉ | |- ๐ฉ signifies that the model can perform well and with good accuracy (<1% difference as compared with FP32).
- ๐จ signifies that the model can perform well while accuracy may not been in a perfect state (>1% difference as compared with FP32).
*Note*: The above verified models (including other models in the same model family, like "codellama/CodeLlama-7b-hf" from LLAMA family) are well supported with all optimizations like indirect access KV cache, fused ROPE, and customized linear kernels.
We are working in progress to better support the models in the tables with various data types. In addition, more models will be optimized in the future.In addition, Intelยฎ Extension for PyTorch* introduces module level optimization APIs (prototype feature) since release 2.3.0.
The feature provides optimized alternatives for several commonly used LLM modules and functionalities for the optimizations of the niche or customized LLMs.
Please read [**LLM module level optimization practice**](./examples/cpu/inference/python/llm-modeling) to better understand how to optimize your own LLM and achieve better performance.## Support
The team tracks bugs and enhancement requests using [GitHub issues](https://github.com/intel/intel-extension-for-pytorch/issues/). Before submitting a suggestion or bug report, search the existing GitHub issues to see if your issue has already been reported.
## License
_Apache License_, Version _2.0_. As found in [LICENSE](https://github.com/intel/intel-extension-for-pytorch/blob/main/LICENSE) file.
## Security
See Intel's [Security Center](https://www.intel.com/content/www/us/en/security-center/default.html)
for information on how to report a potential security issue or vulnerability.See also: [Security Policy](SECURITY.md)