@@ -263,7 +263,6 @@ static void init_model(struct my_llama_model * model) {
263
263
model->data .resize (size + tensor_alignment);
264
264
alloc = ggml_allocr_new (model->data .data (), model->data .size (), tensor_alignment);
265
265
alloc_model (alloc, model);
266
- ggml_allocr_free (alloc);
267
266
}
268
267
269
268
static void randomize_model (struct my_llama_model * model, int seed, float mean, float std, float min, float max) {
@@ -1102,7 +1101,6 @@ int main(int argc, char ** argv) {
1102
1101
alloc = ggml_allocr_new (mem_input_data.data (), mem_input_data.size (), tensor_alignment);
1103
1102
ggml_allocr_alloc (alloc, tokens_input);
1104
1103
ggml_allocr_alloc (alloc, target_probs);
1105
- ggml_allocr_free (alloc);
1106
1104
1107
1105
// context for compute tensors without their data
1108
1106
const size_t estimated_compute_size_wo_data = (
@@ -1149,7 +1147,6 @@ int main(int argc, char ** argv) {
1149
1147
best_compute_size = max_compute_size;
1150
1148
best_order = gf->order ;
1151
1149
}
1152
- ggml_allocr_free (alloc);
1153
1150
ggml_free (ctx_compute);
1154
1151
}
1155
1152
size_t max_compute_size = best_compute_size;
@@ -1177,7 +1174,6 @@ int main(int argc, char ** argv) {
1177
1174
params.common .use_flash ,
1178
1175
params.common .use_checkpointing
1179
1176
);
1180
- ggml_allocr_free (alloc);
1181
1177
1182
1178
std::vector<llama_token> train_tokens;
1183
1179
std::vector<size_t > train_samples_begin;
0 commit comments