Update README.md
Browse files
README.md
CHANGED
@@ -20,8 +20,10 @@ from auto_round import AutoRoundConfig ##must import for auto_round format
|
|
20 |
from transformers import AutoModelForCausalLM,AutoTokenizer
|
21 |
quantized_model_dir = "Intel/Qwen2-7B-int4-inc"
|
22 |
tokenizer = AutoTokenizer.from_pretrained(quantized_model_dir)
|
23 |
-
model = AutoModelForCausalLM.from_pretrained(quantized_model_dir,
|
24 |
-
|
|
|
|
|
25 |
text = "下面我来介绍一下阿里巴巴公司,"
|
26 |
text = "9.8和9.11哪个数字大?答案是"
|
27 |
text = "Once upon a time,"
|
|
|
20 |
from transformers import AutoModelForCausalLM,AutoTokenizer
|
21 |
quantized_model_dir = "Intel/Qwen2-7B-int4-inc"
|
22 |
tokenizer = AutoTokenizer.from_pretrained(quantized_model_dir)
|
23 |
+
model = AutoModelForCausalLM.from_pretrained(quantized_model_dir,
|
24 |
+
device_map="auto"
|
25 |
+
## revision="07a117c" ##AutoGPTQ format
|
26 |
+
)
|
27 |
text = "下面我来介绍一下阿里巴巴公司,"
|
28 |
text = "9.8和9.11哪个数字大?答案是"
|
29 |
text = "Once upon a time,"
|