mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-06-06 22:09:08 +08:00
[Docs] Update oneshot imports (#28188)
Signed-off-by: UranusSeven <109661872+UranusSeven@users.noreply.github.com>
This commit is contained in:
parent
73ff872db0
commit
6a25ea5f0e
@ -60,7 +60,7 @@ Since simple RTN does not require data for weight quantization and the activatio
|
|||||||
??? code
|
??? code
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from llmcompressor.transformers import oneshot
|
from llmcompressor import oneshot
|
||||||
from llmcompressor.modifiers.quantization import QuantizationModifier
|
from llmcompressor.modifiers.quantization import QuantizationModifier
|
||||||
|
|
||||||
# Configure the simple PTQ quantization
|
# Configure the simple PTQ quantization
|
||||||
|
|||||||
@ -80,7 +80,7 @@ Now, apply the quantization algorithms:
|
|||||||
??? code
|
??? code
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from llmcompressor.transformers import oneshot
|
from llmcompressor import oneshot
|
||||||
from llmcompressor.modifiers.quantization import GPTQModifier
|
from llmcompressor.modifiers.quantization import GPTQModifier
|
||||||
from llmcompressor.modifiers.smoothquant import SmoothQuantModifier
|
from llmcompressor.modifiers.smoothquant import SmoothQuantModifier
|
||||||
|
|
||||||
|
|||||||
@ -87,7 +87,7 @@ Now, apply the quantization algorithms:
|
|||||||
??? code
|
??? code
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from llmcompressor.transformers import oneshot
|
from llmcompressor import oneshot
|
||||||
from llmcompressor.modifiers.quantization import GPTQModifier
|
from llmcompressor.modifiers.quantization import GPTQModifier
|
||||||
from llmcompressor.modifiers.smoothquant import SmoothQuantModifier
|
from llmcompressor.modifiers.smoothquant import SmoothQuantModifier
|
||||||
|
|
||||||
|
|||||||
@ -78,7 +78,7 @@ Here's a complete example using `meta-llama/Llama-3.1-8B-Instruct` (most models
|
|||||||
```python
|
```python
|
||||||
from datasets import load_dataset
|
from datasets import load_dataset
|
||||||
from transformers import AutoModelForCausalLM, AutoTokenizer
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||||
from llmcompressor.transformers import oneshot
|
from llmcompressor import oneshot
|
||||||
|
|
||||||
# Select model and load it
|
# Select model and load it
|
||||||
MODEL_ID = "meta-llama/Llama-3.1-8B-Instruct"
|
MODEL_ID = "meta-llama/Llama-3.1-8B-Instruct"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user