klemenk commited on
Commit
f9813dc
·
verified ·
1 Parent(s): 75ed49a

Update modeling_auristream.py

Browse files
Files changed (1) hide show
  1. modeling_auristream.py +1 -1
modeling_auristream.py CHANGED
@@ -98,7 +98,7 @@ class AuriStream(PreTrainedModel):
98
  x = block(x)
99
 
100
  # append the last hidden state if we did not exit early
101
- if up_until_layer is not None and block_idx != up_until_layer:
102
  all_hidden_states.append(x)
103
 
104
  if output_hidden_states:
 
98
  x = block(x)
99
 
100
  # append the last hidden state if we did not exit early
101
+ if up_until_layer is None or block_idx == len(self.transformer.h)) - 1:
102
  all_hidden_states.append(x)
103
 
104
  if output_hidden_states: