mirror of
https://gitlab.com/niansa/libjustlm.git
synced 2025-03-06 20:49:17 +01:00
Call llama_backend_init()/llama_backend_free()
This commit is contained in:
parent
e3d52c42b7
commit
5d818e31aa
2 changed files with 11 additions and 2 deletions
|
@ -347,10 +347,8 @@ public:
|
|||
return get_state()->prompt;
|
||||
}
|
||||
|
||||
#if LLAMA_DATE >= 230519
|
||||
bool is_mirostat_available() const noexcept override {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
|
11
llama.cpp
11
llama.cpp
|
@ -30,3 +30,14 @@ LM::Inference *construct(const std::string &weights_path, std::ifstream& f, cons
|
|||
return new LM::LLaMAInference(weights_path, p);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__attribute__((constructor))
|
||||
static void init() {
|
||||
llama_backend_init(true);
|
||||
}
|
||||
|
||||
__attribute__((destructor))
|
||||
static void deinit() {
|
||||
llama_backend_free();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue