Skip to content

Commit 2355c62

Browse files
committed
change chunking threshold
1 parent 324e209 commit 2355c62

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Diff for: src/boltz/data/const.py

+7
Original file line numberDiff line numberDiff line change
@@ -352,3 +352,10 @@
352352

353353
max_msa_seqs = 16384
354354
max_paired_seqs = 8192
355+
356+
357+
####################################################################################################
358+
# CHUNKING
359+
####################################################################################################
360+
361+
chunk_size_threshold = 384

Diff for: src/boltz/model/modules/trunk.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def forward(
224224
"""
225225
# Set chunk sizes
226226
if not self.training:
227-
if z.shape[1] > 512:
227+
if z.shape[1] > const.chunk_size_threshold:
228228
chunk_heads_pwa = True
229229
chunk_size_transition_z = 64
230230
chunk_size_transition_msa = 32
@@ -520,7 +520,7 @@ def forward(
520520
521521
"""
522522
if not self.training:
523-
if z.shape[1] > 512:
523+
if z.shape[1] > const.chunk_size_threshold:
524524
chunk_size_tri_attn = 128
525525
else:
526526
chunk_size_tri_attn = 512

0 commit comments

Comments
 (0)