# flashkda-delta-attention

This skill guides FlashKDA setup for Kimi Delta Attention CUDA kernels, with direct flash_kda.fwd use and chunk_kda integration.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 368 installs · ★ 88
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/flashkda-delta-attention/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/flashkda-delta-attention

## What it does

The skill covers FlashKDA, a CUTLASS-based CUDA kernel package for Kimi Delta Attention and recurrent-state inference. It explains the low-level `flash_kda.fwd` call and the recommended path through `flash-linear-attention`, where `chunk_kda` can dispatch to the FlashKDA backend.

The setup needs an SM90-or-newer GPU such as H100 or H20, CUDA 12.9+, PyTorch 2.4+, and Python 3.8+. The `flash-linear-attention` integration at version `0.5.0` or newer is recommended. Hardware below SM90 does not meet the backend requirement.

The package build uses `https://github.com/MoonshotAI/FlashKDA.git`, initializes its submodules, and runs `pip install -v .`. Kernel inputs require `K == V == 128`; packed variable-length input with `cu_seqlens` requires batch size `1`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill flashkda-delta-attention -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/flashkda-delta-attention/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/flashkda-delta-attention/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill flashkda-delta-attention -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/flashkda-delta-attention/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill flashkda-delta-attention -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/flashkda-delta-attention/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/trending-skills flashkda-delta-attention
```

2. **Manually: put the files in place**
- File: `.github/skills/flashkda-delta-attention/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill flashkda-delta-attention -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/trending-skills --path skills/flashkda-delta-attention
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/flashkda-delta-attention/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill flashkda-delta-attention -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/flashkda-delta-attention/SKILL.md

## When to use it
- wire FlashKDA into `chunk_kda`
- call the low-level `flash_kda.fwd` kernel
- carry an initial state and collect the final state
- run packed sequences with `cu_seqlens`

## Example prompts
- Use `flashkda-delta-attention` to connect FlashKDA to `chunk_kda`.
- Show a `flash_kda.fwd` call that passes `initial_state` and returns `final_state`.
- Check the GPU, CUDA, and tensor-shape requirements for a Kimi Delta Attention implementation.

## Similar
- [nvidia-cuda](https://affpapa.org/en/nevibecode/skills/nvidia-cuda.md) — skill · 326 installs
- [spark-training-gotchas](https://affpapa.org/en/nevibecode/skills/spark-training-gotchas.md) — skill · 2500 installs
- [nemo-mbridge-perf-memory-tuning](https://affpapa.org/en/nevibecode/skills/nemo-mbridge-perf-memory-tuning.md) — skill · 1900 installs
- [nemo-mbridge-perf-moe-comm-overlap](https://affpapa.org/en/nevibecode/skills/nemo-mbridge-perf-moe-comm-overlap.md) — skill · 1800 installs
- [mcp-server-colab-exec](https://affpapa.org/en/nevibecode/mcp/mcp-server-colab-exec.md) — MCP server · ★ 9
- [optimizing-attention-flash](https://affpapa.org/en/nevibecode/skills/optimizing-attention-flash.md) — skill · 967 installs

From the same set: [reason-machines/trending-skills](https://affpapa.org/en/nevibecode/by/reason-machines/trending-skills.md) — 199 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
