@@ -20,6 +20,8 @@ DEFINE_string(
20
20
" llama2.pte" ,
21
21
" Model serialized in flatbuffer format." );
22
22
23
+ DEFINE_string (data_path, " " , " Data file for the model." );
24
+
23
25
DEFINE_string (tokenizer_path, " tokenizer.bin" , " Tokenizer stuff." );
24
26
25
27
DEFINE_string (prompt, " The answer to the ultimate question is" , " Prompt." );
@@ -49,6 +51,11 @@ int32_t main(int32_t argc, char** argv) {
49
51
// and users can create their own DataLoaders to load from arbitrary sources.
50
52
const char * model_path = FLAGS_model_path.c_str ();
51
53
54
+ std::optional<std::string> data_path = std::nullopt;
55
+ if (!FLAGS_data_path.empty ()) {
56
+ data_path = FLAGS_data_path.c_str ();
57
+ }
58
+
52
59
const char * tokenizer_path = FLAGS_tokenizer_path.c_str ();
53
60
54
61
const char * prompt = FLAGS_prompt.c_str ();
@@ -74,7 +81,7 @@ int32_t main(int32_t argc, char** argv) {
74
81
#endif
75
82
// create llama runner
76
83
// @lint-ignore CLANGTIDY facebook-hte-Deprecated
77
- example::Runner runner (model_path, tokenizer_path);
84
+ example::Runner runner (model_path, tokenizer_path, data_path );
78
85
79
86
if (warmup) {
80
87
// @lint-ignore CLANGTIDY facebook-hte-Deprecated
0 commit comments