Skip to content
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

[nnx] improve runtime flags #3607

Merged
merged 1 commit into from
Jan 9, 2024
Merged

Conversation

cgarciae
Copy link
Collaborator

@cgarciae cgarciae commented Jan 8, 2024

What does this PR do?

  • Improves error messages for runtime flags.
  • Makes MultiHeadAttention decode runtime flag behave like runtime flags for other layers.

@@ -26,7 +26,7 @@ def test_basic(self):
out_features=6,
rngs=nnx.Rngs(0),
)
y = module(jnp.ones((1, 7, 3)))
y = module(jnp.ones((1, 7, 3)), decode=False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might be worth adding another check/test to test instantiating MultiHeadAttention with decode=False as an init arg. It's already tested in the autoregressive test, but the main point of that test was to test jax.experimental.enable_x64

@copybara-service copybara-service bot merged commit fae3a30 into main Jan 9, 2024
21 checks passed
@copybara-service copybara-service bot deleted the nnx-improve-first-from branch January 9, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants