File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,12 @@ DEFINE_string(
20
20
" llama2.pte" ,
21
21
" Model serialized in flatbuffer format." );
22
22
23
+ DEFINE_string (
24
+ data_path,
25
+ " " ,
26
+ " Data file for the model."
27
+ );
28
+
23
29
DEFINE_string (tokenizer_path, " tokenizer.bin" , " Tokenizer stuff." );
24
30
25
31
DEFINE_string (prompt, " The answer to the ultimate question is" , " Prompt." );
@@ -49,6 +55,11 @@ int32_t main(int32_t argc, char** argv) {
49
55
// and users can create their own DataLoaders to load from arbitrary sources.
50
56
const char * model_path = FLAGS_model_path.c_str ();
51
57
58
+ std::optional<std::string> data_path = std::nullopt;
59
+ if (!FLAGS_data_path.empty ()) {
60
+ data_path = FLAGS_data_path.c_str ();
61
+ }
62
+
52
63
const char * tokenizer_path = FLAGS_tokenizer_path.c_str ();
53
64
54
65
const char * prompt = FLAGS_prompt.c_str ();
@@ -74,7 +85,7 @@ int32_t main(int32_t argc, char** argv) {
74
85
#endif
75
86
// create llama runner
76
87
// @lint-ignore CLANGTIDY facebook-hte-Deprecated
77
- example::Runner runner (model_path, tokenizer_path);
88
+ example::Runner runner (model_path, tokenizer_path, data_path );
78
89
79
90
if (warmup) {
80
91
// @lint-ignore CLANGTIDY facebook-hte-Deprecated
You can’t perform that action at this time.
0 commit comments