Skip to content

A Python package for extending the official PyTorch that can easily obtain performance on Intel platform

License

Notifications You must be signed in to change notification settings

intel/intel-extension-for-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b9395c4 ยท Apr 3, 2025
Oct 12, 2024
Mar 4, 2025
Apr 3, 2025
Feb 18, 2025
Mar 12, 2025
Apr 1, 2025
Dec 15, 2023
Apr 3, 2025
Mar 4, 2025
Apr 3, 2025
Dec 1, 2021
Mar 20, 2025
Aug 28, 2024
Nov 15, 2024
Dec 8, 2021
Sep 3, 2021
Sep 3, 2021
Mar 4, 2025
Jan 17, 2023
Mar 7, 2024
Mar 4, 2025
May 11, 2024
Feb 21, 2022
Jun 1, 2024
Jan 17, 2023
Feb 18, 2025
Feb 8, 2022
Mar 25, 2025
Oct 26, 2023
Mar 4, 2025
Nov 8, 2024
Mar 24, 2025

Intelยฎ Extension for PyTorch*

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

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 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 โœ… โœ… โœ… โœ… โœ…
LLAMA meta-llama/Llama-3.2-3B-Instruct โœ… โœ… โœ… โœ… โœ…
LLAMA meta-llama/Llama-3.2-11B-Vision-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 โœ… โœ… โœ… โœ… โœ…
Maira microsoft/maira-2 โœ… โœ… โœ… โœ…
Jamba ai21labs/Jamba-v0.1 โœ… โœ… โœ… โœ…
DeepSeek deepseek-ai/DeepSeek-V2.5-1210 โœ… โœ… โœ… โœ…

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