Skip to content

Convert DenseGeneral to NNX #1710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Closed

Convert DenseGeneral to NNX #1710

wants to merge 11 commits into from

Conversation

bvandermoon
Copy link
Collaborator

@bvandermoon bvandermoon commented May 9, 2025

Description

Finishing out PR 1604 for @cgarciae due to a lot of issues being faced during testing (we are both listed on the commit, but it doesn't look like using multiple PR authors is supported).

Previous PR description:

This commit converts DenseGeneral to NNX and creates a dense_general to interface with it through a Linen wrapper. dense_general contains all the same arguments as the Linen version but adds two additional ones:

  • input_shape: the expected shape of the input.
  • in_features: an int or tuple representing the input features.

Only one of them can be set at a time.

Tests

  • Unit tests
  • Will be running a logits check for gpt3 which is the first model we are using

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed.

Co-authored-by: Cristian Garcia <[email protected]>
Co-authored-by: Branden Vandermoon <[email protected]>
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.

8 participants