File tree 3 files changed +16
-18
lines changed
3 files changed +16
-18
lines changed Original file line number Diff line number Diff line change
1
+ import gc
2
+
1
3
from xturing .datasets .instruction_dataset import InstructionDataset
2
4
from xturing .models import BaseModel
3
5
10
12
# Save the model
11
13
model .save ("./gptj_weights" )
12
14
15
+ del model
16
+ gc .collect ()
17
+ model = BaseModel .load ("./gptj_weights" )
13
18
# Once the model has been finetuned, you can start doing inferences
14
19
output = model .generate (texts = ["Why LLM models are becoming so important?" ])
15
20
print ("Generated output by the model: {}" .format (output ))
Original file line number Diff line number Diff line change
1
+ import gc
2
+
1
3
from xturing .datasets .instruction_dataset import InstructionDataset
2
4
from xturing .models import BaseModel
3
5
11
13
model .save ("./llama_weights" )
12
14
13
15
# Once the model has been finetuned, you can start doing inferences
16
+ del model
17
+ gc .collect ()
18
+ model = BaseModel .load ("./llama_weights" )
14
19
output = model .generate (texts = ["Why LLM models are becoming so important?" ])
15
20
print ("Generated output by the model: {}" .format (output ))
16
21
Original file line number Diff line number Diff line change @@ -20,10 +20,8 @@ llama_lora:
20
20
max_new_tokens : 256
21
21
do_sample : false
22
22
23
- # Contrastive search
23
+ # Greedy search
24
24
llama_lora_int8 :
25
- penalty_alpha : 0.6
26
- top_k : 4
27
25
max_new_tokens : 256
28
26
do_sample : false
29
27
@@ -48,10 +46,8 @@ gptj_lora:
48
46
max_new_tokens : 256
49
47
do_sample : false
50
48
51
- # Contrastive search
49
+ # Greedy search
52
50
gptj_lora_int8 :
53
- penalty_alpha : 0.6
54
- top_k : 4
55
51
max_new_tokens : 256
56
52
do_sample : false
57
53
@@ -104,10 +100,8 @@ galactica_lora:
104
100
max_new_tokens : 256
105
101
do_sample : false
106
102
107
- # Contrastive search
103
+ # Greedy search
108
104
galactica_lora_int8 :
109
- penalty_alpha : 0.6
110
- top_k : 4
111
105
max_new_tokens : 256
112
106
do_sample : false
113
107
@@ -125,10 +119,8 @@ opt_lora:
125
119
max_new_tokens : 256
126
120
do_sample : false
127
121
128
- # Contrastive search
122
+ # Greedy search
129
123
opt_lora_int8 :
130
- penalty_alpha : 0.6
131
- top_k : 4
132
124
max_new_tokens : 256
133
125
do_sample : false
134
126
@@ -146,10 +138,8 @@ cerebras_lora:
146
138
max_new_tokens : 256
147
139
do_sample : false
148
140
149
- # Contrastive search
141
+ # Greedy search
150
142
cerebras_lora_int8 :
151
- penalty_alpha : 0.6
152
- top_k : 4
153
143
max_new_tokens : 256
154
144
do_sample : false
155
145
@@ -167,9 +157,7 @@ bloom_lora:
167
157
max_new_tokens : 256
168
158
do_sample : false
169
159
170
- # Contrastive search
160
+ # Greedy search
171
161
bloom_lora_int8 :
172
- penalty_alpha : 0.6
173
- top_k : 4
174
162
max_new_tokens : 256
175
163
do_sample : false
You can’t perform that action at this time.
0 commit comments