Skip to content

Commit 9c7fc33

Browse files
orestis-zclaude
andcommitted
fix: simplify redundant projector_type checks inside domino branch
Inside `if self.projector_type == "domino":`, two nested checks always evaluated to True/constant. Replace with the simplified values. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Orestis Zambounis <orestis.zambounis@gmail.com>
1 parent f38291a commit 9c7fc33

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

  • src/speculators/models/dflash

src/speculators/models/dflash/core.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -509,11 +509,7 @@ def forward(
509509
hidden_4d = hidden.reshape(1, num_anchors, self.block_size, -1)
510510
base_logits_4d = logits.reshape(1, num_anchors, self.block_size, -1)
511511

512-
suffix_start = (
513-
self.config.pure_draft_prefix_len
514-
if self.config.projector_type == "domino"
515-
else 1 + self.config.pure_draft_prefix_len
516-
)
512+
suffix_start = self.config.pure_draft_prefix_len
517513

518514
prev_token_ids = input_ids[:, anchored_block_indices]
519515
prev_token_ids_4d = prev_token_ids.reshape(1, num_anchors, self.block_size)
@@ -541,7 +537,7 @@ def forward(
541537
else:
542538
base_mask = domino_loss_mask
543539

544-
domino_decay = "domino" if self.config.projector_type == "domino" else "dflash"
540+
domino_decay = "domino"
545541
base_loss, base_metrics = compute_metrics(
546542
logits,
547543
targets,

0 commit comments

Comments
 (0)