@@ -1027,6 +1027,8 @@ class llama_context_params(ctypes.Structure):
10271027 cb_eval_user_data (ctypes.ctypes.c_void_p): user data for cb_eval
10281028 type_k (int): data type for K cache
10291029 type_v (int): data type for V cache
1030+ moe_cache_size (int): device cache size in bytes for host-resident MoE experts
1031+ moe_cache_cpu_share (float): share of MoE cache misses computed on the CPU
10301032 abort_callback (ggml_abort_callback): abort callback if it returns true, execution of llama_decode() will be aborted
10311033 abort_callback_data (ctypes.ctypes.c_void_p): data for abort_callback
10321034 embeddings (bool): if true, extract embeddings (together with logits)
@@ -1067,6 +1069,8 @@ class llama_context_params(ctypes.Structure):
10671069 cb_eval_user_data : ctypes .c_void_p
10681070 type_k : int
10691071 type_v : int
1072+ moe_cache_size : int
1073+ moe_cache_cpu_share : float
10701074 abort_callback : Callable [[ctypes .c_void_p ], bool ]
10711075 abort_callback_data : ctypes .c_void_p
10721076 embeddings : bool
@@ -1106,6 +1110,8 @@ class llama_context_params(ctypes.Structure):
11061110 ("cb_eval_user_data" , ctypes .c_void_p ),
11071111 ("type_k" , ctypes .c_int ),
11081112 ("type_v" , ctypes .c_int ),
1113+ ("moe_cache_size" , ctypes .c_size_t ),
1114+ ("moe_cache_cpu_share" , ctypes .c_float ),
11091115 ("abort_callback" , ggml_abort_callback ),
11101116 ("abort_callback_data" , ctypes .c_void_p ),
11111117 ("embeddings" , ctypes .c_bool ),
@@ -5238,6 +5244,8 @@ def llama_log_set(
52385244# int32_t n_p_eval;
52395245# int32_t n_eval;
52405246# int32_t n_reused; // number of times a ggml compute graph had been reused
5247+ # int32_t n_reallocs_same; // reallocations with unchanged graph size
5248+ # int32_t n_reallocs_diff; // reallocations with changed graph size
52415249# };
52425250class llama_perf_context_data (ctypes .Structure ):
52435251 _fields_ = [
@@ -5248,6 +5256,8 @@ class llama_perf_context_data(ctypes.Structure):
52485256 ("n_p_eval" , ctypes .c_int32 ),
52495257 ("n_eval" , ctypes .c_int32 ),
52505258 ("n_reused" , ctypes .c_int32 ),
5259+ ("n_reallocs_same" , ctypes .c_int32 ),
5260+ ("n_reallocs_diff" , ctypes .c_int32 ),
52515261 ]
52525262
52535263
0 commit comments