Skip to content

Commit 6e4d25f

Browse files
update modular
1 parent f49cf41 commit 6e4d25f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/transformers/models/blt/modular_blt.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,7 @@ def process_patch_lengths(patch_lengths: torch.Tensor, max_patch_length: Optiona
314314
return padded
315315

316316

317-
# ==============================================================================
318317
# INHERITED COMPONENTS (minimal changes from Mllama)
319-
# ==============================================================================
320318

321319

322320
class BLTMLP(MllamaTextMLP):
@@ -356,9 +354,9 @@ def forward(self, x, position_ids):
356354
return cos.to(dtype=x.dtype), sin.to(dtype=x.dtype)
357355

358356

359-
# ==============================================================================
357+
360358
# INHERITED BUT CUSTOMIZED COMPONENTS
361-
# ==============================================================================
359+
362360

363361

364362
class BLTPreTrainedModel(MllamaPreTrainedModel):
@@ -567,9 +565,7 @@ def forward(
567565
return attn_output, attn_weights, past_key_value
568566

569567

570-
# ==============================================================================
571568
# BLT-SPECIFIC COMPONENTS (no Mllama equivalent)
572-
# ==============================================================================
573569

574570

575571
class BLTLocalEncoder(nn.Module):

0 commit comments

Comments
 (0)