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 @@ -511,6 +511,7 @@ extern "C" {
511511 LLAMA_API int32_t llama_model_n_ctx_train (const struct llama_model * model);
512512 LLAMA_API int32_t llama_model_n_embd (const struct llama_model * model);
513513 LLAMA_API int32_t llama_model_n_layer (const struct llama_model * model);
514+ LLAMA_API int32_t llama_model_dev_layer (const struct llama_model * model, int32_t il);
514515 LLAMA_API int32_t llama_model_n_head (const struct llama_model * model);
515516 LLAMA_API int32_t llama_model_n_head_kv (const struct llama_model * model);
516517 LLAMA_API int32_t llama_model_n_swa (const struct llama_model * model);
Original file line number Diff line number Diff line change @@ -14698,6 +14698,11 @@ int32_t llama_model_n_layer(const llama_model * model) {
1469814698 return model->hparams.n_layer;
1469914699}
1470014700
14701+ int32_t llama_model_dev_layer(const llama_model * model, int32_t il) {
14702+ ggml_backend_dev_t dev = model->dev_layer(il);
14703+ return static_cast<int32_t>(ggml_backend_dev_type(dev));
14704+ }
14705+
1470114706int32_t llama_model_n_head(const llama_model * model) {
1470214707 return model->hparams.n_head();
1470314708}
You can’t perform that action at this time.
0 commit comments