본문 바로가기
  • Welcome my blog
카테고리 없음

Meta LLaMA 4: Ushering in a New Era of Multimodal AI

by kukrobo 2025. 4. 6.
728x90

Hello! Today, let’s dive deep into the latest AI language model from Meta, LLaMA 4, announced in April 2025. LLaMA 4 has garnered a lot of attention thanks to its open-source approach. It doesn’t merely scale up model size; it introduces various innovations—such as Mixture-of-Experts (MoE) architecture, multimodal processing that feels almost “native,” and an enormous context window. This post covers the features, performance, training methods, use cases, release status, and safety aspects of LLaMA 4 models. Although the content is quite technical, I’ll maintain a friendly tone for senior developers while ensuring the key concepts are explained accurately.


Overview of LLaMA 4 and Key Innovations

LLaMA 4 is Meta’s next-generation flagship language model, delivering a significant leap in both capabilities and performance compared to the previous LLaMA 3 generation. In a single sentence:
“LLaMA 4 is an open large language model that supports extremely long context by leveraging a highly efficient Mixture-of-Experts architecture and is trained natively for multimodal tasks.”

Here are its main highlights:

  1. Mixture-of-Experts (MoE) Architecture
    • Instead of activating all model parameters for every token, only the subset of “experts” needed is utilized. This dramatically boosts training and inference efficiency.
    • With the same computational budget, more parameters can be employed, further improving performance.
    • References:
  2. Natively Multimodal Support
    • Text, images, video, and audio are seamlessly integrated into a single model.
    • From the very start, LLaMA 4 uses an “early fusion” approach to combine text and vision tokens, leading to natural multimodal comprehension.
    • No separate module is needed to handle images—LLaMA 4 can ingest them directly.
    • References:
  3. Extended Context Length
    • The LLaMA 4 Scout model, in particular, can handle up to 10 million tokens in context, a revolutionary increase.
    • This goes beyond typical limits (tens or hundreds of thousands of tokens), enabling the analysis of very long documents or vast codebases in a single pass.
    • Reference:
  4. Massive Training Data and Multilingual Support
    • Trained on a huge dataset of 300–400 billion tokens spanning text, image, and video transcripts.
    • Supports around 200 languages, with over 100 languages receiving 1 billion+ tokens each, thus greatly enhancing multilingual performance.
    • References:
  5. Open Source & Community-Driven
    • Two key models, Scout and Maverick, are released with open weights on platforms like Hugging Face, so anyone can download and use them.
    • Meta aims to foster an ecosystem by sharing progress, and they plan to host a “LlamaCon” developer conference at the end of April 2025 to share the latest results.
    • References:

In short, LLaMA 4 centers on efficiency, multimodality, long context, and openness. Let’s now explore each model’s specific features and the technical details behind them.


Three Models: Scout, Maverick, and Behemoth – Structures and MoE Architecture

In LLaMA 4, Meta has introduced three models with different sizes and use cases: LLaMA 4 Scout, LLaMA 4 Maverick, and LLaMA 4 Behemoth. Each name evokes a particular focus. Below, we’ll unpack the structural differences and how Mixture-of-Experts (MoE) is applied.

Summary of LLaMA 4 model lineup:
Behemoth, Maverick, Scout in descending size. All three adopt MoE so only a fraction of the parameters are “active” per token. Scout and Behemoth each have 16 experts, while Maverick has 128 experts.
(Source: Meta’s presentation materials)

What Is MoE (Mixture-of-Experts)?

Put simply, MoE involves multiple small “expert” networks inside a large model, where only some experts are activated for any given token. For instance, a 400-billion-parameter model might only utilize 170 billion parameters at a time for each token. According to the LLaMA 4 development team, using just a subset of parameters reduces training and inference cost while still retaining the capacity of a very large model. Essentially, it’s an orchestrated effort by a group of specialized experts to extract knowledge from a bigger network.

In LLaMA 4, all three models implement MoE but differ in the number and distribution of experts:

  • Scout
    • Has 16 experts.
    • A total of ~109 billion parameters, with about 17 billion “active” parameters processing each token.
    • References: TECHCRUNCH.COM
  • Maverick
    • Features 128 experts, reaching 400 billion total parameters but also uses 17B active parameters in practice.
    • References: TECHCRUNCH.COM
  • Behemoth
    • Reverts to 16 experts but at a much larger scale, reaching 2 trillion total parameters.
    • Potentially 288 billion active parameters per token.
    • Currently in “preview” training within Meta and not publicly released.
    • References: TECHCRUNCH.COM

Each model targets different roles:

  1. LLaMA 4 Scout
    • The “lightweight” option, using MoE to house knowledge beyond its 17B active parameters.
    • Streamlined structure with 16 experts for efficiency, capable of running on a single NVIDIA H100 GPU.
    • Exceptional context length (up to ~10 million tokens) for summarizing large documents or codebases.
    • Designed for “document summarization and large-scale code inference.”
    • Excels at image grounding (connecting text descriptions to specific parts of images).
    • References: TECHCRUNCH.COM, MEDIUM.COM
  2. LLaMA 4 Maverick
    • The “mainstay” model, offering broad knowledge and robust performance thanks to 128 experts.
    • Still 17B active parameters, so it can provide real-time responses with enough GPU resources.
    • Might require multiple GPU nodes or heavy optimization to host.
    • Suited for “general chatbot/assistant” scenarios, from creative writing to image-text interplay.
    • Long context capacity (in the millions of tokens), surpassing older models though less than Scout’s 10M.
    • Meta’s tests show it rivals or surpasses GPT-4 in many tasks.
    • References: TECHCRUNCH.COM, HUGGINGFACE.CO
  3. LLaMA 4 Behemoth
    • Aptly named the “giant.”
    • Maintains 16 experts but at an enormous scale of ~2 trillion total parameters, with ~288B active.
    • Surpasses GPT-4.5, Claude 3.7, and Gemini 2.0 Pro on STEM benchmarks, according to Meta.
    • Serves as a “teacher model” to distill knowledge into Scout and Maverick.
    • Not yet publicly released, as typical hardware setups cannot handle it.
    • References: REUTERS.COM, MEDIUM.COM

Despite sharing the LLaMA 4 architecture, these three models differ in scale and parameter assignments. The MoE approach lets Scout and Maverick each run on about 17B active parameters, with Scout optimizing for simplicity/efficiency and Maverick offering broad coverage. Behemoth, in contrast, pushes everything to the absolute limit.

Meta also integrated an improved vision encoder in LLaMA 4. Based on the “MetaCLIP” pipeline, it was trained alongside a temporarily frozen language model to effectively map visual features into the language space. This yields a fundamental understanding of images, significantly boosting multimodal tasks.

Finally, to enable LLaMA 4’s phenomenal context window, they introduced iRoPE (interleaved Rotary Position Embedding). This modifies standard RoPE embeddings by alternating layers—one with no positional info, the next with RoPE—adjusting scale factors during inference to remain stable for extremely long contexts. The Scout model, for instance, expanded context length by 80x, now seamlessly handling inputs of millions of tokens. Meta further supplemented training with large synthetic data mid-way (the “mid-training” approach) so the model could adapt to extended context usage.


Comparing Performance with GPT-4, Gemini, and Other Competitors

While LLaMA 4 is impressive, you may wonder how it stacks up against state-of-the-art models like OpenAI’s GPT-4, Google’s Gemini 2.0, or China’s DeepSeek v3. Here’s an overview of the comparisons Meta has shared.

  • Generally: LLaMA 4 Maverick beats GPT-4 and Google Gemini 2.0 on tasks like coding, logical reasoning, multilingual understanding, extended context processing, and image comprehension, according to Meta’s internal results.
  • In benchmark tests, Maverick scored higher than GPT-4 in certain code generation or complex problem-solving sets. For instance:
    • MMMU (multimodal) test: Maverick scored 73.4 vs. GPT-4’s 69.1
    • MathVista: Maverick 73.7 vs. GPT-4’s 63.8
  • State-of-the-art models like GPT-4.5 or Claude 3.7 (Sonnet) might still have an edge in the highest-level tasks. Meta acknowledges that LLaMA 4 Maverick doesn’t consistently surpass these top-tier competitors. Moreover, the ultra-large Behemoth model can sometimes fall short of Google’s Gemini 2.5 Pro on the hardest STEM questions.

One interesting note is LLaMA 4’s comparison with Chinese open-source models such as DeepSeek. Reports suggest DeepSeek v3.1 outperformed LLaMA 3 in some areas, prompting Meta to accelerate LLaMA 4. In code generation tasks, for example, DeepSeek v3.1 surpasses Maverick by a small margin in accuracy, but Maverick does so using fewer active parameters (17B vs. DeepSeek’s bigger capacity). This demonstrates the efficiency of the MoE design.

Meanwhile, LLaMA 4 Scout also deserves mention. Despite being the smallest in total parameters, it outperforms LLaMA 3 and is considered best-in-class among similarly lightweight models. For instance, tasks like summarizing hundreds of pages or comprehending a massive code repository are now feasible with Scout’s 10M-token context window. It can input an entire novel at once, whereas GPT-4 (with 128k tokens max) can’t even handle half. This real-world advantage makes LLaMA 4 stand out.

In summary, LLaMA 4 Maverick shows broad, advanced capabilities on par with GPT-4, Scout excels in specialized domains (e.g., huge contexts), and Behemoth aims to become an ultra-high-end teacher model. The playing field is still competitive, with rapid advancements from OpenAI, Google, and others. But LLaMA 4’s biggest advantage may be that it’s open, allowing the community to experiment and improve upon it.


Massive Pre-Training: Data, Hyperparameters, and Multilingual Setup

Behind LLaMA 4’s success lies massive-scale pre-training. Meta made ambitious moves in data size, quality, and training methods. Let’s break down the core elements:

1. Training Data & Multimodal Integration

  • LLaMA 4 was trained on 300–400 billion tokens across text, images, and videos—double the size of LLaMA 3, making it among the largest LLMs publicly documented.
  • Because it jointly learned from textual and visual data, LLaMA 4 can directly handle images, video transcripts, etc. Meta refers to this as “native multimodality,” which yields more coherent image comprehension than post-hoc adapters.
  • The model also includes 200 languages, each having up to billions of tokens, boosting non-English performance, including Korean. A final specialized post-training pass was only done on 12 languages due to resource limits, but the broader dataset ensures robust basic proficiency in many tongues.

2. MetaP: Automated Hyperparameter Tuning

  • A new technique called MetaP automatically tunes critical hyperparameters such as per-layer learning rates and initialization scales.
  • This dynamic approach helps maintain training stability and improve final performance, particularly in extremely large-scale training.
  • References: APIDOG.COM, MEDIUM.COM

3. Low-Precision (FP8) Training for Maximum Efficiency

  • Meta trained LLaMA 4 using FP8 floating-point precision, leveraging GPU hardware (NVIDIA H100, etc.) that supports FP8.
  • FP8 can reduce memory footprint and accelerate throughput, enabling them to scale to 32,000 GPUs at up to 390 TFLOPs/GPU.
  • While FP8 is less precise than FP16, Meta introduced techniques to compensate for potential degradation. The result was a tenfold improvement in overall efficiency.

4. “Mid-Training” & Enhanced Reasoning/Long Context

  • Midway through pre-training, the team pivoted with special “curriculum learning” to strengthen key abilities, notably long-context handling and complex reasoning.
  • Since typical web data rarely has millions of tokens in a single document, they generated synthetic sets and multi-hop reasoning tasks for the model to practice.
  • These mid-training adjustments helped LLaMA 4 move beyond naive next-token prediction to more systematic reasoning and memory usage.

With these strategies in place, LLaMA 4 far outstrips its predecessors in intelligence and versatility. Yet the journey doesn’t end at pre-training: next comes post-training to make the model safer and more user-friendly.


Fine-Tuning and Reinforcement: The Post-Training Pipeline

A massive language model must be refined after pre-training to ensure it’s helpful and safe for end users. LLaMA 4 introduced several novel methods in its post-training pipeline:

  1. Lightweight Supervised Fine-Tuning (SFT)
    • Human-provided Q&A pairs are used to guide the model.
    • “Lightweight” here means focusing on difficult data selection. Meta used LLaMA 4 itself to gauge data difficulty and discarded over 50% of “easy” examples, focusing on challenging ones that the model can’t already solve.
    • This made best use of limited SFT resources, refining the model’s ability on tricky queries.
  2. Online Reinforcement Learning (RL)
    • Rather than a single pass of RLHF, LLaMA 4 is trained with online RL, allowing the model to engage in continuous interaction and learn from newly generated data in real time.
    • The approach is called “hard-prompt adaptation,” where the system selectively keeps only mid-to-high difficulty queries for policy updates.
    • This encourages the model to handle more complex tasks.
    • The RL process runs asynchronously, so training can proceed without halting.
  3. Direct Preference Optimization (DPO)
    • DPO is a recent technique to align outputs with human preferences without relying solely on RL.
    • After the RL stage, DPO is used to fix edge cases or ambiguous answers by comparing pairs of model responses.
    • With low learning rates, it fine-tunes the model’s style and correctness in ways that pure RL might overlook.

Meta applied this SFT → Online RL → DPO pipeline to the entire LLaMA 4 family, adjusting intensity based on model size. For Behemoth, they pruned 95% of SFT data (instead of 50%) and used a fully asynchronous RL framework for efficiency, resulting in a reported tenfold training improvement over previous generations.

Additionally, prompt curriculum—gradually increasing prompt difficulty—helped the model generalize without overfitting. LLaMA 4’s post-training thus focuses on “max effect from minimal data,” which is wise for large-scale models.


Use Cases for LLaMA 4: From Multi-Image VQA to Code Analysis

What real-world tasks can LLaMA 4 tackle? Let’s highlight a few standout applications:

  1. Multi-Image VQA (Visual Question Answering)
    • LLaMA 4 excels at understanding and describing images. For instance, it can process multiple images simultaneously (“Compare these two pictures and tell me the differences!”).
    • Traditional models often handle only a single image at a time, making LLaMA 4’s multi-image approach quite powerful.
    • A Hugging Face demo for Scout/Maverick shows how the model can load up to 5 images, parse each one, and deliver sophisticated comparative answers (e.g., “Both depict rabbits, but one is a realistic photo while the other is an abstract pattern”).
    • This multi-image VQA ability is well-suited for creative tools, visual data analysis, and more.
  2. Code Understanding and Reasoning
    • LLaMA 4 offers impressive code comprehension and generation.
    • Scout, in particular, can handle massive contexts (tens of thousands of lines) by reading an entire codebase at once. Developers can ask, “Where is feature X implemented in this project?” and get references to relevant files and functions.
    • Maverick rivals GPT-4 in coding tasks, consistently solving complex problems and occasionally outperforming GPT-4 on large coding tests.
    • Potential use cases include developer assistance, automated code reviews, bug detection, and educational programming tools.
  3. Long-Context Summaries and Knowledge Integration
    • With a 10-million-token window, LLaMA 4 Scout can process vast input.
    • For instance, it can ingest thousands of pages of a technical manual or a full novel at once and produce a cohesive summary.
    • Legacy models often had to break up long texts and reassemble partial summaries, but LLaMA 4 can do it in a single pass.
    • This also works for open-domain Q&A with large datasets, e.g., “Here are 50 research papers; summarize them and propose a novel direction.”
  4. Everyday Assistants and Chatbots
    • Naturally, LLaMA 4 is also excellent for conversational AI. Meta has integrated it into Meta AI on WhatsApp and Instagram DMs in around 40 countries.
    • Users can send pictures, and the model (primarily Maverick) will analyze them in real time, produce witty remarks, creative writing, or knowledge answers.
    • Meta has also fine-tuned LLaMA 4 to better handle politically or socially controversial questions in a balanced manner (no more excessive refusals or one-sided viewpoints).

In short, LLaMA 4 = versatility. Whether you want an AI that handles images and text seamlessly, digests enormous contexts for integrated queries, or assists with coding, the LLaMA 4 lineup can do it. And because it’s open, anyone—companies or individual developers—can fine-tune these models for their own specialized use.


Release and Distribution: A New Chapter for Open-Source Models

When announcing LLaMA 4, Meta emphasized collaboration with the open-source community. Indeed, Scout and Maverick were made available on Llama.com and Hugging Face on day one for researchers and developers to download and test.

  • Hugging Face hosts them under the meta-llama organization, with example code and direct compatibility with Transformers (version 4.51+).
  • Instruction-tuned variants are also provided for immediate use in chatbot or VQA applications.
  • References: TECHCRUNCH.COM, MEDIUM.COM, HUGGINGFACE.CO

Licensing and Use

  • LLaMA 4 is distributed under the “Llama 4 Community License,” a custom license continuing from LLaMA 2’s structure.
  • It’s free for research and product development except that “organizations with over 700 million MAU” need separate permission, among other conditions.
  • Additionally, EU users may be restricted due to compliance concerns with AI regulations and data privacy laws.
  • Meta is also releasing LLaMA 4 via cloud APIs with partners like Snowflake and Databricks, so enterprise clients can seamlessly integrate these models into their workflows.

Meta reports that the LLaMA series has been downloaded hundreds of millions of times, spawning tens of thousands of derivative services. Goldman Sachs, AWS, and Accenture have adopted LLaMA-based solutions, for instance—an illustration of how open-source strategies can succeed. Meta’s stance is, “Open platforms win. Systems that everyone can improve ultimately become the best.” Thanks to LLaMA 4’s release, developers worldwide have a cutting-edge, powerful model at their fingertips.

Even so, it’s worth noting that commercial use must respect the license and Acceptable Use Policy. Overall, LLaMA 4 Scout and Maverick essentially provide open-source access (with conditions), expanding transparency and accessibility in AI research—whether or not it’s profitable for Meta is debatable, but developers and researchers undoubtedly benefit.


Reducing Bias and Ensuring Safety: Toward Trustworthy AI

As language models grow more powerful, bias and safety become increasingly critical. Meta has emphasized several measures for LLaMA 4 in these areas, focusing on model-level safety and system-level defenses.

Model-Level Tuning: Less Censorship, More Balance

  • LLaMA 4 is more “open and balanced” compared to older models.
  • LLaMA 2 was known to refuse answering on many politically sensitive questions, whereas LLaMA 4 attempts to “provide a response whenever possible,” within reason.
  • It won’t produce harmful content, but the aim is to avoid forced silence or ideological bias, instead offering factual, neutral info.
  • Meta hopes LLaMA 4 will produce “more useful and factual responses on controversial issues” and “present multiple viewpoints rather than favoring one side.”
  • This shift addresses criticisms that some AI chatbots are “overly locked down” or “too woke.”

Serious Risks

  • Meta still strongly guards against severe misuses: violence, crime, explicit adult content, or bias. They do “red teaming” to test LLaMA 4 in adversarial scenarios.
  • For child safety, cyberattacks, and weapons, specialized teams ensure the model won’t facilitate harmful activities.
  • LLaMA 4 is also designed to refuse or redirect such dangerous requests.

System-Level Safeguards: Llama Guard, Prompt Guard, Code Shield

  • Meta points out that a model alone can’t guarantee 100% safety, so external layers are required.
  • They provide modules like “Llama Guard,” “Prompt Guard,” and “Code Shield” as lightweight filters for inputs/outputs.
    • Llama Guard: A small LLM (e.g., 7B parameters) that classifies user prompts and LLaMA outputs in real time, intercepting harmful content.
    • Prompt Guard: Specifically checks if the user’s query is malicious or tries “prompt injection.”
    • Code Shield: Monitors generated code for malicious features or dangerous commands.
  • Meta recommends that developers incorporate these system-level defenses to protect their own apps. Official demos also include them by default, allowing safe experimentation with LLaMA 4.

In essence, LLaMA 4 aims to be “useful yet trustworthy” by maximizing openness while still mitigating worst-case abuses. Developers and enterprises can pick the level of filtering needed. This approach is pragmatic for an open-source model: let the community adapt it, with Meta offering optional guardrails.


Future Directions and Industry Trends (LlamaCon, etc.)

Finally, let’s briefly consider the broader R&D context for LLaMA 4 and Meta’s next steps.

The Rise of MoE

  • LLaMA 4’s biggest innovation, Mixture-of-Experts, has been explored in academia (e.g., Google’s Switch Transformer, GLaM), but rarely adopted in commercial-scale models—until now.
  • Because model sizes have hit practical limits, MoE is seeing a resurgence.
  • Following LLaMA 4, other big players are also trying MoE. For example, Alibaba’s Qwen announced a MoE version, and many open-source LLaMA forks are exploring MoE as well.
  • Challenges remain, like load-balancing and distributed inference, but MoE is a promising real-world solution for scaling large models efficiently.

The Push for Full Multimodality

  • OpenAI’s GPT-4 can handle images, Google’s Gemini highlights multimodal capabilities, and LLaMA 4 claims to incorporate video and audio.
  • The future seems to be comprehensive integration of multiple sensory data (text, images, speech, etc.).
  • Meta had previously showcased “ImageBind,” which might feed into LLaMA 4’s backbone. Voice capabilities are not yet fully integrated, but we may see TTS/STT modules or expanded training for more natural voice interfaces.
  • Early reviews suggest LLaMA 4’s voice performance is behind ChatGPT’s, so Meta might address that in a future version.

The Open Ecosystem and LlamaCon

  • Meta will hold the first “LlamaCon” on April 29, 2025, showcasing LLaMA 4’s behind-the-scenes stories, use cases, and future plans.
  • Meta promises updates on open-source AI progress and more developer support. They also plan to partner with the external community.
  • Potential announcements could include partial releases of LLaMA 4 Behemoth or mention of a next-gen LLaMA 5 with advanced reasoning or memory/tool usage modules.
  • The entire AI space is a race between U.S. Big Tech, Chinese Big Tech, and the open-source community. Meta stands out as a Big Tech entity that leans closer to open-source. LLaMA 4 strengthens the open side, while closed-source leaders like OpenAI and Google continue rapid innovation. This competition drives both camps to improve.

Conclusion

LLaMA 4 isn’t important because it’s the biggest model, but because anyone can use and improve it.” That sentiment, attributed to a Meta blog post, sums up the significance of LLaMA 4. It’s a major milestone along the path to more powerful, efficient, and safe AI—and one that thrives on community involvement.

We’ll see what news emerges at LlamaCon, but for now, that’s the in-depth exploration of LLaMA 4. Thanks for reading!

댓글