Update modeling_symphony.py
Browse files- modeling_symphony.py +6 -6
modeling_symphony.py
CHANGED
|
@@ -287,9 +287,9 @@ class SpeechEncoder(nn.Module):
|
|
| 287 |
return array
|
| 288 |
# --- Main Model Class ---
|
| 289 |
|
| 290 |
-
class
|
| 291 |
-
config_class =
|
| 292 |
-
base_model_prefix = "
|
| 293 |
|
| 294 |
def _init_weights(self, module):
|
| 295 |
if isinstance(module, nn.Linear):
|
|
@@ -297,9 +297,9 @@ class FastSLMPreTrainedModel(PreTrainedModel):
|
|
| 297 |
if module.bias is not None:
|
| 298 |
nn.init.zeros_(module.bias)
|
| 299 |
|
| 300 |
-
class
|
| 301 |
-
config_class =
|
| 302 |
-
def __init__(self, config:
|
| 303 |
super().__init__(config)
|
| 304 |
|
| 305 |
# Initialize the two main components using their respective sub-configs
|
|
|
|
| 287 |
return array
|
| 288 |
# --- Main Model Class ---
|
| 289 |
|
| 290 |
+
class SYMPHONYreTrainedModel(PreTrainedModel):
|
| 291 |
+
config_class = SYMPHONYConfig
|
| 292 |
+
base_model_prefix = "symphony"
|
| 293 |
|
| 294 |
def _init_weights(self, module):
|
| 295 |
if isinstance(module, nn.Linear):
|
|
|
|
| 297 |
if module.bias is not None:
|
| 298 |
nn.init.zeros_(module.bias)
|
| 299 |
|
| 300 |
+
class SYMPHONYForConditionalGeneration(SYMPHONYPreTrainedModel, GenerationMixin):
|
| 301 |
+
config_class = SYMPHONYConfig
|
| 302 |
+
def __init__(self, config: SYMPHONYConfig):
|
| 303 |
super().__init__(config)
|
| 304 |
|
| 305 |
# Initialize the two main components using their respective sub-configs
|