Skip to content

Commit 970a212

Browse files
Xarbirusarthw
authored andcommitted
llama : add llama_n_head() (ggml-org#9512)
1 parent a99e024 commit 970a212

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

include/llama.h

+1
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ extern "C" {
441441
LLAMA_API int32_t llama_n_ctx_train(const struct llama_model * model);
442442
LLAMA_API int32_t llama_n_embd (const struct llama_model * model);
443443
LLAMA_API int32_t llama_n_layer (const struct llama_model * model);
444+
LLAMA_API int32_t llama_n_head (const struct llama_model * model);
444445

445446
LLAMA_API const struct llama_model * llama_get_model(const struct llama_context * ctx);
446447

src/llama.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -19052,6 +19052,10 @@ int32_t llama_n_layer(const struct llama_model * model) {
1905219052
return model->hparams.n_layer;
1905319053
}
1905419054

19055+
int32_t llama_n_head(const struct llama_model * model) {
19056+
return model->hparams.n_head();
19057+
}
19058+
1905519059
const struct llama_model * llama_get_model(const struct llama_context * ctx) {
1905619060
return &ctx->model;
1905719061
}

0 commit comments

Comments
 (0)