fix: not properly reference config
#12
by
bwang0911
- opened
- custom_st.py +3 -3
custom_st.py
CHANGED
@@ -53,10 +53,10 @@ class Transformer(nn.Module):
|
|
53 |
if config_args is None:
|
54 |
config_args = {}
|
55 |
|
56 |
-
config = AutoConfig.from_pretrained(model_name_or_path, **config_args, cache_dir=cache_dir)
|
57 |
-
self.auto_model = AutoModel.from_pretrained(model_name_or_path, config=config, cache_dir=cache_dir, **model_args)
|
58 |
|
59 |
-
self._lora_adaptations = config.lora_adaptations
|
60 |
if (
|
61 |
not isinstance(self._lora_adaptations, list)
|
62 |
or len(self._lora_adaptations) < 1
|
|
|
53 |
if config_args is None:
|
54 |
config_args = {}
|
55 |
|
56 |
+
self.config = AutoConfig.from_pretrained(model_name_or_path, **config_args, cache_dir=cache_dir)
|
57 |
+
self.auto_model = AutoModel.from_pretrained(model_name_or_path, config=self.config, cache_dir=cache_dir, **model_args)
|
58 |
|
59 |
+
self._lora_adaptations = self.config.lora_adaptations
|
60 |
if (
|
61 |
not isinstance(self._lora_adaptations, list)
|
62 |
or len(self._lora_adaptations) < 1
|