forked from skeskinen/bert.cpp
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
In server.cpp, bert_encode seems not thread-safe, different invocation works in same memory buffer in bert_context
while(true) {
std::string string_in = receive_string(new_socket);
if (string_in.empty()) {
break;
}
std::vector<float> embeddings = std::vector<float>(n_embd);
bert_encode(bctx, params.n_threads, string_in.data(), embeddings.data());
send_floats(new_socket, embeddings);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels