Skip to content

Commit 1966df5

Browse files
committed
Update Submodule vendor/llama.cpp 0b5be7e..9723942
Signed-off-by: JamePeng <jame_peng@sina.com>
1 parent a80434b commit 1966df5

2 files changed

Lines changed: 78 additions & 57 deletions

File tree

llama_cpp/_ggml.py

Lines changed: 77 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,16 @@ class GGMLPrec(enum.IntEnum):
213213
GGML_PREC_F32 = 10
214214

215215

216+
# // op hint
217+
# enum ggml_op_hint {
218+
# GGML_HINT_NONE = 0,
219+
# GGML_HINT_SRC0_IS_HADAMARD = 1,
220+
# };
221+
class GGMLOpHint(enum.IntEnum):
222+
GGML_HINT_NONE = 0
223+
GGML_HINT_SRC0_IS_HADAMARD = 1
224+
225+
216226
# // model file types
217227
# enum ggml_ftype {
218228
# GGML_FTYPE_UNKNOWN = -1,
@@ -369,6 +379,9 @@ class GGMLFType(enum.IntEnum):
369379
# GGML_OP_SOLVE_TRI,
370380
# GGML_OP_GATED_DELTA_NET,
371381
# GGML_OP_LIGHTNING_INDEXER,
382+
# GGML_OP_DSV4_HC_COMB,
383+
# GGML_OP_DSV4_HC_PRE,
384+
# GGML_OP_DSV4_HC_POST,
372385

373386
# GGML_OP_UNARY,
374387

@@ -480,23 +493,26 @@ class GGML_OP(enum.IntEnum):
480493
GGML_OP_SOLVE_TRI = 85
481494
GGML_OP_GATED_DELTA_NET = 86
482495
GGML_OP_LIGHTNING_INDEXER = 87
496+
GGML_OP_DSV4_HC_COMB = 88
497+
GGML_OP_DSV4_HC_PRE = 89
498+
GGML_OP_DSV4_HC_POST = 90
483499

484-
GGML_OP_UNARY = 88
500+
GGML_OP_UNARY = 91
485501

486-
GGML_OP_MAP_CUSTOM1 = 89
487-
GGML_OP_MAP_CUSTOM2 = 90
488-
GGML_OP_MAP_CUSTOM3 = 91
502+
GGML_OP_MAP_CUSTOM1 = 92
503+
GGML_OP_MAP_CUSTOM2 = 93
504+
GGML_OP_MAP_CUSTOM3 = 94
489505

490-
GGML_OP_CUSTOM = 92
506+
GGML_OP_CUSTOM = 95
491507

492-
GGML_OP_CROSS_ENTROPY_LOSS = 93
493-
GGML_OP_CROSS_ENTROPY_LOSS_BACK = 94
494-
GGML_OP_OPT_STEP_ADAMW = 95
495-
GGML_OP_OPT_STEP_SGD = 96
508+
GGML_OP_CROSS_ENTROPY_LOSS = 96
509+
GGML_OP_CROSS_ENTROPY_LOSS_BACK = 97
510+
GGML_OP_OPT_STEP_ADAMW = 98
511+
GGML_OP_OPT_STEP_SGD = 99
496512

497-
GGML_OP_GLU = 97
513+
GGML_OP_GLU = 100
498514

499-
GGML_OP_COUNT = 98
515+
GGML_OP_COUNT = 101
500516

501517
# enum ggml_unary_op {
502518
# GGML_UNARY_OP_ABS,
@@ -557,6 +573,7 @@ class GGMLUnaryOp(enum.IntEnum):
557573
# GGML_GLU_OP_SWIGLU_OAI,
558574
# GGML_GLU_OP_GEGLU_ERF,
559575
# GGML_GLU_OP_GEGLU_QUICK,
576+
# GGML_GLU_OP_SWIGLU_CLAMP,
560577
# GGML_GLU_OP_COUNT,
561578
# };
562579
class GGMLGluOp(enum.IntEnum):
@@ -566,8 +583,56 @@ class GGMLGluOp(enum.IntEnum):
566583
GGML_GLU_OP_SWIGLU_OAI = 3
567584
GGML_GLU_OP_GEGLU_ERF = 4
568585
GGML_GLU_OP_GEGLU_QUICK = 5
586+
GGML_GLU_OP_SWIGLU_CLAMP = 6
587+
588+
GGML_GLU_OP_COUNT = 7
589+
590+
591+
# enum ggml_log_level {
592+
# GGML_LOG_LEVEL_NONE = 0,
593+
# GGML_LOG_LEVEL_DEBUG = 1,
594+
# GGML_LOG_LEVEL_INFO = 2,
595+
# GGML_LOG_LEVEL_WARN = 3,
596+
# GGML_LOG_LEVEL_ERROR = 4,
597+
# GGML_LOG_LEVEL_CONT = 5, // continue previous log
598+
# };
599+
class GGMLLogLevel(enum.IntEnum):
600+
GGML_LOG_LEVEL_NONE = 0
601+
GGML_LOG_LEVEL_DEBUG = 1
602+
GGML_LOG_LEVEL_INFO = 2
603+
GGML_LOG_LEVEL_WARN = 3
604+
GGML_LOG_LEVEL_ERROR = 4
605+
GGML_LOG_LEVEL_CONT = 5 # continue previous log
606+
607+
608+
# // this tensor...
609+
# enum ggml_tensor_flag {
610+
# GGML_TENSOR_FLAG_INPUT = 1, // ...is an input for the GGML compute graph
611+
# GGML_TENSOR_FLAG_OUTPUT = 2, // ...is an output for the GGML compute graph
612+
# GGML_TENSOR_FLAG_PARAM = 4, // ...contains trainable parameters
613+
# GGML_TENSOR_FLAG_LOSS = 8, // ...defines loss for numerical optimization (multiple loss tensors add up)
614+
# GGML_TENSOR_FLAG_COMPUTE = 16, // ...must be computed
615+
# };
616+
class GGMLTensorFlag(enum.IntEnum):
617+
GGML_TENSOR_FLAG_INPUT = 1 # ...is an input for the GGML compute graph
618+
GGML_TENSOR_FLAG_OUTPUT = 2 # ...is an output for the GGML compute graph
619+
GGML_TENSOR_FLAG_PARAM = 4 # ...contains trainable parameters
620+
GGML_TENSOR_FLAG_LOSS = 8 # ...defines loss for numerical optimization (multiple loss tensors add up)
621+
GGML_TENSOR_FLAG_COMPUTE = 16 # ...must be computed
622+
623+
624+
# enum ggml_tri_type {
625+
# GGML_TRI_TYPE_UPPER_DIAG = 0,
626+
# GGML_TRI_TYPE_UPPER = 1,
627+
# GGML_TRI_TYPE_LOWER_DIAG = 2,
628+
# GGML_TRI_TYPE_LOWER = 3
629+
# };
630+
class GGMLTriType(enum.IntEnum):
631+
GGML_TRI_TYPE_UPPER_DIAG = 0
632+
GGML_TRI_TYPE_UPPER = 1
633+
GGML_TRI_TYPE_LOWER_DIAG = 2
634+
GGML_TRI_TYPE_LOWER = 3
569635

570-
GGML_GLU_OP_COUNT = 6
571636

572637
# //
573638
# // ggml object
@@ -649,50 +714,6 @@ class ggml_context(ctypes.Structure):
649714
ggml_context_p = ctypes.POINTER(ggml_context)
650715

651716

652-
# enum ggml_log_level {
653-
# GGML_LOG_LEVEL_NONE = 0,
654-
# GGML_LOG_LEVEL_DEBUG = 1,
655-
# GGML_LOG_LEVEL_INFO = 2,
656-
# GGML_LOG_LEVEL_WARN = 3,
657-
# GGML_LOG_LEVEL_ERROR = 4,
658-
# GGML_LOG_LEVEL_CONT = 5, // continue previous log
659-
# };
660-
class GGMLLogLevel(enum.IntEnum):
661-
GGML_LOG_LEVEL_NONE = 0
662-
GGML_LOG_LEVEL_DEBUG = 1
663-
GGML_LOG_LEVEL_INFO = 2
664-
GGML_LOG_LEVEL_WARN = 3
665-
GGML_LOG_LEVEL_ERROR = 4
666-
GGML_LOG_LEVEL_CONT = 5 # continue previous log
667-
668-
669-
# // this tensor...
670-
# enum ggml_tensor_flag {
671-
# GGML_TENSOR_FLAG_INPUT = 1, // ...is an input for the GGML compute graph
672-
# GGML_TENSOR_FLAG_OUTPUT = 2, // ...is an output for the GGML compute graph
673-
# GGML_TENSOR_FLAG_PARAM = 4, // ...contains trainable parameters
674-
# GGML_TENSOR_FLAG_LOSS = 8, // ...defines loss for numerical optimization (multiple loss tensors add up)
675-
# };
676-
class GGMLTensorFlag(enum.IntEnum):
677-
GGML_TENSOR_FLAG_INPUT = 1 # ...is an input for the GGML compute graph
678-
GGML_TENSOR_FLAG_OUTPUT = 2 # ...is an output for the GGML compute graph
679-
GGML_TENSOR_FLAG_PARAM = 4 # ...contains trainable parameters
680-
GGML_TENSOR_FLAG_LOSS = 8 # ...defines loss for numerical optimization (multiple loss tensors add up)
681-
682-
683-
# enum ggml_tri_type {
684-
# GGML_TRI_TYPE_UPPER_DIAG = 0,
685-
# GGML_TRI_TYPE_UPPER = 1,
686-
# GGML_TRI_TYPE_LOWER_DIAG = 2,
687-
# GGML_TRI_TYPE_LOWER = 3
688-
# };
689-
class GGMLTriType(enum.IntEnum):
690-
GGML_TRI_TYPE_UPPER_DIAG = 0
691-
GGML_TRI_TYPE_UPPER = 1
692-
GGML_TRI_TYPE_LOWER_DIAG = 2
693-
GGML_TRI_TYPE_LOWER = 3
694-
695-
696717
# struct ggml_init_params {
697718
# // memory pool
698719
# size_t mem_size; // bytes

vendor/llama.cpp

Submodule llama.cpp updated 53 files

0 commit comments

Comments
 (0)