4.1. Setup
We evaluate
Transponder on standard language modeling with LLaMA backbones [
4] ranging from
M to
M parameters, trained on the C4 [
14] and OpenWebText [
15] corpus. All models are optimized with Adam and a base learning rate of
for Openwebtext dataset and
for C4 dataset. All the experiments are trained with bfloat16 for all the activations, weights, and optimization states. The hidden dimension of the contextual modulator is set to
in the main comparisons to emphasize gains from contextual modulation rather than capacity. For fairness, we keep training data, tokenization, optimizer settings, and learning-rate schedules identical across baselines and
Transponder. We report the perplexity (the lower the better) as the standard language-modeling metrics and measure parameter overhead relative to the corresponding backbone. We initialize
of the Transponder with Kaiming uniform [
16] and zero biases; set
initially. Detailed hyperparameter settings can be found in
Table A1.
4.2. Baselines
We compare against widely used residual/normalization designs and recent residual-scaling or layer-wise contextual control methods:
DeepNorm/DeepNet [
6]: rescales the residual branch with depth-dependent constants and tailored initialization to stabilize training of very deep Transformers.
LayerNorm Scaling [
8]: multiplies each layer’s normalized output by a depth-aware factor (e.g.,
) to curb variance growth across residual connections.
LAuREL [
11]: learns a lightweight mixer that blends the skip and transformed paths (LR/PA variants), improving layer-wise signal routing with minimal extra parameters.
SDPA-Gate [
13]: applies a per-head sigmoid gate to the scaled dot-product attention output to modulate contribution and mitigate attention-sink effects.
To match SDPA-Gate’s mechanism more broadly, we also implement an ALL-Gate variant that applies the same gating scheme to all linear sublayers, including the MLP projections, providing a stronger control baseline.
4.3. Modulator Variants Validation
We instantiate five different variants of the contextual modulator in the framework of the Transponder to probe where and at what resolution modulation helps most:
Modulator-path-scalar: a single scalar Modulator modulates the entire functional path (attention output or MLP output) per block.
Modulator-path-channel: a channel-wise Modulator modulates the entire functional path (attention output or MLP output) output channels.
Modulator-layer-scalar: a single scalar Modulator per linear projection.
Modulator-layer-channel: a channel-wise Modulator per linear projection.
Modulator-layer-channel-scalar (Transponder): a channel-wise Modulator per linear projection and a single scalar output Modulator per linear projection.
Table 1 shows two consistent trends across model scales. (i) The functional-path modulator does not aid training and can even destabilize optimization, whereas the layer-wise modulator consistently improves both training dynamics and final performance. (ii) With a layer-wise modulator in place, both channel-wise and scalar modulators further benefit
Transponder: the scalar provides coarse, global control, while the channel-wise variant offers finer-grained adjustments. Using both together yields an additional, robust gain with only a modest
parameter overhead.
Given its consistently best validation perplexity under comparable budgets and its favorable integration cost, we adopt Modulator–layer–channel–scalar as the default Transponder configuration for all subsequent comparisons against baseline methods.
4.4. Main Results for Language Modeling.
Table 2 compares validation perplexity (PPL; lower is better) across three LLaMA model scales. From the results,
Transponder attains the best PPL wherever reported with only
parameter overhead. Compared to the LLaMA baseline,
Transponder reduces PPL on OpenWebText by
15.3% at 60M (26.56→22.50),
9.4% at 130M (19.27→17.45), and
13.6% at 250M (17.28→14.93); on
C4 the reductions are
5.8% at 60M (30.31→28.55),
17.4% at 130M (26.73→22.09), and
14.6% at 250M (21.92→18.72). These gains persist through 250M under larger token budgets, indicating strong large-scale behavior.
Capacity-heavy gates (SDPA-Gate, ALL-Gate) improve PPL but require 15–80% extra parameters. In contrast, Transponder matches or exceeds these improvements with only overhead. Among minimal/zero-overhead baselines, LayerNorm Scaling is competitive yet still trails.
Several baselines that attempt to learn the mixing between the residual path and functional blocks exhibit instability at some scales (e.g., DeepNet and LAuReL-LR explode on C4-130M, 143.65 and 106.94 PPL; LAuReL-PA diverges on C4-130M with 1355 PPL and collapses on OpenWebText-250M to 257 PPL), whereas Transponder delivers consistent improvements across all reported settings.
Under comparable budgets, Transponder achieves state-of-the-art PPL with minimal overhead, strong large-scale behavior, and improved robustness, establishing it as our default configuration for subsequent comparisons.
4.5. Stability with Post-LayerNorm
Beyond the Pre-LN setting, we evaluate
Transponder under the more delicate Post-LN regime. As shown in
Table 3, vanilla LLaMA with Post-LN is unstable at scale: PPL explodes at 250M (1409.79), and even at 130M performance degrades to 26.95 in comparison to the Pre-LN LLaMA. In contrast,
Transponder stabilizes training and improves accuracy in both cases, yielding a
4.6% PPL reduction at 130M (26.95
25.71) and preventing divergence at 250M, where it achieves
20.28 PPL instead of catastrophic failure. While Post-LN remains slightly behind strong Pre-LN baselines at a similar scale, these results indicate that
Transponder substantially enlarges the viable training regime for Post-LN models with only
overhead, mitigating the well-known optimization fragility of Post-LN Transformers.
4.6. Ablations and Sensitivity Tests
To assess the contribution of contextual modulation, we compare
Transponder with and without contextual signals. In the non-contextual variant, for each layer
l, we replace the contextual pathway with learnable parameters—a layer-wise scalar
and a channel-wise vector
—and set
where
applies uniform scaling and
provides per-channel modulation.
As shown in
Table 4, the non-contextual variant already improves over the LLaMA baseline at certain scales, confirming the utility of the proposed modulator design. However, adding contextual control consistently delivers much larger gains across all model sizes, establishing it as the key driver of performance. This result directly supports our initial motivation: each component benefits from input-aware, contextual control rather than relying solely on static modulation.
A key innovation of
Transponder is the introduction of a learnable sigmoid. This learnable non-linear modulation mechanism allows each modulator to dynamically adjust its sensitivity to the input, either amplifying or attenuating modulation strength as needed. As shown in
Table 4, incorporating the learnable sigmoid consistently improves (except for 250M that is comparable)perplexity across model sizes, validating our design intuition that adaptive nonlinearity provides a crucial layer of flexibility for effective modulation.
We further examine the effect of the hidden dimension
r in the contextual modulator.
Table 5 shows that even with an extremely compact setting (
),
Transponder already delivers large gains over the LLaMA baseline. Scaling up the hidden size from 8 to 32 provides marginal yet consistent improvements. These findings suggest that the modulator does not require a large intermediate capacity to capture input-dependent scaling, underscoring the efficiency of our design: lightweight modulators suffice to model contextual dependencies while adding negligible parameter overhead.
We next investigate which functional modules benefit most from modulation by selectively applying the contextual modulators to individual subcomponents (
Table 6). Applying modulators to either the self-attention or MLP block alone yields clear improvements, while restricting modulation to partial components (e.g., only_first, only_last, only_qk) provides only limited gains.
We further evaluate the effect of removing the up- and gate-projections. In the original LLaMA design, the gate projection serves as a channel-wise modulator to the up-projection, though implemented as a full-rank matrix. Interestingly, excluding these projections leads to strong performance, second only to the full “all” configuration. This suggests that the gate-projections already play a key role in channel-wise contextual modulation.
Overall, the best results are consistently achieved when all components are modulated jointly (“all”), yielding the lowest PPL on both LLaMA-60M and LLaMA-130M. This confirms that full-path functional modulation is necessary to provide comprehensive control over residual transformations, enabling robust and consistent improvements across scales.