Skip to content

Commit 7cb69f5

Browse files
committed
review: rename part_bounded to n_rs
1 parent 757be51 commit 7cb69f5

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

common/common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ common_context_seq_rm_type common_context_can_seq_rm(llama_context * ctx) {
14221422

14231423
if (llama_n_rs_seq(ctx) > 0) {
14241424
LOG_INF("%s: the context supports bounded partial sequence removal\n", __func__);
1425-
res = COMMON_CONTEXT_SEQ_RM_TYPE_PART_BOUNDED;
1425+
res = COMMON_CONTEXT_SEQ_RM_TYPE_RS;
14261426
goto done;
14271427
}
14281428

common/common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ enum common_speculative_type {
160160
COMMON_SPECULATIVE_TYPE_NONE, // no speculative decoding
161161
COMMON_SPECULATIVE_TYPE_DRAFT_SIMPLE, // standalone draft model speculative decoding
162162
COMMON_SPECULATIVE_TYPE_DRAFT_EAGLE3, // Eagle3 speculative decoding
163-
COMMON_SPECULATIVE_TYPE_DRAFT_MTP, // multi-token prediction head loaded from the target GGUF
163+
COMMON_SPECULATIVE_TYPE_DRAFT_MTP, // Multi-token prediction
164164
COMMON_SPECULATIVE_TYPE_NGRAM_SIMPLE, // simple self-speculative decoding based on n-grams
165165
COMMON_SPECULATIVE_TYPE_NGRAM_MAP_K, // self-speculative decoding with n-gram keys only
166166
COMMON_SPECULATIVE_TYPE_NGRAM_MAP_K4V, // self-speculative decoding with n-gram keys and 4 m-gram values
@@ -884,7 +884,7 @@ enum common_context_seq_rm_type {
884884
COMMON_CONTEXT_SEQ_RM_TYPE_NO = 0, // seq_rm not supported (e.g. no memory module)
885885
COMMON_CONTEXT_SEQ_RM_TYPE_PART = 1, // can seq_rm partial sequences
886886
COMMON_CONTEXT_SEQ_RM_TYPE_FULL = 2, // can seq_rm full sequences only
887-
COMMON_CONTEXT_SEQ_RM_TYPE_PART_BOUNDED = 3, // can seq_rm partial sequences, bounded by n_rs_seq
887+
COMMON_CONTEXT_SEQ_RM_TYPE_RS = 3, // can seq_rm partial sequences, bounded by n_rs_seq
888888
};
889889

890890
// check if the llama_context can remove sequences

examples/speculative-simple/speculative-simple.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ int main(int argc, char ** argv) {
8383

8484
// check if the context supports partial sequence removal
8585
const bool use_ckpt_tgt = (common_context_can_seq_rm(ctx_tgt) == COMMON_CONTEXT_SEQ_RM_TYPE_FULL)
86-
|| (common_context_can_seq_rm(ctx_tgt) == COMMON_CONTEXT_SEQ_RM_TYPE_PART_BOUNDED);
8786
const bool use_ckpt_dft = (common_context_can_seq_rm(ctx_dft.get()) == COMMON_CONTEXT_SEQ_RM_TYPE_FULL);
8887

8988
if (use_ckpt_tgt) {

tools/server/server-context.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2696,8 +2696,8 @@ struct server_context_impl {
26962696
// - the model uses SWA (and we are not using `swa_full`)
26972697
// - the model supports partial sequence removal but only up to a fixed bound
26982698
do_checkpoint = do_checkpoint && (
2699-
ctx_tgt_seq_rm_type == COMMON_CONTEXT_SEQ_RM_TYPE_FULL ||
2700-
ctx_tgt_seq_rm_type == COMMON_CONTEXT_SEQ_RM_TYPE_PART_BOUNDED ||
2699+
ctx_tgt_seq_rm_type == COMMON_CONTEXT_SEQ_RM_TYPE_FULL ||
2700+
ctx_tgt_seq_rm_type == COMMON_CONTEXT_SEQ_RM_TYPE_RS ||
27012701
n_swa > 0);
27022702

27032703
bool has_mtmd = false;

0 commit comments

Comments
 (0)