Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binding Change #142

Open
jrideout opened this issue Jul 21, 2023 · 0 comments
Open

Binding Change #142

jrideout opened this issue Jul 21, 2023 · 0 comments

Comments

@jrideout
Copy link

I had to make the follow change to the types to get successful compilation:

diff --git a/binding.cpp b/binding.cpp
index aef2e8e..eea635d 100644
--- a/binding.cpp
+++ b/binding.cpp
@@ -631,11 +631,11 @@ void* load_model(const char *fname, int n_ctx, int n_seed, bool memory_f16, bool
     void* res = nullptr;
     try {

-        struct llama_model * model = llama_load_model_from_file(fname, &lparams);
+        struct llama_model * model = llama_load_model_from_file(fname, lparams);
         if (!model) {
             return nullptr;
         }
-        struct llama_context * ctx = llama_new_context_with_model(model, &lparams);
+        struct llama_context * ctx = llama_new_context_with_model(model, lparams);
         res = ctx;
     } catch(std::runtime_error& e) {
         fprintf(stderr, "failed %s",e.what());
@@ -643,4 +643,4 @@ void* load_model(const char *fname, int n_ctx, int n_seed, bool memory_f16, bool
     }

     return res;
-}

I can create a PR if this is desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant