Skip to content

Commit

Permalink
Make alloc/free usage consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
saharNooby committed Apr 19, 2023
1 parent 74caedb commit 0e0fe5f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rwkv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,9 +590,10 @@ bool rwkv_eval(struct rwkv_context * ctx, int32_t token, float * state_in, float
void rwkv_free(struct rwkv_context * ctx) {
ggml_free(ctx->ctx);

delete ctx->model;
free(ctx->model);
delete ctx->state_parts;
delete ctx;
free(ctx->graph);
free(ctx);
}

bool rwkv_quantize_model_file(const char * model_file_path_in, const char * model_file_path_out, uint32_t q_type) {
Expand Down

0 comments on commit 0e0fe5f

Please sign in to comment.