简介
Seed-OSS 是由字节跳动种子团队开发的一系列开源大型语言模型,旨在提供强大的长上下文、推理、代理和通用功能,以及对开发者友好的多功能特性。尽管只使用了12T个令牌进行训练,Seed-OSS在多个流行的开源基准测试中表现出色。
我们在Apache-2.0许可下将这一系列模型发布给开源社区。
NOTE
Seed-OSS 主要针对国际化(i18n)用例进行了优化。
关键特性
- 灵活控制思考预算:允许用户根据需要灵活调整推理长度。这种动态控制推理长度的能力在实际应用场景中提高了推理效率。
- 增强的推理能力:特别针对推理任务进行了优化,同时保持了平衡且出色的通用能力。
- 代理智能:在工具使用和问题解决等代理任务中表现卓越。
- 研究友好:考虑到预训练中包含合成指令数据可能会影响后训练研究,我们发布了带有和不带指令数据的预训练模型,为研究界提供了更多样化的选择。
- 原生长上下文:使用长达512K的长上下文进行训练。
模型概述
Seed-OSS 采用了流行的因果语言模型架构,结合了RoPE、GQA注意力机制、RMSNorm 和 SwiGLU激活函数。
Seed-OSS-36B | |
参数 | 36B |
注意力机制 | GQA |
激活函数 | SwiGLU |
层数 | 64 |
QKV头数 | 80 / 8 / 8 |
头大小 | 128 |
隐藏层大小 | 5120 |
词汇量 | 155K |
上下文长度 | 512K |
RoPE 基频 | 1e7 |
评估结果
Seed-OSS-36B-Base
将合成指令数据纳入预训练可以提高大多数基准测试的性能。我们采用添加了合成指令数据的版本(即 w/ syn.)作为 Seed-OSS-36B-Base
。我们也发布了未使用此类数据训练的 Seed-OSS-36B-Base-woSyn
(即 w/o syn.),为社区提供一个不受合成指令数据影响的高性能基础模型。
Benchmark | Seed1.6-Base | Qwen3-30B-A3B-Base-2507* | Qwen2.5-32B-Base* | Seed-OSS-36B-Base (w/ syn.) | Seed-OSS-36B-Base-woSyn (w/o syn.) |
---|---|---|---|---|---|
Knowledge | |||||
MMLU-Pro | 70 | 59.8 | 58.5 (55.1) | 65.1 | 60.4 |
MMLU | 88.8 | 82.7 | 84 (83.3) | 84.9 | 84.8 |
TriviaQA | 91 | 76.2 | 76 | 82.1 | 81.9 |
GPQA-D | 43.4 | 37 | 29.3 | 31.7 | 35.2 |
SimpleQA | 17.1 | 7.2 | 6.1 | 5.8 | 7.4 |
Reasoning | |||||
BBH | 92.1 | 81.4 | 79.1 (84.5) | 87.7 | 87.2 |
AGIEval-en | 78 | 66.4 | 65.6 | 70.7 | 70.1 |
Math | |||||
GSM8K | 93.1 | 87 | 87.5 (92.9) | 90.8 | 90.3 |
MATH | 72.9 | 61.1 | 63.5 (57.7) | 81.7 | 61.3 |
Coding | |||||
MBPP | 83.6 | 78.8 | 77.8 (84.5) | 80.6 | 74.6 |
HumanEval | 78 | 70.7 | 47.6 (58.5) | 76.8 | 75.6 |
– Bold denotes open-source SOTA.
– “*” indicates that the results in this column are presented in the format of “reproduced_results (reported_results_if_any)”.
Seed-OSS-36B-Instruct
Benchmark | Seed1.6-Thinking-0715 | OAI-OSS-20B* | Qwen3-30B-A3B-Thinking-2507* | Qwen3-32B* | Gemma3-27B | Seed-OSS-36B-Instruct |
---|---|---|---|---|---|---|
Knowledge | ||||||
MMLU-Pro | 86.6 | 76.2 | 81.9 (80.9) | 81.8 | 67.5 | 82.7 |
MMLU | 90.6 | 81.7 (85.3) | 86.9 | 86.2 | 76.9 | 87.4 |
GPQA-D | 80.7 | 72.2 (71.5) | 71.4 (73.4) | 66.7 (68.4) | 42.4 | 71.4 |
SuperGPQA | 63.4 | 50.1 | 57.3 (56.8) | 49.3 | – | 55.7 |
SimpleQA | 23.7 | 6.7 | 23.6 | 8.6 | 10 | 9.7 |
Math | ||||||
AIME24 | 90.3 | 92.7 (92.1) | 87.7 | 82.7 (81.4) | – | 91.7 |
AIME25 | 86 | 90.3 (91.7) | 81.3 (85) | 73.3 (72.9) | – | 84.7 |
BeyondAIME | 60 | 69 | 56 | 29 | – | 65 |
Reasoning | ||||||
ArcAGI V2 | 50.3 | 41.7 | 37.8 | 14.4 | – | 40.6 |
KORBench | 74.8 | 72.3 | 70.2 | 65.4 | – | 70.6 |
Coding | ||||||
LiveCodeBench v6 (02/2025-05/2025) | 66.8 | 63.8 | 60.3 (66) | 53.4 | – | 67.4 |
HLE | 13.9 | 12.7 (10.9) | 8.7 | 6.9 | – | 10.1 |
Instruction Following | ||||||
IFEval | 86.3 | 92.8 | 88 (88.9) | 88.4 (85) | 90.4 | 85.8 |
Agent | ||||||
TAU1-Retail | 63 | (54.8) | 58.7 (67.8) | 40.9 | – | 70.4 |
TAU1-Airline | 49 | (38) | 47 (48) | 38 | – | 46 |
SWE-Bench Verified (OpenHands) | 41.8 | (60.7) | 31 | 23.4 | – | 56 |
SWE-Bench Verified (AgentLess 4*10) | 48.4 | – | 33.5 | 39.7 | – | 47 |
Multi-SWE-Bench | 17.7 | – | 9.5 | 7.7 | – | 17 |
Multilingualism | ||||||
MMMLU | 84.3 | 77.4 (75.7) | 79 | 79 (80.6) | – | 78.4 |
Long Context | ||||||
RULER (128K) | 94.5 | 78.7 | 94.5 | 77.5 | – | 94.6 |
Safety | ||||||
AIR-Bench | – | – | – | – | – | 75.6 |
– Bold denotes open-source SOTA. Underlined indicates the second place in the open-source model.
– “*” indicates that the results in this column are presented in the format of “reproduced_results (reported_results_if_any)”. Some results have been omitted due to the failure of the evaluation run.
– The results of Gemma3-27B are sourced directly from its technical report.
– Generation configs for Seed-OSS-36B-Instruct: temperature=1.1, top_p=0.95. Specifically, for Taubench, temperature=1, top_p=0.7.
NOTE
我们建议使用 temperature=1.1
和 top_p=0.95
进行采样。
思考预算
用户可以灵活指定模型的思考预算。下图显示了随着思考预算变化,不同任务的表现曲线。对于较简单的任务(例如 IFEval),模型的思维链(CoT)较短,随着思考预算的增加,得分会有所波动。对于更复杂的任务(例如 AIME 和 LiveCodeBench),模型的 CoT 较长,随着思考预算的增加,得分会有所提高。

这是一个将思考预算设置为 512 的例子:在推理过程中,模型会定期触发自我反思,以估计已消耗和剩余的预算,并在预算耗尽或推理结束时给出最终响应。
<seed:think>
Got it, let's try to solve this problem step by step. The problem says ... ...
<seed:cot_budget_reflect>I have used 129 tokens, and there are 383 tokens remaining for use.</seed:cot_budget_reflect>
Using the power rule, ... ...
<seed:cot_budget_reflect>I have used 258 tokens, and there are 254 tokens remaining for use.</seed:cot_budget_reflect>
Alternatively, remember that ... ...
<seed:cot_budget_reflect>I have used 393 tokens, and there are 119 tokens remaining for use.</seed:cot_budget_reflect>
Because if ... ...
<seed:cot_budget_reflect>I have exhausted my token budget, and now I will start answering the question.</seed:cot_budget_reflect>
</seed:think>
To solve the problem, we start by using the properties of logarithms to simplify the given equations: (full answer omitted).
如果不设置思考预算(默认模式),Seed-OSS 将以无限长度进行思考。如果指定了思考预算,建议优先选择 512 的整数倍值(例如 512、1K、2K、4K、8K 或 16K),因为模型在这些区间上进行了大量训练。当思考预算为 0 时,模型会被指示输出直接响应,我们建议将任何低于 512 的预算设置为此值。
快速开始
pip3 install -r requirements.txt
pip install git+ssh://git@github.com/Fazziekey/transformers.git@seed-oss
from modelscope import AutoModelForCausalLM, AutoTokenizer
import os
import re
model_name_or_path = "ByteDance-Seed/Seed-OSS-36B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
model = AutoModelForCausalLM.from_pretrained(model_name_or_path, device_map="auto") # You may want to use bfloat16 and/or move to GPU here
messages = [
{"role": "user", "content": "How to make pasta?"},
]
tokenized_chat = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
thinking_budget=512 # control the thinking budget
)
outputs = model.generate(tokenized_chat.to(model.device), max_new_tokens=2048)
output_text = tokenizer.decode(outputs[0])
推理
下载模型
将 Seed-OSS 检查点下载到 ./Seed-OSS-36B-Instruct
Transformers
generate.py
脚本提供了一个简单的模型推理接口,具有可配置的选项。
基本用法
cd inference
python3 generate.py --model_path /path/to/model
关键参数
参数 | 描述 |
---|---|
--model_path | 预训练模型目录的路径(必需) |
--prompts | 输入提示(默认:示例烹饪/代码问题) |
--max_new_tokens | 生成的最大令牌数(默认:4096) |
--attn_implementation | 注意力机制:flash_attention_2 (默认)或 eager |
--load_in_4bit/8bit | 启用4位/8位量化(减少内存使用) |
--thinking_budget | 思考预算(以令牌为单位,默认:-1 表示无限制预算) |
量化示例
# 8-bit quantization
python3 generate.py --model_path /path/to/model --load_in_8bit True
# 4-bit quantization
python3 generate.py --model_path /path/to/model --load_in_4bit True
自定义提示
python3 generate.py --model_path /path/to/model --prompts "['What is machine learning?', 'Explain quantum computing']"
vLLM
使用 vllm >= 0.10.0 或更高版本进行推理。
- 首先安装支持 Seed-OSS 的 vLLM 版本:
VLLM_USE_PRECOMPILED=1 VLLM_TEST_USE_PRECOMPILED_NIGHTLY_WHEEL=1 pip install git+ssh://git@github.com/FoolPlayer/vllm.git@seed-oss
- 启动 vLLM API 服务器:
python3 -m vllm.entrypoints.openai.api_server \
--host localhost \
--port 4321 \
--enable-auto-tool-choice \
--tool-call-parser seed_oss \
--trust-remote-code \
--model ./Seed-OSS-36B-Instruct \
--chat-template ./Seed-OSS-36B-Instruct/chat_template.jinja \
--tensor-parallel-size 8 \
--dtype bfloat16 \
--served-model-name seed_oss
- 使用 OpenAI 客户端测试:
聊天
python3 inference/vllm_chat.py
工具调用
python3 inference/vllm_tool_call.py
模型卡片
参见 MODEL_CARD。
许可证
此项目根据 Apache-2.0 许可。有关详细信息,请参阅 LICENSE 文件。
引用
@misc{seed2025seed-oss,
author={ByteDance Seed Team},
title={Seed-OSS Open-Source Models},
year={2025},
howpublished={\url{https://github.com/ByteDance-Seed/seed-oss}}
}
关于 字节跳动 Seed 团队
字节跳动 Seed 团队成立于 2023 年,致力于打造业界最先进的 AI 基础模型。该团队立志成为世界级的研究团队,并对科学和社会的发展做出重大贡献。
原创文章,转载请注明: 转载自诺德美地科技
本文链接地址: Seed-OSS-36B-Instruct