Piecewise-Taylor Attention (PWT) 是一种无需训练且可训练的稀疏注意力机制,它在 PISA 的逐块注意力近似基础上增加了二阶泰勒修正项。

Stars

25

7 天增长

暂无数据

Fork 数

0

开放 Issue

0

开源协议

MIT

最近更新

2026-07-29

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它在 14B 视频扩散模型上以无需训练的方式实现了比 PISA 更高的 PSNR,同时速度几乎相同,并且提供了完整的反向传播用于高稀疏度下的微调。

适合谁使用

  • 高效注意力机制的研究人员
  • 从事视频生成扩散 Transformer 的工程师
  • 部署大规模视频模型并受限于内存的实践者
  • 对可训练稀疏注意力内核感兴趣的开发者

典型使用场景

  • 加速 Wan2.1-T2V-14B 等大型视频扩散 Transformer 中的注意力计算
  • 使用可微分稀疏注意力层对预训练模型进行高稀疏度微调
  • 在序列长度可变的训练循环中用 PWT 替换密集注意力

项目优势

  • 在 Wan2.1-T2V-14B 上以 87.5% 稀疏度达到 21.03 dB PSNR,优于 PISA 的 20.83 dB
  • 相比 PISA 几乎无开销:仅需一个预计算的广播加法,无需额外的张量核心工作
  • 包含完整的反向传播,梯度流经所有块统计量,支持可训练的微调
  • 内核在可变序列长度上无需重新编译,适合视频 DiT 训练循环

使用前须知

  • 需要 torch >= 2.7、triton >= 3.4 和 CUDA GPU,限制了平台兼容性
  • 在泰勒展开无效的块上,二阶修正项被门控为零,退化为 PISA 的行为
  • 在所测硬件和配置下,端到端加速比(1.54x)略低于 PISA(1.57x)

README 快速开始

Installation

项目描述

Piecewise-Taylor Attention

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

Vincentwei1021
Vincentwei1021 GitHub avatar

video-shotcraft

An AI agent skill that turns Claude Code or Codex into a motion-design studio for crafting cinematic product videos with Remotion, offering 106 shot recipe cards, 162 styles, 161 motion previews, and a production-ready template.

TypeScript
2,432
lopopolo
精选
lopopolo GitHub avatar

harness-engineering

Harness Engineering is a methodology for improving coding agent outputs by carefully crafting the environment around them—providing curated context, tools, and executable constraints that encode an organization’s nonfunctional requirements and cumulative lessons.

AI 与机器学习AI 智能体
2,390
slvDev
精选
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI 与机器学习大语言模型
1,960