Skip to content

Commit 076e3b9

Browse files
committed
helper: use mtmd_image_tokens_get_n_pos
1 parent 049ae24 commit 076e3b9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tools/llava/mtmd.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,7 @@ int32_t mtmd_helper_eval_chunk_single(mtmd_context * ctx,
681681
i_batch++;
682682
}
683683

684-
// for mrope, one image is one single **temporal** position
685-
n_past += mtmd_decode_use_mrope(ctx) ? 1 : n_tokens;
684+
n_past += mtmd_image_tokens_get_n_pos(image_tokens);
686685
*new_n_past = n_past;
687686

688687
if (mtmd_decode_use_non_causal(ctx)) {

0 commit comments

Comments
 (0)