nm-research
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -74,10 +74,10 @@ python quantize.py --model_path ibm-granite/granite-3.1-8b-instruct --quant_path
|
|
74 |
|
75 |
```python
|
76 |
from datasets import load_dataset
|
77 |
-
from transformers import AutoTokenizer
|
78 |
from llmcompressor.modifiers.quantization import GPTQModifier
|
79 |
from llmcompressor.modifiers.smoothquant import SmoothQuantModifier
|
80 |
-
from llmcompressor.transformers import
|
81 |
import argparse
|
82 |
from compressed_tensors.quantization import QuantizationScheme, QuantizationArgs, QuantizationType, QuantizationStrategy
|
83 |
|
@@ -90,7 +90,7 @@ parser.add_argument('--dampening_frac', type=float, default=0.1)
|
|
90 |
parser.add_argument('--observer', type=str, default="minmax")
|
91 |
args = parser.parse_args()
|
92 |
|
93 |
-
model =
|
94 |
args.model_path,
|
95 |
device_map="auto",
|
96 |
torch_dtype="auto",
|
|
|
74 |
|
75 |
```python
|
76 |
from datasets import load_dataset
|
77 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
78 |
from llmcompressor.modifiers.quantization import GPTQModifier
|
79 |
from llmcompressor.modifiers.smoothquant import SmoothQuantModifier
|
80 |
+
from llmcompressor.transformers import oneshot, apply
|
81 |
import argparse
|
82 |
from compressed_tensors.quantization import QuantizationScheme, QuantizationArgs, QuantizationType, QuantizationStrategy
|
83 |
|
|
|
90 |
parser.add_argument('--observer', type=str, default="minmax")
|
91 |
args = parser.parse_args()
|
92 |
|
93 |
+
model = AutoModelForCausalLM.from_pretrained(
|
94 |
args.model_path,
|
95 |
device_map="auto",
|
96 |
torch_dtype="auto",
|