File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -481,6 +481,7 @@ extern "C" {
481481 LLAMA_API int32_t llama_model_n_ctx_train (const struct llama_model * model);
482482 LLAMA_API int32_t llama_model_n_embd (const struct llama_model * model);
483483 LLAMA_API int32_t llama_model_n_layer (const struct llama_model * model);
484+ LLAMA_API int32_t llama_model_dev_layer (const struct llama_model * model, int32_t il);
484485 LLAMA_API int32_t llama_model_n_head (const struct llama_model * model);
485486 LLAMA_API int32_t llama_model_n_head_kv (const struct llama_model * model);
486487 LLAMA_API int32_t llama_model_n_swa (const struct llama_model * model);
Original file line number Diff line number Diff line change @@ -19192,6 +19192,11 @@ int32_t llama_model_n_layer(const llama_model * model) {
1919219192 return model->hparams.n_layer;
1919319193}
1919419194
19195+ int32_t llama_model_dev_layer(const llama_model * model, int32_t il) {
19196+ ggml_backend_dev_t dev = model->dev_layer(il);
19197+ return static_cast<int32_t>(ggml_backend_dev_type(dev));
19198+ }
19199+
1919519200int32_t llama_model_n_head(const llama_model * model) {
1919619201 return model->hparams.n_head();
1919719202}
You can’t perform that action at this time.
0 commit comments