Add llama_context_default_params_by_ref to be available to get it from java JNA
This commit is contained in:
parent
5517d6e692
commit
7f828e6b10
2 changed files with 8 additions and 0 deletions
|
@ -901,6 +901,13 @@ static bool kv_cache_init(
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct llama_context_params * llama_context_default_params_by_ref() {
|
||||||
|
struct llama_context_params params = llama_context_default_params();
|
||||||
|
struct llama_context_params* result = new llama_context_params();
|
||||||
|
*result = params;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
struct llama_context_params llama_context_default_params() {
|
struct llama_context_params llama_context_default_params() {
|
||||||
struct llama_context_params result = {
|
struct llama_context_params result = {
|
||||||
/*.seed =*/ LLAMA_DEFAULT_SEED,
|
/*.seed =*/ LLAMA_DEFAULT_SEED,
|
||||||
|
|
1
llama.h
1
llama.h
|
@ -214,6 +214,7 @@ extern "C" {
|
||||||
|
|
||||||
LLAMA_API int llama_max_devices();
|
LLAMA_API int llama_max_devices();
|
||||||
|
|
||||||
|
LLAMA_API struct llama_context_params * llama_context_default_params_by_ref();
|
||||||
LLAMA_API struct llama_context_params llama_context_default_params();
|
LLAMA_API struct llama_context_params llama_context_default_params();
|
||||||
LLAMA_API struct llama_model_quantize_params llama_model_quantize_default_params();
|
LLAMA_API struct llama_model_quantize_params llama_model_quantize_default_params();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue