suayptalha commited on
Commit
6f44d75
·
verified ·
1 Parent(s): bc73055

Update configuration_minGRULM.py

Browse files
Files changed (1) hide show
  1. configuration_minGRULM.py +1 -20
configuration_minGRULM.py CHANGED
@@ -25,23 +25,4 @@ class MinGRULMConfig(PretrainedConfig):
25
  self.n_layer = n_layer
26
  self.pad_vocab_size_multiple = pad_vocab_size_multiple
27
  self.initializer_range = initializer_range
28
- super().__init__(**kwargs)
29
-
30
- def state_dict(self):
31
- """
32
- Custom state_dict function to return the model's state dict.
33
- This includes the wrapped model and any extra components like the language model head.
34
- """
35
- state_dict = {}
36
-
37
- # Add min_gru_model's state_dict
38
- state_dict['model'] = self.model.min_gru_model.state_dict()
39
-
40
- # Add lm_head's state_dict
41
- state_dict['lm_head'] = self.lm_head.state_dict()
42
-
43
- # Add config as a dictionary
44
- state_dict['config'] = self.config.__dict__
45
-
46
- return state_dict
47
-
 
25
  self.n_layer = n_layer
26
  self.pad_vocab_size_multiple = pad_vocab_size_multiple
27
  self.initializer_range = initializer_range
28
+ super().__init__(**kwargs)