Home

Awesome

<div align="center">

Intelยฎ Extension for PyTorch*

</div>

CPU ๐Ÿ’ปmain branchย ย ย |ย ย ย ๐ŸŒฑQuick Startย ย ย |ย ย ย ๐Ÿ“–Documentationsย ย ย |ย ย ย ๐ŸƒInstallationย ย ย |ย ย ย ๐Ÿ’ปLLM Example <br> GPU ๐Ÿ’ปmain branchย ย ย |ย ย ย ๐ŸŒฑQuick Startย ย ย |ย ย ย ๐Ÿ“–Documentationsย ย ย |ย ย ย ๐ŸƒInstallationย ย ย |ย ย ย ๐Ÿ’ปLLM Example<br>

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 X<sup>e</sup> 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 for details.

Optimized Model List

MODEL FAMILYMODEL NAME (Huggingface hub)FP32BF16Static quantization INT8Weight only quantization INT8Weight only quantization INT4
LLAMAmeta-llama/Llama-2-7b-hf๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
LLAMAmeta-llama/Llama-2-13b-hf๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
LLAMAmeta-llama/Llama-2-70b-hf๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
LLAMAmeta-llama/Meta-Llama-3-8B๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
LLAMAmeta-llama/Meta-Llama-3-70B๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
LLAMAmeta-llama/Meta-Llama-3.1-8B-Instruct๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
LLAMAmeta-llama/Llama-3.2-3B-Instruct๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
LLAMAmeta-llama/Llama-3.2-11B-Vision-Instruct๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
GPT-JEleutherAI/gpt-j-6b๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
GPT-NEOXEleutherAI/gpt-neox-20b๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
DOLLYdatabricks/dolly-v2-12b๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
FALCONtiiuae/falcon-7b๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
FALCONtiiuae/falcon-11b๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
FALCONtiiuae/falcon-40b๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
OPTfacebook/opt-30b๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
OPTfacebook/opt-1.3b๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
Bloombigscience/bloom-1b7๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
CodeGenSalesforce/codegen-2B-multi๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
Baichuanbaichuan-inc/Baichuan2-7B-Chat๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
Baichuanbaichuan-inc/Baichuan2-13B-Chat๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
Baichuanbaichuan-inc/Baichuan-13B-Chat๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
ChatGLMTHUDM/chatglm3-6b๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
ChatGLMTHUDM/chatglm2-6b๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
GPTBigCodebigcode/starcoder๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
T5google/flan-t5-xl๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
MPTmosaicml/mpt-7b๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
Mistralmistralai/Mistral-7B-v0.1๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
Mixtralmistralai/Mixtral-8x7B-v0.1๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
Stablelmstabilityai/stablelm-2-1_6b๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
QwenQwen/Qwen-7B-Chat๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
QwenQwen/Qwen2-7B๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
LLaVAliuhaotian/llava-v1.5-7b๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
GITmicrosoft/git-base๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
YuanIEITYuan/Yuan2-102B-hf๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
Phimicrosoft/phi-2๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
Phimicrosoft/Phi-3-mini-4k-instruct๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
Phimicrosoft/Phi-3-mini-128k-instruct๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
Phimicrosoft/Phi-3-medium-4k-instruct๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
Phimicrosoft/Phi-3-medium-128k-instruct๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ
Whisperopenai/whisper-large-v2๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ๐ŸŸฉ

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 to better understand how to optimize your own LLM and achieve better performance.

Support

The team tracks bugs and enhancement requests using GitHub 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 file.

Security

See Intel's Security Center for information on how to report a potential security issue or vulnerability.

See also: Security Policy