AI 与机器学习2024arxiv.org
Megalodon:高效 LLM 预训练与无限上下文长度推理
Megalodon: Efficient LLM Pretraining and Inference with Unlimited Context Length
进阶 · 约 80 分钟读完前置知识:Transformer 基础、注意力机制、LLM 预训练
导读
论文提出 Megalodon,目标是高效地进行 LLM 预训练与推理,并支持无限上下文长度。根据评论,它仍把序列切成长度 4096 的块,并只在块内使用注意力,因此块内仍是二次复杂度;论文是否在召回类任务上有效、代码和权重是否可用,是讨论中的主要疑点。
HN 关注点:是否真能高效支持无限上下文,以及代码链接失效、权重缺失和召回能力未验证带来的可复现性问题。
HN 评论精选
这几条评论里:质疑 4
质疑批评代码链接失效,认为只有可运行代码才有价值,并对 arXiv LLM 论文整体不满。
1. 打开论文 2. 找 GitHub 3. 读源码 https://github.com/XuezheMax/megalodon 死链。我已经不读论文了,只关心能用的工作代码。arXiv 上的 LLM 论文总体已经到学术自慰的程度。先把坏链接修好,我们才有得谈。
zer00eyz查看英文原文
1. Open paper 2. Find GitHub 3. Read Source https://github.com/XuezheMax/megalodon Dead link I have stoped reading the papers, I only care about working code that can be used. Arvix LLM papers have reached the level of academic mastrubation in general. Fix the bad link and then we have something to talk about.
质疑质疑未报告召回任务表现,且代码链接失效、权重不可得,难以验证论文声明。
我看到这项工作有两个问题:* 没有提到模型在召回任务上的表现。有注意力的模型在召回任务上表现好,而像这个没有注意力的模型往往表现差。[a] 这个模型在召回任务上的表现如何?* 正如其他人指出,GitHub 链接是死的。此外,预训练权重似乎也不在 HF 或任何地方。既没有代码也没有权重,很难验证任何声明!
cs702查看英文原文
The two issues I see with this work: * There's no mention of model performance on recall tasks. Models with attention do well on recall tasks, but models without it, like this one, tend to do poorly.[a] What is the performance of this model on recall tasks? * As others here have pointed out, the github link is dead. In addition, the pretrained weights don't seem to be available on HF or anywhere else. It's hard to check any claims if we have neither code nor weights! --- [a] https://arxiv.org/abs/2402.01032
质疑认为无限上下文不实用,主张把每日上下文离线整合进模型,而不是长期依赖超长上下文。
我刚和 ChatGPT 聊了无限上下文长度。即使理论上可以这样做一个知道所有聊天历史的个人助理,无限上下文似乎也不够高效。更合理的做法是每天创建一个新上下文,并在夜间把它整合进模型;或者每天创建一个聚合最近几天的上下文。让它每天有时间“睡一觉”,第二天无需再次传入上下文就能使用。
qwertox查看英文原文
I was just chatting with ChatGPT about unlimited context length, and even if you theoretically could archive to have a personal assistant this way, one which would know all your chat history, an unlimited context length doesn't seem efficient enough. It would make more sense to create a new context every day and integrate it into the model at night. Or a every day a new context of the aggregated last several days. Giving it time to sleep on it every day and it being capable to use it the next day without it needing to get passed in the context again.
质疑指出该模型仍是分块注意力,块内复杂度与 Llama 2 同级,并非真正消除二次复杂度。
这个模型有注意力,只是序列被切成长度 4096 的块,注意力只作用于块内。Llama 2 也是在长度 4096 的块上训练的,所以对于任何能放进 Llama 2 上下文长度的序列,这个模型具有相同的二次复杂度。
YetAnotherNick查看英文原文
This model has attention, just the sequence in broken into chunks of length 4096 and the attention is only applied for the chunk. Llama 2 was trained on chunks of length 4096 so this model has the same quadratic complexity for any sequence which fits within llama 2 context size.
相关资源
从这篇论文所有 HN 讨论帖的全部评论里整理出来的链接。
历次讨论
- 2024Hacker News 讨论帖168 分 · 28 评
同领域还值得读
DeepSeek-R1:通过强化学习激励 LLM 的推理能力
DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via RL
研究如何用强化学习激励大语言模型的推理能力,提出 DeepSeek-R1,并探讨 RL 训练对模型推理表现的影响。
AI 与机器学习2025 · 1,351 分 · 1,056 评 · 引用 30进阶 · 约 80 分钟编辑精选1-bit LLM 时代:面向低成本计算的三值参数
The Era of 1-bit LLMs: ternary parameters for cost-effective computing
提出用三值参数 {-1, 0, 1} 替代 LLM 中的浮点权重,即所谓“1-bit LLM”。
AI 与机器学习2024 · 1,040 分 · 447 评 · 引用 19进阶 · 约 45 分钟编辑精选DeepSeek-V3.2:推进开放大语言模型的前沿
DeepSeek-v3.2: Pushing the frontier of open large language models
这是 DeepSeek-V3.2 的技术报告,延续了 DeepSeek 开源权重模型的路线,目标是让开放模型继续逼近甚至追平前沿闭源模型。
AI 与机器学习2025 · 982 分 · 465 评进阶 · 约 90 分钟编辑精选通过自我对弈与通用强化学习掌握国际象棋和将棋(AlphaZero)
Mastering Chess and Shogi by Self-Play with General Reinforcement Learning
DeepMind 的 AlphaZero 论文:用通用强化学习算法(自我博弈 + MCTS + 神经网络),从零开始仅数小时训练便在国际象棋和将棋上击败了世界顶级引擎 Stock…
AI 与机器学习2017 · 539 分 · 270 评 · 引用 13进阶 · 约 90 分钟编辑精选用强化学习发现更快的矩阵乘法算法
Discovering faster matrix multiplication algorithms with reinforcement learning
论文提出 AlphaTensor,用强化学习搜索矩阵乘法算法。
AI 与机器学习2022 · 518 分 · 111 评专业 · 约 90 分钟编辑精选