模型官方一手

i14 在 AWS Trainium2 上用原生 PyTorch 训练并部署线性注意力模型 Laplace 3B

Beyond the KV cache: Training and serving i14’s Laplace 3B linear attention model on AWS Trainium2 with native PyTorch

精选理由

一个 3B 的线性注意力模型,每条序列状态固定 29.5 MB,不随上下文膨胀,还全程跑在 Trainium2 上,长上下文推理的内存账很好算。

i14 训练并部署了线性注意力模型 Laplace 3B,全程在 AWS Trainium2 芯片上用原生 PyTorch 完成。该模型的循环状态固定为每条序列 29.5 MB,不随上下文长度增长。相比 transformer 需要维护不断变大的 KV cache,Laplace 3B 在长上下文推理时的内存占用可预测。文章介绍了具体的训练与服务部署方案。

图片来源 · AWS Machine Learning Blog
原文 · AWS Machine Learning Blog

Beyond the KV cache: Training and serving i14’s Laplace 3B linear attention model on AWS Trainium2 with native PyTorch

Learn how i14 trained and served Laplace 3B, a linear attention model, on AWS Trainium2 using native PyTorch. Its recurrent state stays fixed at 29.5 MB per sequence regardless of context length, avoiding the growing key-value cache of transformer models and keeping serving memory predictable.