Skip to content

Commit 2024523

Browse files
committed
Fix compiler error. Need
1 parent 66f2a42 commit 2024523

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

examples/models/llava/runner/llava_runner.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,29 @@ class LlavaRunner : public MultimodalRunner {
2929
const float temperature = 0.8f)
3030
: MultimodalRunner(model_path, tokenizer_path, temperature){};
3131

32+
bool is_loaded() override;
33+
Error load() override;
34+
Error generate(
35+
std::vector<Image> images,
36+
const std::string& prompt,
37+
int32_t seq_len = 1024,
38+
std::function<void(const std::string&)> token_callback = {},
39+
std::function<void(const ::executorch::extension::llm::Stats&)>
40+
stats_callback = {}) override;
41+
Error prefill_images(std::vector<Image>& images, int64_t& start_pos) override;
42+
Result<uint64_t> prefill_prompt(
43+
const std::string& prompt,
44+
int64_t& start_pos,
45+
int8_t bos = 0,
46+
int8_t eos = 0) override;
47+
Error generate_from_pos(
48+
const std::string& prompt,
49+
int32_t seq_len = 1024,
50+
int64_t start_pos = 0,
51+
std::function<void(const std::string&)> token_callback = {},
52+
std::function<void(const ::executorch::extension::llm::Stats&)>
53+
stats_callback = {}) override;
54+
3255
private:
3356
inline static const std::string kPresetPrompt =
3457
"A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions. USER: ";

0 commit comments

Comments
 (0)