Skip to content

Commit b268941

Browse files
committed
remove device
1 parent 30b7d1e commit b268941

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lmdeploy/pytorch/models/internvl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ def update_forward_inputs(self, input_ids: torch.Tensor, new_seqlens: List[int],
735735
# create new model inputs and context, to get updated position_ids and attn_metadata
736736
device = input_ids.device
737737
total_msgs = len(new_seqlens)
738-
kv_seqlens = torch.tensor([meta['new_seqlen'] for meta in context.model_metas], device=device, dtype=torch.long)
738+
kv_seqlens = torch.tensor([meta['new_seqlen'] for meta in context.model_metas], dtype=torch.long)
739739
new_model_inputs = ModelInputs(input_ids=input_ids,
740740
seq_length=torch.tensor(new_seqlens, device=device, dtype=torch.long),
741741
history_lengths=torch.tensor(prev_lens, device=device, dtype=torch.long),

0 commit comments

Comments
 (0)