首页 > AI前沿 > Chorus: Shared N-gram Embeddings with Layer-wise Adaptation

Chorus: Shared N-gram Embeddings with Layer-wise Adaptation

arXiv自然语言 2026-11-19 13:00 3 阅读 查看原文
用户需要我把给定的英文纯文本新闻正文排版成语义化的HTML片段。要求包括:只输出HTML片段本身,不要Markdown围栏,不要解释;每个自然段落用`

`包裹,长文用`

/

`划分小节;列表内容用`
  • `,引用用`
    `,代码用`
    `,重要句子可用``;保留原文所有信息,不得增删改内容;不要输出`//`等文档级标签。
    
    正文内容是一段关于Chorus模型的英文,没有明显的小节划分、列表、引用或代码。看起来就是几个自然段落。我需要检查原文,看看是否可以合理划分小节。原文内容连贯,但可以分为几个主题部分:介绍n-gram embedding tables,现有方法的局限性,提出的Chorus方法,实验结果。
    
    为了符合“长文用`

    /

    `划分小节”的要求,我可以将原文分成几个小节,每个小节有标题和段落。例如: - `

    背景与挑战

    ` 或英文标题,但原文是英文,标题应该保持英文还是中文?用户给的是英文正文,我应该保持英文标题,因为内容是英文。不过用户没有明确要求标题语言,但为了保留原文信息,标题最好也是英文,避免增删内容。标题本身不算正文内容,但为了语义化,可以添加小节标题。 原文可以分成: 1. 介绍n-gram embedding tables及其优势和现有问题。 2. 提出Chorus方法及其机制。 3. 实验结果和性能。 4. 优化器Ember的兼容性。 5. 总结意义。 但原文是一段,实际上可以分成多个自然段落。原文开头到"performs poorly in practice."是一个段落。然后"We propose Chorus... its current hidden state."是第二个段落。接着"Chorus matches... 9.6B."是第三个。"It outperforms... 9.6B parameters."是第四个。"We also show... training performance."是第五个。"These results... across layers."是第六个。 我可以将这些段落用`

    `包裹,并添加小节标题来划分。例如: - `

    背景与问题

    ` 然后第一个段落。 - `

    Chorus 方法

    ` 然后第二个段落。 - `

    实验结果

    ` 然后第三、四、五段。 - `

    总结

    ` 然后最后一段。 但要注意:用户要求“保留原文所有信息,不得增删改内容”。添加小节标题属于结构划分,不算增删内容,因为标题只是结构标签,不是内容。但为了安全,我可以不添加标题,直接用`

    `包裹每个自然段落,因为原文已经就是几个自然段落。用户说“长文用`

    /

    `划分小节”,这意味着如果内容较长,应该划分小节。原文虽然不算特别长,但可以划分。不过如果划分,标题需要准确概括。我可以添加英文小节标题,但标题本身不是原文内容,属于排版元素。用户说“保留原文所有信息,不得增删改内容”,添加标题是结构划分,不改变内容,应该可以。但为了更严格,我可以直接用`

    `,因为原文是多个自然段落,每个段落用`

    `包裹即可。用户没有强制要求必须有`

    /

    `,只是说“长文用”,这里不算特别长,可以不用。 但考虑到用户要求“语义化”,用`

    `划分小节更符合要求。我决定划分小节,标题用英文,概括内容,不增加额外信息。例如: - `

    Background

    ` - `

    Proposed Method

    ` - `

    Results

    ` - `

    Conclusion

    ` 但标题可能会被视为增删内容?通常排版中添加小标题是允许的,只要不改变正文内容。用户要求“不得增删改内容”,标题是结构,不是内容。我认为可以。 不过,更安全的做法是:原文本身就是多个自然段,直接用`

    `包裹,不添加标题。因为用户说“每个自然段落用`

    `包裹,长文用`

    /

    `划分小节”,这里原文可以视为几个自然段,直接包裹即可。 我决定采用:直接按原文的自然段落拆分,用`

    `包裹。因为原文中已经有明显的句子分隔,但自然段落划分:从开头到"performs poorly in practice."是一个段落;"We propose Chorus... hidden state."是第二个;"Chorus matches... 9.6B."是第三个;"It outperforms... 9.6B parameters."是第四个;"We also show... training performance."是第五个;"These results... across layers."是第六个。这样就是6个段落。 我可以用`

    `分别包裹这6段。但这样是否足够语义化?用户还要求“重要句子可用``”。我可以在某些关键句子上加``,比如Chorus的提出、性能数据等。但要注意不要过度,保留原文所有信息,加粗只是强调,不改变内容。 例如,在第二段中,“We propose Chorus”可以加粗。在第三段中,“Chorus matches the quality of existing n-gram methods with 87% smaller tables”可以加粗。在第四段中,“It outperforms Engram, TN-gram and FactorEngram in every setting where we compared them”可以加粗。在第五段中,“saving 99.2% of table-optimizer memory”可以加粗。在第六段中,“These results enable further scaling of n-gram embedding tables”可以加粗。 但用户说“重要句子可用``”,是可选,不是必须的。为了安全,我可以不加粗,或者只在最关键处加粗。我决定不加粗,因为原文是学术性内容,加粗可能不太自然,但规则允许。我加几个关键的。 另外,原文中有没有列表、引用、代码?没有。所以不需要`

      `、`
      `、`
      `。
      
      最终输出应该是纯HTML片段,没有Markdown围栏。
      
      现在,构建HTML:
      
      

      Language models can gain capacity at little computational cost from n-gram embedding tables: large tables of learned vectors for short sequences of consecutive tokens, which are looked up and added to the model's input or to its intermediate layers. Recent designs commonly use a separate n-gram embedding table for each layer, which makes the tables costly in memory and prevents layers from sharing what they learn. Sharing a single table, however, gives every layer the same embedding and leaves no room for layer-wise preferences, and it performs poorly in practice.

      We propose Chorus, in which one set of n-gram embedding tables serves the whole network and every layer reads it in its own way. Each layer maps the refined embedding through its own projection layer, after rescaling its components by factors computed from its current hidden state.

      Chorus matches the quality of existing n-gram methods with 87% smaller tables: with 1.2B table parameters it predicts text better than FactorEngram and DeepSeek's Engram do with 9.6B.

      It outperforms Engram, TN-gram and FactorEngram in every setting where we compared them, across table sizes from 20M to 9.6B parameters.

      We also show that the recently proposed memory-efficient optimizer Ember works well with Chorus, saving 99.2% of table-optimizer memory compared with AdamW without degrading training performance.

      These results enable further scaling of n-gram embedding tables along the table-size axis by reducing memory use and allowing shared knowledge to be reused across layers.

      这样应该符合要求。检查是否有文档级标签,没有。没有Markdown围栏。保留了所有内容,没有增删。加粗了重要句子。段落用`

      `包裹。没有小节标题,因为原文不算特别长,且没有明确需要划分的章节。如果用户要求长文用`

      /

      `,这里可以不加,因为每个自然段落已经用`

      `了,而且原文是连续的论述,没有明显的章节。我认为这样是合适的。 但用户说“长文用`

      /

      `划分小节”,如果我想更符合,可以添加小节标题。