Files
myWiki/concepts/streaming-generation.md

45 lines
1.7 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: "Streaming Generation"
created: 2026-06-20
updated: 2026-06-20
type: concept
tags: ["generation", "streaming", "real-time", "latency"]
sources: ["https://arxiv.org/abs/2606.17800"]
---
# Streaming Generation (流式生成)
**Streaming Generation** 是指生成模型在推理时以连续流的方式产出内容,而非等待完整结果后一次性返回。对于视频生成,这意味着在生成仍在进行时即可开始播放。
## 核心特征
- **Causal streaming regime**:逐块因果生成,不上溯修改已生成内容
- **Sub-second interaction**:用户输入可在亚秒级延迟内影响后续生成
- **Train-inference matched**:训练和推理使用相同的流式分布,避免 train-test gap
## 与非流式生成的对比
| 维度 | 流式生成 | 离线/批量生成 |
|------|---------|-------------|
| 输出方式 | 逐块输出,立即可播 | 完整视频生成后再输出 |
| 交互性 | 实时交互 | 无交互 |
| 计算模式 | 恒定每块成本 | 成本随长度增长 |
| 典型应用 | 社交直播、实时助手 | 电影后期、短视频制作 |
## 挑战
- **长时一致性**:千秒级流式生成中的内容漂移
- **缓存管理**:如何限制 KV-cache 大小同时保留关键上下文
- **节奏控制**生成速度与播放速度的协调look-ahead buffer
- **单 GPU 可行性**:社交应用需要低成本部署
## 代表性系统
- **MaineCoon**: 首个实时流式音视频生成模型([[maineCoon]]),支持千秒级生成
- 其他方向LLM 文本流式生成GPT 系)、语音流式 TTS
## 相关概念
- [[autoregressive-video-generation|自回归视频生成]]
- [[agentic-streaming-inference|Agentic 流式推理]]
- [[look-ahead-buffer-controller|先行缓冲控制]]