[V0 Deprecation] Remove unused context_len and seq_len from M-RoPE (#28395)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2025-11-11 00:30:06 +08:00
committed by GitHub
parent f080a83511
commit d0e186c16f
13 changed files with 2 additions and 39 deletions

View File

@@ -1419,8 +1419,6 @@ class Qwen3VLForConditionalGeneration(
hf_config: PretrainedConfig,
image_grid_thw: list[list[int]] | torch.Tensor,
video_grid_thw: list[list[int]] | torch.Tensor,
context_len: int = 0,
seq_len: int | None = None,
second_per_grid_ts: list[float] | None = None,
audio_feature_lengths: torch.Tensor | None = None,
use_audio_in_video: bool = False,
@@ -1519,7 +1517,7 @@ class Qwen3VLForConditionalGeneration(
llm_positions = torch.cat(llm_pos_ids_list, dim=1).reshape(3, -1)
mrope_position_delta = (llm_positions.max() + 1 - len(input_tokens)).item()
llm_positions = llm_positions[:, context_len:seq_len]
return llm_positions, mrope_position_delta
def get_language_model(self) -> torch.nn.Module: