-
Notifications
You must be signed in to change notification settings - Fork 535
[JAX] A2A CP support #2271
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
base: main
Are you sure you want to change the base?
[JAX] A2A CP support #2271
Conversation
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
/te-ci jax L1 |
| dv_sharding = NamedSharding(mesh, PartitionSpec(*v_spec)) | ||
| dbias_sharding = NamedSharding(mesh, PartitionSpec(*bias_spec)) | ||
| arg_shardings = [arg_i.sharding for arg_i in arg_infos] | ||
| arg_shardings = list(arg_i.sharding for arg_i in arg_infos) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this change from [...] to list(...)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| # Apply all-to-all to transform from heads-sharded to seq-sharded (scatter in seq dimension) | ||
| # output is always [b, s, h/cp, d] -> heads_dim=2 | ||
| output = helper.all_to_all(output, False, seq_dim=1, heads_dim=2) | ||
| # softmax_aux has shape [b, h/cp, s, 1] with heads at dim 1, seq at dim 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clear comments!
|
/te-ci jax L1 |
Description
This PR adds A2A CP support for JAX.
Type of change
Checklist: