Skip to content

gemma-4-E2B integration: model loaders, vision/audio encoders, PLE, kernels - #11

Closed
Marker689 wants to merge 2 commits into
Atlas-Inf:mainfrom
Marker689:feat/gemma-4-e2b-atlasinf
Closed

Marker689 wants to merge 2 commits into
Atlas-Inf:mainfrom
Marker689:feat/gemma-4-e2b-atlasinf

Conversation

@Marker689

Copy link
Copy Markdown

gemma-4-E2B integration (model loaders, vision/audio encoders, PLE, kernels)

Carries the gemma-4-E2B work onto this repo's current main. Two layers, split because they have different provenance:

For context: this was ported (not rebased) because your main diverged ~108 commits and reworked core areas, so the contribution is built directly on top of your current tree.

Scope notes for review

  • Server multimodal streaming is NOT included. This repo rebuilt the media path around VisionItem / RemoteImagePolicy / VideoDecode; I left the existing server pipeline untouched to keep the PR reviewable. Model-side media (encoders/preprocess/splice) is fully present and compiles; serving E2B text works via the existing pipeline.
  • Cross-layer KV sharing is NOT included. Your KvCacheConfig has no layer_to_pool, so E2B runs with flat per-layer KV cache (more memory, functionally correct).
  • The contested in-flight gemma4.jinja template edit from the original branch is intentionally not carried - this repo's template is kept.

Validation

  • Locally green: cargo fmt --check, cargo clippy --workspace --tests (deny-warnings), typos, and SPDX header checks.
  • Not yet verified locally (no CUDA host here): PTX kernel build and a real model run. Please run the CUDA build + tests/e2b_oracle.py / vision sweep before merging.

…and test harness (carried from feat/gemma-4-e2b-text-parity)
…io encoders, kernels, recipe, tests) onto reworked core

- Wire Gemma4WeightLoader E2B loaders (loader_c/d/e) plus Gemma4PleTables re-export
- Wire PLE: impl_ple, compute/arm path, set_ple_base trait hook, gemma4_ple_forward
- Wire gemma vision/audio encoders, media preprocess, splice and prefill dispatch
- atlas-core: gemma media config parsing
- kernels/gb10/gemma-4-e2b target + MODEL/KERNEL tomls
- Cross-layer KV sharing (num_kv_shared_layers/kv_pool_map) NOT ported: atlasinf KvCacheConfig has no layer_to_pool, so runtime uses flat per-layer KV
- Server multimodal streaming path NOT ported: atlasinf rebuilt msg_entry around VisionItem/RemoteImagePolicy/VideoDecode; E2B serves text via the existing atlasinf pipeline, model-side media stays fully wired
- Passes local CI gates: fmt, clippy --workspace --tests (deny-warnings), typos, SPDX headers. CUDA kernel build and runtime model run still require a CUDA host.
@github-actions

github-actions Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA. Thank you!
Posted by the CLA Assistant Lite bot.

@Marker689

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@Marker689

Copy link
Copy Markdown
Author

recheck

@github-actions github-actions Bot added the needs-rebase Conflicts with main — its green checks are NOT real (GitHub skips merge-commit workflows) label Sep 2, 2026
@AzeezIsh

Copy link
Copy Markdown
Contributor

Triage (2026-09-26). @Marker689, thanks for this. It's been quiet since 09-02:

  • it carries needs-rebase;
  • the CLA check is still failing;
  • at 11.8k lines across 97 files, it's the largest open PR.

Gemma-4-E2B isn't on the current job list, so we can't give it GB10 gate time soon. Are you still planning to rebase and sign the CLA? If not, we'd like to close it for now and track E2B as a [job] issue, where the text path and the multimodal path can land as separate, smaller PRs.

@AzeezIsh

AzeezIsh commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Maintainer pass-through (2026-11-02). This PR can't merge as it stands.

  • It conflicts with current main (bce5dd904). The branch is 1650 commits behind, and a merge of its head into main conflicts in 17 files:
crates/atlas-core/src/config.rs
crates/spark-model/src/factory/build.rs
crates/spark-model/src/layer/transformer_layer.rs
crates/spark-model/src/layers/mod.rs
crates/spark-model/src/layers/qwen3_attention/mod.rs
crates/spark-model/src/layers/qwen3_attention/types.rs
crates/spark-model/src/model/impl_a1.rs
crates/spark-model/src/model/mod.rs
crates/spark-model/src/model/trait_impl/decode_a2.rs
crates/spark-model/src/model/trait_impl/decode_a3.rs
crates/spark-model/src/model/trait_impl/decode_b.rs
crates/spark-model/src/model/trait_impl/mod.rs
crates/spark-model/src/model/trait_impl/prefill_b.rs
crates/spark-model/src/model/trait_impl/prefill_b/forward_layers.rs
crates/spark-model/src/model/types.rs
crates/spark-model/src/weight_loader/mod.rs
crates/spark-server/src/main_modules/serve_load.rs

Main has reworked these areas since this branch was cut: qwen4_exp MTP, the qwen3_attention decode path, MoE forward, QSA, the verify pipeline, and the 500-LoC file-size cap.

  • The CLA check fails. The CLA must be signed before this can merge.
  • Gating: after a rebase onto main, I can run the single-GB10 gate on sparky: byte-identical controls on the existing Qwen3.8 deployments, plus agentic-50 and BFCL ST-995 where they apply. Please name the exact checkpoint (HF repo and revision) this PR serves, because sparky doesn't have it cached.

Leaving this open for the author. Please rebase onto main (merge commits are fine) and ping here.

@AzeezIsh

Copy link
Copy Markdown
Contributor

This branch conflicts with current main, which has moved substantially since August. Could you rebase it? I'll then test gemma-4-E2B on one GB10 (sparky): load, greedy exactness, decode speed, plus a vision/audio smoke.

@AzeezIsh

AzeezIsh commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@Marker689 Checking in again. This still conflicts with main (17+ files as of 11-02, more since), and the CLA check is still open. If you'd like to continue, the quickest path is a rebase that lands the text path first and vision/audio as a follow-up PR. I'll then gate gemma-4-E2B on one GB10. If I don't hear back by 2026-12-14, I'll close it; it can be reopened any time.

🤖 Generated with Claude Code

@Marker689 Marker689 closed this Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Conflicts with main — its green checks are NOT real (GitHub skips merge-commit workflows)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants