File tree Expand file tree Collapse file tree
packages/react-native-executorch/common/rnexecutorch/models/llm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ using executorch::runtime::Error;
2020LLM::LLM (const std::string &modelSource, const std::string &tokenizerSource,
2121 std::vector<std::string> capabilities,
2222 std::shared_ptr<react::CallInvoker> callInvoker)
23- : BaseModel(modelSource, callInvoker, Module::LoadMode::File ) {
23+ : BaseModel(modelSource, callInvoker, Module::LoadMode::Mmap ) {
2424
2525 if (capabilities.empty ()) {
2626 runner_ =
@@ -194,9 +194,7 @@ int32_t LLM::countTextTokens(std::string text) const {
194194 return runner_->count_text_tokens (text);
195195}
196196
197- size_t LLM::getMemoryLowerBound () const noexcept {
198- return memorySizeLowerBound;
199- }
197+ size_t LLM::getMemoryLowerBound () const noexcept { return 0 ; }
200198
201199void LLM::setCountInterval (size_t countInterval) {
202200 if (!runner_ || !runner_->is_loaded ()) {
You can’t perform that action at this time.
0 commit comments