You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tripy/examples/nanogpt/README.md
+15-25Lines changed: 15 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,16 +34,13 @@ for expected accuracy.
34
34
python3 example.py --input-text "What is the answer to life, the universe, and everything?" --seed=0
35
35
```
36
36
37
-
<!-- Tripy: TEST: EXPECTED_STDOUT Start -->
38
37
<!--
38
+
Tripy: TEST: EXPECTED_STDOUT Start
39
39
```
40
-
What is the answer to life, the universe, and everything\? How can we know what's real\? How can
41
-
====
42
-
(?s).*?
43
-
What is the answer to life, the universe, and everything\? The answer to the questions that
40
+
(?s).*?What is the answer to life, the universe, and everything\? (How can we know what's real\? How can|The answer to the questions that are asked of us)
44
41
```
45
-
-->
46
-
<!-- Tripy: TEST: EXPECTED_STDOUT End -->
42
+
Tripy: TEST: EXPECTED_STDOUT End
43
+
-->
47
44
48
45
### Running with Quantization
49
46
@@ -60,33 +57,26 @@ To run with a quantization mode, pass `--quant-mode` to `example.py`. The suppor
60
57
```bash
61
58
python3 example.py --input-text "What is the answer to life, the universe, and everything?" --seed=0 --quant-mode int8-weight-only
62
59
```
63
-
<!-- Tripy: TEST: EXPECTED_STDOUT Start -->
64
60
<!--
61
+
Tripy: TEST: EXPECTED_STDOUT Start
65
62
```
66
-
(?s).*?
67
-
What is the answer to life, the universe, and everything\? How is life possible, what is the meaning of
68
-
====
69
-
(?s).*?
70
-
What is the answer to life, the universe, and everything\? The answer to the questions that
71
-
====
72
-
(?s).*?
73
-
What is the answer to life, the universe, and everything\? How can
63
+
(?s).*?What is the answer to life, the universe, and everything\? (The answer to the questions that|How is life possible, what is the meaning of|How can)
74
64
```
75
-
-->
76
-
<!-- Tripy: TEST: EXPECTED_STDOUT End -->
65
+
Tripy: TEST: EXPECTED_STDOUT End
66
+
-->
77
67
78
68
2. Weight-only int4 quantization:
79
69
70
+
*Note: `int4` quantization may result in poor accuracy for this model.*
71
+
*We include it here primarily to demonstrate the workflow.*
72
+
80
73
```bash
81
74
python3 example.py --input-text "What is the answer to life, the universe, and everything?" --seed=0 --quant-mode int4-weight-only
82
75
```
83
-
<!-- Tripy: TEST: EXPECTED_STDOUT Start -->
84
76
<!--
77
+
Tripy: TEST: EXPECTED_STDOUT Start
85
78
```
86
-
(?s).*?
87
-
What is the answer to life, the universe, and everything\? What is what is what is what is what is
79
+
(?s).*?What is the answer to life, the universe, and everything\? What is what is what is what is what is
88
80
```
89
-
-->
90
-
<!-- Tripy: TEST: EXPECTED_STDOUT End -->
91
-
92
-
*Note: `int4` quantization may result in poor accuracy. We include it here primarily to demonstrate the workflow.*
0 commit comments