每日基础课

← 返回日报
基础知识 第一则

ASR 基本流水线:今天真正弄懂

先记住

先记住:一句话定义 + 一句记忆口诀 ASR(自动语音识别)流水线,就是把连续的“声音波形”一步步转换成离散“文本字符”的标准数据工序。 记忆口诀:波形切碎提特征,声学网络算拼音,对齐解码出文字。

通俗讲解

1. 生活类比:速记员听写 想象你是一名同传速记员: - 耳朵接收声音震动(原始波形)。 - 大脑把连续声音拆成一小段一小段的音色特征(声学特征提取)。 - 凭借发音常识,判断每一瞬间大概是哪个音素或拼音(声学模型)。 - 结合上下文语法,把“ni-hao”拼成“你好”,并去掉结巴重复(语言模型与解码器)。

2. 核心数学公式与符号 ASR 的本质是一个条件概率最大化问题: $$\hat{W} = \arg\max_{W} P(W|X)$$

符号逐个拆解: - $X = (x_1, x_2, \dots, x_T)$:输入的声学特征序列(比如每帧 25ms 的 Mel 频谱向量,$T$ 是总帧数)。 - $W = (w_1, w_2, \dots, w_U)$:输出的目标文本序列(词或字,$U$ 是总字数,通常 $U \ll T$)。 - $P(W|X)$:在听到音频特征 $X$ 的条件下,对应文本是 $W$ 的概率。 - $\arg\max_W$:在所有可能的文本组合中,找出概率最大的那个。

3. 它解决什么问题?没有它会怎样? - 解决的问题:把模拟连续的声学时域信号,映射到人类离散的语义符号系统,并解决“音频帧数(比如 1000 帧)与文字数量(比如 20 个字)严重不匹配”的时序对齐问题。 - 没有它会怎样:计算机眼中的音频只是一串无意义的振幅浮点数。没有 ASR,音视频检索、智能助手、会议纪要和多模态理解就无法提取声音中的高密度文本信息。

4. 在音视频理解与说话人日志中的真实位置 - 在说话人日志(Diarization)中:Diarization 负责回答“谁在什么时候说话(Who spoke when)”,ASR 负责回答“说了什么(What was said)”。工程上通常先做 VAD(人声检测)和 Diarization 切分出说话人音频片段,再送进 ASR 流水线,最后将“人名 + 时间戳 + 文字”拼成带身份的会议纪要。 - 在音视频大模型中:ASR 流水线常作为前端特征提取器或文字引导器,将音频信号快速转为文本轨迹(Transcript),极大减轻主模型直接理解长音频的负担。

先想再展开答案
为什么 100 帧音频特征只能输出 5 个字?
因为人类发一个音需要几十到几百毫秒(对应数十帧),多帧对应同一个发音,存在严重的时序不对齐,需要去重和对齐。
ASR 传统贝叶斯公式中声学模型和语言模型分别对应什么符号?
$P(X
说话人日志(Diarization)管的是什么?
管的是“谁在什么时间段说话(Who spoke when)”,不负责转录具体说了什么内容。
发展脉络 · 现状 · 未来

1. 发展演进 - 过去(传统 GMM-HMM 时代):流水线高度模块化。先提取手工特征(MFCC),再用高斯混合模型(GMM)算发音概率,再用隐马尔可夫模型(HMM)做时间对齐,外挂 N-gram 语言模型搜索。缺点:链路极长、各模块独立调优、误差逐层累加。 - 为什么出现端到端(E2E):为了打破割裂。深度学习普及后,CTC(连接时序分类)、RNN-T(Transducer)和基于 Transformer 的 AED(注意力编码-解码)架构出现,一个神经网络直接端到端输入波形/频谱,输出文字。 - 现在主流用法:工业界与学术界主流全采用端到端模型(如 Whisper、Conformer-CTC)。离线长音频常用 Encoder-Decoder 结构;实时低延迟场景常用 Conformer-RNN-T。

2. 学习资源建议 - 想系统打牢特征与 Transformer 基础:建议参考 Hugging Face Audio Course 的数据处理和模型微调章节。 - 想动手实践官方管道与推理:建议参考 TorchAudio Tutorials 的特征提取与预训练模型加载示例。

3. 与相近概念的区别 - ASR vs. 说话人日志(Diarization):ASR 识别“说了什么”(内容),Diarization 区分“谁说的”(身份与区间)。 - ASR vs. 语音活动检测(VAD):VAD 是 ASR 的前序过滤器,只做二分类(有人声/静音),不做文字识别。 - ASR vs. 音频描述(Audio Captioning):ASR 只转录人类语音;Audio Captioning 描述整个环境声音事件(如“门铃响了,伴随狗吠”)。

4. 局限性与未来发展 - 当前客观局限(事实):多人重叠说话(Overlap Speech)时转写准确率极低;强背景噪音、口音重、专业领域词汇容易出现幻觉或错漏。 - 未来发展趋势(推测):ASR 边界会进一步模糊,不再作为一个独立模块,而是直接作为多模态大模型的原生音频 Tokenizer,在端到端训练中同时完成转写、翻译、说话人分离与情感理解。

自测
  • 1. 为什么 1 秒 16000Hz 的音频不能直接用全连接层直接映射成文本,必须经过声学特征提取和时序对齐?
  • 2. 说话人日志(Diarization)和 ASR 结合时,先做 ASR 还是先做 Diarization 各有什么优缺点?
  • 3. CTC 解码算法中的 Blank(空白标记)起到了什么关键作用?
类比
ASR 流水线就像“速记员听写”:耳朵接收振动(波形),大脑辨识音节(声学特征与模型),手头按语法规则整理成通顺字词(解码器与语言模型)。
动手练习 第二则

ASR 基本流水线:动手实现

练习目标

10-20分钟小练习 目标:用 PyTorch/TorchAudio 搭建一个最小闭环的 ASR 流水线,完成“合成音频波形 -> 提取 Log-Mel 频谱 -> 声学模型前向计算 -> CTC 贪心解码输出文本”的完整流程。 输入:模拟的原始音频波形张量 `(batch_size, samples)`。 输出:识别出的字符序列及每一步张量形状(Shape)追踪。 验收标准:代码无报错运行,清楚展示张量在每一步的维度变换,并成功运行 CTC 贪心解码去重逻辑。

参考实现

实现思路: 1. 音频输入:生成 1 秒采样率 16000Hz 的假音频信号。 2. 特征提取:用 `torchaudio.transforms.MelSpectrogram` 提取 80 维 Log-Mel 谱。 3. 极简声学模型:用一个简单的 1D 卷积/线性层,将时序特征投影到词表大小的类别概率分布上。 4. CTC 贪心解码:手动实现 CTC 贪心解码算法(取 argmax -> 去除相邻重复 -> 去除 blank)。

import torch
import torch.nn as nn
import torchaudio.transforms as T

# 1. 词表定义 (0 号留给 CTC Blank)
VOCAB = ["<blank>", "h", "e", "l", "o", "w", "r", "d", " "]
vocab_map = {i: ch for i, ch in enumerate(VOCAB)}
VOCAB_SIZE = len(VOCAB)

# 2. 模拟音频输入 (Batch=1, 采样率 16kHz, 持续 1 秒)
SAMPLE_RATE = 16000
audio_waveform = torch.randn(1, SAMPLE_RATE)  # [B, Num_Samples]

# 3. 特征提取模块:Log-Mel Spectrogram
mel_extractor = T.MelSpectrogram(
    sample_rate=SAMPLE_RATE,
    n_fft=400,          # 窗长 25ms
    hop_length=160,      # 帧移 10ms (每秒产生 100 帧)
    n_mels=80
)
mel_spec = mel_extractor(audio_waveform)  # [B, n_mels, T]
log_mel_spec = torch.log(mel_spec + 1e-6).permute(0, 2, 1)  # [B, T, n_mels]

# 4. 极简声学模型 (特征维度 80 -> 预测词表分布 VOCAB_SIZE)
class ToyAcousticModel(nn.Module):
    def __init__(self, in_features, num_classes):
        super().__init__()
        self.encoder = nn.Sequential(
            nn.Linear(in_features, 64),
            nn.ReLU(),
            nn.Linear(64, num_classes)
        )
    def forward(self, x):
        return self.encoder(x)  # [B, T, num_classes]

model = ToyAcousticModel(in_features=80, num_classes=VOCAB_SIZE)
logits = model(log_mel_spec)  # [B, T, num_classes]
probs = torch.softmax(logits, dim=-1)

# 5. CTC 贪心解码函数 (核心逻辑)
def ctc_greedy_decode(probs, vocab_map, blank_idx=0):
    """
    输入: probs [T, VOCAB_SIZE]
    输出: 解码后的文本字符串
    """
    # 步骤 A: 每一帧挑概率最大的 token id
    best_tokens = torch.argmax(probs, dim=-1).tolist()
    
    # 步骤 B: 去除连续重复的 token
    collapsed = []
    prev = None
    for token in best_tokens:
        if token != prev:
            collapsed.append(token)
            prev = token
            
    # 步骤 C: 去除 blank 占位符并拼接为字符
    decoded_chars = [vocab_map[token] for token in collapsed if token != blank_idx]
    return "".join(decoded_chars)

# 6. 执行解码
pred_text = ctc_greedy_decode(probs[0], vocab_map, blank_idx=0)

print(f"1. 输入音频形状: {audio_waveform.shape} (1 秒音频)")
print(f"2. Log-Mel 特征形状: {log_mel_spec.shape} (T=101帧, Mel=80维)")
print(f"3. 声学模型输出形状: {logits.shape} (每帧给出 {VOCAB_SIZE} 个类别得分)")
print(f"4. 最终解码输出: '{pred_text}' (未训练模型输出随机字符)")
代码拆解与真实用法

1. 张量形状追踪 - `audio_waveform`: `[1, 16000]`。1 秒 16kHz 音频共有 16000 个采样点。 - `log_mel_spec`: `[1, 101, 80]`。`hop_length=160` 意味着每 160 个采样点(10ms)滑一步,$16000 / 160 + 1 = 101$ 帧。 - `logits`: `[1, 101, 9]`。为 101 帧里的每一帧,预测词表中 9 个字符的未归一化得分。

2. CTC 贪心解码三步法 - 为什么不能直接把每一帧的字符拼起来?因为 101 帧会输出 101 个字符(如 `hhhhhheeeellllllllllooooo`)。 - CTC 规则: 1. 帧级别选最大:`[h, h, h, e, e, blank, l, l]` 2. 合并连续相同:`[h, e, blank, l]` 3. 剔除 Blank:`[h, e, l]`

3. 常见初学者错误 - 错误颠倒维数:`MelSpectrogram` 默认输出 `[B, n_mels, T]`,送入 Linear 层或 PyTorch Transformer 时若按特征维处理,必须显式 `.permute(0, 2, 1)` 转成 `[B, T, n_mels]`。 - 忘加 log 操作:Mel 频谱能量跨度非常大,不取 `log` 会导致模型数值不稳定,难以收敛。 - 解码时先去 Blank 再去重(顺序颠倒):如果先把 blank 删掉,原本分开的两个相同字母(如 `l, blank, l` 变成 `l, l`)就会被错误合并成一个 `l`,导致 `hello` 变成 `helo`。必须先合并连续相同,再去 Blank

4. 真实工业模型对应位置 - 代码中的 `MelSpectrogram` 对应真实 ASR(如 Whisper / WeNet)的前端特征提取层。 - 代码中的 `ToyAcousticModel` 在真实大模型中被替换为 Conformer EncoderTransformer Encoder。 - 代码中的 `ctc_greedy_decode` 是最基础的解码策略,真实场景会升级为结合语言模型的 CTC Prefix Beam SearchBeam Search with Transformer Decoder

再练一步
  • 1. 将该练习中的 `ctc_greedy_decode` 改写,让它在解码文字的同时,输出每个字对应的起止时间帧索引。
  • 2. 尝试将 `ToyAcousticModel` 替换为一个 2 层的 `nn.GRU`,观察模型参数量与时序输出变化。
类比
一句代码记忆法:音频过 Mel 变图片,网络打分出矩阵,CTC 去重消空白。

往期记录 229 条记录

2026年09月02日学习率与调度器:今天真正弄懂foundationlearning ratewarmupscheduler
2026年09月02日学习率与调度器:动手实现practicePythonPyTorch学习率与调度器
2026年09月02日对比学习:今天真正弄懂foundationcontrastive learningpositive pairnegative pair
2026年09月02日对比学习:动手实现practicePythonPyTorch对比学习
2026年09月02日SGD 与动量:今天真正弄懂foundationSGDmomentumoptimization
2026年09月02日SGD 与动量:动手实现practicePythonPyTorchSGD 与动量
2026年09月02日VAD 语音活动检测:今天真正弄懂foundationVADspeech activitysegmentation
2026年09月02日VAD 语音活动检测:动手实现practicePythonPyTorchVAD 语音活动检测
2026年09月02日Adam 与 AdamW:今天真正弄懂foundationAdamAdamWoptimizer
2026年09月02日Adam 与 AdamW:动手实现practicePythonPyTorchAdam 与 AdamW
2026年09月02日InfoNCE 损失:今天真正弄懂foundationInfoNCEcontrastive losstemperature
2026年09月02日InfoNCE 损失:动手实现practicePythonPyTorchInfoNCE 损失
2026年09月01日Log-Mel 频谱:今天真正弄懂foundationlog-mel spectrogramdynamic rangeaudio
2026年09月01日Log-Mel 频谱:动手实现practicePythonPyTorchLog-Mel 频谱
2026年08月31日BatchNorm:今天真正弄懂foundationBatchNormrunning statisticstrain eval
2026年08月31日BatchNorm:动手实现practicePythonPyTorchBatchNorm
2026年08月30日Mel 频率与 Mel 滤波器组:今天真正弄懂foundationMel scalefilterbankaudio feature
2026年08月30日Mel 频率与 Mel 滤波器组:动手实现practicePythonPyTorchMel 频率与 Mel 滤波器组
2026年08月30日Dropout 为什么有效:今天真正弄懂foundationdropoutregularizationoverfitting
2026年08月30日Dropout 为什么有效:动手实现practicePythonPyTorchDropout 为什么有效
2026年08月30日早期、晚期与中间融合:今天真正弄懂foundationearly fusionlate fusionmultimodal
2026年08月30日早期、晚期与中间融合:动手实现practicePythonPyTorch早期、晚期与中间融合
2026年08月29日ReLU、GELU 与 SiLU:今天真正弄懂foundationReLUGELUSiLU
2026年08月29日ReLU、GELU 与 SiLU:动手实现practicePythonPyTorchReLU、GELU 与 SiLU
2026年08月28日跨模态对齐:今天真正弄懂foundationmultimodal alignmentaudio-videorepresentation
2026年08月28日跨模态对齐:动手实现practicePythonPyTorch跨模态对齐
2026年08月28日自动微分 Autograd:今天真正弄懂foundationautogradcomputation graphbackward
2026年08月28日自动微分 Autograd:动手实现practicePythonPyTorch自动微分 Autograd
2026年08月28日STFT 短时傅里叶变换:今天真正弄懂foundationSTFTspectrumtime-frequency
2026年08月28日STFT 短时傅里叶变换:动手实现practicePythonPyTorchSTFT 短时傅里叶变换
2026年08月28日参数初始化:今天真正弄懂foundationinitializationXavierKaiming
2026年08月28日参数初始化:动手实现practicePythonPyTorch参数初始化
2026年08月28日Cross-Attention:今天真正弄懂foundationcross-attentionquerymultimodal fusion
2026年08月28日Cross-Attention:动手实现practicePythonPyTorchCross-Attention
2026年08月27日分帧、加窗与帧移:今天真正弄懂foundationframingwindowinghop length
2026年08月27日分帧、加窗与帧移:动手实现practicePythonPyTorch分帧、加窗与帧移
2026年08月27日链式法则与梯度:今天真正弄懂foundationchain rulegradientbackpropagation
2026年08月27日链式法则与梯度:动手实现practicePythonPyTorch链式法则与梯度
2026年08月26日广播机制 Broadcasting:今天真正弄懂foundationbroadcastingtensor shapePyTorch
2026年08月26日广播机制 Broadcasting:动手实现practicePythonPyTorch广播机制 Broadcasting
2026年08月25日视频帧与时间维:今天真正弄懂foundationvideo frameFPStemporal dimension
2026年08月25日视频帧与时间维:动手实现practicePythonPyTorch视频帧与时间维
2026年08月24日矩阵乘法的直觉:今天真正弄懂foundationmatrix multiplicationlinear layerprojection
2026年08月24日矩阵乘法的直觉:动手实现practicePythonPyTorch矩阵乘法的直觉
2026年08月23日音频采样与混叠:今天真正弄懂foundationsampling rateNyquistaliasing
2026年08月23日音频采样与混叠:动手实现practicePythonPyTorch音频采样与混叠
2026年08月22日张量、形状与维度:今天真正弄懂foundationtensorshapedimension
2026年08月22日张量、形状与维度:动手实现practicePythonPyTorch张量、形状与维度
2026年08月21日音视频时间对齐:今天真正弄懂foundationaudio-visual alignmentsynchronizationtemporal modeling
2026年08月21日音视频时间对齐:动手实现practicePythonPyTorch音视频时间对齐
2026年08月20日说话人日志基本流程:今天真正弄懂foundationspeaker diarizationVADclustering
2026年08月20日说话人日志基本流程:动手实现practicePythonPyTorch说话人日志基本流程
2026年08月19日说话人嵌入:今天真正弄懂foundationspeaker embeddingx-vectorECAPA-TDNN
2026年08月19日说话人嵌入:动手实现practicePythonPyTorch说话人嵌入
2026年08月18日KV Cache:今天真正弄懂foundationKV cacheinferenceautoregressive
2026年08月18日KV Cache:动手实现practicePythonPyTorchKV Cache
2026年08月18日CTC 损失:今天真正弄懂foundationCTCASRalignment
2026年08月18日CTC 损失:动手实现practicePythonPyTorchCTC 损失
2026年08月17日RoPE 旋转位置编码:今天真正弄懂foundationRoPEposition encodingattention
2026年08月17日RoPE 旋转位置编码:动手实现practicePythonPyTorchRoPE 旋转位置编码
2026年08月16日自注意力机制:今天真正弄懂foundationself-attentionQKVscaled dot product
2026年08月16日自注意力机制:动手实现practicePythonPyTorch自注意力机制
2026年08月15日交叉熵与负对数似然:今天真正弄懂foundationcross entropyNLLclassification
2026年08月15日交叉熵与负对数似然:动手实现practicePythonPyTorch交叉熵与负对数似然
2026年08月14日Softmax 与温度系数:今天真正弄懂foundationsoftmaxtemperaturelogits
2026年08月14日Softmax 与温度系数:动手实现practicePythonPyTorchSoftmax 与温度系数
2026年08月13日残差连接:今天真正弄懂foundationresidual connectiongradient flowResNet
2026年08月13日残差连接:动手实现practicePythonPyTorch残差连接
2026年08月12日LayerNorm 与 Pre-Norm:今天真正弄懂foundationLayerNormPre-Normresidual
2026年08月12日LayerNorm 与 Pre-Norm:动手实现practicePythonPyTorchLayerNorm 与 Pre-Norm
2026年08月11日信息粒缓存编排interviewPrefixDAGMinCostFlowSemanticHash
2026年08月11日表示一个折线图的最少线段数codeGeometryArrayMath
2026年08月11日RMSNorm:今天真正弄懂foundationRMSNormnormalizationLLaMA
2026年08月11日RMSNorm:动手实现practicePythonPyTorchRMSNorm
2026年08月10日长上下文块复用interviewPrefixCachingDynamicProgrammingIntervalScheduling
2026年08月10日到达终点数字codeMathParityGreedy
2026年08月10日多教师蒸馏调度interviewMinCostFlowDynamicProgrammingParetoFrontier
2026年08月10日定长子串中元音的最大数目codeStringSliding WindowTwo Pointers
2026年08月06日长窗注意力稳健化interviewNumericalStabilitySoftmaxPositionBias
2026年08月06日执行操作使数据元素之和大于等于 KcodeGreedyMathEnumeration
2026年08月05日必须拿起的最小连续卡牌数codehashmaparrayslidingwindow
2026年08月04日绝对差不超过限制的最长连续子数组codesliding windowmonotonic queuedeque
2026年08月03日证据路由与采样优化interviewRoutingSubmodularLatency
2026年08月01日查询引导长视频采样interviewSubmodularKnapsackTemporalCoverage
2026年08月01日边界元素是最大值的子数组数目codeStackArrayMonotonicStack
2026年07月30日受限内存推理调度interviewLLM-servingKV-cacheScheduling
2026年07月29日技能感知词元压缩interviewTokenCompressionMultimodalKnapsack
2026年07月27日递归验证预算分配interviewAStarBanditSubmodular
2026年07月26日推理早停预算分配interviewOptimalStoppingSequentialTestCalibration
2026年07月26日二叉树中所有距离为 K 的结点codeTreeBFSDFS
2026年07月25日流式同传轨迹调度interviewStreamingMonotonicAlignmentLatencyControl
2026年07月25日分割回文串codepalindromebacktrackingdynamicprogramming
2026年07月24日最大节点价值之和codeGreedyBitManipulationTree
2026年07月23日长音视频工具调度interviewTool RoutingDAG SchedulingSubmodular Maximization
2026年07月20日流式多模态记忆检索interviewStreaming MemoryMultimodal RetrievalTemporal Indexing
2026年07月20日T 秒后青蛙的位置codeTreeDFSProbability
2026年07月20日约束预算模型路由interviewModel RoutingConstrained OptimizationContextual Bandit
2026年07月20日匹配模式数组的子数组数目 IIcodeArrayKMPStringMatching
2026年07月20日受限显存解码调度interviewLLMCompilerKVCacheScheduling
2026年07月20日填充每个节点的下一个右侧节点指针 IIcodeTreeBFSLinkedList
2026年07月02日变分信息瓶颈Information BottleneckVariational BoundRate-Distortion
2026年07月01日CTC序列对齐算法CTCForward-Backward AlgorithmBlank Token
2026年07月01日故障流行病学Core DumpStatistical DebuggingFault Localization
2026年06月30日哈希嵌入压缩Hash EmbeddingFeature HashingEmbedding Compression
2026年06月29日一致性蒸馏Consistency ModelsProgressive DistillationODE Trajectory
2026年06月29日原生推理引擎Native RuntimeggmlInference Engine
2026年06月28日无分类器引导Classifier-Free GuidanceGuidance ScaleScore Interpolation
2026年06月25日MVDR波束成形MVDR BeamformingSpatial FilteringCovariance Estimation
2026年06月24日神经缩放定律Scaling LawsCompute-Optimal TrainingPower Law
2026年06月23日最小贝叶斯风险解码Minimum Bayes RiskDecision TheoryHypothesis Selection
2026年06月23日PID控制与生成调控PID ControllerFeedback ControlClosed-loop Generation
2026年06月22日生成模型评估度量Frechet Inception DistanceGenerative EvaluationFeature Statistics
2026年06月21日浮点量化收缩偏差FP4 TrainingShrinkage BiasLow-Precision Arithmetic
2026年06月21日模型上线仿真Deployment SimulationShadow TestingOffline Evaluation
2026年06月20日现代联想记忆Hopfield NetworkAssociative MemoryEnergy-Based Model
2026年06月19日离散扩散语言模型Discrete DiffusionAbsorbing StateConcrete Score
2026年06月18日循环变换器架构Looped TransformerWeight TyingAdaptive Computation
2026年06月17日韵律建模演进Prosody PredictionF0 ModelingDuration Prediction
2026年06月16日说话人日志Speaker DiarizationSpeaker EmbeddingEEND
2026年06月15日偏好对齐优化Preference OptimizationDPOReward Modeling
2026年06月14日多令牌并行预测Multi-Token PredictionSpeculative DecodingParallel Decoding
2026年06月13日流匹配生成模型Flow MatchingRectified FlowOptimal Transport Path
2026年06月13日实时管线延迟预算Latency BudgetPipeline OrchestrationTime-to-First-Token
2026年06月12日MoE路由机制Mixture of ExpertsSparse GatingRouter Design
2026年06月11日连续自回归生成Continuous AutoregressiveLatent PredictionAudioVAE
2026年06月10日KV缓存压缩KV Cache CompressionToken EvictionAttention Sparsity
2026年06月09日浏览器端模型推理WebGPUBrowser InferenceClient-side ML
2026年06月02日残差向量量化Residual Vector QuantizationAudio TokenizationNeural Codec
2026年05月31日彩色噪声扩散采样Colored NoiseSpectral BiasSDE Solver
2026年05月31日算子融合编译原理Kernel FusionOperator Fusiontorch.compile
2026年05月20日AI生成内容溯源 (7 chars) ✓Content ProvenanceC2PASynthID
2026年05月19日推理委托设计模式 (8 chars) ✓ Let me now write the full content for both topics. Actually, I realize I should double-check: is "Runtime Abstraction" or "Delegate Pattern" too close to any covered keyword? Looking at the list: Cluster Scheduling, Co-design, Collective Communication, Computational Expressiveness, CUTLASS... No, none of these overlap. OK, let me finalize and write everything out. Let me reconsider the engineering topic one more time. The title "推理委托设计模式" is good but maybe I should make it even more specific and interesting. What about focusing on the "graph partitioning" aspect - how ML runtimes decide which operations to delegate to which backend? This is a more specific and technically interesting angle. No, I think the broader "delegate pattern" is better because it covers the full picture and is more useful to the reader. Let me write it all out now. For the engineering topic, let me think about the history: - Early days: frameworks were monolithic (Caffe, early TensorFlow) - TensorRT (2017): NVIDIA's specialized inference engine, initially standalone - ONNX Runtime (2019): Microsoft introduced "Execution Providers" - the first major delegate-like abstraction - TFLite delegates (2018-2019): TensorFlow Lite introduced delegate API for GPU, NNAPI, etc. - ExecuTorch (2023-2024): PyTorch's answer to edge inference with a clean delegate API - 2025-2026: MLX delegate, Qualcomm AI Engine Direct delegate, etc. This is a rich history. Let me write it up. Actually, I want to make sure I have the dates right: - TensorRT was first released around 2016-2017 - ONNX was announced in 2017 - ONNX Runtime was open-sourced in 2018-2019 - TFLite was released in 2017, delegates came later - ExecuTorch was announced at PyTorch Conference 2023 OK, let me write everything now. I'll be thorough. One more thought: for the MATH section of the engineering topic, I could discuss the graph partitioning problem formally, or I could discuss the cost model for deciding whether to delegate. Let me think... The graph partitioning for delegation can be formalized as: - Given a computation graph $G = (V, E)$ where $V$ is the set of operations and $E$ is data dependencies - And a set of delegates $D = \{d_1, ..., d_m\}$ where each delegate supports a subset of operations $S_i \subseteq V$ - Find a partition $P = \{P_0, P_1, ..., P_m\}$ (where $P_0$ is the fallback/CPU partition) that minimizes total execution time - Subject to: each $
2026年05月17日连续批处理异步化
2026年05月10日连续潜在扩散语言模型Continuous Latent DiffusionNon-autoregressive LMDiffusion Language Model
2026年05月10日零样本跨语言语音克隆Zero-shot Voice CloningCross-lingual TTSIPA Phoneme Representation
2026年05月09日最优传输音频距离Optimal TransportFréchet Audio DistanceRiemannian Metric
2026年05月09日推荐系统推理核内广播优化Intra-kernel BroadcastEmbedding TableRecommendation Inference
2026年05月08日扩散Transformer异常值令牌Outlier TokensDiffusion TransformerAttention Sink
2026年05月08日WebRTC低延迟语音工程WebRTCReal-time AudioJitter Buffer
2026年05月07日音素级深度伪造检测原理Phoneme-level Deepfake DetectionSelf-supervised Speech EmbeddingEmotional Speech Synthesis
2026年05月07日AI训练网络协议工程哲学Multi-path Reliable ConnectionRDMA over EthernetCollective Communication
2026年05月05日对抗解纠缠说话人验证Speaker DisentanglementAdversarial TrainingCross-lingual Verification
2026年05月05日LLM推理为何用语言Chain-of-ThoughtLatent ReasoningToken Space
2026年05月01日跨架构知识蒸馏原理Cross-Architecture DistillationDiffusion LMAutoregressive Teacher
2026年05月01日AI评估计算瓶颈工程LLM Evaluation InfrastructureBenchmark SaturationEval Compute Bottleneck
2026年04月29日平衡传输语音增强Schrödinger BridgeStochastic Differential EquationSpeech Enhancement
2026年04月29日深度学习理论形成Deep Learning TheoryLoss LandscapeNeural Tangent Kernel
2026年04月28日语义进度函数原理Semantic Progress FunctionDiffusion TrajectoryNonlinear Denoising
2026年04月28日大模型OCR选型认知OCR BenchmarkModel Selection BiasCost-Performance Tradeoff
2026年04月27日说话人验证核心原理Speaker Verificationd-vectorECAPA-TDNN
2026年04月27日GPU核函数语言选型GPU Kernel EngineeringCuTe DSLCUTLASS
2026年04月26日时长控制TTS原理Duration ModelingProsody ControlAutoregressive TTS
2026年04月26日AI研究价值评估困境Research EvaluationPublication BiasPeer Review
2026年04月25日全双工对话建模原理Full-Duplex DialogueTurn-TakingVoice Activity Detection
2026年04月25日流式TTS文本规范化Text NormalizationStreaming TTSInverse Text Normalization
2026年04月24日离散扩散语言模型原理Discrete DiffusionMasked Diffusion Language ModelAbsorbing Diffusion
2026年04月24日跟进ML研究的认知工程Information OverloadResearch TriageSpaced Repetition
2026年04月23日一致性正则化ASR原理Consistency RegularizationUnified ASRTransducer
2026年04月23日流式TTS文本规范化工程Text NormalizationStreaming TTSInverse Text Normalization
2026年04月22日神经编码器伪影检测Neural Audio CodecArtifact DetectionForensic Residual
2026年04月22日AI研究复现危机工程Reproducibility CrisisML EngineeringExperimental Rigor
2026年04月21日扩散SNR偏差校正原理Signal-to-Noise RatioDiffusion Timestep BiasScore Matching
2026年04月21日论文复现危机根治工程Reproducibility CrisisAblation StudyExperimental Rigor
2026年04月20日音频时序定位原理Temporal GroundingAudio Event DetectionCross-modal Alignment
2026年04月20日论文复现危机根因Reproducibility CrisisBenchmark OverfittingEvaluation Validity
2026年04月19日流匹配对齐原理Flow Matching AlignmentReward Gradient BackpropagationTrajectory Optimization
2026年04月19日分布式训练任务编排Distributed Training OrchestrationCluster SchedulingFault Tolerance
2026年04月18日最优传输信号融合Optimal TransportWasserstein BarycenterTime-Frequency Resolution
2026年04月18日分布式训练任务调度Distributed Training OrchestrationJob SchedulingCluster Resource Management
2026年04月17日扩散语音识别原理Masked Diffusion Language ModelDiscrete DiffusionASR Decoding
2026年04月17日Mel尺度跨文化偏差Mel ScalePsychoacousticsCultural Bias
2026年04月16日音频水印对抗原理Audio WatermarkingSemi-FragilePsychoacoustic Masking
2026年04月16日推测解码草稿树工程Speculative DecodingDraft TreeBlock Diffusion
2026年04月15日对抗流模型原理Continuous Normalizing FlowAdversarial TrainingFlow Matching
2026年04月15日代理状态可观测性工程Agent ObservabilityDistributed TracingState Machine Debugging
2026年04月14日过程奖励模型原理Process Reward ModelStep-level SupervisionReasoning Chain
2026年04月13日离散令牌音源分离Discrete Token ModelingSource SeparationConditional Generation
2026年04月13日超算API工程哲学Distributed Training OrchestrationSupercomputer API DesignFault Tolerance
2026年04月12日信息瓶颈原理演进Information BottleneckVariational IBDisentanglement
2026年04月12日Safetensors格式工程哲学SafetensorsModel SerializationMemory-Mapped IO
2026年04月11日归一化层演进原理Layer NormalizationRMS NormalizationBatch Normalization
2026年04月11日GEMM自调优后端工程GEMM AutotuningTorchInductorCuteDSL
2026年04月10日多令牌预测原理Multi-Token PredictionSpeculative DecodingMedusa Heads
2026年04月10日ML从业者认知校准Calibration BiasCapability IllusionBenchmark Overfitting
2026年04月09日编码器-解码器LM原理Encoder-Decoder LMCross-Attention ConditioningSequence-to-Sequence
2026年04月09日torch.compile归一化优化torch.compileLayerNormRMSNorm
2026年04月08日KV缓存压缩原理KV Cache CompressionRoPE Position EncodingAttention Score Estimation
2026年04月08日音效基础模型工程Sound Effect GenerationFoundation ModelFoley Synthesis
2026年04月07日可验证奖励强化学习Verifiable RewardRLVRProcess Reward Model
2026年04月07日LLM技能退化认知机制Cognitive OffloadingSkill AtrophyDesirable Difficulty
2026年04月06日音素可解释说话人验证Phoneme-aware Speaker VerificationInterpretable BiometricsLocal Acoustic Evidence
2026年04月06日音频幻觉攻击评估Hallucination AttackAudio Language Model ReliabilityAdversarial Probing
2026年04月05日潜在空间推理原理Latent Space ReasoningContinuous RepresentationToken-Free Inference
2026年04月05日mRNA模型极低成本训练Biology Foundation ModelCross-Species TransferLow-Budget Training
2026年04月04日编码器-解码器TTS原理Encoder-Decoder TTSText ConditioningPositional Capacity
2026年04月04日大模型训练的MXFP8工程MXFP8MicroscalingMixed Precision Training
2026年04月03日在线知识蒸馏原理Online DistillationKnowledge TransferStudent-Teacher
2026年04月03日MoE专家并行调度工程Expert ParallelismMixture of ExpertsAll-to-All Communication
2026年04月02日波形潜空间扩散TTSwaveform latent diffusionnon-autoregressive TTSlatent space acoustic modeling
2026年04月02日波形隐空间扩散原理waveform latent spacediffusion TTSVAE audio codec
2026年04月02日LLM量化权重工程weight quantizationLLM compression4-bit quantization
2026年04月02日扩散语言模型离散生成Discrete DiffusionMasked Diffusion Language ModelNon-autoregressive TTS
2026年04月02日LLM后训练库工程演进RLHF engineeringPPO training stabilityreward hacking
2026年04月02日声学证据瓶颈原理Audio Evidence BottleneckAcoustic GroundingAudio Language Model
2026年04月02日状态空间模型音频建模State Space ModelMambaSelective Scan
2026年04月02日实时语音增强工程选型Real-time Speech EnhancementNoise SuppressionStreaming Inference
2026年04月02日对话上下文压缩原理Context CompressionAbstractive SummarizationCross-Attention Fusion
2026年04月02日说话人匿名化工程Speaker AnonymizationVoice ConversionStreaming Inference
2026年04月02日视听语音识别融合Audio-Visual Speech RecognitionLip ReadingViseme
2026年04月02日GPU训练吞吐加速工程MXFP8MoE TrainingExpert Parallelism
2026年04月01日熵驱动多样性生成diversity samplingtypicality biasrepulsion in latent space
2026年04月01日说话人分割工程选型speaker diarizationbenchmark methodologystreaming ASR pipeline
2026年03月31日转向检测联合建模turn-taking detectionvoice activity detectionjoint acoustic-linguistic modeling
2026年03月31日基准测试的系统性失效benchmark contaminationevaluation validityLLM judge reliability
2026年03月31日扩散模型声学生成diffusion modelscore matchingstochastic differential equation
2026年03月31日TTS开源生态竞争open-weight TTStime-to-first-audiomultilingual speech synthesis
2026年03月30日注意力机制变体演进Multi-Head AttentionGrouped Query AttentionMulti-head Latent Attention
2026年03月30日设备端语音推理架构on-device inferenceExecuTorchvoice agent pipeline
2026年03月29日混合自回归流匹配TTSautoregressive semantic tokensflow matching acoustic decoderhybrid TTS architecture
2026年03月29日NCCL超时诊断方法论NCCL watchdog timeoutdistributed training debuggingcollective communication
2026年03月29日混合架构音频表示Mambastate space modelaudio representation learning
2026年03月29日DeepSeek预训练加速工程MXFP8 trainingexpert parallelismMoE pretraining
2026年03月27日说话人验证度量学习speaker verificationmetric learningcurriculum learning
2026年03月27日MX浮点格式加速训练MXFP8microscalingmixed precision training
2026年03月26日TTS模型极限压缩model compressionknowledge distillationTTS on-device
2026年03月26日小模型极限压缩哲学model compressionknowledge distillationquantization
2026年03月25日流匹配生成原理flow matchingrectified flowODE
2026年03月25日神经音频编解码器neural audio codecresidual vector quantizationEnCodec
2026年03月25日推测解码加速推理speculative decodingdraft modeltoken verification