Article complete

Meta Releases MEGALODON, Efficient LLM Pre-Training and Inference on Infinite Context Length

In direct comparisons with Llama 2, MEGALODON demonstrates superior efficiency at a scale of 7 billion parameters and 2 trillion training tokens.

Two robotic arms interactively intertwine blue cables against a black background, symbolizing advanced technology.

Key takeaways

  • Meta launches MEGALODON, a neural architecture for efficient long-sequence modeling with unlimited context length.
  • Demonstrates superior efficiency over Llama 2, achieving 7 billion parameters and 2 trillion training tokens.
  • Implements innovations like complex exponential moving average and timestep normalization for enhanced performance.
  • Achieves linear computational and memory complexity through chunking input sequences during training and inference.
  • Consistently outperforms Transformers across various benchmarks and tasks, confirming its advanced capabilities.

Takeaways drafted with AI from the article text.

In direct comparisons with Llama 2, MEGALODON demonstrates superior efficiency at a scale of 7 billion parameters and 2 trillion training tokens, with a training loss of 1.70—positioned between LLAMA2-7B (1.75) and LLAMA2-13B (1.67). MEGALODON's improvements over Transformers are consistent across a range of benchmarks, encompassing different tasks and modalities.

To evaluate MEGALODON's performance, various experiments were conducted, including large-scale long-context pretraining. The model was scaled up to 7 billion parameters and applied to large-scale language models pretraining on 2 trillion tokens. 

MEGALODON introduces key innovations such as the complex exponential moving average (CEMA) component, which extends the multi-dimensional damped EMA to the complex domain, and the timestep normalization layer, which allows normalization along the sequential dimension in autoregressive sequence modeling tasks. Other improvements include normalized attention and pre-norm with two-hop residual configurations.

MEGALODON’s linear computational and memory complexity during training and inference is achieved by chunking input sequences into fixed blocks as in MEGA-chunk. This results in efficient long-context pretraining and better data efficiency. MEGALODON is evaluated across various scales of language modeling and downstream domain-specific tasks, showcasing its ability to model sequences of unlimited length.

MEGALODON's instruction fine-tuning performance is also notable. Fine-tuning the base model of MEGALODON-7B on proprietary instruction-alignment data yields strong performance on MT-Bench, comparable to LLAMA2-Chat, which employs reinforcement learning from human feedback.

In terms of image classification, MEGALODON exhibits top-1 accuracy improvements over DeiT-B and MEGA on ImageNet-1K. Its performance on auto-regressive language modelling tasks on PG19 surpasses state-of-the-art baselines.

Published Updated

Spotted an error? Tell our editors. Read our editorial standards and corrections.

Selling to AI teams? Put your brand in front of the 5M+ people who read AIM every month. Plan a campaign

More in this story

LLMs · 3 stories
  1. You are here: Meta Releases MEGALODON, Efficient LLM Pre-Training and Inference on Infinite Context Length
  2. Google's 'localllm' Lets You Create GenAI Apps Without GPUs
  3. For 25 Years, Wikipedia Trained AI. Now it Wants Payback
About the author

Journalist

Mohit writes about AI in simple, explainable, and often funny words. He's especially passionate about chatting with those building AI for Bharat, with the occasional detour into AGI.

All stories
Belamy · Daily

The day’s AI news, before your first meeting.