惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Blog — PlanetScale
Blog — PlanetScale
小众软件
小众软件
F
Fortinet All Blogs
博客园 - 叶小钗
博客园_首页
D
DataBreaches.Net
Apple Machine Learning Research
Apple Machine Learning Research
U
Unit 42
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
博客园 - Franky
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
The Cloudflare Blog
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
IT之家
IT之家
M
MIT News - Artificial intelligence
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog

MarkTechPost

A Coding Implementation of End-to-End Brain Decoding from MEG Signals Using NeuralSet and Deep Learning for Predicting Linguistic Features Meta Introduces Autodata: An Agentic Framework That Turns AI Models into Autonomous Data Scientists for High-Quality Training Data Creation A Coding Guide on LLM Post Training with TRL from Supervised Fine Tuning to DPO and GRPO Reasoning Qwen AI Releases Qwen-Scope: An Open-Source Sparse AutoEncoders (SAE) Suite That Turns LLM Internal Features into Practical Development Tools A Coding Deep Dive into Agentic UI, Generative UI, State Synchronization, and Interrupt-Driven Approval Flows Microsoft Research’s World-R1 Uses Flow-GRPO and 3D-Aware Rewards to Inject Geometric Consistency Into Wan 2.1 Without Architectural Changes A Coding Implementation on Pyright Type Checking Covering Generics, Protocols, Strict Mode, Type Narrowing, and Modern Python Typing IBM Releases Two Granite Speech 4.1 2B Models: Autoregressive ASR with Translation and Non-Autoregressive Editing for Fast Inference Top 10 KV Cache Compression Techniques for LLM Inference: Reducing Memory Overhead Across Eviction, Quantization, and Low-Rank Methods Qwen Team Releases FlashQLA: a High-Performance Linear Attention Kernel Library That Achieves Up to 3× Speedup on NVIDIA Hopper GPUs Step by Step Guide to Build a Complete PII Detection and Redaction Pipeline with OpenAI Privacy Filter Meta FAIR Releases NeuralSet: A Python Package for Neuro-AI That Supports fMRI, M/EEG, Spikes, and HuggingFace Embeddings smol-audio: A Colab-Friendly Notebook Collection for Fine-Tuning Whisper, Parakeet, Voxtral, Granite Speech, and Audio Flamingo 3 A Coding Implementation on Document Parsing Benchmarking with LlamaIndex ParseBench Using Python, Hugging Face, and Evaluation Metrics Poolside AI Introduces Laguna XS.2 and M.1: Agentic Coding Models Reaching 68.2% and 72.5% on SWE-bench Verified How to Build Traceable and Evaluated LLM Workflows Using Promptflow, Prompty, and OpenAI OpenAI Releases Privacy Filter: A 1.5B-Parameter Open-Source PII Redaction Model with 50M Active Parameters Top 10 Physical AI Models Powering Real-World Robots in 2026 How to Build a Lightweight Vision-Language-Action-Inspired Embodied Agent with Latent World Modeling and Model Predictive Control Meet Talkie-1930: A 13B Open-Weight LLM Trained on Pre-1931 English Text for Historical Reasoning and Generalization Research Build a Reinforcement Learning Powered Agent that Learns to Retrieve Relevant Long-Term Memories for Accurate LLM Question Answering OpenMOSS Releases MOSS-Audio: An Open-Source Foundation Model for Speech, Sound, Music, and Time-Aware Audio Reasoning Meta AI Releases Sapiens2: A High-Resolution Human-Centric Vision Model for Pose, Segmentation, Normals, Pointmap, and Albedo The LoRA Assumption That Breaks in Production How to Build a Fully Searchable AI Knowledge Base with OpenKB, OpenRouter, and Llama How to Build Smarter Multilingual Text Wrapping with BudouX Through Parsing, HTML Rendering, Model Introspection, and Toy Training Top 7 Benchmarks That Actually Matter for Agentic Reasoning in Large Language Models RAG Without Vectors: How PageIndex Retrieves by Reasoning A Coding Tutorial on Datashader on Rendering Massive Datasets with High-Performance Python Visual Analytics xAI Launches grok-voice-think-fast-1.0: Topping τ-voice Bench at 67.3%, Outperforming Gemini, GPT Realtime, and More
Moonshot AI Open-Sources FlashKDA: CUTLASS Kernels for Ki...
Asif Razzaq · 2026-05-01 · via MarkTechPost

The team behind Kimi.ai (Moonshot AI) just made a significant contribution to the open-source AI infrastructure space. The research team has made a significant contribution to the open-source AI infrastructure space. They released FlashKDA (Flash Kimi Delta Attention), a high-performance CUTLASS-based kernel implementation of the Kimi Delta Attention (KDA) mechanism. The FlashKDA library is available on GitHub under an MIT license. It delivers prefill speedups of 1.72× to 2.22× over the flash-linear-attention baseline on NVIDIA H20 GPUs, and works as a drop-in backend for the popular flash-linear-attention library.

What Is Kimi Delta Attention, and Why Does It Matter?

To understand FlashKDA, it helps to first understand where it sits in the LLM attention landscape.

Standard softmax attention has quadratic complexity with respect to sequence length — meaning that as you feed longer context into a model, compute costs grow extremely fast. This has driven a wave of research into linear attention mechanisms, which approximate or replace the softmax operation to achieve linear scaling. Kimi Delta Attention (KDA) is Moonshot AI’s contribution to this space: a linear attention mechanism that refines the Gated DeltaNet with a finer-grained, channel-wise gating mechanism, enabling more effective use of limited finite-state RNN memory.

KDA is not just a research prototype. It is the core attention mechanism in Kimi Linear, Moonshot AI’s open-source hybrid model with 48B total parameters and 3B activated parameters. Kimi Linear uses a 3:1 KDA-to-MLA (Multi-Head Latent Attention) ratio — three KDA layers for every one global attention layer — which reduces KV cache usage by up to 75% during long-sequence generation while achieving up to 6× higher decoding throughput at 1 million context length compared to full attention. FlashKDA is the production-grade CUDA kernel that makes that architecture fast during prefill.

Concretely, the KDA forward pass takes in queries (q), keys (k), values (v), a gate before activation (g), and beta logits (beta), along with a scale factor, an output tensor (out), and gate parameters: A_log (log-gate parameter per head), dt_bias (gate bias), and lower_bound (gate lower bound, ranging from -5.0 to 0). The sigmoid activation on beta is applied internally by the kernel. The mechanism also supports optional initial and final recurrent states — useful for multi-turn inference where you want to carry state across requests.

The recurrent formulation means the model can efficiently process long sequences during generation. But efficient prefill of these architectures still requires highly optimized GPU kernels — which is exactly what FlashKDA delivers.

Under the Hood: CUTLASS on Hopper

FlashKDA is built on CUTLASS, NVIDIA’s open-source library of CUDA C++ template abstractions for high-performance linear algebra and custom kernel development. CUTLASS allows developers to write kernels that take full advantage of NVIDIA’s Tensor Core architecture, and it’s the same foundation used by libraries like FlashAttention-3.

The library targets SM90 and above — meaning NVIDIA’s Hopper architecture (H100, H20) and newer. The minimum requirements are CUDA 12.9 and PyTorch 2.4. The codebase is predominantly CUDA (56.4%), with Python (36.2%) bindings and C++ (6.7%) glue code.

The core API is flash_kda.fwd, which takes the following inputs:

  • q, k, v, g: all in bf16 with shape [B, T, H, K] or [B, T, H, V] (where g is the gate before activation)
  • beta: bf16 beta logits in shape [B, T, H] (sigmoid applied internally)
  • scale: fp32 scalar scaling factor
  • out: bf16 output tensor in shape [B, T, H, V]
  • A_log, dt_bias, lower_bound: fp32 gate parameters
  • initial_state, final_state: optional bf16 or fp32 recurrent states
  • cu_seqlens: optional int64 cumulative sequence lengths for variable-length batching

One current constraint: the kernel requires K = V = 128 for head dimension.

The variable-length batching support via cu_seqlens is particularly notable for production use. In real inference serving, requests in a batch rarely share the same sequence length. Being able to pack multiple sequences of different lengths into a single kernel call is a key requirement for high-throughput serving systems.

Benchmark Results: 1.72× to 2.22× on H20

The benchmark results (as of April 20, 2026) compare flash_kda against fla_chunk_kda (the existing flash-linear-attention implementation) across a sequence length of T=8192, head dimension D=128, and two head count configurations: H=96 and H=64. Each benchmark ran with 30 warmup iterations, 200 measurement iterations, and 5 repeats.

For H=96:

Caseflash_kda (ms)fla_chunk_kda (ms)Speedup
Fixed2.62194.50521.72×
Varlen, seq_lens=[1300, 547, 2048, 963, 271, 3063]2.34204.57171.95×
Varlen, seq_lens=1024 × 82.01004.46682.22×

For H=64:

Caseflash_kda (ms)fla_chunk_kda (ms)Speedup
Fixed1.61992.95871.83×
Varlen, seq_lens=[1300, 547, 2048, 963, 271, 3063]1.70273.05951.80×
Varlen, seq_lens=1024 × 81.39303.04122.18×

The peak speedup of 2.22× appears in the uniform variable-length case (seq_lens=1024 × 8, eight sequences of length 1024 summing to T=8192). The fixed-length case delivers the floor of the range at 1.72×. Across both head configurations and all three sequence scenarios, FlashKDA consistently outperforms the flash-linear-attention baseline by a significant margin.

Integration with flash-linear-attention

One of the most practical aspects of FlashKDA is its integration story. Once installed, FlashKDA is auto-dispatched from flash-linear-attention’s chunk_kda — which means existing codebases using flash-linear-attention don’t need manual wiring to take advantage of the faster kernel. The integration is tracked in flash-linear-attention PR #852.

Installation is straightforward:

git clone https://github.com/MoonshotAI/FlashKDA.git flash-kda
cd flash-kda
git submodule update --init --recursive
pip install -v .

The correctness test suite (tests/test_fwd.py) runs exact-match verification against a PyTorch reference implementation and cross-validates against flash-linear-attention. This gives AI devs a reliable baseline for auditing kernel behavior before deploying in production.

Key Takeaways

  • FlashKDA is Moonshot AI’s open-source CUTLASS-based CUDA kernel for Kimi Delta Attention (KDA), delivering 1.72×–2.22× prefill speedup over the flash-linear-attention baseline on NVIDIA H20 GPUs.
  • KDA extends Gated DeltaNet with fine-grained, channel-wise gating — it’s the core attention mechanism behind Kimi Linear, a 48B-total / 3B-active-parameter hybrid model that reduces KV cache usage by up to 75% and achieves up to 6× higher decoding throughput at 1M context length.
  • The kernel targets SM90+ hardware (NVIDIA Hopper — H100, H20 and above), requires CUDA 12.9+ and PyTorch 2.4+, and currently supports a fixed head dimension of K = V = 128.
  • Variable-length batching is natively supported via the cu_seqlens parameter, allowing multiple sequences of different lengths to be packed into a single kernel call — a critical feature for high-throughput inference serving.
  • Once installed, FlashKDA is auto-dispatched from flash-linear-attention‘s chunk_kda, making it a drop-in performance upgrade for any existing codebase already using the flash-linear-attention library — no architecture changes required.

Check out the GitHub Repo. Also, feel free to follow us on Twitter and don’t forget to join our 130k+ ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.

Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? Connect with us