返回全部动态

使用 OpenCode 和 TRL 在远程沙箱中训练编码代理

原标题:Training a coding agent using the OpenCode harness in remote HF sandboxes with TRL and OpenEnv

Hugging Face Blog一手来源教程质量 87

AI 摘要

Hugging Face 博客介绍了如何使用 TRL 和 OpenEnv 在远程 HF 沙箱中训练编码代理。文章通过 OpenCode 代理示例,展示了利用 AsyncGRPO 算法对代理产生的真实 token 进行训练,并实现每个 rollout 在独立远程沙箱中运行以扩展规模。该架构通过透明代理捕获 token,使用隐藏测试作为奖励,并支持在 Hugging Face Jobs 上运行。

以上摘要由 AI 生成,可能存在误差。事实请以原文为准。

正文节选

TRL recently shipped support for training a coding agent natively with OpenEnv, via the OpenCode harness (see the announcement). In this post we walk through a concrete example, end to end. We take a real, off-the-shelf coding agent, let it run its own loop against real coding problems, and train it with AsyncGRPO on the exact tokens it produced. Then we go one step further and run every rollout in its own remote Hugging Face sandbox, so the rollouts scale out beyond a single node. We use OpenCo


发布时间:—
抓取时间:2026-08-06 21:18
来源机构:Hugging Face
阅读原文huggingface.co