oweller2 commited on
Commit
306d8ae
1 Parent(s): f40aaa2
Files changed (2) hide show
  1. config.json +1 -1
  2. modeling_flexbert.py +4 -3
config.json CHANGED
@@ -69,7 +69,7 @@
69
  "num_attention_heads": 12,
70
  "num_hidden_layers": 22,
71
  "num_initial_layers": 1,
72
- "pad_logits": false,
73
  "pad_token_id": 0,
74
  "padding": "unpadded",
75
  "pooling_type": "cls",
 
69
  "num_attention_heads": 12,
70
  "num_hidden_layers": 22,
71
  "num_initial_layers": 1,
72
+ "pad_logits": true,
73
  "pad_token_id": 0,
74
  "padding": "unpadded",
75
  "pooling_type": "cls",
modeling_flexbert.py CHANGED
@@ -1701,9 +1701,10 @@ class FlexBertForCausalLM(FlexBertPreTrainedModel):
1701
  shift_labels.view(-1)
1702
  )
1703
 
1704
- if self.unpad_embeddings:
1705
- # reshape to batch size
1706
- logits = logits.view(-1, self.vocab_size)
 
1707
 
1708
  if self.pad_logits:
1709
  # print(f"Padding logits: {logits.shape}")
 
1701
  shift_labels.view(-1)
1702
  )
1703
 
1704
+ # if self.unpad_embeddings:
1705
+ # # reshape to batch size
1706
+ # logits = logits.view(-1, self.vocab_size)
1707
+ # # NOTE: error from here above
1708
 
1709
  if self.pad_logits:
1710
  # print(f"Padding logits: {logits.shape}")