Update modeling.py
Browse files- modeling.py +1 -7
modeling.py
CHANGED
|
@@ -119,10 +119,4 @@ class SmallTransformer(PreTrainedModel):
|
|
| 119 |
return decoder_input_ids
|
| 120 |
|
| 121 |
|
| 122 |
-
#
|
| 123 |
-
# This ensures that when AutoModelForSeq2SeqLM sees 'model_type': 'small_transformer'
|
| 124 |
-
# in your config.json, it knows to use the SmallTransformer class from this file.
|
| 125 |
-
if SmallTransformer.config_class.model_type in PreTrainedModel._model_mapping.keys():
|
| 126 |
-
pass
|
| 127 |
-
else:
|
| 128 |
-
PreTrainedModel._model_mapping.register(SmallTransformer.config_class, SmallTransformer)
|
|
|
|
| 119 |
return decoder_input_ids
|
| 120 |
|
| 121 |
|
| 122 |
+
# No registration needed - auto_map in config.json handles this
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|