Skip to content

Commit f82ee68

Browse files
committed
Remove state
1 parent 2924089 commit f82ee68

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

modules/llama_cpp_plugin/include/compiled_model.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ namespace ov {
7474
llama_model* m_llama_model_ptr = nullptr;
7575
llama_context* m_llama_ctx = nullptr;
7676
std::shared_ptr<ov::Model> m_fake_model;
77-
size_t* num_tokens_processed_ptr = nullptr; // TODO: (vshampor) find a better place for this kind of storage
7877

7978
std::vector<ov::Output<const ov::Node>> m_fake_inputs;
8079
std::vector<ov::Output<const ov::Node>> m_fake_outputs;

modules/llama_cpp_plugin/src/compiled_model.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,11 @@ LlamaCppModel::~LlamaCppModel() {
3737
llama_free(m_llama_ctx);
3838
llama_free_model(m_llama_model_ptr);
3939
llama_backend_free();
40-
delete num_tokens_processed_ptr;
4140
}
4241

4342
LlamaCppModel::LlamaCppModel(const std::string& gguf_fname, const std::shared_ptr<const IPlugin>& plugin)
4443
: ICompiledModel(nullptr, plugin),
4544
m_gguf_fname(gguf_fname) {
46-
num_tokens_processed_ptr = new size_t; // TODO (vshampor): hack, remove
47-
*num_tokens_processed_ptr = 0;
4845
OPENVINO_DEBUG << "llama_cpp_plugin: loading llama model directly from GGUF... " << std::endl;
4946
llama_model_params mparams = llama_model_default_params();
5047
mparams.n_gpu_layers = 99;

0 commit comments

Comments
 (0)