Update configuration_motif.py
Browse files- configuration_motif.py +4 -10
configuration_motif.py
CHANGED
@@ -1,8 +1,9 @@
|
|
|
|
|
|
|
|
1 |
from transformers.configuration_utils import PretrainedConfig
|
2 |
from transformers.modeling_rope_utils import rope_config_validation
|
3 |
from transformers.utils import logging
|
4 |
-
from typing import Optional
|
5 |
-
import math
|
6 |
|
7 |
logger = logging.get_logger(__name__)
|
8 |
|
@@ -13,11 +14,8 @@ class MotifConfig(PretrainedConfig):
|
|
13 |
Motif model according to the specified arguments, defining the model architecture. Instantiating a configuration
|
14 |
with the defaults will yield a similar configuration to that of
|
15 |
Motif-102B [moreh/Motif-102B](https://huggingface.co/moreh/Motif-102B).
|
16 |
-
|
17 |
Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
|
18 |
documentation from [`PretrainedConfig`] for more information.
|
19 |
-
|
20 |
-
|
21 |
Args:
|
22 |
vocab_size (`int`, *optional*, defaults to 151936):
|
23 |
Vocabulary size of the Motif model. Defines the number of different tokens that can be represented by the
|
@@ -97,16 +95,12 @@ class MotifConfig(PretrainedConfig):
|
|
97 |
The number of layers that use SWA (Sliding Window Attention). The bottom layers use SWA while the top use full attention.
|
98 |
attention_dropout (`float`, *optional*, defaults to 0.0):
|
99 |
The dropout ratio for the attention probabilities.
|
100 |
-
|
101 |
```python
|
102 |
>>> from transformers import MotifModel, MotifConfig
|
103 |
-
|
104 |
>>> # Initializing a Motif style configuration
|
105 |
>>> configuration = MotifConfig()
|
106 |
-
|
107 |
>>> # Initializing a model from the Motif-102B style configuration
|
108 |
>>> model = MotifModel(configuration)
|
109 |
-
|
110 |
>>> # Accessing the model configuration
|
111 |
>>> configuration = model.config
|
112 |
```"""
|
@@ -170,4 +164,4 @@ class MotifConfig(PretrainedConfig):
|
|
170 |
tie_word_embeddings=tie_word_embeddings,
|
171 |
**kwargs,
|
172 |
)
|
173 |
-
logger.info(f' kwargs : {kwargs}')
|
|
|
1 |
+
import math
|
2 |
+
from typing import Optional
|
3 |
+
|
4 |
from transformers.configuration_utils import PretrainedConfig
|
5 |
from transformers.modeling_rope_utils import rope_config_validation
|
6 |
from transformers.utils import logging
|
|
|
|
|
7 |
|
8 |
logger = logging.get_logger(__name__)
|
9 |
|
|
|
14 |
Motif model according to the specified arguments, defining the model architecture. Instantiating a configuration
|
15 |
with the defaults will yield a similar configuration to that of
|
16 |
Motif-102B [moreh/Motif-102B](https://huggingface.co/moreh/Motif-102B).
|
|
|
17 |
Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
|
18 |
documentation from [`PretrainedConfig`] for more information.
|
|
|
|
|
19 |
Args:
|
20 |
vocab_size (`int`, *optional*, defaults to 151936):
|
21 |
Vocabulary size of the Motif model. Defines the number of different tokens that can be represented by the
|
|
|
95 |
The number of layers that use SWA (Sliding Window Attention). The bottom layers use SWA while the top use full attention.
|
96 |
attention_dropout (`float`, *optional*, defaults to 0.0):
|
97 |
The dropout ratio for the attention probabilities.
|
|
|
98 |
```python
|
99 |
>>> from transformers import MotifModel, MotifConfig
|
|
|
100 |
>>> # Initializing a Motif style configuration
|
101 |
>>> configuration = MotifConfig()
|
|
|
102 |
>>> # Initializing a model from the Motif-102B style configuration
|
103 |
>>> model = MotifModel(configuration)
|
|
|
104 |
>>> # Accessing the model configuration
|
105 |
>>> configuration = model.config
|
106 |
```"""
|
|
|
164 |
tie_word_embeddings=tie_word_embeddings,
|
165 |
**kwargs,
|
166 |
)
|
167 |
+
logger.info(f' kwargs : {kwargs}')
|