Remove all cases of fmt: on/off (#26253)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2025-10-05 17:18:14 +01:00
committed by GitHub
parent 4e256cadc2
commit 557b2e961d
5 changed files with 216 additions and 156 deletions

View File

@@ -1398,12 +1398,10 @@ class Qwen2_5_VLForConditionalGeneration(
# Tensors
input_ids_t = torch.as_tensor(input_ids, device=device, dtype=torch.long)
# fmt: off
mm_embeddings_out = [mm[:, :-4] for mm in
multimodal_embeddings]
mm_embeddings_pos = [mm[:, -4:].permute(1, 0).long() for mm in
multimodal_embeddings]
# fmt: in
mm_embeddings_out = [mm[:, :-4] for mm in multimodal_embeddings]
mm_embeddings_pos = [
mm[:, -4:].permute(1, 0).long() for mm in multimodal_embeddings
]
positions, mrope_positions_delta = recompute_mrope_positions(
input_ids_t,