Skip to content

Commit b5782f9

Browse files
committed
use interface
1 parent b8feebd commit b5782f9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

examples/mediatek/executor_runner/mtk_llama_runner.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ Error MTKLlamaRunner::generate(
120120
const std::string& prompt,
121121
int32_t seq_len,
122122
std::function<void(const std::string&)> token_callback,
123-
std::function<void(const Stats&)> stats_callback) {
123+
std::function<void(const Stats&)> stats_callback
124+
bool,
125+
bool) {
124126
if (!is_loaded()) {
125127
ET_CHECK_OK_OR_RETURN_ERROR(load());
126128
}

examples/mediatek/executor_runner/mtk_llama_runner.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#pragma once
1313

1414
#include <executorch/examples/models/llama/tokenizer/llama_tiktoken.h>
15+
#include <executorch/extension/llm/runner/runner_interface.h>
1516
#include <executorch/extension/llm/runner/stats.h>
1617
#include <executorch/extension/llm/tokenizer/bpe_tokenizer.h>
1718
#include <executorch/extension/llm/tokenizer/tiktoken.h>
@@ -31,7 +32,8 @@ using executorch::extension::llm::Tokenizer;
3132
using executorch::runtime::Error;
3233
using executorch::runtime::Result;
3334

34-
class MTKLlamaRunner {
35+
class MTKLlamaRunner
36+
: public executorch::extension::llm::RunnerInterface {
3537
public:
3638
explicit MTKLlamaRunner(
3739
const std::string& model_path,

0 commit comments

Comments
 (0)