FLASHQuad_pytorch icon indicating copy to clipboard operation
FLASHQuad_pytorch copied to clipboard

FLASHQuad_pytorch

Results 2 FLASHQuad_pytorch issues
Sort by recently updated
recently updated
newest added
trafficstars

你好,非常感谢您用PyTorch复现Flash-Quad,我对这个模型也很感兴趣, 有几个小问题,想讨论下: - A = square(relu(qk / seq_len + bias)), 这里的seq_len是不是用当前batch的length更合适,代码中https://github.com/JunnYu/FLASHQuad_pytorch/blob/main/flash/gau.py#L117 用的是预设的max_length(如512 ). 不同batch 的序列长度可能是不同的。 - 您有在不同任务上对比过GAU与Transformer的性能吗 我这边试了几个序列建模任务,发现性能会下降,可能训练超参数差异? 谢谢

您好,看了您关于GAU的代码,发现您的代码中并没有scale_offset的相关代码。 `def scale_offset(x): gamma = var(x.shape[−1:]) beta = var(x.shape[−1:]) return x ∗ gamma + beta def attn(x, v, s=128): z = dense(x, s) q, k = scale_offset(z), scale_offset(z) qk =...