Skip to content

Commit

Permalink
bugfix of crash
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzhaode committed Jan 9, 2024
1 parent f66fe6a commit 67d21e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/llm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ class Llm {
// default tokenier is senrencepiece
tokenizer_.reset(new Sentencepiece);
}
virtual ~Llm() = default;
virtual ~Llm() {
modules_.clear();
visual_module_.reset();
runtime_manager_.reset();
}
static Llm* createLLM(const std::string& path, std::string model_type = "auto");
void load(const std::string& model_dir);
void chat();
Expand Down

0 comments on commit 67d21e1

Please sign in to comment.