Skip to content

Commit

Permalink
llamamodel: free the batch in embedInternal (#2348)
Browse files Browse the repository at this point in the history
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
  • Loading branch information
cebtenzzre committed May 15, 2024
1 parent 61cefcf commit 6d8888b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gpt4all-backend/llamamodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,8 @@ void LLamaModel::embedInternal(
}

if (tokenCount) { *tokenCount = totalTokens; }

llama_batch_free(batch);
}

#if defined(_WIN32)
Expand Down

0 comments on commit 6d8888b

Please sign in to comment.