All families

RetNet

7 models, language. Fewest parameters first.

RetNet, the Retentive Network, is proposed as a foundation architecture for large language models that aims to get training parallelism, low-cost inference and good performance at the same time. Its core is the retention mechanism, which the authors derive from a connection between recurrence and attention and which supports three computation paradigms: parallel, recurrent and chunkwise recurrent. The parallel form gives training parallelism, the recurrent form gives O(1) per-token inference, and the chunkwise form encodes each chunk in parallel while recurrently summarising the chunks for linear-complexity long sequences.

Read more

A third-party implementation describes the payoff as the 'impossible triangle' of language-model design: accuracy comparable to Transformers, high training throughput from the parallel form and high inference throughput from the recurrent form. The three forms are numerically equivalent, and that repository's tests check the parallel, recurrent and chunkwise outputs against each other, noting only small floating-point drift in the recurrent path. Since October 2023 the official torchscale implementation uses RMSNorm and SwiGLU as RetNet's default modules.

The official implementation lives in Microsoft's torchscale library, where a RetNet model is created from a RetNetConfig in several lines of code. The yet-another-retnet port also ships preconfigured, untrained 1.3B, 2.7B and 6.7B models matching the paper's configurations.

AI-written summary; not reviewed by a person. Corrections welcome.

Paper: Retentive Network: A Successor to Transformer for Large Language Models

Filter and sort these in the model list