Skip to content

Gemma-4 PLE/MoE VLM support - #495

Open
arielge wants to merge 12 commits into
mainfrom
gemma4_vlm_ple_moe
Open

Gemma-4 PLE/MoE VLM support#495
arielge wants to merge 12 commits into
mainfrom
gemma4_vlm_ple_moe

Conversation

@arielge

@arielge arielge commented Sep 8, 2026

Copy link
Copy Markdown
Contributor
  • Expand Gemma 4 multimodal support to cover encoder-free, PLE/KV-sharing, and MoE VLM variants, including E2B and 26B-A4B.
  • Add Spyre execution for the full Gemma 4 vision transformer, preserving two-axis RoPE, head/MLP padding, clipping, attention masks, and multimodal PLE/MoE semantics.
  • Refactor the dense/PLE text decoder and vision tower to use parameter-explicit compiled executors shared across structurally identical layers, substantially reducing cold-start compilation.
  • Add registry coverage, generic VLM correctness validation, and architecture documentation for the newly supported checkpoints.

@arielge
arielge force-pushed the gemma4_vlm_ple_moe branch 3 times, most recently from 9f3f922 to 004e763 Compare September 9, 2026 13:00
@arielge
arielge marked this pull request as ready for review September 9, 2026 13:00
@arielge
arielge enabled auto-merge September 9, 2026 13:58
@spyre-ci

spyre-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown

⚙️ Auto-merge enabled — dispatched /spyre-test for 980a67a2 because the required Spyre Test gate had not run on this commit.

Automated: enabling auto-merge requests the gate, so the PR is not left waiting on a check nobody asked for. Re-enabling auto-merge on this same commit will not dispatch again.

@spyre-ci

spyre-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown

✅ spyre-test: success

Triggered by: /spyre-test comment

Plan (build waves + dependencies, per arch)

amd64

flowchart LR
  subgraph Lamd64_0["amd64 L0 · 1 parallel"]
    n_amd64_torch_spyre_torch_spyre_dev["torch-spyre/torch-spyre-dev 🟢<br/>image · e4b36ae9b896"]
  end
  subgraph Lamd64_1["amd64 L1 · 1 parallel"]
    n_amd64_hf_adapters_hf_adapters_dev["hf-adapters/hf-adapters-dev 🟢<br/>image · 7727c6fe8d47"]
  end
  subgraph Lamd64_2["amd64 L2 · 1 parallel"]
    n_amd64_spyre_inference_spyre_inference_dev["spyre-inference/spyre-inference-dev 🔴<br/>image · e28b30bdf999"]
  end
  n_amd64_torch_spyre_torch_spyre_dev --> n_amd64_hf_adapters_hf_adapters_dev
  n_amd64_hf_adapters_hf_adapters_dev --> n_amd64_spyre_inference_spyre_inference_dev
  classDef sPending fill:#eceff1,stroke:#90a4ae,color:#37474f
  classDef sBuilding fill:#fff8e1,stroke:#f9a825,color:#5d4037,stroke-width:2px
  classDef sOk fill:#e8f5e9,stroke:#43a047,color:#1b5e20
  classDef sReused fill:#e3f2fd,stroke:#1e88e5,color:#0d47a1
  classDef sFailed fill:#ffebee,stroke:#e53935,color:#b71c1c,stroke-width:2px
  classDef sDropped fill:#f5f5f5,stroke:#bdbdbd,color:#9e9e9e
  class n_amd64_torch_spyre_torch_spyre_dev sOk;
  class n_amd64_hf_adapters_hf_adapters_dev sOk;
  class n_amd64_spyre_inference_spyre_inference_dev sOk;
Loading

✅ orch trigger-pr-validationgreen · arches amd64 · fp amd64=03df935c

level component arch build smoke unit integration trunk regression perf
L0 torch-spyre/torch-spyre-dev amd64 ✅ ok · 🟢 gha · · ·
L1 hf-adapters/hf-adapters-dev amd64 ✅ ok 🟢 · 🟢 gha · · ·
L2 spyre-inference/spyre-inference-dev amd64 ✅ ok 🟢 · 🟡 gha · · ·

GHA test runs:


✅ safe to merge

Build: built 3

Tests: passed 5 · blocking 0 · advisory 0 · infra/inconclusive 0 · no signal 0

Failures by kind
  • ℹ️ informational · spyre-inference/amd64 gha:integration: FAILURE

Before merging, consider:

  • spyre-inference/amd64 gha:integration failed with gating: false — informational only, no merge impact.

@spyre-ci

spyre-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown

GHA test runs:

@spyre-ci

spyre-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown

GHA test runs:

@spyre-ci

spyre-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown

GHA test runs:

@arielge

arielge commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

FYI @ani300, particularly regarding the compiled executor sharing logic

BenjSz
BenjSz previously approved these changes Sep 10, 2026

@BenjSz BenjSz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arielge
arielge added this pull request to the merge queue Sep 10, 2026
@spyre-ci

spyre-ci Bot commented Sep 10, 2026

Copy link
Copy Markdown

❌ merge-queue-integration: failure

Plan (build waves + dependencies, per arch)

amd64

flowchart LR
  subgraph Lamd64_0["amd64 L0 · 1 parallel"]
    n_amd64_torch_spyre_torch_spyre_dev["torch-spyre/torch-spyre-dev 🟢<br/>image · 21033cfc086e"]
  end
  subgraph Lamd64_1["amd64 L1 · 1 parallel"]
    n_amd64_hf_adapters_hf_adapters_dev["hf-adapters/hf-adapters-dev 🔴<br/>image · 7c49db73bf46"]
  end
  subgraph Lamd64_2["amd64 L2 · 1 parallel"]
    n_amd64_spyre_inference_spyre_inference_dev["spyre-inference/spyre-inference-dev 🟢<br/>image · c9e9ffea3cb6"]
  end
  n_amd64_torch_spyre_torch_spyre_dev --> n_amd64_hf_adapters_hf_adapters_dev
  n_amd64_hf_adapters_hf_adapters_dev --> n_amd64_spyre_inference_spyre_inference_dev
  classDef sPending fill:#eceff1,stroke:#90a4ae,color:#37474f
  classDef sBuilding fill:#fff8e1,stroke:#f9a825,color:#5d4037,stroke-width:2px
  classDef sOk fill:#e8f5e9,stroke:#43a047,color:#1b5e20
  classDef sReused fill:#e3f2fd,stroke:#1e88e5,color:#0d47a1
  classDef sFailed fill:#ffebee,stroke:#e53935,color:#b71c1c,stroke-width:2px
  classDef sDropped fill:#f5f5f5,stroke:#bdbdbd,color:#9e9e9e
  class n_amd64_torch_spyre_torch_spyre_dev sOk;
  class n_amd64_hf_adapters_hf_adapters_dev sOk;
  class n_amd64_spyre_inference_spyre_inference_dev sOk;
Loading

✅ orch trigger-pr-validationgreen · arches amd64 · fp amd64=de20bf96

level component arch build smoke unit integration trunk regression perf
L0 torch-spyre/torch-spyre-dev amd64 ✅ ok · 🟢 gha · · ·
L1 hf-adapters/hf-adapters-dev amd64 ✅ ok 🟢 · · · 🟡 gha ·
L2 spyre-inference/spyre-inference-dev amd64 ✅ ok 🟢 · 🟢 gha · · ·

GHA test runs:


⚠️ advisory failures only — mergeable, see below

Build: built 3

Tests: passed 4 · blocking 0 · advisory 2 · infra/inconclusive 0 · no signal 0

Failures by kind
  • ⚠️ advisory (does not block) · hf-adapters/amd64 regression: UNSTABLE
  • ⚠️ advisory (does not block) · hf-adapters/amd64 gha:regression: FAILURE

Before merging, consider:

  • hf-adapters/amd64 gha:regression, hf-adapters/amd64 regression failed with gating: "unstable" — advisory. It set the build UNSTABLE but does not block the merge. Worth a look, not a stop.

@spyre-ci

spyre-ci Bot commented Sep 10, 2026

Copy link
Copy Markdown

GHA test runs:

@spyre-ci

spyre-ci Bot commented Sep 10, 2026

Copy link
Copy Markdown

GHA test runs:

@spyre-ci

spyre-ci Bot commented Sep 10, 2026

Copy link
Copy Markdown

GHA test runs:

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 10, 2026
@arielge
arielge added this pull request to the merge queue Sep 10, 2026
@spyre-ci

spyre-ci Bot commented Sep 10, 2026

Copy link
Copy Markdown

❌ merge-queue-integration: failure

Plan (build waves + dependencies, per arch)

amd64

flowchart LR
  subgraph Lamd64_0["amd64 L0 · 1 parallel"]
    n_amd64_torch_spyre_torch_spyre_dev["torch-spyre/torch-spyre-dev 🟢<br/>image · 21033cfc086e"]
  end
  subgraph Lamd64_1["amd64 L1 · 1 parallel"]
    n_amd64_hf_adapters_hf_adapters_dev["hf-adapters/hf-adapters-dev 🔴<br/>image · 426f303af34e"]
  end
  subgraph Lamd64_2["amd64 L2 · 1 parallel"]
    n_amd64_spyre_inference_spyre_inference_dev["spyre-inference/spyre-inference-dev 🟢<br/>image · a0d9eab46312"]
  end
  n_amd64_torch_spyre_torch_spyre_dev --> n_amd64_hf_adapters_hf_adapters_dev
  n_amd64_hf_adapters_hf_adapters_dev --> n_amd64_spyre_inference_spyre_inference_dev
  classDef sPending fill:#eceff1,stroke:#90a4ae,color:#37474f
  classDef sBuilding fill:#fff8e1,stroke:#f9a825,color:#5d4037,stroke-width:2px
  classDef sOk fill:#e8f5e9,stroke:#43a047,color:#1b5e20
  classDef sReused fill:#e3f2fd,stroke:#1e88e5,color:#0d47a1
  classDef sFailed fill:#ffebee,stroke:#e53935,color:#b71c1c,stroke-width:2px
  classDef sDropped fill:#f5f5f5,stroke:#bdbdbd,color:#9e9e9e
  class n_amd64_torch_spyre_torch_spyre_dev sOk;
  class n_amd64_hf_adapters_hf_adapters_dev sOk;
  class n_amd64_spyre_inference_spyre_inference_dev sOk;
Loading

✅ orch trigger-pr-validationgreen · arches amd64 · fp amd64=51b01948

level component arch build smoke unit integration trunk regression perf
L0 torch-spyre/torch-spyre-dev amd64 ✅ ok · 🟢 gha · · ·
L1 hf-adapters/hf-adapters-dev amd64 ✅ ok 🟢 · · · 🟡 gha ·
L2 spyre-inference/spyre-inference-dev amd64 ✅ ok 🟢 · 🟢 gha · · ·

GHA test runs:


⚠️ advisory failures only — mergeable, see below

Build: built 3

Tests: passed 4 · blocking 0 · advisory 2 · infra/inconclusive 0 · no signal 0

Failures by kind
  • ⚠️ advisory (does not block) · hf-adapters/amd64 regression: UNSTABLE
  • ⚠️ advisory (does not block) · hf-adapters/amd64 gha:regression: FAILURE

Before merging, consider:

  • hf-adapters/amd64 gha:regression, hf-adapters/amd64 regression failed with gating: "unstable" — advisory. It set the build UNSTABLE but does not block the merge. Worth a look, not a stop.

@spyre-ci

spyre-ci Bot commented Sep 10, 2026

Copy link
Copy Markdown

GHA test runs:

@spyre-ci

spyre-ci Bot commented Sep 10, 2026

Copy link
Copy Markdown

GHA test runs:

@spyre-ci

spyre-ci Bot commented Sep 10, 2026

Copy link
Copy Markdown

GHA test runs:

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 10, 2026
Comment thread hf_adapters/hf_gemma4_mm.py
Comment thread hf_adapters/hf_gemma4.py
Comment thread hf_adapters/hf_gemma4.py Outdated
Comment thread hf_adapters/hf_gemma4.py
Comment thread hf_adapters/hf_gemma4_vision.py
Comment thread hf_adapters/hf_gemma4_vision.py
Comment thread hf_adapters/hf_gemma4_mm.py Outdated
Comment thread hf_adapters/hf_gemma4_mm.py Outdated
Comment thread tests/model_registry.py Outdated
arielge and others added 9 commits September 10, 2026 13:25
Co-authored-by: GPT 5.6 <gpt5@users.noreply.github.com>
Signed-off-by: Ariel Gera <ariel.gera1@ibm.com>
Co-authored-by: GPT 5.6 <gpt5@users.noreply.github.com>
Signed-off-by: Ariel Gera <ariel.gera1@ibm.com>
Co-authored-by: GPT 5.6 <gpt5@users.noreply.github.com>
Signed-off-by: Ariel Gera <ariel.gera1@ibm.com>
Co-authored-by: GPT 5.6 <gpt5@users.noreply.github.com>
Signed-off-by: Ariel Gera <ariel.gera1@ibm.com>
Co-authored-by: GPT 5.6 <gpt5@users.noreply.github.com>
Signed-off-by: Ariel Gera <ariel.gera1@ibm.com>
Co-authored-by: GPT 5.6 <gpt5@users.noreply.github.com>
Signed-off-by: Ariel Gera <ariel.gera1@ibm.com>
Co-authored-by: GPT 5.6 <gpt5@users.noreply.github.com>
Signed-off-by: Ariel Gera <ariel.gera1@ibm.com>
Co-authored-by: GPT 5.6 <gpt5@users.noreply.github.com>
Signed-off-by: Ariel Gera <ariel.gera1@ibm.com>
Co-authored-by: GPT 5.6 <gpt5@users.noreply.github.com>
Signed-off-by: Ariel Gera <ariel.gera1@ibm.com>
arielge and others added 3 commits September 10, 2026 13:32
Signed-off-by: Ariel Gera <ariel.gera1@ibm.com>
Co-authored-by: GPT 5.6 <gpt5@users.noreply.github.com>
Signed-off-by: Ariel Gera <ariel.gera1@ibm.com>
Co-authored-by: GPT 5.6 <gpt5@users.noreply.github.com>
Signed-off-by: Ariel Gera <ariel.gera1@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants