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 @@ -479,6 +479,7 @@ extern "C" {
479
479
LLAMA_API int32_t llama_model_n_layer (const struct llama_model * model);
480
480
LLAMA_API int32_t llama_model_n_head (const struct llama_model * model);
481
481
LLAMA_API int32_t llama_model_n_head_kv (const struct llama_model * model);
482
+ LLAMA_API const ggml_backend_dev_t * llama_model_get_devices (const struct llama_model * model, size_t * out_len);
482
483
483
484
// Get the model's RoPE frequency scaling factor
484
485
LLAMA_API float llama_model_rope_freq_scale_train (const struct llama_model * model);
Original file line number Diff line number Diff line change @@ -3845,6 +3845,11 @@ int32_t llama_model_n_head_kv(const struct llama_model * model) {
3845
3845
return model->hparams .n_head_kv ();
3846
3846
}
3847
3847
3848
+ const ggml_backend_dev_t * llama_model_get_devices (const struct llama_model * model, size_t * out_len) {
3849
+ *out_len = model->devices .size ();
3850
+ return model->devices .data ();
3851
+ }
3852
+
3848
3853
// deprecated
3849
3854
int32_t llama_n_ctx_train (const struct llama_model * model) {
3850
3855
return llama_model_n_ctx_train (model);
You can’t perform that action at this time.
0 commit comments