Support nested Gemma 4 checkpoint layout - #346
ousamabenyounes wants to merge 2 commits into
Conversation
ca6a1aa to
89d0bda
Compare
|
Pushed follow-up Validation: reproduced the PLE omission with |
Add a PLE-enabled Gemma 4 regression path so the splitter fails when model.language_model embed_tokens_per_layer, per_layer_model_projection, or per_layer_projection_norm are omitted from resident modules. Focused test: PYTHONPATH=air_llm pytest -q air_llm/tests/test_gemma4_split.py. Full local CI remains iso-baseline: origin/main has the same two existing unittest import errors; package build and twine check pass.
89d0bda to
b3a3c31
Compare
|
Rebased onto current Validation is RED -> GREEN on the current upstream base: Gemma 4 routes through the incorrect generic model before this patch, while the rebased branch passes a real tiny-model split, bit-exact round-trip, and reload test covering nested decoder layers, fused MoE experts, vision modules, and PLE modules. Local CI is iso-baseline (46 -> 47 tests with the same two pre-existing import errors); package build, |
Summary
Gemma4ForConditionalGenerationthrough its nested language-model layoutFixes #345
Test verification (RED -> GREEN)
On current upstream
main(430adb1), the regression test routes Gemma 4 through the generic layout, the prerequisite for the reported nested-prefix parser failure:On this rebased branch (
b3a3c31), a tiny realGemma4ForConditionalGenerationmodel splits, round-trips bit-exactly, and reloads with no missing or unexpected keys. The fixture covers nested decoder layers, fused MoE expert tensors, the vision tower, and PLE modules:The ignored local CI runner is iso-baseline: upstream runs 46 tests with 2 pre-existing collection/import errors; this branch runs 47 tests with the same 2 errors. Package sdist/wheel builds and
twine checkpass, changed executable production lines have 14/14 coverage, and the visible GitHub check (GitGuardian Security Checks) passes onb3a3c31.The official 51.6 GB checkpoint was not downloaded and CUDA 4-bit generation was not run; validation covers its published architecture and nested/fused module layout without making performance claims.