Sifal commited on
Commit
41587e8
·
verified ·
1 Parent(s): ff5ca92

add config class

Browse files
Files changed (1) hide show
  1. automodel.py +3 -0
automodel.py CHANGED
@@ -11,11 +11,13 @@ from huggingface_hub import hf_hub_download
11
  from safetensors.torch import load_file
12
 
13
  from .bert_layers_mosa import BertModel
 
14
 
15
  logger = logging.getLogger(__name__)
16
 
17
 
18
  class ClinicalMosaicForEmbeddingGeneration(BertPreTrainedModel):
 
19
 
20
  def __init__(self, config, **kwargs):
21
  """
@@ -95,6 +97,7 @@ class ClinicalMosaicForSequenceClassification(BertPreTrainedModel):
95
  """Bert Model transformer with a sequence classification/regression head.
96
  This head is just a linear layer on top of the pooled output.
97
  """
 
98
 
99
  def __init__(self, config, **kwargs):
100
  super().__init__(config)
 
11
  from safetensors.torch import load_file
12
 
13
  from .bert_layers_mosa import BertModel
14
+ from .configuration_bert import BertConfig
15
 
16
  logger = logging.getLogger(__name__)
17
 
18
 
19
  class ClinicalMosaicForEmbeddingGeneration(BertPreTrainedModel):
20
+ config_class = BertConfig
21
 
22
  def __init__(self, config, **kwargs):
23
  """
 
97
  """Bert Model transformer with a sequence classification/regression head.
98
  This head is just a linear layer on top of the pooled output.
99
  """
100
+ config_class = BertConfig
101
 
102
  def __init__(self, config, **kwargs):
103
  super().__init__(config)