Gleb Vinarskis commited on
Commit
51f79b2
·
1 Parent(s): 7941afa
Files changed (1) hide show
  1. configuration_stacked.py +9 -9
configuration_stacked.py CHANGED
@@ -4,16 +4,16 @@ import torch
4
  class ImpressoConfig(PretrainedConfig):
5
  model_type = "floret"
6
 
7
- # def __init__(self, filename="LID-40-3-2000000-1-4.bin", **kwargs):
8
- # super().__init__(**kwargs)
9
- # self.filename = filename
10
 
11
- # @classmethod
12
- # def from_pretrained(cls, pretrained_model_name_or_path, **kwargs):
13
- # # Bypass JSON loading and create config directly
14
- # print(f"Loading ImpressoConfig from {pretrained_model_name_or_path}")
15
- # config = cls(filename="LID-40-3-2000000-1-4.bin", **kwargs)
16
- # return config
17
 
18
 
19
 
 
4
  class ImpressoConfig(PretrainedConfig):
5
  model_type = "floret"
6
 
7
+ def __init__(self, filename="LID-40-3-2000000-1-4.bin", **kwargs):
8
+ super().__init__(**kwargs)
9
+ self.filename = filename
10
 
11
+ @classmethod
12
+ def from_pretrained(cls, pretrained_model_name_or_path, **kwargs):
13
+ # Bypass JSON loading and create config directly
14
+ print(f"Loading ImpressoConfig from {pretrained_model_name_or_path}")
15
+ config = cls(filename="LID-40-3-2000000-1-4.bin", **kwargs)
16
+ return config
17
 
18
 
19