Skip to content

Commit 1eb106c

Browse files
committed
delete dead code
Signed-off-by: HonestDeng <2958906959@qq.com>
1 parent 6ec6a23 commit 1eb106c

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

vllm_omni/model_executor/models/mammoth_moda2/mammoth_moda2_ar.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,9 @@ def moe_enable(moe_type, layer_type, layer_idx):
6565
moe_type, layers = moe_type.split("-")
6666
start, end = [int(n) for n in layers.split(":")]
6767
else:
68-
moe_type = moe_type
6968
start, end = 0, float("inf")
7069
assert moe_type in ["none", "attention", "ffn", "ffn_attention"]
71-
if layer_type in moe_type and start <= layer_idx < end:
72-
return True
73-
else:
74-
return False
70+
return layer_type in moe_type and start <= layer_idx < end
7571

7672
def moe_forward(
7773
hidden_states: torch.Tensor,
@@ -622,14 +618,11 @@ def _apply_t2i_token_constraints(self, logits: torch.Tensor) -> torch.Tensor:
622618
continue
623619

624620
ar_width = runtime_info["ar_width"][0]
625-
ar_height = runtime_info["ar_height"][0]
626621
eol_token_id = runtime_info["eol_token_id"][0]
627622
visual_start = runtime_info["visual_token_start_id"][0]
628623
visual_end = runtime_info["visual_token_end_id"][0]
629624
generated_len = runtime_info["generated_len"]
630625

631-
expected_token_num = (ar_width + 1) * ar_height
632-
633626
row = logits[i]
634627
column_id = generated_len % (ar_width + 1)
635628
if column_id == ar_width:

0 commit comments

Comments
 (0)