Skip to content

Commit 4f2348b

Browse files
fix some tests
1 parent e58402b commit 4f2348b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/transformers/models/blt/modeling_blt.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,6 @@ def byte_group_hash_function(
992992
hashes = rolling_polynomial_hash(windows, hash_func_nb)
993993
hash_values = hashes % max_hash
994994

995-
hash_values.requires_grad = False
996995
return hash_values
997996

998997

src/transformers/models/blt/modular_blt.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ def byte_group_hash_function(
120120
hashes = rolling_polynomial_hash(windows, hash_func_nb)
121121
hash_values = hashes % max_hash
122122

123-
hash_values.requires_grad = False
124123
return hash_values
125124

126125

@@ -459,7 +458,7 @@ def forward(
459458
)
460459

461460
layer_idx = idx if self.config.cross_attn_all_layers else 0
462-
cross_attention_output, _, _ = self.cross_attn_layers[layer_idx](
461+
cross_attention_output, _ = self.cross_attn_layers[layer_idx](
463462
hidden_states=patch_embeds,
464463
cross_attention_states=hidden_states,
465464
attention_mask=cross_mask,
@@ -579,7 +578,7 @@ def forward(
579578

580579
if i == 0 or self.config.cross_attn_all_layers:
581580
# Use cross attention to extract info from patch_embeds into hidden_states
582-
cross_attention_output, _, _ = self.cross_attn_layers[i](
581+
cross_attention_output, _ = self.cross_attn_layers[i](
583582
hidden_states=hidden_states,
584583
cross_attention_states=patch_embeds,
585584
attention_mask=cross_mask,

utils/check_docstrings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@
125125
"BlipVisionConfig",
126126
"BloomConfig",
127127
"BloomTokenizerFast",
128+
"BLTConfig",
129+
"BLTPatcherConfig",
130+
"BLTTokenizer",
128131
"BridgeTowerTextConfig",
129132
"BridgeTowerVisionConfig",
130133
"BrosModel",

0 commit comments

Comments
 (0)