Skip to content

Commit 46d597e

Browse files
committed
wip: add an example header
1 parent 7ace914 commit 46d597e

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

packages/react-native-executorch/common/rnexecutorch/models/llm/Runner.cpp

Whitespace-only changes.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#pragma once
2+
3+
#include <executorch/runner/runner.h>
4+
5+
namespace rnexecutorch {
6+
class LLM {
7+
private:
8+
std::unique_ptr<example::Runner> runner;
9+
size_t externalMemoryPressure{
10+
0}; // TODO: the naming is off, this is just a placeholder
11+
12+
public:
13+
LLM(const std::string &modelSource, const std::string &tokenizerSource);
14+
void generate(std::string input, void *callback);
15+
size_t getExternalMemoryPressure(); // TODO: the naming is off, this is just a
16+
// placeholder
17+
void unload();
18+
};
19+
} // namespace rnexecutorch

0 commit comments

Comments
 (0)