Skip to content

Commit

Permalink
fix with deep copy
Browse files Browse the repository at this point in the history
  • Loading branch information
AllentDan committed Dec 6, 2024
1 parent bbc108c commit 2940dce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lmdeploy/pytorch/engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ def __update_inputs(next_token_ids):
retrieve_indices) = self.model_agent.generate_candidates(
spec_logits, next_token_ids)
bs, _, tree_decode_len = tree_candidates.shape
spec_inputs = inputs
spec_inputs = copy.deepcopy(inputs)
spec_inputs.input_ids = tree_candidates.flatten().unsqueeze(0)
spec_inputs.history_lengths += spec_inputs.seq_length
spec_inputs.seq_length = torch.ones_like(
Expand Down

0 comments on commit 2940dce

Please sign in to comment.