Update self-speculative readme (#9986)
This commit is contained in:
parent
b27e5a27b9
commit
3bc3d0bbcd
6 changed files with 12 additions and 12 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# BigDL-LLM Speculative Decoding Optimization for Large Language Model on Intel GPUs
|
||||
You can use BigDL-LLM to run almost every Huggingface Transformer models with speculative decoding optimizations on Intel GPUs. This directory contains example scripts to help you quickly get started using BigDL-LLM to run some popular open-source models in the community. Each model has its own dedicated folder, where you can find detailed instructions on how to install and run it.
|
||||
# Self-Speculative Decoding for Large Language Model FP16 Inference using BigDL-LLM on Intel GPUs
|
||||
You can use BigDL-LLM to run FP16 inference for any Huggingface Transformer model with ***self-speculative decoding*** on Intel GPUs. This directory contains example scripts to help you quickly get started to run some popular open-source models using self-speculative decoding. Each model has its own dedicated folder, where you can find detailed instructions on how to install and run it.
|
||||
|
||||
## Verified Hardware Platforms
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Baichuan2
|
||||
In this directory, you will find examples on how you could apply BigDL-LLM speculative decoding optimizations on Baichuan2 models on [Intel GPUs](../README.md). For illustration purposes, we utilize the [baichuan-inc/Baichuan2-7B-Chat](https://huggingface.co/baichuan-inc/Baichuan2-7B-Chat) and [baichuan-inc/Baichuan2-13B-Chat](https://huggingface.co/baichuan-inc/Baichuan2-13B-Chat) as reference Baichuan2 models.
|
||||
In this directory, you will find examples on how you could run Baichuan2 FP16 infernece with self-speculative decoding using BigDL-LLM on [Intel GPUs](../README.md). For illustration purposes, we utilize the [baichuan-inc/Baichuan2-7B-Chat](https://huggingface.co/baichuan-inc/Baichuan2-7B-Chat) and [baichuan-inc/Baichuan2-13B-Chat](https://huggingface.co/baichuan-inc/Baichuan2-13B-Chat) as reference Baichuan2 models.
|
||||
|
||||
## 0. Requirements
|
||||
To run these examples with BigDL-LLM on Intel GPUs, we have some recommended requirements for your machine, please refer to [here](../README.md#recommended-requirements) for more information.
|
||||
|
|
@ -51,4 +51,4 @@ First token latency x.xxxxs
|
|||
折纸的过程看似简单,其实想要做好,还是需要一套很复杂的工艺。以折一支玫瑰花为例,我们可以将整个折纸过程分成三个阶段,即:创建栅格折痕,制作立体基座,完成花瓣修饰。首先是创建栅格折痕:这一步有点像我们折千纸鹤的第一步,即通过对称州依次对折,然后按照长和宽两个维度,依次进行多等分的均匀折叠;最终在两个方向上的折痕会交织成一套完整均匀的小方格拼接图案;这些小方格就组成了类似二维坐标系的参考系统,使得我们在该平面上,通过组合临近折痕的方式从二维小方格上折叠出三维的高台或凹陷,以便于接下来的几座制作过程。需要注意的是,在建立栅格折痕的过程中,可能会出现折叠不对成的情况,这种错误所带来的后果可能是很严重的,就像是蝴蝶效应,一开始只是毫厘之差,最后可能就是天壤之别。然后是制作立体基座:在这一步,我们需要基于栅格折痕折出对称的三维高台或凹陷。从对称性分析不难发现,玫瑰花会有四个周对称的三维高台和配套凹陷。所以,我们可以先折出四分之一的凹陷和高台图案,然后以这四分之一的部分作为摸板,再依次折出其余三个部分的重复图案。值得注意的是,高台的布局不仅要考虑长和宽这两个唯独上的规整衬度和对称分布,还需要同时保证高这个维度上的整齐。与第一阶段的注意事项类似,请处理好三个维度上的所有折角,确保它们符合计划中所要求的那种布局,以免出现三维折叠过程中的蝴蝶效应;为此,我们常常会在折叠第一个四分之一图案的过程中,与成品玫瑰花进行反复比较,以便在第一时间排除掉所有可能的错误。最后一个阶段是完成花瓣修饰。在这个阶段,我们往往强调一个重要名词,叫用心折叠。这里的用心已经不是字面上的认真这个意思,而是指通过我们对于大自然中玫瑰花外型的理解,借助自然的曲线去不断修正花瓣的形状,以期逼近现实中的玫瑰花瓣外形。请注意,在这个阶段的最后一步,我们需要通过拉扯已经弯折的四个花瓣,来调整玫瑰花中心的绽放程度。这个过程可能会伴随玫瑰花整体结构的崩塌,所以,一定要控制好调整的力道,以免出现不可逆的后果。最终,经过三个阶段的折叠,我们会得到一支栩栩如生的玫瑰花冠。如果条件允许,我们可以在一根拉直的铁丝上缠绕绿色纸条,并将玫瑰花冠插在铁丝的一段。这样,我们就得到了一支手工玫瑰花。总之,通过创建栅格折痕,制作立体基座,以及完成花瓣修饰,我们从二维的纸面上创作出了一支三维的花朵。这个过程虽然看似简单,但它确实我们人类借助想象力和常见素材而创作出的艺术品。问: 请基于以上描述,分析哪些步骤做错了很大可能会导致最终折叠失败?答: 首先,在创建栅格折痕的过程中,如果出现折叠不对成的情况,可能会导致最终的折叠失败。这是因为折叠不对成可能会影响到后续的立体基座制作,甚至可能导致整个折纸过程的混乱。其次,在制作立体基座的过程中,如果高台的布局没有考虑到长、宽、高三个维度上的整齐和对称分布,也可能会导致最终的折叠失败。这是因为高台的布局直接影响到花瓣的形状和排列,从而影响整个玫瑰花的形状。最后,在完成花瓣修饰的阶段,如果没有充分理解大自然中玫瑰花的外形,并借助自然的曲线去不断修正花瓣的形状,也可能导致最终的折叠失败。这是因为花瓣的形状直接
|
||||
Tokens generated 128
|
||||
E2E Generation time x.xxxxs
|
||||
First token latency x.xxxxs
|
||||
First token latency x.xxxxs
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Chatglm3
|
||||
In this directory, you will find examples on how you could apply BigDL-LLM speculative decoding optimizations on ChatGLM3 models on [Intel GPUs](../README.md). For illustration purposes, we utilize the [THUDM/chatglm3-6b](https://huggingface.co/THUDM/chatglm3-6b) as a reference ChatGLM3 model.
|
||||
# ChatGLM3
|
||||
In this directory, you will find examples on how you could run ChatGLM3 FP16 infernece with self-speculative decoding using BigDL-LLM on [Intel GPUs](../README.md). For illustration purposes, we utilize the [THUDM/chatglm3-6b](https://huggingface.co/THUDM/chatglm3-6b) as a reference ChatGLM3 model.
|
||||
|
||||
## 0. Requirements
|
||||
To run these examples with BigDL-LLM on Intel GPUs, we have some recommended requirements for your machine, please refer to [here](../README.md#recommended-requirements) for more information.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Llama2
|
||||
In this directory, you will find examples on how you could apply BigDL-LLM speculative decoding optimizations on Llama2 models on [Intel GPUs](../README.md). For illustration purposes, we utilize the [meta-llama/Llama-2-7b-chat-hf](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf) and [meta-llama/Llama-2-13b-chat-hf](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf) as reference Llama2 models.
|
||||
# LLaMA2
|
||||
In this directory, you will find examples on how you could run LLaMA2 FP16 infernece with self-speculative decoding using BigDL-LLM on [Intel GPUs](../README.md). For illustration purposes, we utilize the [meta-llama/Llama-2-7b-chat-hf](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf) and [meta-llama/Llama-2-13b-chat-hf](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf) as reference Llama2 models.
|
||||
|
||||
## 0. Requirements
|
||||
To run these examples with BigDL-LLM on Intel GPUs, we have some recommended requirements for your machine, please refer to [here](../README.md#recommended-requirements) for more information.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Mistral
|
||||
In this directory, you will find examples on how you could apply BigDL-LLM speculative decoding optimizations on Mistral models on [Intel GPUs](../README.md). For illustration purposes,we utilize the [mistralai/Mistral-7B-Instruct-v0.1](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1) and [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) as reference Mistral models.
|
||||
In this directory, you will find examples on how you could run Mistral FP16 infernece with self-speculative decoding using BigDL-LLM on [Intel GPUs](../README.md). For illustration purposes,we utilize the [mistralai/Mistral-7B-Instruct-v0.1](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1) and [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) as reference Mistral models.
|
||||
|
||||
## 0. Requirements
|
||||
To run these examples with BigDL-LLM on Intel GPUs, we have some recommended requirements for your machine, please refer to [here](../README.md#recommended-requirements) for more information.
|
||||
|
|
@ -83,4 +83,4 @@ In the end, Maya's speech was just one small step on a long and winding journey
|
|||
Tokens generated 128
|
||||
E2E Generation time xx.xxxxs
|
||||
First token latency xx.xxxxs
|
||||
```
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Qwen
|
||||
In this directory, you will find examples on how you could apply BigDL-LLM speculative decoding optimizations on Qwen models on [Intel GPUs](../README.md). For illustration purposes, we utilize the [Qwen/Qwen-7B-Chat](https://huggingface.co/Qwen/Qwen-7B-Chat) and [Qwen/Qwen-14B-Chat](https://huggingface.co/Qwen/Qwen-14B-Chat) as reference Qwen models.
|
||||
In this directory, you will find examples on how you could run Qwen FP16 infernece with self-speculative decoding using BigDL-LLM on [Intel GPUs](../README.md). For illustration purposes, we utilize the [Qwen/Qwen-7B-Chat](https://huggingface.co/Qwen/Qwen-7B-Chat) and [Qwen/Qwen-14B-Chat](https://huggingface.co/Qwen/Qwen-14B-Chat) as reference Qwen models.
|
||||
|
||||
## 0. Requirements
|
||||
To run these examples with BigDL-LLM on Intel GPUs, we have some recommended requirements for your machine, please refer to [here](../README.md#recommended-requirements) for more information.
|
||||
|
|
@ -81,4 +81,4 @@ assistant
|
|||
Tokens generated 128
|
||||
E2E Generation time x.xxxxs
|
||||
First token latency x.xxxxs
|
||||
```
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue