Debugging
Browse files- models/__init__.py +37 -33
models/__init__.py
CHANGED
|
@@ -1,33 +1,37 @@
|
|
| 1 |
-
# -*- coding: utf-8 -*-
|
| 2 |
-
|
| 3 |
-
"""
|
| 4 |
-
Shared Subspace Decoder Models
|
| 5 |
-
|
| 6 |
-
This module contains the implementation of the Shared Subspace Decoder architecture,
|
| 7 |
-
including Multi-Head Latent Attention (MLA) and decomposed MLP layers.
|
| 8 |
-
"""
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
|
| 3 |
+
"""
|
| 4 |
+
Shared Subspace Decoder Models
|
| 5 |
+
|
| 6 |
+
This module contains the implementation of the Shared Subspace Decoder architecture,
|
| 7 |
+
including Multi-Head Latent Attention (MLA) and decomposed MLP layers.
|
| 8 |
+
"""
|
| 9 |
+
|
| 10 |
+
print("\n========================================\n")
|
| 11 |
+
print(" models/__init__.py: Is this being run?")
|
| 12 |
+
print("\n========================================\n")
|
| 13 |
+
|
| 14 |
+
from transformers import AutoConfig, AutoModel, AutoModelForCausalLM
|
| 15 |
+
|
| 16 |
+
from .shared_space_config import SharedSpaceDecoderConfig
|
| 17 |
+
from .shared_space_decoder import (
|
| 18 |
+
SharedSpaceDecoderPreTrainedModel,
|
| 19 |
+
SharedSpaceDecoderModel,
|
| 20 |
+
)
|
| 21 |
+
|
| 22 |
+
# Import from task_heads in layers directory
|
| 23 |
+
from ..layers.task_heads import SharedSpaceDecoderForCausalLM
|
| 24 |
+
|
| 25 |
+
# Register the configuration class with AutoConfig
|
| 26 |
+
AutoConfig.register("shared_space_decoder", SharedSpaceDecoderConfig)
|
| 27 |
+
|
| 28 |
+
# Register the model classes with AutoModel
|
| 29 |
+
AutoModel.register(SharedSpaceDecoderConfig, SharedSpaceDecoderModel)
|
| 30 |
+
AutoModelForCausalLM.register(SharedSpaceDecoderConfig, SharedSpaceDecoderForCausalLM)
|
| 31 |
+
|
| 32 |
+
__all__ = [
|
| 33 |
+
"SharedSpaceDecoderConfig",
|
| 34 |
+
"SharedSpaceDecoderPreTrainedModel",
|
| 35 |
+
"SharedSpaceDecoderModel",
|
| 36 |
+
"SharedSpaceDecoderForCausalLM",
|
| 37 |
+
]
|