Open-source defensive patch recipe for Qwen4-35B-A3B, runs on just 2 H200s
Ben Burtenshaw has released an RL recipe that uses HF Jobs and TRL AsyncGRPO to train Qwen4-35B-A3B on 2× H200s to patch vulnerable code. The model, data, and evaluation are said to be open source; the UltraCyber dataset 404 has been fixed, and training metrics have a live page. In the comments, some asked how the reward is defined, while others questioned whether the same knowledge could be repurposed for attacks.
Ben Burtenshaw has released an RL recipe on X with a very specific goal: train Qwen4-35B-A3B into a defensive code-patching agent. In HF Jobs, it reads vulnerable code, generates fixes, and a verifier scores them; TRL's AsyncGRPO handles the learning, and the entire training run uses 2× H200s. The author also says the model, dataset, and evaluation will all be open source, with the recipe entry point on the cyber page of TRL recipes.
The pain point here is no mystery. Vulnerability remediation isn't about getting a model to write code that looks correct; it's about making a patch that actually closes the issue without breaking existing behavior. In Ben's setup, Qwen4-35B-A3B acts as an agent patching code in HF Jobs, fixes that pass verification are scored by a verifier, and AsyncGRPO updates based on the reward. For teams that want to build a local defensive guardian, this is closer to a usable training loop than just looking at general coding ability.
How the reward is defined came up in the comments. Phil Mizrahi asked whether patches are rewarded for passing tests or for making the exploit fail. Ben replied that both types of verifiers will be involved, depending on the task, and that more data details will be added next week. The answer leaves room for interpretation, but it also highlights the key point: passing tests and attack failure are not the same thing, and verifier design directly determines what the model learns.
Another challenge was more direct. Simon Ngoy said the same knowledge Qwen uses to fix vulnerabilities could also be used by attackers against other systems, even if you have a guardian. Ben acknowledged this but stressed that this version has gone through RL and will perform better on defense. That tension won't disappear because of one reply. The difference between an open-source defensive model and open-source offensive capability often comes down to intent. The author later mentioned that when someone asked whether he would build a high-quality dataset for the offensive side, his answer was 'probably cant handle the heat,' and that the next step is science.
There was a small hiccup on the dataset side. Stefan Boesen found that the UltraCyber dataset link returned a 404 and asked when it would be available. Ben then fixed the link and shared training progress: the canary run has finished, the main run has just started, and metrics have been pushed to the live page.
Those who want to follow along can start from two entry points: on the recipe page, select cyber/Qwen4-35B-A3B; the link already includes the task=train, platform=hf_jobs, and harness parameters. Training metrics are on the ultra-cyber-live page. Full details on the dataset and evaluation are still to come from the author. What can be confirmed now is that this work breaks defensive patching training down from a slogan into an executable agent, verifier, reward, and training task. Whether it can become a reliable local guardian will depend on the results of the main run and on whether the verifier can define 'fixed' clearly.
Original tweet: https://x.com/ben_burtenshaw/status/2128866928173466031
发布时间: 2026-12-05 11:31