summaryrefslogtreecommitdiff
path: root/examples/lookup
diff options
context:
space:
mode:
Diffstat (limited to 'examples/lookup')
-rw-r--r--examples/lookup/lookup-create.cpp8
-rw-r--r--examples/lookup/lookup-stats.cpp8
-rw-r--r--examples/lookup/lookup.cpp8
3 files changed, 12 insertions, 12 deletions
diff --git a/examples/lookup/lookup-create.cpp b/examples/lookup/lookup-create.cpp
index d713f6f2..5f04709f 100644
--- a/examples/lookup/lookup-create.cpp
+++ b/examples/lookup/lookup-create.cpp
@@ -22,11 +22,11 @@ int main(int argc, char ** argv){
llama_backend_init();
llama_numa_init(params.numa);
- llama_model * model = NULL;
- llama_context * ctx = NULL;
-
// load the model
- std::tie(model, ctx) = llama_init_from_gpt_params(params);
+ llama_init_result llama_init = llama_init_from_gpt_params(params);
+
+ llama_model * model = llama_init.model;
+ llama_context * ctx = llama_init.context;
GGML_ASSERT(model != nullptr);
// tokenize the prompt
diff --git a/examples/lookup/lookup-stats.cpp b/examples/lookup/lookup-stats.cpp
index 2fe67100..400f3e0b 100644
--- a/examples/lookup/lookup-stats.cpp
+++ b/examples/lookup/lookup-stats.cpp
@@ -26,11 +26,11 @@ int main(int argc, char ** argv){
llama_backend_init();
llama_numa_init(params.numa);
- llama_model * model = NULL;
- llama_context * ctx = NULL;
-
// load the model
- std::tie(model, ctx) = llama_init_from_gpt_params(params);
+ llama_init_result llama_init = llama_init_from_gpt_params(params);
+
+ llama_model * model = llama_init.model;
+ llama_context * ctx = llama_init.context;
// tokenize the prompt
std::vector<llama_token> inp;
diff --git a/examples/lookup/lookup.cpp b/examples/lookup/lookup.cpp
index bb571bac..d53a9828 100644
--- a/examples/lookup/lookup.cpp
+++ b/examples/lookup/lookup.cpp
@@ -34,11 +34,11 @@ int main(int argc, char ** argv){
llama_backend_init();
llama_numa_init(params.numa);
- llama_model * model = NULL;
- llama_context * ctx = NULL;
-
// load the model
- std::tie(model, ctx) = llama_init_from_gpt_params(params);
+ llama_init_result llama_init = llama_init_from_gpt_params(params);
+
+ llama_model * model = llama_init.model;
+ llama_context * ctx = llama_init.context;
// tokenize the prompt
std::vector<llama_token> inp;