Update configuration_neollm.py
Browse files- configuration_neollm.py +14 -12
configuration_neollm.py
CHANGED
|
@@ -576,12 +576,13 @@ class NeoLLMConfig(PretrainedConfig):
|
|
| 576 |
|
| 577 |
use_nitp_temporal (:obj:`bool`, *optional*, defaults to ``False``):
|
| 578 |
Instantiate the NITP temporal-transition extension. The module is
|
| 579 |
-
a separate bias-free
|
| 580 |
-
existing ``NextLatDynamicsModel``.
|
| 581 |
-
|
| 582 |
-
|
| 583 |
-
|
| 584 |
-
|
|
|
|
| 585 |
nitp_temporal_apply_loss (:obj:`bool`, *optional*, defaults to ``True``):
|
| 586 |
When ``True``, add the weighted temporal state and identification
|
| 587 |
losses to the model loss. When ``False``, keep the transition
|
|
@@ -597,9 +598,10 @@ class NeoLLMConfig(PretrainedConfig):
|
|
| 597 |
Weight applied to the symmetric listwise temporal-identification
|
| 598 |
objective over the local :math:`W\times W` cosine matrix.
|
| 599 |
nitp_temporal_intermediate_size (:obj:`int`, *optional*):
|
| 600 |
-
|
| 601 |
-
``2 * hidden_size``. At
|
| 602 |
-
``2,
|
|
|
|
| 603 |
nitp_temporal_similarity_temperature (:obj:`float`, *optional*, defaults to ``0.1``):
|
| 604 |
Temperature applied to predicted cosine similarities before the
|
| 605 |
listwise temporal-identification softmax.
|
|
@@ -1121,9 +1123,9 @@ class NeoLLMConfig(PretrainedConfig):
|
|
| 1121 |
f"got {nitp_temporal_identification_weight}."
|
| 1122 |
)
|
| 1123 |
if nitp_temporal_intermediate_size is None:
|
| 1124 |
-
# For d=512 this resolves to 1024.
|
| 1125 |
-
# transition
|
| 1126 |
-
#
|
| 1127 |
nitp_temporal_intermediate_size = 2 * hidden_size
|
| 1128 |
if int(nitp_temporal_intermediate_size) <= 0:
|
| 1129 |
raise ValueError(
|
|
|
|
| 576 |
|
| 577 |
use_nitp_temporal (:obj:`bool`, *optional*, defaults to ``False``):
|
| 578 |
Instantiate the NITP temporal-transition extension. The module is
|
| 579 |
+
a separate bias-free, context-conditioned multiplicative residual
|
| 580 |
+
updater and does not reuse the existing ``NextLatDynamicsModel``.
|
| 581 |
+
The final state proposes an update while the teacher-forced token
|
| 582 |
+
embedding only gates that contextual proposal, so ``F(0, e)=0``.
|
| 583 |
+
It predicts :math:`\hat h_{t+1}^L`, may be composed for
|
| 584 |
+
``nitp_temporal_horizon`` local rollout steps, and never materializes
|
| 585 |
+
an additional vocabulary projection.
|
| 586 |
nitp_temporal_apply_loss (:obj:`bool`, *optional*, defaults to ``True``):
|
| 587 |
When ``True``, add the weighted temporal state and identification
|
| 588 |
losses to the model loss. When ``False``, keep the transition
|
|
|
|
| 598 |
Weight applied to the symmetric listwise temporal-identification
|
| 599 |
objective over the local :math:`W\times W` cosine matrix.
|
| 600 |
nitp_temporal_intermediate_size (:obj:`int`, *optional*):
|
| 601 |
+
Intermediate width of the context proposal and token modulation
|
| 602 |
+
paths. ``None`` resolves to ``2 * hidden_size``. At
|
| 603 |
+
``hidden_size=512`` this branch adds ``2,098,176`` parameters, in
|
| 604 |
+
addition to the NITP projector.
|
| 605 |
nitp_temporal_similarity_temperature (:obj:`float`, *optional*, defaults to ``0.1``):
|
| 606 |
Temperature applied to predicted cosine similarities before the
|
| 607 |
listwise temporal-identification softmax.
|
|
|
|
| 1123 |
f"got {nitp_temporal_identification_weight}."
|
| 1124 |
)
|
| 1125 |
if nitp_temporal_intermediate_size is None:
|
| 1126 |
+
# For d=512 this resolves to 1024. The conditioned
|
| 1127 |
+
# multiplicative transition adds 4dm + 2d = 2,098,176 trainable
|
| 1128 |
+
# parameters, including the two affine RMSNorm scales.
|
| 1129 |
nitp_temporal_intermediate_size = 2 * hidden_size
|
| 1130 |
if int(nitp_temporal_intermediate_size) <= 0:
|
| 1131 |
raise ValueError(
|