Files
myWiki/concepts/causal-generation.md

32 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "Causal Generation"
created: 2026-06-20
updated: 2026-06-20
type: concept
tags: ["generation", "causal", "autoregressive", "attention"]
sources: ["https://arxiv.org/abs/2606.17800"]
---
# Causal Generation (因果生成)
**Causal Generation** 是指生成模型中输出元素仅依赖历史、不访问未来信息的生成方式。与双向bidirectional生成相对。
## 在视频生成中的应用
在 [[autoregressive-video-generation|自回归视频生成]] 中因果注意力causal attention确保
- 生成帧 `t` 仅能 attend 帧 `1..t-1`
- 中间帧可立即输出,无需等待全部去噪完成
- 支持 [[streaming-generation|流式生成]] 和实时交互
## 实现
- **Causal Attention Mask**:下三角矩阵,阻止未来信息
- **Sliding Block-Causal Mask**块内双向块间因果MaineCoon 使用)
- **KV-Cache**:缓存历史 chunk 的 keys/values
## 相关概念
- [[autoregressive-video-generation|自回归视频生成]]
- [[streaming-generation|流式生成]]
- [[kv-cache]]
- [[diffusion-transformer|DiT]]