跳转到内容

正在加载搜索…

在小型机器上运行

agent 的模型常驻时占用 21.2 GB GPU 显存:Simate 14 GB,SAM 3 7.2 GB(主模型和 VLM 是托管的),另外每个 仿真器 worker 占 6-9 GB。没有 deploy 文件时,harness 会替你做选择;本指南以可复制、可修改的 deploy 文件的 形式,展示两块 GPU、一块 GPU 和没有 GPU 运行模型时的选择。取舍总是相同的:要么运行保持配置及其 identity 不变,但耗时更长(在一块 GPU 上,swap 还会清空策略的记忆),要么运行一个更小的、identity 不同的配置。

# A machine with two 24 GB GPUs: the agent's models stay resident on GPU 1 (SAM 3 7.2 GB
# and Simate 14 GB; started once with `harness up`), the simulator workers run on GPU 0.
# Copy to configs/deploy/<your machine>.toml (git-ignored) and set the paths.
weights = "~/harness-weights"
state = "~/.cache/harness-policy/services"
gpus = [0, 1]
gpu_memory_gb = 24
[sim]
gpus = [0]
workers_per_gpu = 2
[services.sam3]
gpu = 1
[services.simate]
gpu = 1
Terminal window
harness up --deploy example-2gpu # starts SAM 3 and Simate on GPU 1
harness config configs/experiments/dev.toml --deploy example-2gpu
# A machine with one 24 GB GPU. The simulator (6-9 GB) leaves room for one model at a
# time: SAM 3 (7.2 GB) and Simate (14 GB) are on demand in one swap group, so the broker
# loads the one a skill calls and swaps when the other is needed. The simulator waits
# while a model loads, so this costs wall time, not episode steps, and the identity is
# that of a machine where both stay resident. One thing differs: Simate keeps a memory of
# past frames, and swapped out it starts that memory afresh, so a policy run after a SAM 3
# call in the same episode does not see the frames before it (docs/src/content/docs/guides/small-machine.md).
# Copy to configs/deploy/<your machine>.toml and set the paths.
weights = "~/harness-weights"
state = "~/.cache/harness-policy/services"
gpus = [0]
gpu_memory_gb = 24
[sim]
gpus = [0]
workers_per_gpu = 1
[services.sam3]
gpu = 0
mode = "on_demand"
swap = "models"
[services.simate]
gpu = 0
mode = "on_demand"
swap = "models"

仿真器一次只给一个模型留出空间,因此 SAM 3 和 Simate 都设为按需,放在同一个 swap group 中:broker 加载 skill 调用的那个模型,在需要另一个时进行 swap(locate 和每个程序之后的场景报告会调用 SAM 3;被移交的 任务会调用 Simate)。模型加载时仿真器会等待,因此代价是墙钟时间,而不是 episode 步数:配置及其 identity 与两块 GPU 的机器相同。

有一点不同。Simate 保留过去相机帧的记忆,而带记忆的策略被 swap 出去后会从头开始记忆。当一个程序在同一 episode 中策略的两次运行之间调用 SAM 3 时(移交停滞后的场景报告,或之后调用中的一次 locate),下一次 运行会重新加载 Simate,而不带之前的帧。需要记忆的任务(之前看到、被盖住或被交换的物体)得分可能不同, 因此只把一块 GPU 的运行与一块 GPU 的运行比较。

一个 swap group 需要容纳其最大成员的空间(这里是 14 GB),再加上该 GPU 上所有常驻的内容。 harness doctor --deploy <file> 会把放置方案与空闲显存对照检查。

# No GPU for models: only the simulator runs here, every model is hosted (the main and
# vlm roles). Without a segmenter, segmentation and the tools built on it (locate, pick,
# release, ...) drop out of runs on this machine, and without a policy server the
# learned skills: a smaller configuration with another identity.
weights = "~/harness-weights"
gpus = [0]
[sim]
gpus = [0]
workers_per_gpu = 1

这里只运行仿真器;每个模型角色都是托管的。没有分割器时,分割以及基于它的工具(locate、pick、 release 等)会被去掉;没有策略服务器时,学习型 skill 和strategy 步骤会被去掉:

segmentation no no segmenter service
eef no no segmenter service
vla no no policy service
wam no no world_model service

这是一个小得多的配置(identity 不同):适合检查 prompt 和 driver,不适合产出结果。

agent 用它的 VLM 做指点,没有世界模型。需要它们的实验会运行这些服务(configs/deploy/example-4gpu.toml 把两者都设为按需,放在一块专用的 GPU 上:Molmo2 12.7 GB,OpenWAM 15.3 GB),并把它们加入 agent, identity 也随之不同:

Terminal window
harness run configs/experiments/dev.toml --deploy mine --output runs/dev-wam \
--set 'agent.services.world_models=["openwam"]' \
--set 'agent.roles=["main", "vlm", "pointer", "verifier"]'

qwen3-vl-32b 模型文件在一块 24 GB GPU 上以 4 bit 运行 Qwen3-VL-32B,作为主模型和 VLM,没有 API 花费。 使用自托管模型。