Skip to content

Gemma4 model implementation#460

Draft
edenamram wants to merge 7 commits into
elixir-nx:mainfrom
edenamram:gemma4-model-implementation
Draft

Gemma4 model implementation#460
edenamram wants to merge 7 commits into
elixir-nx:mainfrom
edenamram:gemma4-model-implementation

Conversation

@edenamram

Copy link
Copy Markdown

No description provided.

@edenamram edenamram marked this pull request as draft June 13, 2026 16:19
@edenamram edenamram force-pushed the gemma4-model-implementation branch from 73aa3c2 to 0d707a6 Compare June 16, 2026 11:41
…rs and enhance attention block implementation
}

outputs =
Enum.reduce(0..(spec.num_blocks - 1), initial_state, fn idx, state ->

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We generally use Layers.Transformer.blocks as much as possible, to avoid duplicating all that code, which is harder to maintain. When models introduce something novel, we add options to that function as needed to accommodate for the change. Ideally it's something we would do here as well.

@jonatanklosko

Copy link
Copy Markdown
Member

Hey, thanks for the PR!

The most important part is to ensure the implementation is correct. The contributing section describes how to add tests with reference values generated using Python hf/transformers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants