razmars commited on
Commit
c2a97fb
·
verified ·
1 Parent(s): 87b73e2

Update modeling_super_linear.py

Browse files
Files changed (1) hide show
  1. modeling_super_linear.py +1 -1
modeling_super_linear.py CHANGED
@@ -601,7 +601,7 @@ class SuperLinearForCausalLM(PreTrainedModel, GenerationMixin):
601
  upsample = interpolate(x, scale_factor=scale_factor, mode='linear') # [B, C, new_L]
602
 
603
  # Take last 500 timesteps and rearrange to [B, L, C]
604
- upsample = upsample.permute(0, 2, 1)[:, -500:, :]
605
 
606
  # If input was 2D, remove the channel dimension
607
  if x.shape[1] == 1:
 
601
  upsample = interpolate(x, scale_factor=scale_factor, mode='linear') # [B, C, new_L]
602
 
603
  # Take last 500 timesteps and rearrange to [B, L, C]
604
+ upsample = upsample.permute(0, 2, 1)[:, -target_len:, :]
605
 
606
  # If input was 2D, remove the channel dimension
607
  if x.shape[1] == 1: