HuggingFace镜像/Olmo-3-32B-Think
模型介绍
文件和版本
分析

Unsloth Dynamic 2.0 具备更高的精度,并优于其他主流量化方案。

模型详情

OLMo Logo

Olmo 3 32B Think 模型卡片

我们推出 Olmo 3,这是一个全新的 7B 与 32B 模型系列,均提供 Instruct 和 Think 两种变体。长思维链可提升数学与编程等推理任务的表现。

Olmo 是一系列 Open language models,旨在推动语言模型科学的发展。 这些模型基于 Dolma 3 数据集进行预训练,并基于 Dolci 数据集进行后训练。我们将发布所有代码、检查点、日志(即将推出)以及相关训练细节。

本批次发布的核心模型如下:

阶段Olmo 3 7B ThinkOlmo 3 32B ThinkOlmo 3 7B Instruct
基础模型Olmo-3-7BOlmo-3-32BOlmo-3-7B
SFTOlmo-3-7B-Think-SFTOlmo-3-32B-Think-SFTOlmo-3-7B-Instruct-SFT
DPOOlmo-3-7B-Think-DPOOlmo-3-32B-Think-DPOOlmo-3-7B-Instruct-DPO
最终模型(RLVR)Olmo-3-7B-ThinkOlmo-3-32B-ThinkOlmo-3-7B-Instruct

安装

Olmo 3 在 transformers 4.57.0 及更高版本中受到支持:

pip install transformers>=4.57.0

推理

你可以使用标准的 HuggingFace transformers 库来运行 OLMo:

from transformers import AutoModelForCausalLM, AutoTokenizer
olmo = AutoModelForCausalLM.from_pretrained("allenai/Olmo-3-32B-Think")
tokenizer = AutoTokenizer.from_pretrained("allenai/Olmo-3-32B-Think")
message = ["Who would win in a fight - a dinosaur or a cow named Moo Moo?"]
inputs = tokenizer(message, return_tensors='pt', return_token_type_ids=False)
# optional verifying cuda
# inputs = {k: v.to('cuda') for k,v in inputs.items()}
# olmo = olmo.to('cuda')
response = olmo.generate(**inputs, max_new_tokens=100, do_sample=True, top_k=50, top_p=0.95)
print(tokenizer.batch_decode(response, skip_special_tokens=True)[0])
>> '<think>Okay, so the question is who would win in a fight...'

为获得更快的性能,您可以使用以下方法对模型进行量化:

AutoModelForCausalLM.from_pretrained("allenai/Olmo-3-32B-Think", 
    torch_dtype=torch.float16, 
    load_in_8bit=True)  # Requires bitsandbytes

量化模型对数据类型和 CUDA 操作更为敏感。为避免潜在问题,建议通过以下方式将输入直接传入 CUDA:

inputs.input_ids.to('cuda')

我们已为这些模型发布检查点。对于后训练,命名规则为 step_XXX。

若要在 HuggingFace 中加载某个特定的模型修订版本,只需添加参数 revision:

olmo = AutoModelForCausalLM.from_pretrained("allenai/Olmo-3-32B-Think", revision="step_300")

或者,您可以通过以下代码片段访问这些模型的所有版本:

from huggingface_hub import list_repo_refs
out = list_repo_refs("allenai/Olmo-3-32B-Think")
branches = [b.name for b in out.branches]

Chat template

Default System Message

该模型的默认系统提示词为:

<|im_start|>system
You are a helpful AI assistant.<|im_end|>

对话格式

本模型的对话模板格式如下:

<|im_start|>system
You are a helpful AI assistant.
<|im_start|>user
Who would win in a fight - a dinosaur or a cow named Moo Moo?<|im_end|>
<|im_start|>assistant
<think>Okay, so the question is who would win in a fight between a dinosaur and a cow named Moo Moo.
Hmm, first I need to break this down. Let me think about the different factors involved here..... </think>
Moo Moo the cow would certinaly win.
<|endoftext|>

模型描述

  • 开发机构: Allen Institute for AI (Ai2)
  • 模型类型: 一种 Transformer 风格的自回归语言模型。
  • 语言(NLP): 英语
  • 许可: 本模型基于 Apache 2.0 许可发布。按照 Ai2 的负责任使用指南,本模型旨在用于研究和教育目的。
  • 联系方式: 技术咨询:olmo@allenai.org。媒体咨询:press@allenai.org
  • 数据截止日期: 2024 年 12 月。

模型来源

  • 项目主页: https://allenai.org/olmo
  • 代码仓库:
    • Open-Instruct(用于 DPO 和 RLVR):https://github.com/allenai/open-instruct
    • OLMo-Core(用于预训练和 SFT):https://github.com/allenai/OLMo-core
    • OLMo-Eval(用于评测):https://github.com/allenai/OLMo-Eval
  • 论文: [待定]

评测

基准测试Olmo 3 Think 32B SFTOlmo 3 Think 32B DPOOlmo 3 Think 32BQwen 3 32BQwen 3 VL 32B ThinkingQwen 2.5 32BGemma 3 27B InstructGemma 2 27B InstructOlmo 2 32B InstructDeepSeek-R1-Distill-Qwen-32B
数学
MATH95.695.996.195.496.780.287.451.549.292.6
AIME 202473.576.076.880.886.315.728.94.74.670.3
AIME 202566.270.772.570.978.813.422.90.90.956.3
OMEGA43.145.250.847.750.819.224.09.19.838.9
推理
BigBenchHard88.889.189.890.691.180.982.466.065.689.7
ZebraLogic70.574.576.088.396.124.124.817.213.369.4
AGI Eval English85.987.888.290.092.278.976.970.968.488.1
编程
HumanEvalPlus90.091.691.491.290.682.679.267.544.492.3
MBPP+66.767.268.070.666.266.665.761.249.070.1
LiveCodeBench v375.881.983.590.284.849.939.028.710.679.5
指令遵循
IFEval83.980.689.086.585.581.985.462.185.878.7
IFBench37.034.447.637.355.136.731.327.836.423.8
知识与问答
MMLU85.385.285.488.890.184.674.676.177.188.0
PopQA33.137.031.930.732.228.030.230.437.226.7
GPQA55.757.658.167.367.444.645.039.936.461.8
对话
AlpacaEval 2 LC69.178.674.275.680.981.965.539.838.026.2
安全64.865.368.869.082.781.968.674.383.863.6

模型细节

阶段 1:SFT

  • 在 Dolci-Think-SFT-7B 数据集上进行有监督微调。该数据集包含数学、代码、对话和通用知识查询。
  • 数据集:Dolci-Think-SFT-7B, Dolci-Instruct-SFT-7B

阶段 2:DPO

  • 在 Dolci-Think-DPO-7B 数据集上进行直接偏好优化。该数据集包含数学、代码、对话和通用知识查询。
  • 数据集:Dolci-Think-DPO-7B, Dolci-Instruct-DPO-7B

阶段 3:RLVR

  • 在 Dolci-Think-RL-7B 数据集上进行基于可验证奖励的强化学习。该数据集包含数学、代码、指令遵循和通用对话查询。
  • 数据集:Dolci-Think-RL-7B, Dolci-Instruct-RL-7B

偏见、风险与局限性

与任何基座语言模型或未进行安全过滤的微调模型一样,这些模型容易被用户提示生成有害和敏感内容。此类内容也可能无意中产生,尤其是在涉及偏见的情形下,因此建议用户在应用该技术时充分评估相关风险。此外,来自 OLMo 或任何 LLM 的许多表述往往并不准确,因此应当核实事实。

引用

技术文章即将发布!

模型卡联系方式

如发现本模型卡存在错误,请联系 olmo@allenai.org。