PSA: Upscaling Gemma 4 requires a proportional layer_scalar adjustment
retained text
<!-- SC_OFF --><div class="md"><p>A lot of people seem to be confused or mystified about this so figured I'd spell it out.</p> <p>I played around with RYS and realized that it broke Gemma 4 models. Turns out there's a `layer_scalar` value that is applied at each layer. If you don't adjust that so that the resulting model gets "the same amount", you break it. Since it's multiplicative, you have to do `s^(1/N)`, where `s` is the original scalar and `N` is the number of times the layer occurs (duplications + 1 for the original layer; thanks <a href="/u/ttkciar">u/ttkciar</a> for pointing out my original error).</p> <p>Vibe coded (and closed) PR at <a href="https://github.com/dnhkng/RYS/pull/4">https://github.com/dnhkng/RYS/pull/4</a> for reference.</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/kallewoof"> /u/kallewoof </a> <br /> <span><a href="https://www.reddit.com/r/LocalLLaMA/comments/1un9muu/psa_upscaling_gemma_4_requires_a_proportional/">[link]</a></span>   <span><a href="https://www.reddit.com/r/LocalLLaMA/comments/1un9muu/psa_upscaling_gemma_4_requires_a_proportional/">[comments]</a></span>
document fetched 2026-07-05 08:45 · canonical https://reddit.com/r/LocalLLaMA/comments/1un9muu/psa_upscaling_gemma_4_requires_a_proportional