diff --git a/llama.cpp b/llama.cpp index c5112e5ba..ccec53c86 100644 --- a/llama.cpp +++ b/llama.cpp @@ -4147,6 +4147,18 @@ int llama_n_embd_from_model(const struct llama_model * model) { return model->hparams.n_embd; } +int llama_n_mult_from_model(const struct llama_model * model) { + return model->hparams.n_mult; +} + +int llama_n_head_from_model(const struct llama_model * model) { + return model->hparams.n_head; +} + +int llama_n_rot_from_model(const struct llama_model * model) { + return model->hparams.n_rot; +} + int llama_n_layer_from_model(const struct llama_model * model) { return model->hparams.n_layer; } @@ -4163,6 +4175,18 @@ int llama_n_embd(const struct llama_context * ctx) { return ctx->model.hparams.n_embd; } +int llama_n_mult(const struct llama_context * ctx) { + return ctx->model.hparams.n_mult; +} + +int llama_n_head(const struct llama_context * ctx) { + return ctx->model.hparams.n_head; +} + +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; } diff --git a/llama.h b/llama.h index 647f9abdc..e74279aba 100644 --- a/llama.h +++ b/llama.h @@ -330,11 +330,17 @@ extern "C" { LLAMA_API int llama_n_vocab(const struct llama_context * ctx); LLAMA_API int llama_n_ctx (const struct llama_context * ctx); LLAMA_API int llama_n_embd (const struct llama_context * ctx); + LLAMA_API int llama_n_mult (const struct llama_context * ctx); + LLAMA_API int llama_n_head (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 int llama_n_vocab_from_model(const struct llama_model * model); LLAMA_API int llama_n_ctx_from_model (const struct llama_model * model); LLAMA_API int llama_n_embd_from_model (const struct llama_model * model); + LLAMA_API int llama_n_mult_from_model (const struct llama_model * model); + LLAMA_API int llama_n_head_from_model (const struct llama_model * model); + LLAMA_API int llama_n_rot_from_model (const struct llama_model * model); LLAMA_API int llama_n_layer_from_model(const struct llama_model * model); // Get the vocabulary as output parameters.