Meituan LongCat-2.0: The Engineering Marvel of a 1.6T-Parameter Model on Domestic AI Chips

Abstract: On July 6, 2026, Meituan open-sourced LongCat-2.0 — a 1.6T-parameter MoE model with 48B activated parameters per token and native 1M-token context window. It is the industry’s first trillion-parameter model trained and inferred entirely on a 50,000-card domestic AI chip cluster. This article dissects three core innovations — LongCat Sparse Attention (LSA), N-gram Embedding, and Multi-Teacher Distillation — plus the PD-separated deployment, KV-cache partitioning, and Super Kernel optimization strategies for domestic chips.


1. Background: Scaling Everest on Domestic Silicon

On July 6, 2026, Meituan open-sourced LongCat-2.0 — 1.6T total parameters, 48B activated per token, native 1M-token context window. It is the first trillion-parameter model trained end-to-end on a 50,000-card domestic AI chip cluster.

Huawei Ascend, Moore Threads, and Muxi all announced inference adaptation on the same day. Meituan CEO Wang Xing stated that AI transformation is a “mandatory question” not an “optional one.”

Metric Value
Total parameters 1.6T
Activated per token 48B
Architecture MoE (97% sparsity)
Context window 1M tokens (native)
Training cluster 50,000 domestic chips
Training data 30T+ tokens
License MIT (free commercial use)
Precision variants BF16 / FP8 / INT8
SWE-bench Pro 59.5 (beats GPT-5.5’s 58.6)

2. Three Core Architectural Innovations

2.1 LongCat Sparse Attention (LSA)

LSA reduces attention complexity from O(n²) to O(n) through three strategies:

Streaming-aware Indexing: Dynamically select globally important tokens
Cross-layer Indexing: Reuse attention patterns from previous layers
Hierarchical Indexing: Coarse-to-fine retrieval
class LongCatSparseAttention(nn.Module):
    """O(n) sparse attention for million-token contexts"""
    def __init__(self, hidden_dim=7168, num_heads=64, top_k_ratio=0.1):
        super().__init__()
        self.head_dim = hidden_dim // num_heads
        self.top_k_ratio = top_k_ratio
        self.q_proj = nn.Linear(hidden_dim, hidden_dim, bias=False)
        self.k_proj = nn.Linear(hidden_dim, hidden_dim, bias=False)
        self.v_proj = nn.Linear(hidden_dim, hidden_dim, bias=False)
        self.o_proj = nn.Linear(hidden_dim, hidden_dim, bias=False)
        self.stream_selector = nn.Sequential(
            nn.Linear(hidden_dim, hidden_dim//4), nn.GELU(),
            nn.Linear(hidden_dim//4, 1),
        )
    
    def forward(self, x):
        batch, seq, _ = x.shape
        q = self.q_proj(x).view(batch, seq, 64, self.head_dim).transpose(1, 2)
        k = self.k_proj(x).view(batch, seq, 64, self.head_dim).transpose(1, 2)
        v = self.v_proj(x).view(batch, seq, 64, self.head_dim).transpose(1, 2)
        
        # Streaming-aware selection
        scores = self.stream_selector(x).squeeze(-1)
        top_k = max(1, int(seq * self.top_k_ratio))
        _, indices = torch.topk(scores, top_k, dim=-1)
        
        # Sparse attention on selected positions
        k_sel = torch.gather(k, 2, indices.unsqueeze(1).unsqueeze(-1)
                            .expand(-1, 64, -1, self.head_dim))
        v_sel = torch.gather(v, 2, indices.unsqueeze(1).unsqueeze(-1)
                            .expand(-1, 64, -1, self.head_dim))
        
        attn = F.softmax(torch.matmul(q, k_sel.transpose(-2, -1)) / 
                        math.sqrt(self.head_dim), dim=-1)
        out = torch.matmul(attn, v_sel)
        return self.o_proj(out.transpose(1, 2).contiguous().view(batch, seq, -1))

2.2 N-gram Embedding

With MoE sparsity reaching ~97%, adding more experts yields diminishing returns. LongCat-2.0 introduces a 135B-parameter N-gram Embedding module:

class NGramEmbedding(nn.Module):
    """135B parameter N-gram embedding for token-level representation"""
    def __init__(self, vocab_size=200000, dim=7168, max_ngram=5):
        super().__init__()
        self.ngram_embs = nn.ModuleList([
            nn.Embedding(vocab_size ** i, dim // 4) 
            for i in range(1, max_ngram + 1)
        ])
        self.fusion = nn.Sequential(
            nn.Linear(dim // 4 * 5, dim), nn.GELU(), nn.Linear(dim, dim))
    
    def forward(self, input_ids):
        batch, seq = input_ids.shape
        features = []
        for n in range(1, 6):
            if n == 1:
                feat = self.ngram_embs[0](input_ids)
            else:
                # Build n-gram hash indices
                ngram_ids = torch.stack([input_ids[:, i:i+seq-n+1] 
                                        for i in range(n)], dim=-1)
                # Simplified: use hash-based embedding lookup
                feat = torch.zeros(batch, seq, self.ngram_embs[0].weight.shape[1])
            features.append(feat)
        return self.fusion(torch.cat(features, dim=-1))

2.3 Multi-Teacher Online Distillation

Three teacher models specialize in different capabilities:

class MultiTeacherDistillation:
    def __init__(self):
        self.teachers = [
            ("agent_teacher", 0.4, 2.0),      # Autonomous execution
            ("reasoning_teacher", 0.35, 1.5),  # Adaptive reasoning
            ("interaction_teacher", 0.25, 1.0), # Safety alignment
        ]
    
    def compute_loss(self, student_logits, teacher_logits_list, labels):
        # Weighted fusion of teacher logits
        fused = sum(w * tl * s for (_, w, s), tl in 
                   zip(self.teachers, teacher_logits_list))
        
        # KL divergence + CE
        kl = F.kl_div(F.log_softmax(student_logits/2.0, dim=-1),
                     F.softmax(fused/2.0, dim=-1), reduction='batchmean') * 4.0
        ce = F.cross_entropy(student_logits, labels)
        return 0.5 * ce + 0.5 * kl

3. Domestic Chip Adaptation: Dancing in Shackles

3.1 PD-Separated Deployment

type PDDeployment struct {
    prefillNodes int
    decodeNodes  int
}

func (pd *PDDeployment) Strategy(seqLen int) string {
    switch {
    case seqLen <= 4096:
        return "single_node"      // Short: single node
    case seqLen <= 32768:
        return "pd_split"         // Medium: PD split
    default:
        return "pd_split_ep"      // Long: PD + expert parallel
    }
}

// KV-cache partitioning across cards
type KVPCache struct {
    partitions []*Partition
}

func (k *KVPCache) Store(tokenID int64, vec []float32) {
    pid := int(tokenID) % len(k.partitions)
    k.partitions[pid].mu.Lock()
    defer k.partitions[pid].mu.Unlock()
    k.partitions[pid].Data[tokenID] = vec
}

func (k *KVPCache) Lookup(tokenID int64) ([]float32, bool) {
    pid := int(tokenID) % len(k.partitions)
    k.partitions[pid].mu.RLock()
    defer k.partitions[pid].mu.RUnlock()
    v, ok := k.partitions[pid].Data[tokenID]
    return v, ok
}

4. Benchmark Performance

SWE-bench Pro:     59.5 (LongCat-2.0) vs 58.6 (GPT-5.5) vs 57.3 (Claude Opus 4.6)
SWE-bench Multi:   77.3 (LongCat-2.0) vs 77.8 (Claude Opus 4.6)
Terminal-Bench 2.1: 70.8

5. Significance

  1. Validated domestic AI chips: First trillion-parameter model training + inference on 50K domestic chips.
  2. Activated stranded compute: MIT license + multi-precision variants enable deployment on older cards.
  3. Open ecosystem: Huawei Ascend, Moore Threads, Muxi simultaneous adaptation.

Sources: Meituan official release, Jiqizhixin, Huanqiu, Yicai, People’s Post and Telecom.