Skip to content

Commit 3a58d2b

Browse files
committed
chore: minor linting
1 parent 7cef8b2 commit 3a58d2b

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

tools/llm/utils.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -515,9 +515,15 @@ def generate_mm_with_static_cache(
515515
overall_end.record()
516516
torch.cuda.synchronize()
517517
overall_time = overall_start.elapsed_time(overall_end)
518-
return output_tokens[:, input_ids.shape[1]:], step_times, overall_time, vision_time, mlp_time
518+
return (
519+
output_tokens[:, input_ids.shape[1] :],
520+
step_times,
521+
overall_time,
522+
vision_time,
523+
mlp_time,
524+
)
519525
else:
520-
return output_tokens[:, input_ids.shape[1]:]
526+
return output_tokens[:, input_ids.shape[1] :]
521527

522528

523529
def _prepare_qwen_mm_inputs(
@@ -762,9 +768,15 @@ def generate_mm_qwen2_5_vl_with_static_cache(
762768
torch.cuda.synchronize()
763769
overall_time = overall_start.elapsed_time(overall_end)
764770
# For Qwen, there is no separate MLP part like in Eagle, so mlp_time is 0.
765-
return output_tokens[:, input_ids.shape[1]:], step_times, overall_time, vision_time, 0.0
771+
return (
772+
output_tokens[:, input_ids.shape[1] :],
773+
step_times,
774+
overall_time,
775+
vision_time,
776+
0.0,
777+
)
766778
else:
767-
return output_tokens[:, input_ids.shape[1]:]
779+
return output_tokens[:, input_ids.shape[1] :]
768780

769781

770782
@torch.inference_mode()

0 commit comments

Comments
 (0)