oweller2 commited on
Commit
0b86b9b
1 Parent(s): 527bd0b
Files changed (1) hide show
  1. modeling_flexbert.py +2 -1
modeling_flexbert.py CHANGED
@@ -935,7 +935,7 @@ class FlexBertModel(FlexBertPreTrainedModel):
935
  else:
936
  self.final_norm = None
937
  self.unpad_embeddings = config.unpad_embeddings
938
- self.is_decoder = config.get("is_casual", False)
939
 
940
  def post_init(self):
941
  self._init_weights(reset_params=False)
@@ -1515,6 +1515,7 @@ class FlexBertForCausalLM(FlexBertPreTrainedModel):
1515
  def __init__(self, config: FlexBertConfig):
1516
  super().__init__(config)
1517
  self.bert = FlexBertModel(config)
 
1518
  self.lm_head = FlexBertPredictionHead(config)
1519
 
1520
  if config.tie_word_embeddings:
 
935
  else:
936
  self.final_norm = None
937
  self.unpad_embeddings = config.unpad_embeddings
938
+ self.is_decoder = False
939
 
940
  def post_init(self):
941
  self._init_weights(reset_params=False)
 
1515
  def __init__(self, config: FlexBertConfig):
1516
  super().__init__(config)
1517
  self.bert = FlexBertModel(config)
1518
+ self.bert.is_decoder = True
1519
  self.lm_head = FlexBertPredictionHead(config)
1520
 
1521
  if config.tie_word_embeddings: