Skip to content

Commit 00c1bae

Browse files
committed
c definitions
1 parent aaf1777 commit 00c1bae

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

llama_cpp/_internals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def n_embd(self) -> int:
9898

9999
def n_layer(self) -> int:
100100
return llama_cpp.llama_n_layer(self.model)
101-
101+
102102
def dev_layer(self, il: int) -> LlamaBackendDev:
103103
return LlamaBackendDev(llama_cpp.llama_model_dev_layer(self.model, il))
104104

llama_cpp/llama_cpp.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,6 +1395,11 @@ def llama_model_n_embd(model: llama_model_p, /) -> int:
13951395
def llama_model_n_layer(model: llama_model_p, /) -> int:
13961396
...
13971397

1398+
# LLAMA_API int32_t llama_model_dev_layer (const struct llama_model * model, int32_t il);
1399+
@ctypes_function("llama_model_dev_layer", [llama_model_p_ctypes, ctypes.c_int32], ctypes.c_int32)
1400+
def llama_model_dev_layer(model: llama_model_p, il: Union[ctypes.c_int32, int], /) -> int:
1401+
...
1402+
13981403

13991404
# LLAMA_API int32_t llama_model_n_head (const struct llama_model * model);
14001405
@ctypes_function("llama_model_n_head", [llama_model_p_ctypes], ctypes.c_int32)

0 commit comments

Comments
 (0)