Skip to content

refactor: update the adapted 7p and run lint for dsv4 example - #75

Merged
shangkunwang01 merged 1 commit into
mainfrom
shangkun-fix-adapted-benchmark-7p
Jul 31, 2026
Merged

refactor: update the adapted 7p and run lint for dsv4 example#75
shangkunwang01 merged 1 commit into
mainfrom
shangkun-fix-adapted-benchmark-7p

Conversation

@shangkunwang01

Copy link
Copy Markdown
Collaborator

No description provided.

@shangkunwang01
shangkunwang01 requested a review from NinaCai July 30, 2026 17:15
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.


out = jnp.einsum("bmhk,bmkd->bmhd", attn_weights, kv_gathered)

return out

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

For future PRs, could you have separate PRs for different purposes?
Let's do lint before submitting PR.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sure.

ACTIVE_Q_LENS = (1,) * 48 + (512,) * 7 + (464,)
ACTIVE_KV_LENS = tuple(
257 + ((i * 73) % 240) * 16 for i in range(48)
) + (1023, 1535, 2047, 2559, 3071, 3583, 4095, 4095)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Out of curiosity, how do you pick these numbers?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is a follow up from Charles'pr that changed tha JaxBench

@NinaCai NinaCai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. Let's get the numbers for 7p after the code is merged. Would like to know the diff.

@shangkunwang01
shangkunwang01 merged commit 771b2ee into main Jul 31, 2026
7 checks passed
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