cicdatopea
commited on
Commit
•
089c75f
1
Parent(s):
7cb2129
Update README.md
Browse files
README.md
CHANGED
@@ -13,35 +13,43 @@ This model is an int4 model with group_size 128 and symmetric quantization of [f
|
|
13 |
from auto_round import AutoRoundConfig ##must import for auto_round format
|
14 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
15 |
|
16 |
-
quantized_model_dir = "/
|
17 |
tokenizer = AutoTokenizer.from_pretrained(quantized_model_dir)
|
18 |
model = AutoModelForCausalLM.from_pretrained(
|
19 |
quantized_model_dir,
|
20 |
device_map="auto"
|
21 |
## revision="07a117c" ##AutoGPTQ format
|
22 |
)
|
23 |
-
text = "
|
24 |
inputs = tokenizer(text, return_tensors="pt", return_token_type_ids=False).to(model.device)
|
25 |
print(tokenizer.decode(model.generate(**inputs, max_new_tokens=50)[0]))
|
26 |
##INT4:
|
27 |
-
##
|
28 |
|
29 |
##BF16:
|
30 |
-
##
|
31 |
-
##
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
##INT4:
|
35 |
-
## 9.8
|
36 |
-
## Q:
|
37 |
## A: 9.8
|
38 |
-
## Q: 9.8
|
39 |
|
40 |
##BF16:
|
41 |
-
## 9.8
|
42 |
-
## Q:
|
43 |
-
##
|
44 |
-
##
|
|
|
|
|
45 |
|
46 |
text = "Once upon a time,"
|
47 |
##INT4:
|
|
|
13 |
from auto_round import AutoRoundConfig ##must import for auto_round format
|
14 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
15 |
|
16 |
+
quantized_model_dir = "OPEA/falcon3-3B-int4-sym-inc"
|
17 |
tokenizer = AutoTokenizer.from_pretrained(quantized_model_dir)
|
18 |
model = AutoModelForCausalLM.from_pretrained(
|
19 |
quantized_model_dir,
|
20 |
device_map="auto"
|
21 |
## revision="07a117c" ##AutoGPTQ format
|
22 |
)
|
23 |
+
text = "how many r in strawberry? The ansnwer is "
|
24 |
inputs = tokenizer(text, return_tensors="pt", return_token_type_ids=False).to(model.device)
|
25 |
print(tokenizer.decode(model.generate(**inputs, max_new_tokens=50)[0]))
|
26 |
##INT4:
|
27 |
+
## how many r in strawberry? The ansnwer is 10000000000000000000000000000000000000000000000000
|
28 |
|
29 |
##BF16:
|
30 |
+
## how many r in strawberry? The ansnwer is 1.
|
31 |
+
## Q: How many r in strawberry?
|
32 |
+
## A: 1
|
33 |
+
## Q: How many r in strawberry?
|
34 |
+
## A: 1
|
35 |
+
## Q: How many r in strawberry?
|
36 |
+
## A: 1
|
37 |
+
## Q: How many r
|
38 |
+
|
39 |
+
text = "Which number is bigger, 9.8 or 9.11? The answer is"
|
40 |
##INT4:
|
41 |
+
## Which number is bigger, 9.8 or 9.11? The answer is 9.8.
|
42 |
+
## Q: Which number is bigger, 9.8 or 9.11?
|
43 |
## A: 9.8
|
44 |
+
## Q: Which number is bigger, 9.8 or 9.11?
|
45 |
|
46 |
##BF16:
|
47 |
+
## Which number is bigger, 9.8 or 9.11? The answer is 9.8.
|
48 |
+
## Q: Which number is bigger, 9.8 or 9.11?
|
49 |
+
## Options:
|
50 |
+
## - 9.8
|
51 |
+
## - 9.11
|
52 |
+
## Let's think step by step.
|
53 |
|
54 |
text = "Once upon a time,"
|
55 |
##INT4:
|