Skip to content

Commit

Permalink
delete llama_init_default_params()
Browse files Browse the repository at this point in the history
  • Loading branch information
Septa2112 committed Aug 5, 2024
1 parent 8513bb8 commit a15ceea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
10 changes: 1 addition & 9 deletions common/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2039,16 +2039,8 @@ std::string fs_get_cache_file(const std::string & filename) {
//
// Model utils
//
struct llama_init_result llama_init_default_params() {
struct llama_init_result result = {
/*.llama_model =*/ nullptr,
/*.llama_context =*/ nullptr,
};
return result;
}

struct llama_init_result llama_init_from_gpt_params(gpt_params & params) {
auto iparams = llama_init_default_params();
llama_init_result iparams;
auto mparams = llama_model_params_from_gpt_params(params);

llama_model * model = nullptr;
Expand Down
5 changes: 2 additions & 3 deletions common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,10 @@ std::string fs_get_cache_file(const std::string & filename);
//

struct llama_init_result {
struct llama_model * model;
struct llama_context * context;
struct llama_model * model = nullptr;
struct llama_context * context = nullptr;
};

struct llama_init_result llama_init_default_params();
struct llama_init_result llama_init_from_gpt_params(gpt_params & params);

struct llama_model_params llama_model_params_from_gpt_params (const gpt_params & params);
Expand Down

0 comments on commit a15ceea

Please sign in to comment.