Beam by Reflection 已在 Hugging Face 上线!这是新成立的美国实验室 Reflection 推出的首款模型,且已开源。它是一个混合专家(MoE)模型,拥有 501B 参数(每个 token 激活 23B),支持文本输入,具有 1M token 的上下文窗口,并在 Apache 2.0 许可证下发布。
Beam 专注于编码和智能体用例。它面向那些希望在自己的硬件、基础设施或云上部署前沿规模模型,并希望根据自有用例对其进行定制的团队。Beam 附带其专用的基于 Rust 的开源框架,以提供该模型的最佳性能。
Beam 拥有原生的 transformers 实现,以及 vLLM 和 SGLang 等下游库。我们与 Reflection 团队合作,为你提供了用于构建此模型的推理、SFT(监督微调)和 RL(强化学习)配方,以满足你的需求。除了对 transformers、SGLang 和 vLLM 的 Day-0 支持外,本文还将向你展示如何运行它、如何进行后训练,以及我们用它构建了什么。
TL;DR
拥有 52 层、每 MoE 层 256 个专家、每个 token 路由 8 个专家的 501B 参数 MoE LLM,每个 token 激活 23B。
文本输入,文本输出,上下文窗口为 1M token。
检查点格式:BF16、FP8 和 NVFP4
推理过程可跨轮次保留在上下文中(preserve_thinking),并通过专用语法进行工具调用。模型支持五种推理值:“low”、“medium”(默认)、“high”、“xhigh”和“max”。
词元器中的响应模板。
带有 DFlash2 的投机解码草稿模型。
Day-0 库:transformers、SGLang、vLLM。使用 Miles 进行全参数 RL。
附带基于 Rust 的自定义框架。
Apache 2.0。
使用 Beam 构建
Reflection 将向使用 Beam 的最佳项目颁发 10,000 美元的 Hub 积分。你只需要制作一个作品,并在 Hub 上分享即可:
你可以在 Spaces 上使用 Beam 模型制作演示
你可以将其量化以适配你喜欢的硬件
你可以为你喜欢的问题生成合成数据集
你可以为 Beam 或针对 Beam 构建 RL 环境
你可以对 Beam 进行基准测试并分享结果。
你也可以给我们惊喜!
如果你用 Beam 构建了什么东西,请在 Hub 上分享它,有机会赢得 10,000 美元。你只需要构建空间、模型或数据集仓库,并在该模型的仓库页面上分享即可。我们将收集所有链接,选出最佳作品,并将积分发送到你的 Hub 账户。
什么是 Beam?
Beam 是一个专为长上下文(1M 上下文长度)推理和智能体工作而构建的纯文本模型。它是一个稀疏 MoE 模型,每个 token 由网络的一小部分计算得出,因此它以比小得多模型的运行速度运行,同时保持大模型的容量。
注意力机制
解码器有 52 层,隐藏层大小为 5,120。大多数层对前 512 个 token 使用滑动窗口注意力;每第六层以及最后一层则关注整个上下文。这给出了 43 个滑动窗口层和 9 个全局层。
在注意力块内部(两种层类型)
这两种类型的层以不同的方式处理位置信息。滑动窗口层使用 RoPE,因为在短窗口内相对位置最为重要。全局层不使用位置编码。相反,每个查询乘以一个随着可见 token 数量缓慢增长的缩放因子,即 (1 + (pos + 1) / 2048) ** 0.1 。它起到温度的作用:随着上下文变长,softmax 保持其精度而不是变得平坦。该实现将此称为可缩放 softmax 查询缩放。
注意力机制使用分组查询注意力,具有 48 个查询头和 8 个键值头,并对查询和键进行 RMSNorm。一个从层输入计算的 learned sigmoid 门控会在输出投影之前缩放每个头的每个通道。
前3层使用密集的SwiGLU MLP。其余49层将其替换为包含256个专家的混合专家(MoE)模块,每个专家都是一个中间层大小为2,560的SwiGLU MLP,约含39M参数。这些专家承载了模型98.4%的参数。
路由器遵循DeepSeek-V3的分组限制方案。它对全部256个专家进行sigmoid评分,将其分为8组,每组32个,保留得分最高的4个组(按各组前两名得分之和排名),然后在这些组内选出得分最高的8个专家。Beam使用与DeepSeek-V3相同的组大小,但不共享专家。专家输出通过归一化的路由器权重进行组合,并乘以2.5进行缩放。
每个token仅运行8个专家,因此模型计算每个token时约涉及23B参数。所有256个专家均驻留内存中,因此部署需要相当于501B模型的显存,但运行速度可达23B模型的水平。BF16格式的checkpoint约为1TB(safetensors格式)。NVFP4 checkpoint将大部分参数以4位精度存储,适用于NVIDIA Blackwell GPU,部分参数保留为BF16以确保准确性。Hugging Face Hub上还提供了FP8 checkpoint,非常适合Hopper和Ampere系列芯片。
如果您想自行部署Beam,请参阅下方的vLLM或SGLang配置指南。
残差流
残差连接是最具特色的部分。标准Transformer以权重1将每个子层输出加到残差流中,因此随着深度增加,残差流的规模会不断增大。
Beam将输入嵌入视为第1步。在第k步,它以权重$1/\sqrt{k}$加上子层输出,并以权重$\sqrt{(k-1)/k}$保留现有的残差流。这两个权重的平方和为1,因此从第一层到最后一层,残差流的规模保持恒定。经过全部104次累加后,每个子层输出和输入嵌入在最终隐藏状态中拥有相同的权重。
每个子层在前后均进行归一化,最终的logits通过$\pm30$的tanh软上限(softcap)处理,该过程以FP32精度计算。实现细节明确了哪些部分必须在FP32下计算:路由器、SwiGLU乘积、归一化、RoPE、查询缩放以及软上限。
长上下文
混合注意力机制在长上下文中表现良好。每层缓存$2 \times 8$个KV头 $\times 128$维 = 每个token 2,048个值。如果所有52层都保留每个token,缓存将随每个token增加208 KiB。只有9个全局层保留整个序列。其余43个滑动窗口层各自保持固定的512-token窗口,不再增长。因此,缓存随每个token仅增加36 KiB,约为朴素方法速率的六分之一。
上下文
如果所有52层均为全局层
Beam
32K tokens
6.5 GiB
1.2 GiB
128K tokens
26 GiB
4.6 GiB
完整上下文(1M)
208 GiB
36.08 GiB
这些数字基于序列,使用BF16精度及transformers动态缓存。
基准测试结果
以下是Reflection团队提供的不同精度级别的基准测试结果。
Beam (BF16)
Beam (FP8)
Beam (NVFP4)
Agentic Coding / Terminal
DeepSWE v1.1
43.3%
43.0%
42.7%
SWE Bench Pro v2-Hard
76.5%
78.4%
78.6%
SWE Bench Pro v1
66.1%
65.9%
65.6%
Terminal Bench v2.1
80.1%
78.9%
78.2%
SWE Atlas Codebase QnA
31.8%
32.2%
31.4%
SWEBench Multilingual
78.3%
78.1%
77.5%
SWEBench Verified
81.6%
80.2%
80.7%
推理能力
AIME 2026
97.7%
98.0%
97.5%
HLE (无工具)
36.0%
36.0%
34.8%
HLE (有工具)
51.1%
51.1%
51.1%
SciCode
49.2%
48.3%
46.9%
CriPT AA
16.3%
17.4%
15.4%
GPQA Diamond
90.6%
90.3%
89.3%
LiveCodeBench
88.3%
88.1%
87.4%
工具调用 / 搜索
AutomationBench - 仅公开划分
39.3
38.2
39.8%
MCP Atlas
80.8%
81.5%
80.5%
Tau3 Banking
36.1%
36.8%
35.4%
BrowseComp 带上下文管理
76.8%
76.7%
75.6%
DeepSearchQA 带上下文管理
80.5%
79.6%
81.1%
通用能力
AA-LCR
78.2%
79.4%
78.7%
LongBench v2
67.5%
67.6%
67.2%
IFBench
79.6%
80.7%
79.2%
AA Omniscience (索引) - 仅公开划分
10.8
8.8
9.8
硬件需求
服务该模型最实用的方式是提供 NVFP4 检查点,它保留了 bf16 检查点的大部分质量。NVFP4 以 4 位存储部分权重,从而将 BF16 中的 501B 参数从 1 TB 缩减至约 280 GB。Blackwell GPU 原生支持 NVFP4,但早于 Blackwell 的 GPU(如 H200)则不支持。FP8 检查点适用于早于 Blackwell 的 GPU。
B200 拥有 180 GB 的 HBM3e 显存,因此两块 B200(共 360 GB)即可容纳 Beam 的权重,但留给激活值和 KV 缓存的空间所剩无几。建议规划使用四块 B200(720 GB),这将为长上下文和并发请求留出充足空间。你也可以在完整的 8xB200 节点上服务它,或在两块 B300(每块 288 GB)上运行,甚至可以使用 8xRTX Pro 6000。如果你没有 Blackwell 硬件,请使用推理提供商(无服务器)来测试 Reflection。
推理支持
Beam 在 transformers、SGLang 和 vLLM 中提供首日支持。
Transformers
安装最新版本的 transformers。
pip install -U "transformers>=5.20.1"
运行 Beam 最简单的方法是文本生成流水线:
from transformers import pipeline
pipe = pipeline(
"text-generation", model="reflection/Beam-1.0-501B-A23B", device_map="auto"
)
messages = [
{ "role": "user", "content": "Write a limerick about Python exceptions." }
]
output = pipe(messages, max_new_tokens= 2000 )
output[ 0 ][ "generated_text" ][- 1 ]
流水线返回整个聊天内容。最后一条消息是 Beam 的回复,已经由响应模板解析完毕。
再低一层,使用 AutoModelForCausalLM 和 AutoTokenizer。
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "reflection/Beam-1.0-501B-A23B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id, dtype="auto", device_map="auto"
)
聊天
messages = [
{ "role": "system", "content": "You should only answer with a number." },
{ "role": "user", "content": "What is 17 * 23?" },
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt= True,
tokenize= True,
return_dict= True,
return_tensors="pt",
reasoning_effort="medium"
).to(model.device)
input_len = inputs["input_ids"].shape[- 1]
outputs = model.generate(**inputs, max_new_tokens= 2000 )
tokenizer.parse_response(
outputs[ 0 ][input_len:], prefix=inputs["input_ids"][ 0]
)
Beam 的 tokenizer 携带一个响应模板。parse_response 读取该模板,将原始输出转换为消息字典,其中推理、答案以及任何工具调用分别位于不同的字段中。这避免了通常用于从答案和工具调用中分离推理的正则表达式规则。由于这些规则随 tokenizer 一起提供,因此解析后的结构与 Beam 训练时产生的结构相匹配。聊天模板可以预先写入助手轮次的一部分,这是解析器所必需的。
工具调用
完整的工具调用示例
def get_weather ( city: str , unit: str = "celsius" ):
"""
Get the current weather for a city.
Args:
city: The city to look up.
unit: Temperature unit, "celsius" or "fahrenheit".
"""
...
tools = [get_weather]
messages = [
{ "role": "user", "content": "I land in Paris tonight. Do I need a coat?" }
]
inputs = tokenizer.apply_chat_template(
messages,
tools=tools,
add_generation_prompt= True,
tokenize= True,
return_dict= True,
return_tensors="pt",
).to(model.device)
input_len = inputs["input_ids"].shape[- 1]
outputs = model.generate(**inputs, max_new_tokens= 1000 )
message = tokenizer.parse_response(
outputs[ 0 ][input_len:], prefix=inputs["input_ids"][ 0], tools=tools
)
message.get("tool_calls")
同样将工具传递给 parse_response。Beam 以内联方式编写工具调用参数,使用其自身的 XML 风格语法,因此裸数字 7 可能是数字也可能是字符串。借助工具模式,解析器会将每个参数转换为其声明的类型。
多 GPU 和多节点
Beam 的配置文件定义了一个专家并行计划。专家并行将每个专家放置在一个设备上。注意力机制、密集层、嵌入层和语言模型头则在每个设备上进行复制。这相当于 80 亿参数,在 BF16 精度下占用 16 GB 内存。使用 DistributedConfig 加载模型:
import os
from transformers import AutoModelForCausalLM
from transformers.distributed import DistributedConfig
model = AutoModelForCausalLM.from_pretrained(
"reflection/Beam-1.0-501B-A23B" ,
distributed_config=DistributedConfig(
tp_size= int (os.environ[ "WORLD_SIZE" ]), ep_size= int (os.environ[ "WORLD_SIZE" ]), tp_plan={}
),
)
使用 torchrun 在 16 张 H200 GPU 上启动脚本。每张卡将持有 78 GB 的权重参数。如果使用 8 张 GPU,每张卡将持有 139 GB,这在容量为 141 GB 的 H200 上将没有剩余空间。设备数量必须能整除专家的数量(256)。
vLLM
Beam 在 vLLM 中享有 Day-0 支持。以下命令通过跨 16 张 GPU(两个 8x H200 节点)的张量并行来服务 BF16 检查点,并暴露一个与 OpenAI 兼容的 API:
vllm serve reflection/Beam-1.0-501B-A23B --tensor-parallel-size 16 --served-model-name beam
为了实现更快的生成速度,可以添加 DFlash2 推测解码。一个小型的草稿模型会提前提议多达 15 个 token,而 Beam 会在一次前向传播中检查所有这些 token,因此每一步都可以接受多个 token。其代价是为草稿模型增加一点额外的内存:
vllm serve reflection/Beam-1.0-501B-A23B \
--tensor-parallel-size 16 \
--speculative-config '{ "method": "dflash", "model": "reflection/dflash2-drafter-preview", "num_speculative_tokens": 15 }'
这两个命令都会启动一个与 OpenAI 兼容的服务器,因此你可以将任何 OpenAI 客户端指向 http://localhost:8000/v1 。有关其他服务配置,请参阅 vLLM 的 Beam 配方提案。
SGLang
Beam 在 SGLang 中也享有 Day-0 支持。我们建议使用 DFlash2 推测解码来服务它,以下两个命令都启用了该功能。在 Blackwell 架构上,NVFP4 检查点可以适配在 4 张 B300 上:
python -m sglang.launch_server \
--model-path reflection/Beam-1.0-501B-A23B-NVFP4 \
--served-model-name beam \
--tp 4 \
--attention-backend trtllm_mha \
--page-size 64 \
--context-length 1048576 \
--mem-fraction-static 0.85 \
--enable-unified-memory \
--speculative-algorithm DFLASH \
--speculative-draft-model-path reflection/Beam-1.0-501B-A23B-DFlash2 \
--speculative-dflash-block-size 8 \
--tool-call-parser beam --reasoning-parser beam \
--host 0.0.0.0 --port 30000
在 Hopper GPU 上,请改用 FP8 检查点并在 8 张 H200 上运行。只有三个标志发生变化:检查点、张量并行大小(从 4 改为 8)以及注意力后端(从 trtllm_mha 改为 fa3,后者需要 Blackwell 架构):
python -m sglang.launch_server \
--model-path reflection/Beam-1.0-501B-A23B-FP8 \
--served-model-name beam \
--tp 8 \
--attention-backend fa3 \
--page-size 64 \
--context-length 1048576 \
--mem-fraction-static 0.85 \
--enable-unified-memory \
--speculative-algorithm DFLASH \
--speculative-draft-model-path reflection/Beam-1.0-501B-A23B-DFlash2 \
--speculative-dflash-block-size 8 \
--tool-call-parser beam --reasoning-parser beam \
--host 0.0.0.0 --port 30000
推理提供商
Beam 已在由 Baseten、Fireworks 和 Together 支持的 Hugging Face Inference Providers 上提供,更多提供商即将上线。
import os
from openai import OpenAI
client = OpenAI(
base_url= "https://router.huggingface.co/v1" ,
api_key=os.environ[ "HF_TOKEN" ],
)
completion = client.chat.completions.create(
model= "reflection/Beam-1.0-501B-A23B:auto" ,
messages=[{ "role" : "user" , "content" : "What is the capital of France?" }],
)
print (completion.choices[ 0 ].message)
推理端点
我们已经为你准备好了 Beam 配方,你可以从目录中一键部署 Inference Endpoints(提供 FP8 或 NVFP4 版本),或者像这样通过 hf cli 安装:
hf endpoints catalog deploy --repo reflection/Beam-1.0-501B-A23B --name beam
我们测试了什么
我们正在通过 Reflection 平台,在五项任务上分别以低推理努力和高推理努力各运行一次,分享关于 Reflection Beam-501B-A23B 的一些 vibe evals(直觉评估)。这些是 vibe evals,而非基准测试。如果您计划使用 Beam,这是测试其性能、了解其在特定用例中表现如何的好方法,更重要的是,明确它在哪些场景下胜出、哪些场景下失利。
以下是我们运行的提示词概述以及来自 hub 的输出追踪记录。完整的输入、输出、API 使用情况、任务夹具(fixtures)、评分器(graders)和对话追踪记录均位于此公共 Hugging Face 存储桶中 。
类别
提示词描述
低推理(token 数)
高推理(token 数)
多步工具调用
完成订单 ORD-742:比较库存、预订
Beam by Reflection is out on Hugging Face! It is the first model from the new US lab, Reflection, and it’s open! It's a mixture-of-experts (MoEs) model with 501B parameters (23B active per token), supports text as input, has a
context window of 1M tokens , and is released under the Apache 2.0 license.
Beam is focused on coding and agentic use cases. It is for teams that want a frontier-scale model on their own hardware, infrastructure, or cloud, and want to customize it to their own use cases. Beam ships with its own dedicated open source Rust based harness that delivers the best performance from the model.
Beam has a native transformers implementation, as well as downstream libraries like vLLM and SGLang. We’ve worked with the Reflection team to bring you inference, SFT (supervised fine tuning), and RL (reinforcement learning) recipes for you to build with this model for your needs. On top of day-0 support in transformers, SGLang and vLLM, this post shows you how to run it, how to post-train it, and what we built with it.
TL;DR
501B-parameter MoEs LLM with 23B active per token. 52 layers, 256 experts per MoE layer, 8 routed per token.
Text in, text out with context window of 1M tokens.
Checkpoint formats: BF16 , FP8 , and NVFP4
Reasoning that can stay in context across turns ( preserve_thinking ), tool calling with a dedicated grammar. The model supports five reasoning values: "low", "medium" (default), "high", "xhigh", and "max".
Response template in the tokenizer.
Speculative decoding drafter model with DFlash2
Day-0 libraries: transformers, SGLang, vLLM. Full-parameter RL with Miles.
Ships with a Rust-based custom harness.
Apache 2.0.
Build with Beam
Reflection is going to give out $10,000 Hub credits to the best projects that use Beam. All you have to do is make a thing, and share it on the Hub:
You could make a demo that uses the Beam model on Spaces
You could quantize it for your favorite hardware
You could generate a synthetic dataset for your favorite problem
You could build an RL environment with or for Beam
You could benchmark Beam and share the results.
You could surprise us!
If you build something with Beam, then share it on the Hub for a chance to win $10,000. All you have to do is build the space, model, or dataset repo and share it on the model’s repo page . We’ll collect all the links, select the best, and send out the credits to your Hub accounts.
What is Beam?
Beam is a text-only model built for long-context (1M context length) reasoning and agentic work. It is a sparse MoE model, where each token is computed by a small fraction of the network, so it runs at the speed of a much smaller model while keeping the capacity of a large one.
Attention
The decoder has 52 layers with a hidden size of 5,120. Most layers use sliding-window attention over the previous 512 tokens; every sixth layer, and the last one, attend to the full context. That gives 43 sliding-window layers and 9 global ones.
Inside the attention block (both layer types)
The two kinds of layers handle position differently. Sliding-window layers use RoPE, since relative position matters most within a short window. Global layers use no positional encoding . Instead, each query is multiplied by a scaler that grows slowly with the number of visible tokens, (1 + (pos + 1) / 2048) ** 0.1 . It acts as a temperature: the softmax keeps its precision as the context lengthens instead of flattening out. The implementation calls this scalable-softmax query scaling.
Attention uses grouped-query attention with 48 query heads and 8 key-value heads, with RMSNorm on queries and keys. A learned sigmoid gate, computed from the layer input, scales every channel of every head before the output projection.
Mixture of Experts
The first 3 layers use a dense SwiGLU MLP. The other 49 replace it with a Mixture-of-Experts block of 256 experts, each a SwiGLU MLP with an intermediate size of 2,560, or about 39M parameters. The experts hold 98.4% of the model's parameters.
The router follows DeepSeek-V3's group-limited scheme. It scores all 256 experts with a sigmoid, splits them into 8 groups of 32, keeps the 4 best groups (ranked by the sum of each group's top two scores), then picks the top 8 experts inside them. Beam uses the same group sizes as DeepSeek-V3 but no shared expert. Expert outputs are combined with normalized router weights and scaled by 2.5.
Only 8 experts run per token, so the model computes each token with about 23B parameters. All 256 experts stay in memory, so deployment needs the memory of a 501B model but runs at the speed of a 23B one. The BF16 checkpoint is about 1 TB in safetensors format. The NVFP4 checkpoint stores most parameters in 4-bit precision for NVIDIA Blackwell GPUs, some parameters are kept in BF16 for accuracy. There are also FP8 checkpoints on the hub which are ideal for Hopper and Ampere series chips.
If you want to deploy Beam yourself, check out the vLLM or SGLang recipes below.
Residual Stream
The residual connections are the most distinctive part. A standard transformer adds each sublayer output to the stream with weight 1, so the stream grows with depth.
Beam counts the input embedding as step 1. At step k it adds the sublayer output with weight 1/sqrt(k) and keeps the existing stream with weight sqrt((k-1)/k) . The squares of the two weights sum to one, so the stream stays at a constant scale from the first layer to the last. After all 104 additions, every sublayer output and the input embedding carry the same weight in the final hidden state.
Every sublayer is also normalized before and after, and the final logits pass through a tanh softcap at ±30, computed in FP32. The implementation fixes where it computes in FP32: the router, the SwiGLU product, the norms, RoPE, the query scaling and the softcap.
Long Context
Hybrid attention works well for long contexts. Each layer caches 2 x 8 KV heads x 128 dims = 2,048 values per token. If all 52 layers kept every token, the cache would grow by 208 KiB per token. Only the 9 global layers keep the whole sequence. The 43 sliding-window layers hold a fixed 512-token window each and stop growing. So the cache grows by 36 KiB per token, roughly a sixth of the naive rate.
Context
If all 52 layers were global
Beam
32K tokens
6.5 GiB
1.2 GiB
128K tokens
26 GiB
4.6 GiB
Full context (1M)
208 GiB
36.08 GiB
These numbers are per sequence, in BF16, with the transformers dynamic cache.
Benchmark Results
Here are the benchmark results across different precision levels, as provided by the Reflection team.
Beam (BF16)
Beam (FP8)
Beam (NVFP4)
Agentic Coding / Terminal
DeepSWE v1.1
43.3%
43.0%
42.7%
SWE Bench Pro v2-Hard
76.5%
78.4%
78.6%
SWE Bench Pro v1
66.1%
65.9%
65.6%
Terminal Bench v2.1
80.1%
78.9%
78.2%
SWE Atlas Codebase QnA
31.8%
32.2%
31.4%
SWEBench Multilingual
78.3%
78.1%
77.5%
SWEBench Verified
81.6%
80.2%
80.7%
Reasoning
AIME 2026
97.7%
98.0%
97.5%
HLE (no tools)
36.0%
36.0%
34.8%
HLE (with tools)
51.1%
51.1%
51.1%
SciCode
49.2%
48.3%
46.9%
CriPT AA
16.3%
17.4%
15.4%
GPQA Diamond
90.6%
90.3%
89.3%
LiveCodeBench
88.3%
88.1%
87.4%
Tool Calling / Search
AutomationBench - public split only
39.3
38.2
39.8%
MCP Atlas
80.8%
81.5%
80.5%
Tau3 Banking
36.1%
36.8%
35.4%
BrowseComp w/ context management
76.8%
76.7%
75.6%
DeepSearchQA w/ context management
80.5%
79.6%
81.1%
General Capabilities
AA-LCR
78.2%
79.4%
78.7%
LongBench v2
67.5%
67.6%
67.2%
IFBench
79.6%
80.7%
79.2%
AA Omniscience (index) - public split only
10.8
8.8
9.8
Hardware Requirements
The most practical way to serve the model is serving the NVFP4 checkpoint, which retains most of the quality of the bf16 checkpoint. NVFP4 stores some weights in 4 bits, and this way, it shrinks the 501B parameters in BF16 from 1 TB to ~280 GB. Blackwell GPUs run NVFP4 natively but GPUs older than Blackwell like the H200 can't. The FP8 checkpoints are suitable for GPUs older than Blackwell.
A B200 has 180 GB of HBM3e, so two of them (360 GB) can hold the Beam weights, with little room left for activations and the KV cache. Plan for four B200s (720 GB), which leaves plenty of room for long contexts and concurrent requests. You can also serve it on a full 8xB200 node, or on two B300s at 288 GB each, or even 8xRTX Pro 6000. If you don't have Blackwell hardware, use Inference Providers (serverless) to test Reflection.
Inference Support
Beam comes with day-0 support in transformers, SGLang and vLLM.
Transformers
Install the latest version of transformers.
pip install -U "transformers>=5.20.1"
The easiest way to run Beam is the text-generation pipeline:
from transformers import pipeline
pipe = pipeline(
"text-generation" , model= "reflection/Beam-1.0-501B-A23B" , device_map= "auto"
)
messages = [
{ "role" : "user" , "content" : "Write a limerick about Python exceptions." }
]
output = pipe(messages, max_new_tokens= 2000 )
output[ 0 ][ "generated_text" ][- 1 ]
The pipeline returns the whole chat. The last message is Beam's reply, already parsed by the response template.
Going one level lower, use AutoModelForCausalLM and AutoTokenizer .
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "reflection/Beam-1.0-501B-A23B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id, dtype= "auto" , device_map= "auto"
)
Chat
messages = [
{ "role" : "system" , "content" : "You should only answer with a number." },
{ "role" : "user" , "content" : "What is 17 * 23?" },
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt= True ,
tokenize= True ,
return_dict= True ,
return_tensors= "pt" ,
reasoning_effort= "medium"
).to(model.device)
input_len = inputs[ "input_ids" ].shape[- 1 ]
outputs = model.generate(**inputs, max_new_tokens= 2000 )
tokenizer.parse_response(
outputs[ 0 ][input_len:], prefix=inputs[ "input_ids" ][ 0 ]
)
Beam's tokenizer carries a response template. parse_response reads it and turns the raw output into a message dict, with the reasoning, the answer, and any tool calls in separate fields. This avoids the usual regex for splitting reasoning from answers from tool calls. And the rules ship with the tokenizer, so the parsed structure matches what Beam was trained to produce. The chat template can pre-write part of the assistant turn, which the parser needs to see.
Tool calling
Complete tool-calling example
def get_weather ( city: str , unit: str = "celsius" ):
"""
Get the current weather for a city.
Args:
city: The city to look up.
unit: Temperature unit, "celsius" or "fahrenheit".
"""
...
tools = [get_weather]
messages = [
{ "role" : "user" , "content" : "I land in Paris tonight. Do I need a coat?" }
]
inputs = tokenizer.apply_chat_template(
messages,
tools=tools,
add_generation_prompt= True ,
tokenize= True ,
return_dict= True ,
return_tensors= "pt" ,
).to(model.device)
input_len = inputs[ "input_ids" ].shape[- 1 ]
outputs = model.generate(**inputs, max_new_tokens= 1000 )
message = tokenizer.parse_response(
outputs[ 0 ][input_len:], prefix=inputs[ "input_ids" ][ 0 ], tools=tools
)
message.get( "tool_calls" )
Pass tools to parse_response as well. Beam writes tool-call arguments inline, in its own XML-style grammar, so a bare 7 could be a number or a string. With the tool schemas, the parser casts each argument to its declared type.
Multi-GPU and multi-node
Beam's config defines an expert-parallel plan. Expert parallelism puts each expert on one device. Attention, the dense layers, the embeddings and the LM head are replicated on every device. That is 8B parameters, or 16 GB in BF16. Load the model with a DistributedConfig :
import os
from transformers import AutoModelForCausalLM
from transformers.distributed import DistributedConfig
model = AutoModelForCausalLM.from_pretrained(
"reflection/Beam-1.0-501B-A23B" ,
distributed_config=DistributedConfig(
tp_size= int (os.environ[ "WORLD_SIZE" ]), ep_size= int (os.environ[ "WORLD_SIZE" ]), tp_plan={}
),
)
Launch the script with torchrun across 16 H200 GPUs. Each one then holds 78 GB of weights. With 8 GPUs each would hold 139 GB, which leaves no room on a 141 GB H200. The number of devices must divide the number of experts, 256.
vLLM
Beam has day-0 support in vLLM. The command below serves the BF16 checkpoint with tensor parallelism across 16 GPUs (two 8x H200 nodes) and exposes an OpenAI-compatible API:
vllm serve reflection/Beam-1.0-501B-A23B --tensor-parallel-size 16 --served-model-name beam
For faster generation, add DFlash2 speculative decoding. A small drafter model proposes up to 15 tokens ahead, and Beam checks them all in one forward pass, so each step can accept several tokens. The cost is a little extra memory for the drafter:
vllm serve reflection/Beam-1.0-501B-A23B \
--tensor-parallel-size 16 \
--speculative-config '{ "method": "dflash", "model": "reflection/dflash2-drafter-preview", "num_speculative_tokens": 15 }'
Both commands start an OpenAI-compatible server, so you can point any OpenAI client at http://localhost:8000/v1 . For additional serving configurations, see the proposed Beam recipe for vLLM .
SGLang
Beam also has day-0 support in SGLang. We recommend serving it with DFlash2 speculative decoding, which both commands below turn on. On Blackwell, the NVFP4 checkpoint fits on 4 B300s:
python -m sglang.launch_server \
--model-path reflection/Beam-1.0-501B-A23B-NVFP4 \
--served-model-name beam \
--tp 4 \
--attention-backend trtllm_mha \
--page-size 64 \
--context-length 1048576 \
--mem-fraction-static 0.85 \
--enable-unified-memory \
--speculative-algorithm DFLASH \
--speculative-draft-model-path reflection/Beam-1.0-501B-A23B-DFlash2 \
--speculative-dflash-block-size 8 \
--tool-call-parser beam --reasoning-parser beam \
--host 0.0.0.0 --port 30000
On Hopper GPUs, use the FP8 checkpoint on 8 H200s instead. Only three flags change: the checkpoint, the tensor-parallel size (8 instead of 4), and the attention backend (fa3 instead of trtllm_mha, which needs Blackwell):
python -m sglang.launch_server \
--model-path reflection/Beam-1.0-501B-A23B-FP8 \
--served-model-name beam \
--tp 8 \
--attention-backend fa3 \
--page-size 64 \
--context-length 1048576 \
--mem-fraction-static 0.85 \
--enable-unified-memory \
--speculative-algorithm DFLASH \
--speculative-draft-model-path reflection/Beam-1.0-501B-A23B-DFlash2 \
--speculative-dflash-block-size 8 \
--tool-call-parser beam --reasoning-parser beam \
--host 0.0.0.0 --port 30000
Inference Providers
Beam is available on Hugging Face Inference Providers, powered by Baseten, Fireworks, and Together, with more to follow soon.
import os
from openai import OpenAI
client = OpenAI(
base_url= "https://router.huggingface.co/v1" ,
api_key=os.environ[ "HF_TOKEN" ],
)
completion = client.chat.completions.create(
model= "reflection/Beam-1.0-501B-A23B:auto" ,
messages=[{ "role" : "user" , "content" : "What is the capital of France?" }],
)
print (completion.choices[ 0 ].message)
Inference Endpoints
We’ve set up a Beam recipe for you to one click deploy in Inference Endpoints from the catalog in FP8 or NVFP4 , or install with the hf cli like so:
hf endpoints catalog deploy --repo reflection/Beam-1.0-501B-A23B --name beam
What we tested
We are sharing some vibe evals of Reflection Beam-501B-A23B on five tasks, once each at low and high reasoning effort through the Reflection platform. These are vibe evals, not benchmarks. If you’re planning on using Beam, this is a great way to kick the tires and see how it behaves on specific use cases, and importantly, where it wins and loses.
Below is an overview of the prompts we ran and the output traces from the hub. The complete inputs, outputs, API usage, task fixtures, graders and conversation traces are in this public Hugging Face bucket .
Category
Prompt Description
Low reasoning (tokens)
High reasoning (tokens)
Multi-step tool calling
Fulfill ORD-742: compare stock, reservations,
首次收录 · 2026-10-17 · 9.95 分