Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/models/phi-3-mini/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int main(int32_t argc, char** argv) {

int32_t seq_len = FLAGS_seq_len;

::torch::executor::Runner runner(model_path, tokenizer_path, temperature);
example::Runner runner(model_path, tokenizer_path, temperature);

runner.generate(prompt, seq_len);

Expand Down
6 changes: 6 additions & 0 deletions examples/models/phi-3-mini/runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
#include <executorch/extension/tensor/tensor.h>
#include <executorch/runtime/platform/log.h>

using executorch::aten::ScalarType;
using executorch::extension::Module;
using executorch::extension::llm::BPETokenizer;
using executorch::extension::llm::Sampler;
using executorch::runtime::Error;

namespace example {

#define SAMPLER_TOP 0.9f
Expand Down
6 changes: 3 additions & 3 deletions examples/models/phi-3-mini/runner.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ class Runner {
uint64_t prefill(std::vector<uint64_t>& tokens);
uint64_t run_model_step(uint64_t token);

std::unique_ptr<Module> module_;
std::unique_ptr<Tokenizer> tokenizer_;
std::unique_ptr<Sampler> sampler_;
std::unique_ptr<executorch::extension::Module> module_;
std::unique_ptr<executorch::extension::llm::Tokenizer> tokenizer_;
std::unique_ptr<executorch::extension::llm::Sampler> sampler_;
};

} // namespace example
Loading