在20 万亿+高质量、密集推理的 tokens上进行预训练,Ling-1T 基础版支持高达128K的上下文长度,并在中训练和后训练过程中采用进化思维链(Evo-CoT)过程。 这种课程大大增强了模型的效率和推理深度,使 Ling-1T 在多个复杂的推理基准上实现了最先进的性能—— 平衡了准确性和效率。
我们全面评估了 Ling-1T 与领先的旗舰模型,包括开源巨头(例如,DeepSeek-V3.1-Terminus,Kimi-K2-Instruct-0905)和闭源 API(GPT-5-main,Gemini-2.5-Pro)。 在代码生成、软件开发、竞赛级别的数学、专业数学和逻辑推理方面,Ling-1T 一直表现出卓越的复杂推理能力和整体优势。
在AIME 25基准测试中,Ling-1T 扩展了推理准确性与推理长度之间的帕累托前沿,展示了其在“高效思考和精确推理”方面的优势。
Ling-1T 在视觉推理和前端代码生成任务中表现出色,结合了深度语义理解与精确的代码合成。 我们引入了一种混合的语法–功能–审美奖励机制,使模型不仅能够生成正确且功能性的代码,还展示了视觉美学的精致感。 在ArtifactsBench上,Ling-1T 在开源模型中排名第一,并且此卡片中的基准可视化实际上是由 Ling-1T 本身生成的。
扩展到万亿参数级别揭示了强大的涌现推理和迁移能力。 例如,在BFCL V3工具使用基准测试中,Ling-1T 仅通过轻量级指令调优就达到了≈ 70% 的工具调用准确性—— 尽管在训练过程中没有看到大规模轨迹数据。 Ling-1T 可以:
这些能力为通用、协作的人类–AI 智能奠定了基础,我们希望通过 Ling-1T 的发布与开源社区共同推进这一目标。
Ling2.0 架构从一开始就设计用于万亿规模的效率,遵循Ling 缩放定律(arXiv:2507.17702)。 这确保了即使在1e25–1e26 FLOPs的计算下,架构和超参数的可扩展性。
关键的架构创新包括:
Ling-1T 是目前已知的最大的 FP8 训练基础模型。 FP8 混合精度训练带来了15%+ 的端到端加速,提高了内存效率,并在1 万亿 tokens上保持了≤ 0.1% 的 BF16 损失偏差。 细粒度的异构 1F1B 交错管道进一步将利用率提高了 40 %+。 系统级优化——融合内核、通信调度、重计算、检查点、模拟和遥测——确保了万亿规模训练的稳定性。
预训练使用了超过20T 高质量的 tokens,在后期阶段中有> 40% 的推理密集型数据。 中期训练引入了“推理预激活”的精选思维链语料库,以提高下游推理稳定性。 自定义的WSM(Warmup–Stable–Merge)学习率调度器结合中期训练检查点合并模拟学习率衰减并增强泛化能力。
基于中期训练中的推理激活,后训练采用Evo-CoT (进化思维链)方法,在可控成本下逐步提升推理能力。 这种方法不断扩展推理准确性与效率之间的帕累托前沿——非常适合反射性非思考模型。
对于强化学习,我们引入了LPO (语言单元策略优化)——一种新的句子级策略优化方法。 与GRPO(词元级别)或GSPO(序列级别)算法不同,LPO将句子视为自然语义动作单位,使奖励与推理行为之间能够精确对齐。 实验证明,LPO在各种推理任务中提供了优越的训练稳定性和泛化能力。
Ling-1T 已经在知识、代码、数学、推理、代理和对齐基准上进行了广泛评估。 它目前是最好的开源旗舰非思考模型,在复杂推理方面可以与闭源API相媲美,同时保持卓越的效率和可解释性。
您可以从下表中下载Ling-1T
模型 | 上下文长度 | 下载 |
Ling-1T | 32K -> 128K (YaRN) | 🤗HuggingFace 🤖ModelScope |
您可以在以下网址在线体验Ling-1T:ZenMux
提示词:画一个svg的动画:猴子捞月亮
画一个 svg 动画:百灵鸟在尽情歌舞
帮我开发一个坦克大战的网页游戏,添加ai辅助功能
emmm…… 一言难尽
您也可以通过API调用使用Ling-1T:
fromopenaiimportOpenAI# 1. Initialize the OpenAI clientclient = OpenAI( # 2. Point the base URL to the ZenMux endpoint base_url="https://zenmux.ai/api/v1", # 3. Replace with the API Key from your ZenMux user console api_key="<your ZENMUX_API_KEY>",)# 4. Make a requestcompletion = client.chat.completions.create( # 5. Specify the model to use in the format "provider/model-name" model="inclusionai/ling-1t", messages=[ { "role":"user", "content":"What is the meaning of life?" } ])print(completion.choices[0].message.content)
这里有一个代码片段展示如何使用modelscope来使用聊天模型:
from modelscope import AutoModelForCausalLM, AutoTokenizermodel_name ="inclusionAI/Ling-1T"model = AutoModelForCausalLM.from_pretrained( model_name, dtype="auto", device_map="auto", trust_remote_code=True,)tokenizer = AutoTokenizer.from_pretrained(model_name)prompt ="Give me a short introduction to large language models."messages = [ {"role":"system","content":"You are Ling, an assistant created by inclusionAI"}, {"role":"user","content": prompt}]text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True)model_inputs = tokenizer([text], return_tensors="pt", return_token_type_ids=False).to(model.device)generated_ids = model.generate( **model_inputs, max_new_tokens=512)generated_ids = [ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)]response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
vLLM支持离线批量推理或启动一个OpenAI兼容的API服务进行在线推理。
pipinstallvllm==0.11.0
frommodelscopeimportAutoTokenizerfromvllmimportLLM, SamplingParamstokenizer = AutoTokenizer.from_pretrained("inclusionAI/Ling-1T")sampling_params = SamplingParams(temperature=0.7, top_p=0.8, repetition_penalty=1.05, max_tokens=16384)llm = LLM(model="inclusionAI/Ling-1T", dtype='bfloat16', trust_remote_code=True)prompt ="Give me a short introduction to large language models."messages = [ {"role":"system","content":"You are Ling, an assistant created by inclusionAI"}, {"role":"user","content": prompt}]text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True)outputs = llm.generate([text], sampling_params)
VLLM_USE_MODELSCOPE=truevllm serve inclusionAI/Ling-1T \ --tensor-parallel-size 32 \ --pipeline-parallel-size 1 \ --trust-remote-code \ --gpu-memory-utilization 0.90# Thisisonlyan example, please adjust arguments accordingtoyour actual environment.
为了在vLLM中使用YaRN处理长上下文,我们需要遵循以下两个步骤:
config.json文件中添加一个rope_scaling字段,例如:{...,"rope_scaling":{"factor":4.0,"original_max_position_embeddings":32768,"type":"yarn"}}我们稍后会将我们的模型提交给SGLang官方发布,现在我们可以按照以下步骤准备环境:
pip3installsglang==0.5.2rc0sgl-kernel==0.3.7.post1
您也可以使用Docker镜像:
dockerpulllmsysorg/sglang:v0.5.2rc0-cu126
然后您应该应用补丁到sglang安装:
#patchcommandisneeded,run`yuminstall-ypatch`ifneededpatch-d`python-c'importsglang;importos;print(os.path.dirname(sglang.__file__))'`-p3<inference/sglang/bailing_moe_v2.patch
SGLang现在支持BF16和FP8模型,这取决于${MODEL_PATH}中的模型数据类型。它们共享相同的命令如下:
SGLANG_USE_MODELSCOPE=truepython -m sglang.launch_server \--model-path$MODEL_PATH\--host 0.0.0.0 --port$PORT\--trust-remote-code \--attention-backend fa3# This is only an example, please adjust arguments according to your actual environment.
基础模型支持MTP,但聊天模型尚不支持。您可以在启动命令中添加参数--speculative-algorithm NEXTN。
curl-shttp://localhost{PORT}/v1/chat/completions\-H"Content-Type:application/json"\-d'{"model":"auto","messages":[{"role":"user","content":"WhatisthecapitalofFrance?"}]}'
| 欢迎光临 链载Ai (https://www.lianzai.com/) | Powered by Discuz! X3.5 |