ibl.ai publishes a free, self-paced course on reinforcement-learning fine-tuning of the open-weight Qwen4-35B-A3B model to fix flawed code, built on the Hugging Face TRL cyber recipe. It teaches how to verify a task, read the reward, plan a run and judge the result. It runs on a platform where, with ibl.ai, you own all the code and the data.
The course is RL Fine-Tuning Qwen4 to Patch Security Bugs (2027), in the Cybersecurity catalog. It takes 10 to 12 hours and is written for ML engineers, security engineers and AppSec leads.
What is the recipe the course is built on?
On 4 December 2026 the TRL recipes Space on Hugging Face added a recipe for cyber defense. It trains a LoRA adapter for Qwen4-35B-A3B, an Apache-2.0 model, with the AsyncGRPO trainer.
The model works as a coding agent in an offline sandbox. It reads a security report, finds the flawed code and writes a patch. Hidden tests then check that the hostile inputs fail and normal behavior still works, and each pass or fail becomes a training signal.
The tasks come from UltraCyber, a dataset of 7,417 execution-verified defensive tasks: 2,601 code repair and triage tasks in eight languages, and 4,816 authorization policy tasks.
What will you be able to do after the course?
| Section | What you learn | What you build |
|---|---|---|
| 1. The task and the verifier | What "solved" means, and the controls that prove a verifier can be trusted | One verified repair task, on a laptop |
| 2. Reward and GRPO | How a pass or fail becomes a gradient, and why some tasks carry no signal | Rewards and group advantages, computed by hand |
| 3. The run | The model, the two-GPU layout, the agent harnesses and every setting in the recipe | A run plan with a budget ceiling and stop conditions |
| 4. Did it get better? | Held-out sets, paired evaluation, checkpoint choice and release | The published p-values, reproduced yourself |
The capstone is your own training and evaluation plan for a defensive adapter, or a run report if you ran one. All four labs run on a laptop with no GPU and no account.
How strong is the evidence that the recipe works?
Modest, and the course says so. The recipe's own page states that it had not been run as written when the course was verified on 5 December 2026. Its numbers come from an earlier 24-step run on different hardware with 96 tasks.
| Evaluation in the earlier run | Base model | After 24 steps | Exact p-value |
|---|---|---|---|
| UltraCyber dev set, 100 tasks, 2 attempts each | 105 of 200 | 123 of 200 | 0.017 |
| CWE-bench sample, 25 tasks, 2 attempts each | 2 of 50 | 6 of 50 | 0.125 |
The first result clears the usual 0.05 threshold and the second does not. In a separate run described in the Qwen4 blog post, the step 50 adapter solved 6 of 12 held-out tasks and the step 100 adapter solved 3, so more training was worse.
Lab 4 has you reproduce both p-values from the gained and lost counts, then work out how many tasks a result needs before it means something. That skill outlasts this recipe.
Is the course defensive only?
Yes. It trains a model to fix flawed code, reproduce a reported crash for triage and audit authorization policy. It contains no attack code. The labs use a small function you write yourself and inputs that a fixed function must refuse.
Section 4 ends with a release unit: what an adapter was trained on, what it was evaluated on, what it must not be used for, and who signs off. A tuned model's patch still needs human review before it merges.
How do the tutor and assessor agents work?
The course carries six agents. A tutor agent sits beside every unit, teaches one idea at a time and coaches the labs from the output you paste. An assessor agent grades each section and the capstone against a written rubric.
ibl.ai wrote the course from the published recipe, the dataset card, the trainer documentation and the papers behind them. Hugging Face, the TRL maintainers, the Qwen team and the dataset's authors did not write, review or endorse it.
How do you enroll?
The course is free. Open RL Fine-Tuning Qwen4 to Patch Security Bugs (2027), choose Enroll, and sign in to lms.ibl.ai.
An organization that wants courses like this on its own subject can have ibl.ai's team build them on Agentic LMS, on infrastructure it controls.