fix: refine scanned layers unroll logic for Gemma 3 - #4640
Open
mesakhcienet wants to merge 1 commit into
Open
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
mesakhcienet
force-pushed
the
fix/train-rl-layers
branch
from
July 28, 2026 10:35
06978d9 to
7095687
Compare
mesakhcienet
force-pushed
the
fix/train-rl-layers
branch
from
July 29, 2026 00:40
7095687 to
d751fe5
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
mesakhcienet
marked this pull request as ready for review
July 29, 2026 03:36
mesakhcienet
requested review from
RissyRan,
abhinavclemson,
bvandermoon,
gagika,
gobbleturk,
khatwanimohit,
richjames0,
shralex and
vipannalla
as code owners
July 29, 2026 03:36
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
mesakhcienet
requested review from
A9isha,
NuojCheng,
SurbhiJainUSC,
aireenmei,
darisoy,
dipannita08,
hengtaoguo,
igorts-git,
jiangjy1982,
suexu1025 and
xibinliu
as code owners
July 29, 2026 03:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
unroll_gemma_scanned_weightsworkaround—specifically designed to unstack Gemma 3 scanned blocks due to Tunix's limitations—was previously formatting the unrolled keys incorrectly (using raw integers for the layer index). This PR fixes :(0,)to("layers_0",)), which aligns with the expected dictionary structure for downstream weight mapping.scan_lengthdetection to safely check for themlp.wi_0architectural pattern.Tests
We run
train_rl.pyfor both scanned and unscanned layers. Both should return normal sentencesScanned layers
Config:
scan_layers=trueanduse_standalone_converter=TrueUnscanned layers
Config :
scan_layers=falseChecklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.