remove now unnecessary llama API functions to get model params that where added by this PR

This commit is contained in:
xaedes 2023-09-17 16:49:52 +02:00
parent 934ad8d35d
commit dd94ce4ec0
No known key found for this signature in database
GPG key ID: 30030EDD817EA2B1
2 changed files with 0 additions and 50 deletions

View file

@ -6478,26 +6478,6 @@ int llama_n_embd(const struct llama_context * ctx) {
return llama_model_n_embd(&ctx->model);
}
int llama_n_ff(const struct llama_context * ctx) {
return ctx->model.hparams.n_ff;
}
int llama_n_head(const struct llama_context * ctx) {
return ctx->model.hparams.n_head;
}
int llama_n_head_kv(const struct llama_context * ctx) {
return ctx->model.hparams.n_head_kv;
}
int llama_n_rot(const struct llama_context * ctx) {
return ctx->model.hparams.n_rot;
}
int llama_n_layer(const struct llama_context * ctx) {
return ctx->model.hparams.n_layer;
}
enum llama_vocab_type llama_vocab_type(const struct llama_context * ctx) {
return ctx->model.vocab.type;
}
@ -6518,26 +6498,6 @@ int llama_model_n_embd(const struct llama_model * model) {
return model->hparams.n_embd;
}
int llama_model_n_ff(const struct llama_model * model) {
return model->hparams.n_ff;
}
int llama_model_n_head(const struct llama_model * model) {
return model->hparams.n_head;
}
int llama_model_n_head_kv(const struct llama_model * model) {
return model->hparams.n_head_kv;
}
int llama_model_n_rot(const struct llama_model * model) {
return model->hparams.n_rot;
}
int llama_model_n_layer(const struct llama_model * model) {
return model->hparams.n_layer;
}
int llama_model_desc(const struct llama_model * model, char * buf, size_t buf_size) {
return snprintf(buf, buf_size, "%s %s %s",
model->name.c_str(),

10
llama.h
View file

@ -249,11 +249,6 @@ extern "C" {
LLAMA_API int llama_n_ctx (const struct llama_context * ctx);
LLAMA_API int llama_n_ctx_train(const struct llama_context * ctx);
LLAMA_API int llama_n_embd (const struct llama_context * ctx);
LLAMA_API int llama_n_ff (const struct llama_context * ctx);
LLAMA_API int llama_n_head (const struct llama_context * ctx);
LLAMA_API int llama_n_head_kv (const struct llama_context * ctx);
LLAMA_API int llama_n_rot (const struct llama_context * ctx);
LLAMA_API int llama_n_layer (const struct llama_context * ctx);
LLAMA_API enum llama_vocab_type llama_vocab_type(const struct llama_context * ctx);
@ -261,11 +256,6 @@ extern "C" {
LLAMA_API int llama_model_n_ctx (const struct llama_model * model);
LLAMA_API int llama_model_n_ctx_train(const struct llama_model * model);
LLAMA_API int llama_model_n_embd (const struct llama_model * model);
LLAMA_API int llama_model_n_ff (const struct llama_model * model);
LLAMA_API int llama_model_n_head (const struct llama_model * model);
LLAMA_API int llama_model_n_head_kv (const struct llama_model * model);
LLAMA_API int llama_model_n_rot (const struct llama_model * model);
LLAMA_API int llama_model_n_layer (const struct llama_model * model);
// Get a string describing the model type
LLAMA_API int llama_model_desc(const struct llama_model * model, char * buf, size_t buf_size);