Skip to content

Add Challenge 113: kimi delta attention - #306

Draft
shxjames wants to merge 3 commits into
mainfrom
james/add-challenge-113-kimi-delta-attn
Draft

Add Challenge 113: kimi delta attention#306
shxjames wants to merge 3 commits into
mainfrom
james/add-challenge-113-kimi-delta-attn

Conversation

@shxjames

Copy link
Copy Markdown
Contributor

No description provided.

@shxjames
shxjames marked this pull request as draft July 31, 2026 04:34
@basilwong

Copy link
Copy Markdown
Contributor

Impressive to put this together so quickly!

Assuming lot's of people will want to play around with this challenge now that they have released the architecture.

K = torch.tensor([[[1.0, 0.0], [0.0, 1.0]]], device=device, dtype=dtype)
V = torch.tensor([[[1.0, 2.0], [2.0, 0.0]]], device=device, dtype=dtype)
alpha = torch.tensor([[[1.0, 1.0], [0.5, 0.5]]], device=device, dtype=dtype)
beta = torch.tensor([[1.0, 0.5]], device=device, dtype=dtype)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The constraints in the spec say 0 ≤ beta < 1 and the example test seems to violate that. Either make the constraint ≤ 1 or change the example.

beta = jnp.asarray(beta, dtype=jnp.float32) # (batch, seq_len)

batch = Q.shape[0]
d = Q.shape[2]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: batch and d are passed in as input params so we don't need to re-derive them here.

github-actions Bot and others added 2 commits August 7, 2026 13:29
- Use seq_len in challenge.html to match the solve signature (all other
  seq_len challenges do the same); T appeared nowhere in the API.
- Widen the beta constraint to [0, 1] — the worked example uses beta = 1.0,
  which the old [0, 1) bound excluded.
- Add an SVG diagram of one recurrence step, showing the per-channel decay
  gate that distinguishes KDA from the head-wise gated delta rule.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Use seq_len (the actual solve parameter) instead of T throughout challenge.html
- Widen the beta constraint to [0, 1] so it covers the example's beta_1 = 1.0
- Drop a stray authoring note from reference_impl

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

3 participants