InternLM · HF · 上海 AI Lab

Intern-S2-Mobius-FP8

Intern-S2-Mobius-FP8

二〇二六年八月二十六日 · 英文原文

Intern-S2-Mobius 是由 InternLM 团队基于 Mobius-v0 架构构建的 35B 基础模型,由 Xtuner 和 LMDeploy 实现。该模型将知识存储于全局共享的 Memory,多个 Reasoner 迭代查询并精炼隐藏状态,实现知识与推理的解耦,具备 Backward Residual Connection 和 Dynamic Latent Reasoning 能力。模型从 Qwen3.5-35B 持续预训练并经 SFT 和 RL 后训练,在推理 benchmark 上达到基线相当或更强分数,同时实现近 4 倍端到端推理加速,并在科学任务上表现提升。

Intern-S2-Mobius

💻Github Repo🤗Model Collections🌳Arch Space

可视化

https://github.com/user-attachments/assets/b1970bdb-44ca-4e48-b213-fa693aa6f6fe

简介

我们推出 Intern-S2-Mobius,这是一个基于 Mobius-v0 架构构建的 35B 基础模型,由 Xtuner 和 LMDeploy 实现。与传统的 Transformer 模型将知识存储和推理计算逐层绑定不同,Mobius 将知识组织为全局共享的 Memory,并让多个 Reasoner 迭代地查询和精炼隐藏状态,以对照这一共享存储库。

这种知识与推理的分离赋予 Intern-S2-Mobius 两项原生能力:Backward Residual Connection,使推理阶段能够访问其局部层层级之外的知识;以及 Dynamic Latent Reasoning,将深思、精炼和多 token 预测内化到高密度连续状态中。Intern-S2-Mobius 从 Qwen3.5-35B 持续预训练而来,并进一步通过 SFT 和 RL 进行后训练,在保持强大下游能力的同时实现了显著更高的端到端推理效率,技术报告中报告了近 4 倍的加速。

特性

性能

我们在多种 benchmark 上评估 Intern-S2-Mobius,包括通用数据集和科学数据集。以下报告了与 Qwen3.5-35B 的性能对比。我们使用 OpenCompass 评估所有模型。对于文本 benchmark,Intern-S2-Mobius 在 MMLU Pro、SimpleQA 和 HLE 上以最大推理长度 64K tokens 进行评估,在其余文本 benchmark 上以 128K tokens 进行评估。

快速开始

Intern-S2-Mobius 发布版是一个以 bfloat16 权重格式存储的 35B 模型。本指南提供以下配置的部署示例:

注意:以下命令为参考配置。推理框架正在积极开发中,因此在调整生产部署时请使用最新的框架文档和本地验证结果。

Intern-S2-Mobius 可以使用以下任一 LLM 推理框架进行部署:

采样参数

我们建议使用以下超参数以获得更好的结果

top_p = 1
top_k = 50
min_p = 0.0
temperature = 0.8

LMDeploy

使用支持 Intern-S2-Mobius 的最新版 LMDeploy。以下示例使用单 GPU 服务。

lmdeploy serve api_server \
    internlm/Intern-S2-Mobius \
    --trust-remote-code \
    --backend pytorch \
    --tp 1 \
    --speculative-algorithm qwen3_5_mtp \
    --speculative-num-draft-tokens 4 \
    --dtype bfloat16 \
    --max-batch-size 64 
lmdeploy serve api_server \
    internlm/Intern-S2-Mobius \
    --trust-remote-code \
    --backend pytorch \
    --dtype bfloat16 \
    --tp 1 

Transformers

使用启用了远程代码加载的较新版本 Transformers。

import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer

model_path = "internlm/Intern-S2-Mobius"

tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
model = AutoModelForImageTextToText.from_pretrained(
    model_path,
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
    device_map="auto",
).eval()

messages = [
    {"role": "user", "content": "Give me a short introduction to Intern-S2-Mobius."}
]

text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
)
inputs = tokenizer(text, return_tensors="pt").to(model.device)

with torch.no_grad():
    output_ids = model.generate(
        **inputs,
        max_new_tokens=512,
        do_sample=True,
        temperature=0.8,
        top_p=1,
    )

response_ids = output_ids[0][inputs["input_ids"].shape[-1]:]
print(tokenizer.decode(response_ids, skip_special_tokens=True))

vLLM

使用支持 Intern-S2-Mobius 的最新 vLLM Docker 镜像或源码构建。

vllm serve \
    internlm/Intern-S2-Mobius \
    --trust-remote-code \
    --tensor-parallel-size 2 \
    --reasoning-parser qwen3 \
    --enable-auto-tool-choice \
    --tool-call-parser qwen3_coder \
    --spec-method mtp \
    --spec-tokens 4
vllm serve \
    internlm/Intern-S2-Mobius \
    --trust-remote-code \
    --tensor-parallel-size 2 \
    --reasoning-parser qwen3 \
    --enable-auto-tool-choice \
    --tool-call-parser qwen3_coder 
译自 InternLM · HF · 上海 AI Lab · 录于 二〇二六年八月二十六日