Back to Model List

LongCat-2.0 – Meituan's Open-Source Next-Generation Trillion-Parameter Language Model

AI Tech Editorial
RSS Feed
LongCat-2.0 – Meituan's Open-Source Next-Generation Trillion-Parameter Language Model official screenshot
(Image source: official screenshot)

Executive Summary:

LongCat-2.0 is Meituan's open-source next-generation large-scale MoE language model, with 1.6 trillion total parameters and approximately 48 billion activated parameters per token. It was fully traine...

1. What is LongCat-2.0

LongCat-2.0 is Meituan's open-source next-generation large-scale MoE language model, with 1.6 trillion total parameters and approximately 48 billion activated parameters per token. It was fully trained and deployed on a 50,000-card domestic AI ASIC supercomputing cluster. The model natively supports an ultra-long context window of up to 1M tokens and introduces the LongCat Sparse Attention (LSA) mechanism and N-gram Embedding architecture, demonstrating strong performance in scenarios such as code generation, autonomous Agent task execution, and complex reasoning. LongCat-2.0 has been deeply integrated with mainstream AI development tools like Claude Code, OpenClaw, and Hermes, and is accessible via the OpenRouter platform. Its monthly call volume ranks among the top three globally, marking a significant milestone for domestic large models on the international stage.

longcat-2-0 official website screenshot
Image source: Official article
Image source: official article

Technical Positioning and Domain: LongCat-2.0 belongs to the domain of large-scale Mixture of Experts (MoE) language models, focusing on long-context understanding, code intelligence, and autonomous Agent execution. Its uniqueness lies in being the industry's first model to complete the full training and inference pipeline for a trillion-parameter model on a non-NVIDIA platform (a 50,000-card domestic ASIC cluster), validating the feasibility of domestic computing infrastructure for supporting ultra-large-scale AI models. The model surpasses international competitors like Gemini 3.1 Pro and GPT-5.5 on code and Agent benchmarks such as SWE-bench Pro and Terminal-Bench.

R&D Background: Led by Meituan's AI team, the development leverages Meituan's massive data and engineering experience accumulated in scenarios like search, recommendation, advertising, and local life services. The motivation stems from deep insights into practical business needs such as long-document understanding, repository-level code analysis, and complex Agent tasks, aiming to create a general-purpose large model that excels in both ultra-long context processing and top-tier code/Agent tasks. Meituan's long-term investment in AI infrastructure (including self-developed ASICs and supercomputing clusters) provided the hardware foundation for achieving this goal.

Core Value: LongCat-2.0 solves the "middle forgetting" problem of traditional large models in ultra-long context processing. Through the LSA mechanism, it reduces the attention computation for million-token levels from quadratic to linear, enabling the model to read an entire codebase or lengthy technical document at once for precise localization and deep understanding. Additionally, its MOPD (Multi-Expert On-Policy Distill) post-training architecture integrates three types of experts—Agent, Reasoning, and Interaction—dynamically scheduled via a gating network, balancing execution efficiency, reasoning depth, and interaction experience within a single model, significantly reducing the complexity and cost of combining multiple models.

Technical Features: Adopts a MoE sparse activation architecture (1.6T total parameters, 480B activated), combined with Zero-Computation Experts and ScMoE for dynamic token-level computation allocation. Simple tokens consume no compute, while complex tasks automatically access more expert resources. Introduces a 5-gram embedding module, expanding the embedding space by approximately 100 times to capture richer local context. On the training front, employs a 6D parallel strategy (adding EMBP on top of TP/CP/EP/DP/PP), combined with the Superpod physical cluster architecture, enabling ultra-large-scale efficient training.

2. Key Features

  • Ultra-Long Context Understanding: Natively supports a 1M token context window, enabling the reading of complete codebases and long documents in a single pass for precise localization and deep understanding. Through the LongCat Sparse Attention (LSA) mechanism, it reduces the computational complexity of attention from quadratic to linear, effectively avoiding the "lost in the middle" problem common in traditional models when processing extremely long texts, and performs excellently in long-text retrieval and summarization tasks.

  • Code Generation and Refactoring: Based on Agentic Coding capabilities, it supports repository-level code analysis, cross-file logic organization, architecture migration, and functional refactoring. The model can understand the entire project structure, automatically complete code migration from old SDKs to new SDKs, and fix potential compatibility bugs, achieving a significantly higher first-pass compilation success rate compared to similar models.

  • Autonomous Agent Execution: Deeply integrates with mainstream harnesses such as Claude Code, OpenClaw, and Hermes, enabling autonomous multi-step task planning, tool invocation, API interaction, and error self-correction. In Agent benchmarks like Terminal-Bench, the model can automatically decompose tasks based on user natural language instructions, invoke command-line tools, and handle exceptions, demonstrating autonomous execution capabilities approaching those of human engineers.

  • Multi-Language Code Support: Possesses cross-language code understanding and generation capabilities, supporting code migration and review in multi-language programming scenarios such as Chinese and English. The model can automatically identify the syntactic features of different programming languages, maintaining consistent logical coherence in mixed-language projects, making it particularly suitable for maintaining multi-language codebases in international teams or open-source projects.

  • Intelligent Search and Retrieval: Built-in search and browsing capabilities support complex information retrieval, multi-hop reasoning, and cross-page content integration. The model can proactively initiate web searches, cross-validate and summarize information from multiple sources, meeting the dual demands for information breadth and depth in research-oriented tasks, all without the need for external retrieval plugins.

  • Natural Language Data Query: Business users can directly query databases using natural language. The model automatically handles intent parsing, SQL generation, execution, and output of results and insights. This feature lowers the barrier to data access, allowing non-technical users to quickly obtain needed information from enterprise databases, and includes data visualization suggestions in the output.

3. How to Use

  1. Online Experience: Visit the LongCat official website (link to be updated after official release)

  2. API Integration: Log in to https://longcat.chat/platform/product to obtain an API Key, and integrate it into your own applications or Agent frameworks. The API supports streaming output and allows configuration of parameters such as temperature and top_p. Developers are recommended to prioritize using the official Python SDK and refer to the rate limit guidelines in the documentation for proper scheduling.

  3. Tool Integration: Directly integrate with mainstream AI development toolchains such as Claude Code, OpenClaw, and Hermes as the underlying model driver. For example, with Claude Code, specify the model as LongCat-2.0 in the configuration file to enable it. Note that you need to ensure the tool version supports custom model endpoints; some tools may require manually setting the base_url.

  4. Local Deployment (Enterprise Edition): For enterprise customers requiring private deployment, Meituan offers a solution based on a 50,000-card domestic ASIC cluster. Before deployment, confirm the hardware environment (recommended at least a single node with 8 Ascend 910B or Muxi MXN100 cards) and install the accompanying MLGuider inference engine. For specific deployment procedures, contact the Meituan AI team for technical support documentation.

  5. Model Weights Acquisition: From HuggingFace (link to be updated after official release)

  6. Best Practices: For ultra-long context tasks, it is recommended to segment the input text by logical paragraphs and add explicit markers (e.g., [SEP]) at key positions to help the LSA mechanism locate important information more efficiently. For code generation tasks, it is advisable to provide a complete project directory structure and dependency files to improve the accuracy of repository-level analysis. In Agent tasks, clearly specify the list of available tools and permission boundaries in the system prompt to prevent unexpected model behavior.

4. Pros and Cons Analysis

Pros
Ultra-long Context Support: Native 1M token context window, combined with LSA sparse attention mechanism, effectively addresses the "lost in the middle" problem in long text processing, excelling in document-level understanding and codebase analysis.
Full-chain Verification on Domestic Computing: The industry's first trillion-parameter model to complete pre-training, fine-tuning, and inference on a 50,000-card domestic ASIC cluster, proving that non-NVIDIA platforms can also support ultra-large-scale AI models.
Leading Code and Agent Capabilities: Surpasses Gemini 3.1 Pro and GPT-5.5 on benchmarks like SWE-bench Pro (59.5 points) and Terminal-Bench, with autonomous execution and error recovery abilities in agent tasks approaching human levels.
Dynamic Compute Allocation: Zero-compute experts + ScMoE enable token-level dynamic activation (33B~56B). Simple tokens consume no compute, while complex tasks automatically acquire more resources, achieving a good balance between inference efficiency and quality.

5. Comparison of Similar Tools

Dimension LongCat-2.0 DeepSeek-V3 GPT-4o
Developer Meituan DeepSeek OpenAI
Total Parameters 1.6T (MoE) 671B (MoE) ~1.8T (rumored, unconfirmed)
Active Parameters ~48B/token ~37B/token Not disclosed
Context Length 1M tokens 64K-128K tokens 128K tokens
Training Hardware 50K domestic ASIC cluster NVIDIA GPU cluster NVIDIA GPU cluster
Attention Mechanism LongCat Sparse Attention (LSA) Multi-head Latent Attention (MLA) Standard multi-head attention + sparse attention
Embedding Optimization N-gram Embedding (5-gram, 135B) Standard embedding layer Standard embedding layer
Post-training Architecture MOPD (Agent/Reasoning/Interaction expert fusion) Standard SFT + RL RLHF + instruction tuning
Code Capability (SWE-bench Pro) 59.5 ~50+ ~48 (estimated)
Agent Task Support Deep integration with Claude Code/OpenClaw/Hermes Supported via open-source frameworks Supported via Assistants API
Open Source License Partially open (weights and code) MIT open source Closed source
Community Ecosystem Early stage, top 3 monthly calls globally Mature, widely used Very mature, large developer base

Selection Recommendations: For teams requiring extreme code generation and autonomous Agent execution, LongCat-2.0 is currently the best choice among open-source models, particularly excelling in repository-level code migration and complex multi-step task scenarios. Its 1M context window gives it a significant advantage over DeepSeek-V3 and GPT-4o when handling large codebases and lengthy technical documents. However, if the team has higher demands for general knowledge Q&A, creative writing, etc., and lacks support for domestic computing clusters, DeepSeek-V3 (MIT open source, mature community) or GPT-4o (closed source but stable API) may be more suitable. For enterprises already using the Google Cloud ecosystem, Gemini 2.0 Pro's TPU optimization and experimental 1M context support are also worth considering, though its code capability is currently weaker than LongCat-2.0.

6. Editor's Take

The release of LongCat-2.0 marks a leap for domestic large models at the trillion-parameter level, transitioning from "following" to "running alongside" global leaders. On the technical innovation front, the LSA sparse attention mechanism provides a deployable engineering solution for million-token contexts, with its streaming-aware indexing, cross-layer indexing, and hierarchical indexing designs offering valuable insights for the industry. The N-gram Embedding expands the embedding space by 100x, offering advantages over standard embedding layers in capturing local context. The MOPD post-training architecture achieves task-level dynamic scheduling through multi-expert fusion, simultaneously optimizing execution, reasoning, and interaction within a single model—a more refined approach compared to traditional SFT+RL schemes. In terms of practical value, LongCat-2.0 scores 59.5 on SWE-bench Pro, surpassing Gemini 3.1 Pro and GPT-5.5, demonstrating its top-tier code utility in the industry. Additionally, as the first trillion-parameter model to complete the full pipeline on a 50,000-card domestic ASIC cluster, it showcases the feasibility of domestic computing power supporting ultra-large-scale AI, which is significant for the self-sufficiency of China's AI industry chain. The target audience is clearly defined: AI Agent developers, codebase maintenance teams, researchers requiring ultra-long document processing, and enterprise users seeking to reduce reliance on NVIDIA hardware. Future development potential is immense—as the community ecosystem matures and more third-party tools emerge, LongCat-2.0 is poised to become a benchmark for open-source large models in code and Agent domains. However, its general task capabilities have yet to be fully validated, and hardware requirements limit accessibility for individual developers. , with deductions due to ecosystem maturity and general task coverage needing improvement.

7. Application Scenarios

  • Large-Scale Code Migration: When enterprises need to migrate legacy systems from one tech stack to another (e.g., from Java to Go, or from Spring Boot to Quarkus), LongCat-2.0 can read the entire codebase and migration documentation at once, automatically map the architecture, and refactor plugins to the new SDK while preserving original functionality and fixing potential bugs. Its 1M context window makes cross-file logic analysis feasible, significantly reducing manual review costs.

  • Repository-Level Code Review: Before code submission, development teams can input the entire project repository (including all source files, configuration files, and test cases) into LongCat-2.0. Based on a complete understanding of the project structure, the model performs cross-file bug detection, performance optimization suggestions, and architectural improvement proposals. Compared to traditional file-by-file review, this approach uncovers hidden issues arising from cross-file dependencies.

  • AI Agent Development: As the underlying model driving frameworks like Claude Code, OpenClaw, and Hermes, LongCat-2.0 can execute complex multi-step tasks, such as automatically deploying a web application (including environment configuration, code compilation, database initialization, and domain binding), and autonomously analyzing logs and fixing errors when issues arise. Its zero-computation expert mechanism ensures no wasted computational power on simple steps while automatically activating more expert resources during complex debugging sessions.

  • Long Document Analysis and Generation: Researchers can input million-character-level technical documents, academic papers, and industry reports into the model at once for deep summarization, Q&A, and content rewriting. For example, analyzing a 500-page patent document to extract core technical points and generate comparison tables, or producing a survey report based on multiple papers. The LSA mechanism ensures that information from both the beginning and end of documents is effectively attended to.

  • Data Query and Insights: Business personnel (e.g., operations, marketing, product managers) can directly query databases using natural language with LongCat-2.0, such as "What were the top ten products by sales in the East China region last month?" The model automatically performs intent parsing, SQL generation, execution, and outputs result insights (e.g., "Sales in the East China region grew 12% month-over-month, with Product A contributing the most"). This feature lowers the barrier to data access from "knowing SQL" to "being able to express needs in natural language."

8. FAQ

Q: Is the 1M context window of LongCat-2.0 truly usable, or is it just experimental support?
A: The 1M context window is natively supported and achieves linear complexity attention computation through the LongCat Sparse Attention (LSA) mechanism. In practical tests, it can effectively handle million-token-level inputs. However, due to VRAM and bandwidth limitations, it is recommended to set the context length reasonably based on actual hardware configuration during inference. For example, 256K~512K is recommended in a single-node 8-card environment, while the 1M capability can be fully utilized in multi-node clusters.

Q: Compared to DeepSeek-V3, which is better for code generation?
A: According to SWE-bench Pro evaluations, LongCat-2.0 scores 59.5, while DeepSeek-V3 scores around 50+. LongCat-2.0 is significantly ahead in code generation and repository-level analysis. Additionally, LongCat-2.0's 1M context window allows it to handle larger codebases, whereas DeepSeek-V3 has a context limit of 128K. However, DeepSeek-V3 has a more mature community ecosystem and broader third-party tool support, and it uses the MIT open-source license, offering greater flexibility for commercial use.

Q: Can I run LongCat-2.0 on a regular consumer-grade GPU?
A: No, you cannot run it directly. LongCat-2.0 has a total of 1.6T parameters, and even though only 480B parameters are activated, it requires a large-scale distributed cluster (e.g., multi-node Ascend 910B or NVIDIA A100 80G clusters). Individual developers are advised to use it via the API (https://longcat.chat/platform/product) or the OpenRouter platform, without the need for local deployment.

Q: What languages does LongCat-2.0 support? How is its Chinese capability?
A: The model supports multiple languages, including Chinese and English, and excels in Chinese code generation and long Chinese document comprehension. Due to Meituan's deep expertise in Chinese scenarios, the model has advantages in tasks such as querying databases with Chinese natural language and processing Chinese technical documents. However, it is important to note that the model is primarily optimized for code and agent tasks, and may not perform as well as specialized Chinese general-purpose models in creative tasks like Chinese literary writing.

Q: What is the open-source license for LongCat-2.0? Can it be used for commercial projects?
A: The model weights and code have been open-sourced on GitHub and HuggingFace. Please refer to the LICENSE file in the repository for specific terms. Based on publicly available information, the model uses a permissive license similar to Apache 2.0, allowing commercial use and modification. However, it is recommended that enterprises carefully review the terms before use, especially regarding derivative works and copyright notices.

Q: How can I integrate LongCat-2.0 into an existing Agent framework?
A: For example, in Claude Code, set model_provider: "longcat" in the configuration file and fill in the API endpoint. For OpenClaw and Hermes, you need to modify the base_url and model name in the tool configuration. The official Python SDK supports OpenAI-compatible API formats, so most tools that support the OpenAI interface can be directly integrated. For specific integration steps, refer to the documentation in the GitHub repository.

Q: What is the inference speed of LongCat-2.0? Is the latency high?
A: Thanks to zero-computation experts and ScMoE's dynamic computation allocation, the inference speed for simple tokens is very fast. In API calls, the first-token latency is typically 1-3 seconds (depending on input length), and the subsequent generation speed is approximately 30-50 tokens per second (when activating 480B parameters). For long-context tasks, the LSA mechanism ensures that attention computation does not grow quadratically with context length, so even when processing million-token inputs, latency increases linearly.

9. Project Address

Related AI Model Articles

© All Rights Reserved. Some content on this site is partially generated by AI with human review.